]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/sinfo.ads
d952b3c2c219f737322bb4bd9a4fa2b9fb8ad2ee
[thirdparty/gcc.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2021, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
25
26 -- This package defines the structure of the abstract syntax tree. The Tree
27 -- package provides a basic tree structure. Sinfo describes how this structure
28 -- is used to represent the syntax of an Ada program.
29
30 -- The grammar in the RM is followed very closely in the tree design, and is
31 -- repeated as part of this source file.
32
33 -- The tree contains not only the full syntactic representation of the
34 -- program, but also the results of semantic analysis. In particular, the
35 -- nodes for defining identifiers, defining character literals, and defining
36 -- operator symbols, collectively referred to as entities, represent what
37 -- would normally be regarded as the symbol table information. In addition a
38 -- number of the tree nodes contain semantic information.
39
40 -- WARNING: Several files are automatically generated from this package.
41 -- See below for details.
42
43 with Namet; use Namet;
44 with Types; use Types;
45 with Uintp; use Uintp;
46 with Urealp; use Urealp;
47
48 package Sinfo is
49
50 ---------------------------------
51 -- Making Changes to This File --
52 ---------------------------------
53
54 -- If changes are made to this file, a number of related steps must be
55 -- carried out to ensure consistency. First, if a field access function is
56 -- added, it appears in these places:
57
58 -- In sinfo.ads:
59 -- The documentation associated with the field (if semantic)
60 -- The documentation associated with the node
61 -- The spec of the access function
62 -- The spec of the set procedure
63 -- The entries in Is_Syntactic_Field
64 -- The pragma Inline for the access function
65 -- The pragma Inline for the set procedure
66 -- In sinfo.adb:
67 -- The body of the access function
68 -- The body of the set procedure
69
70 -- The field chosen must be consistent in all places, and, for a node that
71 -- is a subexpression, must not overlap any of the standard expression
72 -- fields.
73
74 -- In addition, if any of the standard expression fields is changed, then
75 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
76 -- must be updated appropriately, since it special cases expression fields.
77
78 -- If a new tree node is added, then the following changes are made:
79
80 -- Add it to the documentation in the appropriate place
81 -- Add its fields to this documentation section
82 -- Define it in the appropriate classification in Node_Kind
83 -- Add an entry in Is_Syntactic_Field
84 -- In the body (sinfo), add entries to the access functions for all
85 -- its fields (except standard expression fields) to include the new
86 -- node in the checks.
87 -- Add an appropriate section to the case statement in sprint.adb
88 -- Add an appropriate section to the case statement in sem.adb
89 -- Add an appropriate section to the case statement in exp_util.adb
90 -- (Insert_Actions procedure)
91 -- For a subexpression, add an appropriate section to the case
92 -- statement in sem_eval.adb
93 -- For a subexpression, add an appropriate section to the case
94 -- statement in sem_res.adb
95
96 -- All back ends must be made aware of the new node kind.
97
98 -- Finally, four utility programs must be run:
99
100 -- (Optional.) Run CSinfo to check that you have made the changes
101 -- consistently. It checks most of the rules given above. This utility
102 -- reads sinfo.ads and sinfo.adb and generates a report to standard
103 -- output. This step is optional because XSinfo runs CSinfo.
104
105 -- Run XSinfo to create sinfo.h, the corresponding C header. This
106 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
107 -- not need to read sinfo.adb, since the contents of the body are
108 -- algorithmically determinable from the spec.
109
110 -- Run XTreeprs to create treeprs.ads, an updated version of the module
111 -- that is used to drive the tree print routine. This utility reads (but
112 -- does not modify) treeprs.adt, the template that provides the basic
113 -- structure of the file, and then fills in the data from the comments
114 -- in sinfo.ads.
115
116 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
117 -- spec of the Nmake package which contains functions for constructing
118 -- nodes.
119
120 -- The above steps are done automatically by the build scripts when you do
121 -- a full bootstrap.
122
123 -- Note: sometime we could write a utility that actually generated the body
124 -- of sinfo from the spec instead of simply checking it, since, as noted
125 -- above, the contents of the body can be determined from the spec.
126
127 --------------------------------
128 -- Implicit Nodes in the Tree --
129 --------------------------------
130
131 -- Generally the structure of the tree very closely follows the grammar as
132 -- defined in the RM. However, certain nodes are omitted to save space and
133 -- simplify semantic processing. Two general classes of such omitted nodes
134 -- are as follows:
135
136 -- If the only possibilities for a non-terminal are one or more other
137 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
138 -- corresponding node is omitted from the tree, and the target construct
139 -- appears directly. For example, a real type definition is either
140 -- floating point definition or a fixed point definition. No explicit node
141 -- appears for real type definition. Instead either the floating point
142 -- definition or fixed point definition appears directly.
143
144 -- If a non-terminal corresponds to a list of some other non-terminal
145 -- (possibly with separating punctuation), then usually it is omitted from
146 -- the tree, and a list of components appears instead. For example,
147 -- sequence of statements does not appear explicitly in the tree. Instead
148 -- a list of statements appears directly.
149
150 -- Some additional cases of omitted nodes occur and are documented
151 -- individually. In particular, many nodes are omitted in the tree
152 -- generated for an expression.
153
154 -------------------------------------------
155 -- Handling of Defining Identifier Lists --
156 -------------------------------------------
157
158 -- In several declarative forms in the syntax, lists of defining
159 -- identifiers appear (object declarations, component declarations, number
160 -- declarations etc.)
161
162 -- The semantics of such statements are equivalent to a series of identical
163 -- declarations of single defining identifiers (except that conformance
164 -- checks require the same grouping of identifiers in the parameter case).
165
166 -- To simplify semantic processing, the parser breaks down such multiple
167 -- declaration cases into sequences of single declarations, duplicating
168 -- type and initialization information as required. The flags More_Ids and
169 -- Prev_Ids are used to record the original form of the source in the case
170 -- where the original source used a list of names, More_Ids being set on
171 -- all but the last name and Prev_Ids being set on all but the first name.
172 -- These flags are used to reconstruct the original source (e.g. in the
173 -- Sprint package), and also are included in the conformance checks, but
174 -- otherwise have no semantic significance.
175
176 -- Note: the reason that we use More_Ids and Prev_Ids rather than
177 -- First_Name and Last_Name flags is so that the flags are off in the
178 -- normal one identifier case, which minimizes tree print output.
179
180 -----------------------
181 -- Use of Node Lists --
182 -----------------------
183
184 -- With a few exceptions, if a construction of the form {non-terminal}
185 -- appears in the tree, lists are used in the corresponding tree node (see
186 -- package Nlists for handling of node lists). In this case a field of the
187 -- parent node points to a list of nodes for the non-terminal. The field
188 -- name for such fields has a plural name which always ends in "s". For
189 -- example, a case statement has a field Alternatives pointing to list of
190 -- case statement alternative nodes.
191
192 -- Only fields pointing to lists have names ending in "s", so generally the
193 -- structure is strongly typed, fields not ending in s point to single
194 -- nodes, and fields ending in s point to lists.
195
196 -- The following example shows how a traversal of a list is written. We
197 -- suppose here that Stmt points to a N_Case_Statement node which has a
198 -- list field called Alternatives:
199
200 -- Alt := First (Alternatives (Stmt));
201 -- while Present (Alt) loop
202 -- ..
203 -- -- processing for case statement alternative Alt
204 -- ..
205 -- Alt := Next (Alt);
206 -- end loop;
207
208 -- The Present function tests for Empty, which in this case signals the end
209 -- of the list. First returns Empty immediately if the list is empty.
210 -- Present is defined in Atree; First and Next are defined in Nlists.
211
212 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
213 -- contexts, which is handled as described in the previous section, and
214 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
215 -- using the First_Name and Last_Name flags, as further detailed in the
216 -- description of the N_With_Clause node.
217
218 -------------
219 -- Pragmas --
220 -------------
221
222 -- Pragmas can appear in many different context, but are not included in
223 -- the grammar. Still they must appear in the tree, so they can be properly
224 -- processed.
225
226 -- Two approaches are used. In some cases, an extra field is defined in an
227 -- appropriate node that contains a list of pragmas appearing in the
228 -- expected context. For example pragmas can appear before an
229 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
230 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
231
232 -- The other approach is to simply allow pragmas to appear in syntactic
233 -- lists where the grammar (of course) does not include the possibility.
234 -- For example, the Variants field of an N_Variant_Part node points to a
235 -- list that can contain both N_Pragma and N_Variant nodes.
236
237 -- To make processing easier in the latter case, the Nlists package
238 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
239 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
240 -- ignoring all pragmas.
241
242 -- In the case of the variants list, we can either write:
243
244 -- Variant := First (Variants (N));
245 -- while Present (Variant) loop
246 -- ...
247 -- Variant := Next (Variant);
248 -- end loop;
249
250 -- or
251
252 -- Variant := First_Non_Pragma (Variants (N));
253 -- while Present (Variant) loop
254 -- ...
255 -- Variant := Next_Non_Pragma (Variant);
256 -- end loop;
257
258 -- In the first form of the loop, Variant can either be an N_Pragma or an
259 -- N_Variant node. In the second form, Variant can only be N_Variant since
260 -- all pragmas are skipped.
261
262 ---------------------
263 -- Optional Fields --
264 ---------------------
265
266 -- Fields which correspond to a section of the syntax enclosed in square
267 -- brackets are generally omitted (and the corresponding field set to Empty
268 -- for a node, or No_List for a list). The documentation of such fields
269 -- notes these cases. One exception to this rule occurs in the case of
270 -- possibly empty statement sequences (such as the sequence of statements
271 -- in an entry call alternative). Such cases appear in the syntax rules as
272 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
273 -- statement sequences always contain an empty list (not No_List) if no
274 -- statements are present.
275
276 -- Note: the utility program that constructs the body and spec of the Nmake
277 -- package relies on the format of the comments to determine if a field
278 -- should have a default value in the corresponding make routine. The rule
279 -- is that if the first line of the description of the field contains the
280 -- string "(set to xxx if", then a default value of xxx is provided for
281 -- this field in the corresponding Make_yyy routine.
282
283 -----------------------------------
284 -- Note on Body/Spec Terminology --
285 -----------------------------------
286
287 -- In informal discussions about Ada, it is customary to refer to package
288 -- and subprogram specs and bodies. However, this is not technically
289 -- correct, what is normally referred to as a spec or specification is in
290 -- fact a package declaration or subprogram declaration. We are careful in
291 -- GNAT to use the correct terminology and in particular, the full word
292 -- specification is never used as an incorrect substitute for declaration.
293 -- The structure and terminology used in the tree also reflects the grammar
294 -- and thus uses declaration and specification in the technically correct
295 -- manner.
296
297 -- However, there are contexts in which the informal terminology is useful.
298 -- We have the word "body" to refer to the Interp_Etype declared by the
299 -- declaration of a unit body, and in some contexts we need similar term to
300 -- refer to the entity declared by the package or subprogram declaration,
301 -- and simply using declaration can be confusing since the body also has a
302 -- declaration.
303
304 -- An example of such a context is the link between the package body and
305 -- its declaration. With_Declaration is confusing, since the package body
306 -- itself is a declaration.
307
308 -- To deal with this problem, we reserve the informal term Spec, i.e. the
309 -- popular abbreviation used in this context, to refer to the entity
310 -- declared by the package or subprogram declaration. So in the above
311 -- example case, the field in the body is called With_Spec.
312
313 -- Another important context for the use of the word Spec is in error
314 -- messages, where a hyper-correct use of declaration would be confusing to
315 -- a typical Ada programmer, and even for an expert programmer can cause
316 -- confusion since the body has a declaration as well.
317
318 -- So, to summarize:
319
320 -- Declaration always refers to the syntactic entity that is called
321 -- a declaration. In particular, subprogram declaration
322 -- and package declaration are used to describe the
323 -- syntactic entity that includes the semicolon.
324
325 -- Specification always refers to the syntactic entity that is called
326 -- a specification. In particular, the terms procedure
327 -- specification, function specification, package
328 -- specification, subprogram specification always refer
329 -- to the syntactic entity that has no semicolon.
330
331 -- Spec is an informal term, used to refer to the entity
332 -- that is declared by a task declaration, protected
333 -- declaration, generic declaration, subprogram
334 -- declaration or package declaration.
335
336 -- This convention is followed throughout the GNAT documentation
337 -- both internal and external, and in all error message text.
338
339 ------------------------
340 -- Internal Use Nodes --
341 ------------------------
342
343 -- These are Node_Kind settings used in the internal implementation which
344 -- are not logically part of the specification.
345
346 -- N_Unused_At_Start
347 -- Completely unused entry at the start of the enumeration type. This
348 -- is inserted so that no legitimate value is zero, which helps to get
349 -- better debugging behavior, since zero is a likely uninitialized value).
350
351 -- N_Unused_At_End
352 -- Completely unused entry at the end of the enumeration type. This is
353 -- handy so that arrays with Node_Kind as the index type have an extra
354 -- entry at the end (see for example the use of the Pchar_Pos_Array in
355 -- Treepr, where the extra entry provides the limit value when dealing with
356 -- the last used entry in the array).
357
358 -----------------------------------------
359 -- Note on the settings of Sloc fields --
360 -----------------------------------------
361
362 -- The Sloc field of nodes that come from the source is set by the parser.
363 -- For internal nodes, and nodes generated during expansion the Sloc is
364 -- usually set in the call to the constructor for the node. In general the
365 -- Sloc value chosen for an internal node is the Sloc of the source node
366 -- whose processing is responsible for the expansion. For example, the Sloc
367 -- of an inherited primitive operation is the Sloc of the corresponding
368 -- derived type declaration.
369
370 -- For the nodes of a generic instantiation, the Sloc value is encoded to
371 -- represent both the original Sloc in the generic unit, and the Sloc of
372 -- the instantiation itself. See Sinput.ads for details.
373
374 -- Subprogram instances create two callable entities: one is the visible
375 -- subprogram instance, and the other is an anonymous subprogram nested
376 -- within a wrapper package that contains the renamings for the actuals.
377 -- Both of these entities have the Sloc of the defining entity in the
378 -- instantiation node. This simplified for instance in the past some ASIS
379 -- queries.
380
381 -----------------------
382 -- Field Definitions --
383 -----------------------
384
385 -- In the following node definitions, all fields, both syntactic and
386 -- semantic, are documented. The one exception is in the case of entities
387 -- (defining identifiers, character literals, and operator symbols), where
388 -- the usage of the fields depends on the entity kind. Entity fields are
389 -- fully documented in the separate package Einfo.
390
391 -- In the node definitions, three common sets of fields are abbreviated to
392 -- save both space in the documentation, and also space in the string
393 -- (defined in Tree_Print_Strings) used to print trees. The following
394 -- abbreviations are used:
395
396 -- "plus fields for binary operator"
397 -- Chars (Name1) Name_Id for the operator
398 -- Left_Opnd (Node2) left operand expression
399 -- Right_Opnd (Node3) right operand expression
400 -- Entity (Node4-Sem) defining entity for operator
401 -- Associated_Node (Node4-Sem) for generic processing
402 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
403 -- Has_Private_View (Flag11-Sem) set in generic units.
404
405 -- "plus fields for unary operator"
406 -- Chars (Name1) Name_Id for the operator
407 -- Right_Opnd (Node3) right operand expression
408 -- Entity (Node4-Sem) defining entity for operator
409 -- Associated_Node (Node4-Sem) for generic processing
410 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
411 -- Has_Private_View (Flag11-Sem) set in generic units.
412
413 -- "plus fields for expression"
414 -- Paren_Count number of parentheses levels
415 -- Etype (Node5-Sem) type of the expression
416 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
417 -- Is_Static_Expression (Flag6-Sem) set for static expression
418 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
419 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
420 -- Do_Range_Check (Flag9-Sem) set if a range check needed
421 -- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
422 -- Assignment_OK (Flag15-Sem) set if modification is OK
423 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
424
425 -- Note: the utility program that creates the Treeprs spec (in the file
426 -- xtreeprs.adb) knows about the special fields here, so it must be
427 -- modified if any change is made to these fields.
428
429 -- Note: see under (EXPRESSION) for further details on the use of
430 -- the Paren_Count field to record the number of parentheses levels.
431
432 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
433 -- The actual definition of this type is given later (the reason for this
434 -- is that we want the descriptions ordered by logical chapter in the RM,
435 -- but the type definition is reordered to facilitate the definition of
436 -- some subtype ranges. The individual descriptions of the nodes show how
437 -- the various fields are used in each node kind, as well as providing
438 -- logical names for the fields. Functions and procedures are provided for
439 -- accessing and setting these fields using these logical names.
440
441 -----------------------
442 -- Gigi Restrictions --
443 -----------------------
444
445 -- The tree passed to Gigi is more restricted than the general tree form.
446 -- For example, as a result of expansion, most of the tasking nodes can
447 -- never appear. For each node to which either a complete or partial
448 -- restriction applies, a note entitled "Gigi restriction" appears which
449 -- documents the restriction.
450
451 -- Note that most of these restrictions apply only to trees generated when
452 -- code is being generated, since they involved expander actions that
453 -- destroy the tree.
454
455 ----------------
456 -- Ghost Mode --
457 ----------------
458
459 -- The SPARK RM 6.9 defines two classes of constructs - Ghost entities and
460 -- Ghost statements. The intent of the feature is to treat Ghost constructs
461 -- as non-existent when Ghost assertion policy Ignore is in effect.
462 --
463 -- The corresponding nodes which map to Ghost constructs are:
464 --
465 -- Ghost entities
466 -- Declaration nodes
467 -- N_Package_Body
468 -- N_Subprogram_Body
469 --
470 -- Ghost statements
471 -- N_Assignment_Statement
472 -- N_Procedure_Call_Statement
473 -- N_Pragma
474 --
475 -- In addition, the compiler treats instantiations as Ghost entities
476 --
477 -- To achieve the removal of ignored Ghost constructs, the compiler relies
478 -- on global variables Ghost_Mode and Ignored_Ghost_Region, which comprise
479 -- a mechanism called "Ghost regions".
480 --
481 -- The values of Ghost_Mode are as follows:
482 --
483 -- 1. Check - All static semantics as defined in SPARK RM 6.9 are in
484 -- effect. The Ghost region has mode Check.
485 --
486 -- 2. Ignore - Same as Check, ignored Ghost code is not present in ALI
487 -- files, object files, and the final executable. The Ghost region
488 -- has mode Ignore.
489 --
490 -- 3. None - No Ghost region is in effect
491 --
492 -- The value of Ignored_Ghost_Region captures the node which initiates an
493 -- ignored Ghost region.
494 --
495 -- A Ghost region is a compiler operating mode, similar to Check_Syntax,
496 -- however a region is much more finely grained and depends on the policy
497 -- in effect. The region starts prior to the analysis of a Ghost construct
498 -- and ends immediately after its expansion. The region is established as
499 -- follows:
500 --
501 -- 1. Declarations - Prior to analysis, if the declaration is subject to
502 -- pragma Ghost.
503 --
504 -- 2. Renaming declarations - Same as 1) or when the renamed entity is
505 -- Ghost.
506 --
507 -- 3. Completing declarations - Same as 1) or when the declaration is
508 -- partially analyzed and the declaration completes a Ghost entity.
509 --
510 -- 4. N_Package_Body, N_Subprogram_Body - Same as 1) or when the body is
511 -- partially analyzed and completes a Ghost entity.
512 --
513 -- 5. N_Assignment_Statement - After the left hand side is analyzed and
514 -- references a Ghost entity.
515 --
516 -- 6. N_Procedure_Call_Statement - After the name is analyzed and denotes
517 -- a Ghost procedure.
518 --
519 -- 7. N_Pragma - During analysis, when the related entity is Ghost or the
520 -- pragma encloses a Ghost entity.
521 --
522 -- 8. Instantiations - Save as 1) or when the instantiation is partially
523 -- analyzed and the generic template is Ghost.
524 --
525 -- The following routines install a new Ghost region:
526 --
527 -- Install_Ghost_Region
528 -- Mark_And_Set_Ghost_xxx
529 -- Set_Ghost_Mode
530 --
531 -- The following routine ends a Ghost region:
532 --
533 -- Restore_Ghost_Region
534 --
535 -- A region may be reinstalled similarly to scopes for decoupled expansion
536 -- such as the generation of dispatch tables or the creation of a predicate
537 -- function.
538 --
539 -- If the mode of a Ghost region is Ignore, any newly created nodes as well
540 -- as source entities are marked as ignored Ghost. In additon, the marking
541 -- process signals all enclosing scopes that an ignored Ghost node resides
542 -- within. The compilation unit where the node resides is also added to an
543 -- auxiliary table for post processing.
544 --
545 -- After the analysis and expansion of all compilation units takes place
546 -- as well as the instantiation of all inlined [generic] bodies, the GNAT
547 -- driver initiates a separate pass which removes all ignored Ghost nodes
548 -- from all units stored in the auxiliary table.
549
550 --------------------
551 -- GNATprove Mode --
552 --------------------
553
554 -- When a file is compiled in GNATprove mode (-gnatd.F), a very light
555 -- expansion is performed and the analysis must generate a tree in a
556 -- form that meets additional requirements.
557
558 -- This light expansion does two transformations of the tree that cannot
559 -- be postponed till after semantic analysis:
560
561 -- 1. Replace object renamings by renamed object. This requires the
562 -- introduction of temporaries at the point of the renaming, which
563 -- must be properly analyzed.
564
565 -- 2. Fully qualify entity names. This is needed to generate suitable
566 -- local effects and call-graphs in ALI files, with the completely
567 -- qualified names (in particular the suffix to distinguish homonyms).
568
569 -- The tree after this light expansion should be fully analyzed
570 -- semantically, which sometimes requires the insertion of semantic
571 -- preanalysis, for example for subprogram contracts and pragma
572 -- check/assert. In particular, all expression must have their proper type,
573 -- and semantic links should be set between tree nodes (partial to full
574 -- view, etc.) Some kinds of nodes should be either absent, or can be
575 -- ignored by the formal verification backend:
576
577 -- N_Object_Renaming_Declaration: can be ignored safely
578 -- N_Expression_Function: absent (rewritten)
579 -- N_Expression_With_Actions: absent (not generated)
580
581 -- SPARK cross-references are generated from the regular cross-references
582 -- (used for browsing and code understanding) and additional references
583 -- collected during semantic analysis, in particular on all dereferences.
584 -- These SPARK cross-references are output in a separate section of ALI
585 -- files, as described in spark_xrefs.adb. They are the basis for the
586 -- computation of data dependences in GNATprove. This implies that all
587 -- cross-references should be generated in this mode, even those that would
588 -- not make sense from a user point-of-view, and that cross-references that
589 -- do not lead to data dependences for subprograms can be safely ignored.
590
591 -- GNATprove relies on the following front end behaviors:
592
593 -- 1. The first declarations in the list of visible declarations of
594 -- a package declaration for a generic instance, up to the first
595 -- declaration which comes from source, should correspond to
596 -- the "mappings nodes" between formal and actual generic parameters.
597
598 -- 2. In addition pragma Debug statements are removed from the tree
599 -- (rewritten to NULL stmt), since they should be ignored in formal
600 -- verification.
601
602 -- 3. An error is also issued for missing subunits, similar to the
603 -- warning issued when generating code, to avoid formal verification
604 -- of a partial unit.
605
606 -- 4. Unconstrained types are not replaced by constrained types whose
607 -- bounds are generated from an expression: Expand_Subtype_From_Expr
608 -- should be a no-op.
609
610 -- 5. Errors (instead of warnings) are issued on compile-time-known
611 -- constraint errors even though such cases do not correspond to
612 -- illegalities in the Ada RM (this is simply another case where
613 -- GNATprove implements a subset of the full language).
614 --
615 -- However, there are a few exceptions to this rule for cases where
616 -- we want to allow the GNATprove analysis to proceed (e.g. range
617 -- checks on empty ranges, which typically appear in deactivated
618 -- code in a particular configuration).
619
620 -- 6. Subtypes should match in the AST, even after a generic is
621 -- instantiated. In particular, GNATprove relies on the fact that,
622 -- on a selected component, the type of the selected component is
623 -- the type of the corresponding component in the prefix of the
624 -- selected component.
625 --
626 -- Note that, in some cases, we know that this rule is broken by the
627 -- frontend. In particular, if the selected component is a packed
628 -- array depending on a discriminant of a unconstrained formal object
629 -- parameter of a generic.
630
631 ----------------
632 -- SPARK Mode --
633 ----------------
634
635 -- The SPARK RM 1.6.5 defines a mode of operation called "SPARK mode" which
636 -- starts a scope where the SPARK language semantics are either On, Off, or
637 -- Auto, where Auto leaves the choice to the tools. A SPARK mode may be
638 -- specified by means of an aspect or a pragma.
639
640 -- The following entities may be subject to a SPARK mode. Entities marked
641 -- with * may possess two differente SPARK modes.
642
643 -- E_Entry
644 -- E_Entry_Family
645 -- E_Function
646 -- E_Generic_Function
647 -- E_Generic_Package *
648 -- E_Generic_Procedure
649 -- E_Operator
650 -- E_Package *
651 -- E_Package_Body *
652 -- E_Procedure
653 -- E_Protected_Body
654 -- E_Protected_Subtype
655 -- E_Protected_Type *
656 -- E_Subprogram_Body
657 -- E_Task_Body
658 -- E_Task_Subtype
659 -- E_Task_Type *
660 -- E_Variable
661
662 -- In order to manage SPARK scopes, the compiler relies on global variables
663 -- SPARK_Mode and SPARK_Mode_Pragma and a mechanism called "SPARK regions."
664 -- Routines Install_SPARK_Mode and Set_SPARK_Mode create a new SPARK region
665 -- and routine Restore_SPARK_Mode ends a SPARK region. A region may be
666 -- reinstalled similarly to scopes.
667
668 -----------------------
669 -- Check Flag Fields --
670 -----------------------
671
672 -- The following flag fields appear in expression nodes:
673
674 -- Do_Division_Check
675 -- Do_Overflow_Check
676 -- Do_Range_Check
677
678 -- These three flags are always set by the front end during semantic
679 -- analysis, on expression nodes that may trigger the corresponding
680 -- check. The front end then inserts or not the check during expansion. In
681 -- particular, these flags should also be correctly set in GNATprove mode.
682 -- As a special case, the front end does not insert a Do_Division_Check
683 -- flag on float exponentiation expressions, for the case where the value
684 -- is 0.0 and the exponent is negative, although this case does lead to a
685 -- division check failure. As another special case, the front end does not
686 -- insert a Do_Range_Check on an allocator where the designated type is
687 -- scalar, and the designated type is more constrained than the type of the
688 -- initialized allocator value or the type of the default value for an
689 -- uninitialized allocator.
690
691 -- Note that the expander always takes care of the Do_Range_Check case, so
692 -- this flag will never be set in the expanded tree passed to the back end.
693 -- For the other two flags, the check can be generated either by the back
694 -- end or by the front end, depending on the setting of a target parameter.
695
696 -- Note that this accounts for all nodes that trigger the corresponding
697 -- checks, except for range checks on subtype_indications, which may be
698 -- required to check that a range_constraint is compatible with the given
699 -- subtype (RM 3.2.2(11)).
700
701 -- The following flag fields appear in various nodes:
702
703 -- Do_Accessibility_Check
704 -- Do_Discriminant_Check
705 -- Do_Length_Check
706 -- Do_Storage_Check
707 -- Do_Tag_Check
708
709 -- These flags are used in some specific cases by the front end, either
710 -- during semantic analysis or during expansion, and cannot be expected
711 -- to be set on all nodes that trigger the corresponding check.
712
713 ------------------------
714 -- Common Flag Fields --
715 ------------------------
716
717 -- The following flag fields appear in all nodes:
718
719 -- Analyzed
720 -- This flag is used to indicate that a node (and all its children) have
721 -- been analyzed. It is used to avoid reanalysis of a node that has
722 -- already been analyzed, both for efficiency and functional correctness
723 -- reasons.
724
725 -- Comes_From_Source
726 -- This flag is set if the node comes directly from an explicit construct
727 -- in the source. It is normally on for any nodes built by the scanner or
728 -- parser from the source program, with the exception that in a few cases
729 -- the parser adds nodes to normalize the representation (in particular
730 -- a null statement is added to a package body if there is no begin/end
731 -- initialization section.
732 --
733 -- Most nodes inserted by the analyzer or expander are not considered
734 -- as coming from source, so the flag is off for such nodes. In a few
735 -- cases, the expander constructs nodes closely equivalent to nodes
736 -- from the source program (e.g. the allocator built for build-in-place
737 -- case), and the Comes_From_Source flag is deliberately set.
738
739 -- Error_Posted
740 -- This flag is used to avoid multiple error messages being posted on or
741 -- referring to the same node. This flag is set if an error message
742 -- refers to a node or is posted on its source location, and has the
743 -- effect of inhibiting further messages involving this same node.
744
745 -----------------------
746 -- Modify_Tree_For_C --
747 -----------------------
748
749 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
750 -- in ways that help match the semantics better with C, easing the task of
751 -- interfacing to C code generators (other than GCC, where the work is done
752 -- in gigi, and there is no point in changing that), and also making life
753 -- easier for Cprint in generating C source code.
754
755 -- The current modifications implemented are as follows:
756
757 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
758 -- are eliminated from the tree (since these operations do not exist in
759 -- C), and the operations are rewritten in terms of logical shifts and
760 -- other logical operations that do exist in C. See Exp_Ch4 expansion
761 -- routines for these operators for details of the transformations made.
762
763 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
764 -- less than the word size (since other values are not well-defined in
765 -- C). This is done using an explicit test if necessary.
766
767 -- Min and Max attributes are expanded into equivalent if expressions,
768 -- dealing properly with side effect issues.
769
770 -- Mod for signed integer types is expanded into equivalent expressions
771 -- using Rem (which is % in C) and other C-available operators.
772
773 -- Functions returning bounded arrays are transformed into procedures
774 -- with an extra out parameter, and the calls updated accordingly.
775
776 -- Aggregates are only kept unexpanded for object declarations, otherwise
777 -- they are systematically expanded into loops (for arrays) and
778 -- individual assignments (for records).
779
780 -- Unconstrained array types are handled by means of fat pointers.
781
782 -- Postconditions are inlined by the frontend since their body may have
783 -- references to itypes defined in the enclosing subprogram.
784
785 ------------------------------------
786 -- Description of Semantic Fields --
787 ------------------------------------
788
789 -- The meaning of the syntactic fields is generally clear from their names
790 -- without any further description, since the names are chosen to
791 -- correspond very closely to the syntax in the reference manual. This
792 -- section describes the usage of the semantic fields, which are used to
793 -- contain additional information determined during semantic analysis.
794
795 -- Accept_Handler_Records (List5-Sem)
796 -- This field is present only in an N_Accept_Alternative node. It is used
797 -- to temporarily hold the exception handler records from an accept
798 -- statement in a selective accept. These exception handlers will
799 -- eventually be placed in the Handler_Records list of the procedure
800 -- built for this accept (see Expand_N_Selective_Accept procedure in
801 -- Exp_Ch9 for further details).
802
803 -- Access_Types_To_Process (Elist2-Sem)
804 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
805 -- Contains the list of access types which may require specific treatment
806 -- when the nature of the type completion is completely known. An example
807 -- of such treatment is the generation of the associated_final_chain.
808
809 -- Actions (List1-Sem)
810 -- This field contains a sequence of actions that are associated with the
811 -- node holding the field. See the individual node types for details of
812 -- how this field is used, as well as the description of the specific use
813 -- for a particular node type.
814
815 -- Activation_Chain_Entity (Node3-Sem)
816 -- This is used in tree nodes representing task activators (blocks,
817 -- subprogram bodies, package declarations, and task bodies). It is
818 -- initially Empty, and then gets set to point to the entity for the
819 -- declared Activation_Chain variable when the first task is declared.
820 -- When tasks are declared in the corresponding declarative region this
821 -- entity is located by name (its name is always _Chain) and the declared
822 -- tasks are added to the chain. Note that N_Extended_Return_Statement
823 -- does not have this attribute, although it does have an activation
824 -- chain. This chain is used to store the tasks temporarily, and is not
825 -- used for activating them. On successful completion of the return
826 -- statement, the tasks are moved to the caller's chain, and the caller
827 -- activates them.
828
829 -- Acts_As_Spec (Flag4-Sem)
830 -- A flag set in the N_Subprogram_Body node for a subprogram body which
831 -- is acting as its own spec. In the case of a library-level subprogram
832 -- the flag is set as well on the parent compilation unit node.
833
834 -- Actual_Designated_Subtype (Node4-Sem)
835 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
836 -- needs to known the dynamic constrained subtype of the designated
837 -- object, this attribute is set to that type. This is done for
838 -- N_Free_Statements for access-to-classwide types and access to
839 -- unconstrained packed array types, and for N_Explicit_Dereference when
840 -- the designated type is an unconstrained packed array and the
841 -- dereference is the prefix of a 'Size attribute reference.
842
843 -- Address_Warning_Posted (Flag18-Sem)
844 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
845 -- posted a warning for the address clause regarding size or alignment
846 -- issues. Used to inhibit multiple redundant messages.
847
848 -- Aggregate_Bounds (Node3-Sem)
849 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
850 -- known at compile time, this field points to an N_Range node with those
851 -- bounds. Otherwise Empty.
852
853 -- Alloc_For_BIP_Return (Flag1-Sem)
854 -- Present in N_Allocator nodes. True if the allocator is one of those
855 -- generated for a build-in-place return statement.
856
857 -- All_Others (Flag11-Sem)
858 -- Present in an N_Others_Choice node. This flag is set for an others
859 -- exception where all exceptions are to be caught, even those that are
860 -- not normally handled (in particular the tasking abort signal). This
861 -- is used for translation of the at end handler into a normal exception
862 -- handler.
863
864 -- Aspect_On_Partial_View (Flag18)
865 -- Present on an N_Aspect_Specification node. For an aspect that applies
866 -- to a type entity, indicates whether the specification appears on the
867 -- partial view of a private type or extension. Undefined for aspects
868 -- that apply to other entities.
869
870 -- Aspect_Rep_Item (Node2-Sem)
871 -- Present in N_Aspect_Specification nodes. Points to the corresponding
872 -- pragma/attribute definition node used to process the aspect.
873
874 -- Assignment_OK (Flag15-Sem)
875 -- This flag is set in a subexpression node for an object, indicating
876 -- that the associated object can be modified, even if this would not
877 -- normally be permissible (either by direct assignment, or by being
878 -- passed as an out or in-out parameter). This is used by the expander
879 -- for a number of purposes, including initialization of constants and
880 -- limited type objects (such as tasks), setting discriminant fields,
881 -- setting tag values, etc. N_Object_Declaration nodes also have this
882 -- flag defined. Here it is used to indicate that an initialization
883 -- expression is valid, even where it would normally not be allowed
884 -- (e.g. where the type involved is limited). It is also used to stop
885 -- a Force_Evaluation call for an unchecked conversion, but this usage
886 -- is unclear and not documented ???
887
888 -- Associated_Node (Node4-Sem)
889 -- Present in nodes that can denote an entity: identifiers, character
890 -- literals, operator symbols, expanded names, operator nodes, and
891 -- attribute reference nodes (all these nodes have an Entity field).
892 -- This field is also present in N_Aggregate, N_Selected_Component, and
893 -- N_Extension_Aggregate nodes. This field is used in generic processing
894 -- to create links between the generic template and the generic copy.
895 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
896 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
897 -- the normal function of Entity is not required at the point where the
898 -- Associated_Node is set. Note also, that in generic templates, this
899 -- means that the Entity field does not necessarily point to an Entity.
900 -- Since the back end is expected to ignore generic templates, this is
901 -- harmless.
902
903 -- Atomic_Sync_Required (Flag14-Sem)
904 -- This flag is set on a node for which atomic synchronization is
905 -- required for the corresponding reference or modification.
906
907 -- At_End_Proc (Node1)
908 -- This field is present in an N_Handled_Sequence_Of_Statements node.
909 -- It contains an identifier reference for the cleanup procedure to be
910 -- called. See description of this node for further details.
911
912 -- Backwards_OK (Flag6-Sem)
913 -- A flag present in the N_Assignment_Statement node. It is used only
914 -- if the type being assigned is an array type, and is set if analysis
915 -- determines that it is definitely safe to do the copy backwards, i.e.
916 -- starting at the highest addressed element. This is the case if either
917 -- the operands do not overlap, or they may overlap, but if they do,
918 -- then the left operand is at a higher address than the right operand.
919 --
920 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
921 -- means that the front end could not determine that either direction is
922 -- definitely safe, and a runtime check may be required if the backend
923 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
924 -- set, it means that the front end can assure no overlap of operands.
925
926 -- Body_To_Inline (Node3-Sem)
927 -- Present in subprogram declarations. Denotes analyzed but unexpanded
928 -- body of subprogram, to be used when inlining calls. Present when the
929 -- subprogram has an Inline pragma and inlining is enabled. If the
930 -- declaration is completed by a renaming_as_body, and the renamed entity
931 -- is a subprogram, the Body_To_Inline is the name of that entity, which
932 -- is used directly in later calls to the original subprogram.
933
934 -- Body_Required (Flag13-Sem)
935 -- A flag that appears in the N_Compilation_Unit node indicating that
936 -- the corresponding unit requires a body. For the package case, this
937 -- indicates that a completion is required. In Ada 95, if the flag is not
938 -- set for the package case, then a body may not be present. In Ada 83,
939 -- if the flag is not set for the package case, then body is optional.
940 -- For a subprogram declaration, the flag is set except in the case where
941 -- a pragma Import or Interface applies, in which case no body is
942 -- permitted (in Ada 83 or Ada 95).
943
944 -- By_Ref (Flag5-Sem)
945 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
946 -- this flag is set when the returned expression is already allocated on
947 -- the secondary stack and thus the result is passed by reference rather
948 -- than copied another time.
949
950 -- Cleanup_Actions (List5-Sem)
951 -- Present in block statements created for transient blocks, contains
952 -- additional cleanup actions carried over from the transient scope.
953
954 -- Check_Address_Alignment (Flag11-Sem)
955 -- A flag present in N_Attribute_Definition clause for a 'Address
956 -- attribute definition. This flag is set if a dynamic check should be
957 -- generated at the freeze point for the entity to which this address
958 -- clause applies. The reason that we need this flag is that we want to
959 -- check for range checks being suppressed at the point where the
960 -- attribute definition clause is given, rather than testing this at the
961 -- freeze point.
962
963 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
964 -- Present in N_Simple_Return_Statement nodes. True if this node was
965 -- constructed as part of the N_Extended_Return_Statement expansion.
966
967 -- Compile_Time_Known_Aggregate (Flag18-Sem)
968 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
969 -- evaluated at compile time without raising constraint error. Such
970 -- aggregates can be passed as is to the back end without any expansion.
971 -- See Exp_Aggr for specific conditions under which this flag gets set.
972
973 -- Componentwise_Assignment (Flag14-Sem)
974 -- Present in N_Assignment_Statement nodes. Set for a record assignment
975 -- where all that needs doing is to expand it into component-by-component
976 -- assignments. This is used internally for the case of tagged types with
977 -- rep clauses, where we need to avoid recursion (we don't want to try to
978 -- generate a call to the primitive operation, because this is the case
979 -- where we are compiling the primitive operation). Note that when we are
980 -- expanding component assignments in this case, we never assign the _tag
981 -- field, but we recursively assign components of the parent type.
982
983 -- Condition_Actions (List3-Sem)
984 -- This field appears in else-if nodes and in the iteration scheme node
985 -- for while loops. This field is only used during semantic processing to
986 -- temporarily hold actions inserted into the tree. In the tree passed
987 -- to gigi, the condition actions field is always set to No_List. For
988 -- details on how this field is used, see the routine Insert_Actions in
989 -- package Exp_Util, and also the expansion routines for the relevant
990 -- nodes.
991
992 -- Context_Pending (Flag16-Sem)
993 -- This field appears in Compilation_Unit nodes, to indicate that the
994 -- context of the unit is being compiled. Used to detect circularities
995 -- that are not otherwise detected by the loading mechanism. Such
996 -- circularities can occur in the presence of limited and non-limited
997 -- with_clauses that mention the same units.
998
999 -- Controlling_Argument (Node1-Sem)
1000 -- This field is set in procedure and function call nodes if the call
1001 -- is a dispatching call (it is Empty for a non-dispatching call). It
1002 -- indicates the source of the call's controlling tag. For procedure
1003 -- calls, the Controlling_Argument is one of the actuals. For function
1004 -- that has a dispatching result, it is an entity in the context of the
1005 -- call that can provide a tag, or else it is the tag of the root type
1006 -- of the class. It can also specify a tag directly rather than being a
1007 -- tagged object. The latter is needed by the implementations of AI-239
1008 -- and AI-260.
1009
1010 -- Conversion_OK (Flag14-Sem)
1011 -- A flag set on type conversion nodes to indicate that the conversion
1012 -- is to be considered as being valid, even though it is the case that
1013 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
1014 -- Pos, Val, Fixed_Value and Integer_Value, for internal conversions done
1015 -- for fixed-point operations, and for certain conversions for calls to
1016 -- initialization procedures. If Conversion_OK is set, then Etype must be
1017 -- set (the analyzer assumes that Etype has been set). For the case of
1018 -- fixed-point operands, it also indicates that the conversion is to be
1019 -- direct conversion of the underlying integer result, with no regard to
1020 -- the small operand.
1021
1022 -- Convert_To_Return_False (Flag13-Sem)
1023 -- Present in N_Raise_Expression nodes that appear in the body of the
1024 -- special predicateM function used to test a predicate in the context
1025 -- of a membership test, where raise expression results in returning a
1026 -- value of False rather than raising an exception.???obsolete flag
1027
1028 -- Corresponding_Aspect (Node3-Sem)
1029 -- Present in N_Pragma node. Used to point back to the source aspect from
1030 -- the corresponding pragma. This field is Empty for source pragmas.
1031
1032 -- Corresponding_Body (Node5-Sem)
1033 -- This field is set in subprogram declarations, package declarations,
1034 -- entry declarations of protected types, and in generic units. It points
1035 -- to the defining entity for the corresponding body (NOT the node for
1036 -- the body itself).
1037
1038 -- Corresponding_Formal_Spec (Node3-Sem)
1039 -- This field is set in subprogram renaming declarations, where it points
1040 -- to the defining entity for a formal subprogram in the case where the
1041 -- renaming corresponds to a generic formal subprogram association in an
1042 -- instantiation. The field is Empty if the renaming does not correspond
1043 -- to such a formal association.
1044
1045 -- Corresponding_Generic_Association (Node5-Sem)
1046 -- This field is defined for object declarations and object renaming
1047 -- declarations. It is set for the declarations within an instance that
1048 -- map generic formals to their actuals. If set, the field points either
1049 -- to a copy of a default expression for an actual of mode IN or to a
1050 -- generic_association which is the original parent of the expression or
1051 -- name appearing in the declaration. This simplifies GNATprove queries.
1052
1053 -- Corresponding_Integer_Value (Uint4-Sem)
1054 -- This field is set in real literals of fixed-point types (it is not
1055 -- used for floating-point types). It contains the integer value used
1056 -- to represent the fixed-point value. It is also set on the universal
1057 -- real literals used to represent bounds of fixed-point base types
1058 -- and their first named subtypes.
1059
1060 -- Corresponding_Spec (Node5-Sem)
1061 -- This field is set in subprogram, package, task, and protected body
1062 -- nodes, where it points to the defining entity in the corresponding
1063 -- spec. The attribute is also set in N_With_Clause nodes where it points
1064 -- to the defining entity for the with'ed spec, and in a subprogram
1065 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
1066 -- if there is no corresponding spec, as in the case of a subprogram body
1067 -- that serves as its own spec.
1068 --
1069 -- In Ada 2012, Corresponding_Spec is set on expression functions that
1070 -- complete a subprogram declaration.
1071
1072 -- Corresponding_Spec_Of_Stub (Node2-Sem)
1073 -- This field is present in subprogram, package, task, and protected body
1074 -- stubs where it points to the corresponding spec of the stub. Due to
1075 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
1076
1077 -- Corresponding_Stub (Node3-Sem)
1078 -- This field is present in an N_Subunit node. It holds the node in
1079 -- the parent unit that is the stub declaration for the subunit. It is
1080 -- set when analysis of the stub forces loading of the proper body. If
1081 -- expansion of the proper body creates new declarative nodes, they are
1082 -- inserted at the point of the corresponding_stub.
1083
1084 -- Dcheck_Function (Node5-Sem)
1085 -- This field is present in an N_Variant node, It references the entity
1086 -- for the discriminant checking function for the variant.
1087
1088 -- Default_Expression (Node5-Sem)
1089 -- This field is Empty if there is no default expression. If there is a
1090 -- simple default expression (one with no side effects), then this field
1091 -- simply contains a copy of the Expression field (both point to the tree
1092 -- for the default expression). Default_Expression is used for
1093 -- conformance checking.
1094
1095 -- Default_Storage_Pool (Node3-Sem)
1096 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
1097 -- copy of Opt.Default_Pool at the end of the compilation unit. See
1098 -- package Opt for details. This is used for inheriting the
1099 -- Default_Storage_Pool in child units.
1100
1101 -- Discr_Check_Funcs_Built (Flag11-Sem)
1102 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
1103 -- discriminant checking functions are constructed. The purpose is to
1104 -- avoid attempting to set these functions more than once.
1105
1106 -- Do_Accessibility_Check (Flag13-Sem)
1107 -- This flag is set on N_Parameter_Specification nodes to indicate
1108 -- that an accessibility check is required for the parameter. It is
1109 -- not yet decided who takes care of this check (TBD ???).
1110
1111 -- Do_Discriminant_Check (Flag3-Sem)
1112 -- This flag is set on N_Selected_Component nodes to indicate that a
1113 -- discriminant check is required using the discriminant check routine
1114 -- associated with the selector. The actual check is generated by the
1115 -- expander when processing selected components. In the case of
1116 -- Unchecked_Union, the flag is also set, but no discriminant check
1117 -- routine is associated with the selector, and the expander does not
1118 -- generate a check. This flag is also present in assignment statements
1119 -- (and set if the assignment requires a discriminant check), and in type
1120 -- conversion nodes (and set if the conversion requires a check).
1121
1122 -- Do_Division_Check (Flag13-Sem)
1123 -- This flag is set on a division operator (/ mod rem) to indicate that
1124 -- a zero divide check is required. The actual check is either dealt with
1125 -- by the back end if Backend_Divide_Checks is set to true, or by the
1126 -- front end itself if it is set to false.
1127
1128 -- Do_Length_Check (Flag4-Sem)
1129 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1130 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1131 -- is required. It is not determined who deals with this flag (???).
1132
1133 -- Do_Overflow_Check (Flag17-Sem)
1134 -- This flag is set on an operator where an overflow check is required on
1135 -- the operation. The actual check is either dealt with by the back end
1136 -- if Backend_Overflow_Checks is set to true, or by the front end itself
1137 -- if it is set to false. The other cases where this flag is used is on a
1138 -- Type_Conversion node as well on if and case expression nodes.
1139 -- For a type conversion, it means that the conversion is from one base
1140 -- type to another, and the value may not fit in the target base type.
1141 -- See also the description of Do_Range_Check for this case. This flag is
1142 -- also set on if and case expression nodes if we are operating in either
1143 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1144 -- properly process overflow checking for dependent expressions).
1145
1146 -- Do_Range_Check (Flag9-Sem)
1147 -- This flag is set on an expression which appears in a context where a
1148 -- range check is required. The target type is clear from the context.
1149 -- The contexts in which this flag can appear are the following:
1150
1151 -- Right side of an assignment. In this case the target type is taken
1152 -- from the left side of the assignment, which is referenced by the
1153 -- Name of the N_Assignment_Statement node.
1154
1155 -- Subscript expressions in an indexed component. In this case the
1156 -- target type is determined from the type of the array, which is
1157 -- referenced by the Prefix of the N_Indexed_Component node.
1158
1159 -- Argument expression for a parameter, appearing either directly in
1160 -- the Parameter_Associations list of a call or as the Expression of an
1161 -- N_Parameter_Association node that appears in this list. In either
1162 -- case, the check is against the type of the formal. Note that the
1163 -- flag is relevant only in IN and IN OUT parameters, and will be
1164 -- ignored for OUT parameters, where no check is required in the call,
1165 -- and if a check is required on the return, it is generated explicitly
1166 -- with a type conversion.
1167
1168 -- Initialization expression for the initial value in an object
1169 -- declaration. In this case the Do_Range_Check flag is set on
1170 -- the initialization expression, and the check is against the
1171 -- range of the type of the object being declared. This includes the
1172 -- cases of expressions providing default discriminant values, and
1173 -- expressions used to initialize record components.
1174
1175 -- The expression of a type conversion. In this case the range check is
1176 -- against the target type of the conversion. See also the use of
1177 -- Do_Overflow_Check on a type conversion. The distinction is that the
1178 -- overflow check protects against a value that is outside the range of
1179 -- the target base type, whereas a range check checks that the
1180 -- resulting value (which is a value of the base type of the target
1181 -- type), satisfies the range constraint of the target type.
1182
1183 -- Note: when a range check is required in contexts other than those
1184 -- listed above (e.g. in a return statement), an additional type
1185 -- conversion node is introduced to represent the required check.
1186
1187 -- Do_Storage_Check (Flag17-Sem)
1188 -- This flag is set in an N_Allocator node to indicate that a storage
1189 -- check is required for the allocation, or in an N_Subprogram_Body node
1190 -- to indicate that a stack check is required in the subprogram prologue.
1191 -- The N_Allocator case is handled by the routine that expands the call
1192 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1193 -- backend, and all the semantics does is set the flag.
1194
1195 -- Do_Tag_Check (Flag13-Sem)
1196 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1197 -- N_Procedure_Call_Statement, N_Type_Conversion,
1198 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1199 -- node to indicate that the tag check can be suppressed. It is not
1200 -- yet decided how this flag is used (TBD ???).
1201
1202 -- Elaborate_Present (Flag4-Sem)
1203 -- This flag is set in the N_With_Clause node to indicate that pragma
1204 -- Elaborate pragma appears for the with'ed units.
1205
1206 -- Elaborate_All_Desirable (Flag9-Sem)
1207 -- This flag is set in the N_With_Clause mode to indicate that the static
1208 -- elaboration processing has determined that an Elaborate_All pragma is
1209 -- desirable for correct elaboration for this unit.
1210
1211 -- Elaborate_All_Present (Flag14-Sem)
1212 -- This flag is set in the N_With_Clause node to indicate that a
1213 -- pragma Elaborate_All pragma appears for the with'ed units.
1214
1215 -- Elaborate_Desirable (Flag11-Sem)
1216 -- This flag is set in the N_With_Clause mode to indicate that the static
1217 -- elaboration processing has determined that an Elaborate pragma is
1218 -- desirable for correct elaboration for this unit.
1219
1220 -- Else_Actions (List3-Sem)
1221 -- This field is present in if expression nodes. During code
1222 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1223 -- actions at an appropriate place in the tree to get elaborated at the
1224 -- right time. For if expressions, we have to be sure that the actions
1225 -- for the Else branch are only elaborated if the condition is False.
1226 -- The Else_Actions field is used as a temporary parking place for
1227 -- these actions. The final tree is always rewritten to eliminate the
1228 -- need for this field, so in the tree passed to Gigi, this field is
1229 -- always set to No_List.
1230
1231 -- Enclosing_Variant (Node2-Sem)
1232 -- This field is present in the N_Variant node and identifies the Node_Id
1233 -- corresponding to the immediately enclosing variant when the variant is
1234 -- nested, and N_Empty otherwise. Set during semantic processing of the
1235 -- variant part of a record type.
1236
1237 -- Entity (Node4-Sem)
1238 -- Appears in all direct names (identifiers, character literals, and
1239 -- operator symbols), as well as expanded names, and attributes that
1240 -- denote entities, such as 'Class. Points to entity for corresponding
1241 -- defining occurrence. Set after name resolution. For identifiers in a
1242 -- WITH list, the corresponding defining occurrence is in a separately
1243 -- compiled file, and Entity must be set by the library Load procedure.
1244 --
1245 -- Note: During name resolution, the value in Entity may be temporarily
1246 -- incorrect (e.g. during overload resolution, Entity is initially set to
1247 -- the first possible correct interpretation, and then later modified if
1248 -- necessary to contain the correct value after resolution).
1249 --
1250 -- Note: This field overlaps Associated_Node, which is used during
1251 -- generic processing (see Sem_Ch12 for details). Note also that in
1252 -- generic templates, this means that the Entity field does not always
1253 -- point to an Entity. Since the back end is expected to ignore generic
1254 -- templates, this is harmless.
1255 --
1256 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1257 -- It is used only for stream attributes definition clauses. In this
1258 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1259 -- conceptually at the point of the clause. Thus the visibility of the
1260 -- attribute definition clause (in the sense of 8.3(23) as amended by
1261 -- AI-195) can be checked by testing the visibility of that subprogram.
1262 --
1263 -- Note: Normally the Entity field of an identifier points to the entity
1264 -- for the corresponding defining identifier, and hence the Chars field
1265 -- of an identifier will match the Chars field of the entity. However,
1266 -- there is no requirement that these match, and there are obscure cases
1267 -- of generated code where they do not match.
1268
1269 -- Note: Ada 2012 aspect specifications require additional links between
1270 -- identifiers and various attributes. These attributes can be of
1271 -- arbitrary types, and the entity field of identifiers that denote
1272 -- aspects must be used to store arbitrary expressions for later semantic
1273 -- checks. See section on aspect specifications for details.
1274
1275 -- Entity_Or_Associated_Node (Node4-Sem)
1276 -- A synonym for both Entity and Associated_Node. Used by convention in
1277 -- the code when referencing this field in cases where it is not known
1278 -- whether the field contains an Entity or an Associated_Node.
1279
1280 -- Etype (Node5-Sem)
1281 -- Appears in all expression nodes, all direct names, and all entities.
1282 -- Points to the entity for the related type. Set after type resolution.
1283 -- Normally this is the actual subtype of the expression. However, in
1284 -- certain contexts such as the right side of an assignment, subscripts,
1285 -- arguments to calls, returned value in a function, initial value etc.
1286 -- it is the desired target type. In the event that this is different
1287 -- from the actual type, the Do_Range_Check flag will be set if a range
1288 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1289 -- points to an essentially arbitrary choice from the possible set of
1290 -- types.
1291
1292 -- Exception_Junk (Flag8-Sem)
1293 -- This flag is set in a various nodes appearing in a statement sequence
1294 -- to indicate that the corresponding node is an artifact of the
1295 -- generated code for exception handling, and should be ignored when
1296 -- analyzing the control flow of the relevant sequence of statements
1297 -- (e.g. to check that it does not end with a bad return statement).
1298
1299 -- Exception_Label (Node5-Sem)
1300 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1301 -- to be used for transforming the corresponding exception into a goto,
1302 -- or contains Empty, if this exception is not to be transformed. Also
1303 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1304 -- that there may be a local raise for the handler, so that expansion
1305 -- to allow a goto is required (and this field contains the label for
1306 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1307
1308 -- Expansion_Delayed (Flag11-Sem)
1309 -- Set on aggregates and extension aggregates that need a top-down rather
1310 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1311 -- up. For nested aggregates the expansion is delayed until the enclosing
1312 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1313 -- delay it we set this flag. This is done to avoid creating a temporary
1314 -- for each level of a nested aggregate, and also to prevent the
1315 -- premature generation of constraint checks. This is also a requirement
1316 -- if we want to generate the proper attachment to the internal????
1317 -- finalization lists (for record with controlled components). Top down
1318 -- expansion of aggregates is also used for in-place array aggregate
1319 -- assignment or initialization. When the full context is known, the
1320 -- target of the assignment or initialization is used to generate the
1321 -- left-hand side of individual assignment to each sub-component.
1322
1323 -- Expression_Copy (Node2-Sem)
1324 -- Present in N_Pragma_Argument_Association nodes. Contains a copy of the
1325 -- original expression. This field is best used to store pragma-dependent
1326 -- modifications performed on the original expression such as replacement
1327 -- of the current type instance or substitutions of primitives.
1328
1329 -- First_Inlined_Subprogram (Node3-Sem)
1330 -- Present in the N_Compilation_Unit node for the main program. Points
1331 -- to a chain of entities for subprograms that are to be inlined. The
1332 -- Next_Inlined_Subprogram field of these entities is used as a link
1333 -- pointer with Empty marking the end of the list. This field is Empty
1334 -- if there are no inlined subprograms or inlining is not active.
1335
1336 -- First_Named_Actual (Node4-Sem)
1337 -- Present in procedure call statement and function call nodes, and also
1338 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1339 -- named parameter where parameters are ordered by declaration order (as
1340 -- opposed to the actual order in the call which may be different due to
1341 -- named associations). Note: this field points to the explicit actual
1342 -- parameter itself, not the N_Parameter_Association node (its parent).
1343
1344 -- First_Real_Statement (Node2-Sem)
1345 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1346 -- Empty. Used only when declarations are moved into the statement part
1347 -- of a construct as a result of wrapping an AT END handler that is
1348 -- required to cover the declarations. In this case, this field is used
1349 -- to remember the location in the statements list of the first real
1350 -- statement, i.e. the statement that used to be first in the statement
1351 -- list before the declarations were prepended.
1352
1353 -- First_Subtype_Link (Node5-Sem)
1354 -- Present in N_Freeze_Entity node for an anonymous base type that is
1355 -- implicitly created by the declaration of a first subtype. It points
1356 -- to the entity for the first subtype.
1357
1358 -- Float_Truncate (Flag11-Sem)
1359 -- A flag present in type conversion nodes. This is used for float to
1360 -- integer conversions where truncation is required rather than rounding.
1361
1362 -- Forwards_OK (Flag5-Sem)
1363 -- A flag present in the N_Assignment_Statement node. It is used only
1364 -- if the type being assigned is an array type, and is set if analysis
1365 -- determines that it is definitely safe to do the copy forwards, i.e.
1366 -- starting at the lowest addressed element. This is the case if either
1367 -- the operands do not overlap, or they may overlap, but if they do,
1368 -- then the left operand is at a lower address than the right operand.
1369 --
1370 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1371 -- means that the front end could not determine that either direction is
1372 -- definitely safe, and a runtime check may be required if the backend
1373 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1374 -- set, it means that the front end can assure no overlap of operands.
1375
1376 -- From_Aspect_Specification (Flag13-Sem)
1377 -- Processing of aspect specifications typically results in insertion in
1378 -- the tree of corresponding pragma or attribute definition clause nodes.
1379 -- These generated nodes have the From_Aspect_Specification flag set to
1380 -- indicate that they came from aspect specifications originally.
1381
1382 -- From_At_End (Flag4-Sem)
1383 -- This flag is set on an N_Raise_Statement node if it corresponds to
1384 -- the reraise statement generated as the last statement of an AT END
1385 -- handler when SJLJ exception handling is active. It is used to stop
1386 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1387 -- because if the restriction is set, the reraise is not generated.
1388
1389 -- From_At_Mod (Flag4-Sem)
1390 -- This flag is set on the attribute definition clause node that is
1391 -- generated by a transformation of an at mod phrase in a record
1392 -- representation clause. This is used to give slightly different (Ada 83
1393 -- compatible) semantics to such a clause, namely it is used to specify a
1394 -- minimum acceptable alignment for the base type and all subtypes. In
1395 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1396 -- must be a multiple of the given value, and the representation clause
1397 -- is considered to be type specific instead of subtype specific.
1398
1399 -- From_Conditional_Expression (Flag1-Sem)
1400 -- This flag is set on if and case statements generated by the expansion
1401 -- of if and case expressions respectively. The flag is used to suppress
1402 -- any finalization of controlled objects found within these statements.
1403
1404 -- From_Default (Flag6-Sem)
1405 -- This flag is set on the subprogram renaming declaration created in an
1406 -- instance for a formal subprogram, when the formal is declared with a
1407 -- box, and there is no explicit actual. If the flag is present, the
1408 -- declaration is treated as an implicit reference to the formal in the
1409 -- ali file.
1410
1411 -- Generalized_Indexing (Node4-Sem)
1412 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1413 -- that are Ada 2012 container indexing operations. The value of the
1414 -- attribute is a function call (possibly dereferenced) that corresponds
1415 -- to the proper expansion of the source indexing operation. Before
1416 -- expansion, the source node is rewritten as the resolved generalized
1417 -- indexing.
1418
1419 -- Generic_Parent (Node5-Sem)
1420 -- Generic_Parent is defined on declaration nodes that are instances. The
1421 -- value of Generic_Parent is the generic entity from which the instance
1422 -- is obtained.
1423
1424 -- Generic_Parent_Type (Node4-Sem)
1425 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1426 -- actuals of formal private and derived types. Within the instance, the
1427 -- operations on the actual are those inherited from the parent. For a
1428 -- formal private type, the parent type is the generic type itself. The
1429 -- Generic_Parent_Type is also used in an instance to determine whether a
1430 -- private operation overrides an inherited one.
1431
1432 -- Handler_List_Entry (Node2-Sem)
1433 -- This field is present in N_Object_Declaration nodes. It is set only
1434 -- for the Handler_Record entry generated for an exception in zero cost
1435 -- exception handling mode. It references the corresponding item in the
1436 -- handler list, and is used to delete this entry if the corresponding
1437 -- handler is deleted during optimization. For further details on why
1438 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1439
1440 -- Has_Dereference_Action (Flag13-Sem)
1441 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1442 -- indicate that the expansion has aready produced a call to primitive
1443 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1444 -- Such dereference actions are produced for debugging purposes.
1445
1446 -- Has_Dynamic_Length_Check (Flag10-Sem)
1447 -- This flag is present in all expression nodes. It is set to indicate
1448 -- that one of the routines in unit Checks has generated a length check
1449 -- action which has been inserted at the flagged node. This is used to
1450 -- avoid the generation of duplicate checks.
1451
1452 -- Has_Local_Raise (Flag8-Sem)
1453 -- Present in exception handler nodes. Set if the handler can be entered
1454 -- via a local raise that gets transformed to a goto statement. This will
1455 -- always be set if Local_Raise_Statements is non-empty, but can also be
1456 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1457 -- nodes requiring generation of back end checks.
1458
1459 -- Has_No_Elaboration_Code (Flag17-Sem)
1460 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1461 -- or not elaboration code is present for this unit. It is initially set
1462 -- true for subprogram specs and bodies and for all generic units and
1463 -- false for non-generic package specs and bodies. Gigi may set the flag
1464 -- in the non-generic package case if it determines that no elaboration
1465 -- code is generated. Note that this flag is not related to the
1466 -- Is_Preelaborated status, there can be preelaborated packages that
1467 -- generate elaboration code, and non-preelaborated packages which do
1468 -- not generate elaboration code.
1469
1470 -- Has_Pragma_Suppress_All (Flag14-Sem)
1471 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1472 -- pragma appears anywhere in the unit. This accommodates the rather
1473 -- strange placement rules of other compilers (DEC permits it at the
1474 -- end of a unit, and Rational allows it as a program unit pragma). We
1475 -- allow it anywhere at all, and consider it equivalent to a pragma
1476 -- Suppress (All_Checks) appearing at the start of the configuration
1477 -- pragmas for the unit.
1478
1479 -- Has_Private_View (Flag11-Sem)
1480 -- A flag present in generic nodes that have an entity, to indicate that
1481 -- the node has a private type. Used to exchange private and full
1482 -- declarations if the visibility at instantiation is different from the
1483 -- visibility at generic definition.
1484
1485 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1486 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1487 -- flag the presence of a pragma Relative_Deadline.
1488
1489 -- Has_Self_Reference (Flag13-Sem)
1490 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1491 -- of the expressions contains an access attribute reference to the
1492 -- enclosing type. Such a self-reference can only appear in default-
1493 -- initialized aggregate for a record type.
1494
1495 -- Has_SP_Choice (Flag15-Sem)
1496 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1497 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1498 -- True if the Discrete_Choices list has at least one occurrence of a
1499 -- statically predicated subtype.
1500
1501 -- Has_Storage_Size_Pragma (Flag5-Sem)
1502 -- A flag present in an N_Task_Definition node to flag the presence of a
1503 -- Storage_Size pragma.
1504
1505 -- Has_Target_Names (Flag8-Sem)
1506 -- Present in assignment statements. Indicates that the RHS contains
1507 -- target names (see AI12-0125-3) and must be expanded accordingly.
1508
1509 -- Has_Wide_Character (Flag11-Sem)
1510 -- Present in string literals, set if any wide character (i.e. character
1511 -- code outside the Character range but within Wide_Character range)
1512 -- appears in the string. Used to implement pragma preference rules.
1513
1514 -- Has_Wide_Wide_Character (Flag13-Sem)
1515 -- Present in string literals, set if any wide character (i.e. character
1516 -- code outside the Wide_Character range) appears in the string. Used to
1517 -- implement pragma preference rules.
1518
1519 -- Header_Size_Added (Flag11-Sem)
1520 -- Present in N_Attribute_Reference nodes, set only for attribute
1521 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1522 -- hidden list header used by the runtime finalization support has been
1523 -- added to the size of the prefix. The flag also prevents the infinite
1524 -- expansion of the same attribute in the said context.
1525
1526 -- Hidden_By_Use_Clause (Elist5-Sem)
1527 -- An entity list present in use clauses that appear within
1528 -- instantiations. For the resolution of local entities, entities
1529 -- introduced by these use clauses have priority over global ones,
1530 -- and outer entities must be explicitly hidden/restored on exit.
1531
1532 -- Implicit_With (Flag16-Sem)
1533 -- Present in N_With_Clause nodes. The flag indicates that the clause
1534 -- does not comes from source and introduces an implicit dependency on
1535 -- a particular unit. Such implicit with clauses are generated by:
1536 --
1537 -- * ABE mechanism - The static elaboration model of both the default
1538 -- and the legacy ABE mechanism use with clauses to encode implicit
1539 -- Elaborate[_All] pragmas.
1540 --
1541 -- * Analysis - A with clause for child unit A.B.C is equivalent to
1542 -- a series of clauses that with A, A.B, and A.B.C. Manipulation of
1543 -- contexts utilizes implicit with clauses to emulate the visibility
1544 -- of a particular unit.
1545 --
1546 -- * RTSfind - The compiler generates code which references entities
1547 -- from the runtime.
1548
1549 -- Import_Interface_Present (Flag16-Sem)
1550 -- This flag is set in an Interface or Import pragma if a matching
1551 -- pragma of the other kind is also present. This is used to avoid
1552 -- generating some unwanted error messages.
1553
1554 -- Includes_Infinities (Flag11-Sem)
1555 -- This flag is present in N_Range nodes. It is set for the range of
1556 -- unconstrained float types defined in Standard, which include not only
1557 -- the given range of values, but also legitimately can include infinite
1558 -- values. This flag is false for any float type for which an explicit
1559 -- range is given by the programmer, even if that range is identical to
1560 -- the range for Float.
1561
1562 -- Incomplete_View (Node2-Sem)
1563 -- Present in full type declarations that are completions of incomplete
1564 -- type declarations. Denotes the corresponding incomplete type
1565 -- declaration. Used to simplify the retrieval of primitive operations
1566 -- that may be declared between the partial and the full view of an
1567 -- untagged type.
1568
1569 -- Inherited_Discriminant (Flag13-Sem)
1570 -- This flag is present in N_Component_Association nodes. It indicates
1571 -- that a given component association in an extension aggregate is the
1572 -- value obtained from a constraint on an ancestor. Used to prevent
1573 -- double expansion when the aggregate has expansion delayed.
1574
1575 -- Instance_Spec (Node5-Sem)
1576 -- This field is present in generic instantiation nodes, and also in
1577 -- formal package declaration nodes (formal package declarations are
1578 -- treated in a manner very similar to package instantiations). It points
1579 -- to the node for the spec of the instance, inserted as part of the
1580 -- semantic processing for instantiations in Sem_Ch12.
1581
1582 -- Is_Abort_Block (Flag4-Sem)
1583 -- Present in N_Block_Statement nodes. True if the block protects a list
1584 -- of statements with an Abort_Defer / Abort_Undefer_Direct pair.
1585
1586 -- Is_Accessibility_Actual (Flag13-Sem)
1587 -- Present in N_Parameter_Association nodes. True if the parameter is
1588 -- an extra actual that carries the accessibility level of the actual
1589 -- for an access parameter, in a function that dispatches on result and
1590 -- is called in a dispatching context. Used to prevent a formal/actual
1591 -- mismatch when the call is rewritten as a dispatching call.
1592
1593 -- Is_Analyzed_Pragma (Flag5-Sem)
1594 -- Present in N_Pragma nodes. Set for delayed pragmas that require a two
1595 -- step analysis. The initial step is peformed by routine Analyze_Pragma
1596 -- and verifies the overall legality of the pragma. The second step takes
1597 -- place in the various Analyze_xxx_In_Decl_Part routines which perform
1598 -- full analysis. The flag prevents the reanalysis of a delayed pragma.
1599
1600 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1601 -- A flag set in a Block_Statement node to indicate that it is the
1602 -- expansion of an asynchronous entry call. Such a block needs cleanup
1603 -- handler to assure that the call is cancelled.
1604
1605 -- Is_Boolean_Aspect (Flag16-Sem)
1606 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1607 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1608
1609 -- Is_Checked (Flag11-Sem)
1610 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1611 -- assertion aspect or pragma, or check pragma for an assertion, that
1612 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1613 -- is set (they cannot both be set), then this means that the status of
1614 -- the pragma has been checked at the appropriate point and should not
1615 -- be further modified (in some cases these flags are copied when a
1616 -- pragma is rewritten).
1617
1618 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
1619 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1620 -- related to a checked Ghost entity or encloses a checked Ghost entity.
1621 -- This flag has no relation to Is_Checked.
1622
1623 -- Is_Component_Left_Opnd (Flag13-Sem)
1624 -- Is_Component_Right_Opnd (Flag14-Sem)
1625 -- Present in concatenation nodes, to indicate that the corresponding
1626 -- operand is of the component type of the result. Used in resolving
1627 -- concatenation nodes in instances.
1628
1629 -- Is_Controlling_Actual (Flag16-Sem)
1630 -- This flag is set on an expression that is a controlling argument in
1631 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1632 -- details of its use.
1633
1634 -- Is_Declaration_Level_Node (Flag5-Sem)
1635 -- Present in call marker and instantiation nodes. Set when the constuct
1636 -- appears within the declarations of a block statement, an entry body,
1637 -- a subprogram body, or a task body. The flag aids the ABE Processing
1638 -- phase to catch certain forms of guaranteed ABEs.
1639
1640 -- Is_Delayed_Aspect (Flag14-Sem)
1641 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1642 -- come from aspect specifications, where the evaluation of the aspect
1643 -- must be delayed to the freeze point. This flag is also set True in
1644 -- the corresponding N_Aspect_Specification node.
1645
1646 -- Is_Disabled (Flag15-Sem)
1647 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1648 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1649 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1650 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1651 -- If this flag is set, the aspect or policy is not analyzed for semantic
1652 -- correctness, so any expressions etc will not be marked as analyzed.
1653
1654 -- Is_Dispatching_Call (Flag6-Sem)
1655 -- Present in call marker nodes. Set when the related call which prompted
1656 -- the creation of the marker is dispatching.
1657
1658 -- Is_Dynamic_Coextension (Flag18-Sem)
1659 -- Present in allocator nodes, to indicate that this is an allocator
1660 -- for an access discriminant of a dynamically allocated object. The
1661 -- coextension must be deallocated and finalized at the same time as
1662 -- the enclosing object. The partner flag Is_Static_Coextension must
1663 -- be cleared before setting this flag to True.
1664
1665 -- Is_Effective_Use_Clause (Flag1-Sem)
1666 -- Present in both N_Use_Type_Clause and N_Use_Package_Clause to indicate
1667 -- a use clause is "used" in the current source.
1668
1669 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
1670 -- Present in the following nodes:
1671 --
1672 -- assignment statement
1673 -- attribute reference
1674 -- call marker
1675 -- entry call statement
1676 -- expanded name
1677 -- function call
1678 -- function instantiation
1679 -- identifier
1680 -- package instantiation
1681 -- procedure call statement
1682 -- procedure instantiation
1683 -- requeue statement
1684 -- variable reference marker
1685 --
1686 -- Set when the node appears within a context which allows the generation
1687 -- of run-time ABE checks. This flag detemines whether the ABE Processing
1688 -- phase generates conditional ABE checks and guaranteed ABE failures.
1689
1690 -- Is_Elaboration_Code (Flag9-Sem)
1691 -- Present in assignment statements. Set for an assignment which updates
1692 -- the elaboration flag of a package or subprogram when the corresponding
1693 -- body is successfully elaborated.
1694
1695 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
1696 -- Present in the following nodes:
1697 --
1698 -- attribute reference
1699 -- call marker
1700 -- entry call statement
1701 -- expanded name
1702 -- function call
1703 -- function instantiation
1704 -- identifier
1705 -- package instantiation
1706 -- procedure call statement
1707 -- procedure instantiation
1708 -- requeue statement
1709 -- variable reference marker
1710 --
1711 -- Set when the node appears within a context where elaboration warnings
1712 -- are enabled. This flag determines whether the ABE processing phase
1713 -- generates diagnostics on various elaboration issues.
1714
1715 -- Is_Entry_Barrier_Function (Flag8-Sem)
1716 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
1717 -- nodes which emulate the barrier function of a protected entry body.
1718 -- The flag is used when checking for incorrect use of Current_Task.
1719
1720 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1721 -- This flag is set in an N_Function_Call node to indicate that the extra
1722 -- actuals to support a build-in-place style of call have been added to
1723 -- the call.
1724
1725 -- Is_Expanded_Contract (Flag1-Sem)
1726 -- Present in N_Contract nodes. Set if the contract has already undergone
1727 -- expansion activities.
1728
1729 -- Is_Finalization_Wrapper (Flag9-Sem)
1730 -- This flag is present in N_Block_Statement nodes. It is set when the
1731 -- block acts as a wrapper of a handled construct which has controlled
1732 -- objects. The wrapper prevents interference between exception handlers
1733 -- and At_End handlers.
1734
1735 -- Is_Generic_Contract_Pragma (Flag2-Sem)
1736 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1737 -- a source construct, applies to a generic unit or its body, and denotes
1738 -- one of the following contract-related annotations:
1739 -- Abstract_State
1740 -- Contract_Cases
1741 -- Depends
1742 -- Extensions_Visible
1743 -- Global
1744 -- Initial_Condition
1745 -- Initializes
1746 -- Post
1747 -- Post_Class
1748 -- Postcondition
1749 -- Pre
1750 -- Pre_Class
1751 -- Precondition
1752 -- Refined_Depends
1753 -- Refined_Global
1754 -- Refined_Post
1755 -- Refined_State
1756 -- Test_Case
1757
1758 -- Is_Homogeneous_Aggregate (Flag14)
1759 -- A flag set on an Ada 2020 aggregate that uses square brackets as
1760 -- delimiters, and thus denotes an array or container aggregate, or
1761 -- the prefix of a reduction attribute.
1762
1763 -- Is_Ignored (Flag9-Sem)
1764 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1765 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1766 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1767 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1768 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1769 -- gives a policy for the aspect or pragma, then there are two cases. For
1770 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1771 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1772 -- ignored because of the absence of a -gnata switch. For any other
1773 -- aspects or pragmas, the flag is off. If this flag is set, the
1774 -- aspect/pragma is fully analyzed and checked for other syntactic
1775 -- and semantic errors, but it does not have any semantic effect.
1776
1777 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
1778 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1779 -- related to an ignored Ghost entity or encloses ignored Ghost entity.
1780 -- This flag has no relation to Is_Ignored.
1781
1782 -- Is_In_Discriminant_Check (Flag11-Sem)
1783 -- This flag is present in a selected component, and is used to indicate
1784 -- that the reference occurs within a discriminant check. The
1785 -- significance is that optimizations based on assuming that the
1786 -- discriminant check has a correct value cannot be performed in this
1787 -- case (or the discriminant check may be optimized away).
1788
1789 -- Is_Inherited_Pragma (Flag4-Sem)
1790 -- This flag is set in an N_Pragma node that appears in a N_Contract node
1791 -- to indicate that the pragma has been inherited from a parent context.
1792
1793 -- Is_Initialization_Block (Flag1-Sem)
1794 -- Defined in block nodes. Set when the block statement was created by
1795 -- the finalization machinery to wrap initialization statements. This
1796 -- flag aids the ABE Processing phase to suppress the diagnostics of
1797 -- finalization actions in initialization contexts.
1798
1799 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
1800 -- NOTE: this flag is shared between the legacy ABE mechanism and the
1801 -- default ABE mechanism.
1802 --
1803 -- Present in the following nodes:
1804 --
1805 -- call marker
1806 -- formal package declaration
1807 -- function call
1808 -- function instantiation
1809 -- package instantiation
1810 -- procedure call statement
1811 -- procedure instantiation
1812 --
1813 -- Set when the elaboration or evaluation of the scenario results in
1814 -- a guaranteed ABE. The flag is used to suppress the instantiation of
1815 -- generic bodies because gigi cannot handle certain forms of premature
1816 -- instantiation, as well as to prevent the reexamination of the node by
1817 -- the ABE Processing phase.
1818
1819 -- Is_Machine_Number (Flag11-Sem)
1820 -- This flag is set in an N_Real_Literal node to indicate that the value
1821 -- is a machine number. This avoids some unnecessary cases of converting
1822 -- real literals to machine numbers.
1823
1824 -- Is_Null_Loop (Flag16-Sem)
1825 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1826 -- can be determined to be null at compile time. This is used to remove
1827 -- the loop entirely at expansion time.
1828
1829 -- Is_Overloaded (Flag5-Sem)
1830 -- A flag present in all expression nodes. Used temporarily during
1831 -- overloading determination. The setting of this flag is not relevant
1832 -- once overloading analysis is complete.
1833
1834 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1835 -- A flag present only in N_Op_Expon nodes. It is set when the
1836 -- exponentiation is of the form 2 ** N, where the type of N is an
1837 -- unsigned integral subtype whose size does not exceed the size of
1838 -- Standard_Integer (i.e. a type that can be safely converted to
1839 -- Natural), and the exponentiation appears as the right operand of an
1840 -- integer multiplication or an integer division where the dividend is
1841 -- unsigned. It is also required that overflow checking is off for both
1842 -- the exponentiation and the multiply/divide node. If this set of
1843 -- conditions holds, and the flag is set, then the division or
1844 -- multiplication can be (and is) converted to a shift.
1845
1846 -- Is_Preelaborable_Call (Flag7-Sem)
1847 -- Present in call marker nodes. Set when the related call is non-static
1848 -- but preelaborable.
1849
1850 -- Is_Prefixed_Call (Flag17-Sem)
1851 -- This flag is set in a selected component within a generic unit, if
1852 -- it resolves to a prefixed call to a primitive operation. The flag
1853 -- is used to prevent accidental overloadings in an instance, when a
1854 -- primitive operation and a private record component may be homographs.
1855
1856 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1857 -- A flag set in a Subprogram_Body block to indicate that it is the
1858 -- implementation of a protected subprogram. Such a body needs cleanup
1859 -- handler to make sure that the associated protected object is unlocked
1860 -- when the subprogram completes.
1861
1862 -- Is_Qualified_Universal_Literal (Flag4-Sem)
1863 -- Present in N_Qualified_Expression nodes. Set when the qualification is
1864 -- converting a universal literal to a specific type. Such qualifiers aid
1865 -- the resolution of accidental overloading of binary or unary operators
1866 -- which may occur in instances.
1867
1868 -- Is_Read (Flag4-Sem)
1869 -- Present in variable reference markers. Set when the original variable
1870 -- reference constitues a read of the variable.
1871
1872 -- Is_Source_Call (Flag4-Sem)
1873 -- Present in call marker nodes. Set when the related call came from
1874 -- source.
1875
1876 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
1877 -- Present in the following nodes:
1878 --
1879 -- assignment statement
1880 -- attribute reference
1881 -- call marker
1882 -- entry call statement
1883 -- expanded name
1884 -- function call
1885 -- function instantiation
1886 -- identifier
1887 -- package instantiation
1888 -- procedure call statement
1889 -- procedure instantiation
1890 -- requeue statement
1891 -- variable reference marker
1892 --
1893 -- Set when the node appears within a context subject to SPARK_Mode On.
1894 -- This flag determines when the SPARK model of elaboration be activated
1895 -- by the ABE Processing phase.
1896
1897 -- Is_Static_Coextension (Flag14-Sem)
1898 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1899 -- of an object allocated on the stack rather than the heap. The partner
1900 -- flag Is_Dynamic_Coextension must be cleared before setting this flag
1901 -- to True.
1902
1903 -- Is_Static_Expression (Flag6-Sem)
1904 -- Indicates that an expression is a static expression according to the
1905 -- rules in RM-4.9. See Sem_Eval for details.
1906
1907 -- Is_Subprogram_Descriptor (Flag16-Sem)
1908 -- Present in N_Object_Declaration, and set only for the object
1909 -- declaration generated for a subprogram descriptor in fast exception
1910 -- mode. See Exp_Ch11 for details of use.
1911
1912 -- Is_Task_Allocation_Block (Flag6-Sem)
1913 -- A flag set in a Block_Statement node to indicate that it is the
1914 -- expansion of a task allocator, or the allocator of an object
1915 -- containing tasks. Such a block requires a cleanup handler to call
1916 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1917 -- allocated but not activated when the allocator completes abnormally.
1918
1919 -- Is_Task_Body_Procedure (Flag1-Sem)
1920 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
1921 -- nodes which emulate the body of a task unit.
1922
1923 -- Is_Task_Master (Flag5-Sem)
1924 -- A flag set in a Subprogram_Body, Block_Statement, or Task_Body node to
1925 -- indicate that the construct is a task master (i.e. has declared tasks
1926 -- or declares an access to a task type).
1927
1928 -- Is_Write (Flag5-Sem)
1929 -- Present in variable reference markers. Set when the original variable
1930 -- reference constitues a write of the variable.
1931
1932 -- Itype (Node1-Sem)
1933 -- Used in N_Itype_Reference node to reference an itype for which it is
1934 -- important to ensure that it is defined. See description of this node
1935 -- for further details.
1936
1937 -- Kill_Range_Check (Flag11-Sem)
1938 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1939 -- result should not be subjected to range checks. This is used for the
1940 -- implementation of Normalize_Scalars.
1941
1942 -- Label_Construct (Node2-Sem)
1943 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1944 -- N_Block_Statement or N_Loop_Statement node to which the label
1945 -- declaration applies. The field is left empty for the special labels
1946 -- generated as part of expanding raise statements with a local exception
1947 -- handler.
1948
1949 -- Library_Unit (Node4-Sem)
1950 -- In a stub node, Library_Unit points to the compilation unit node of
1951 -- the corresponding subunit.
1952 --
1953 -- In a with clause node, Library_Unit points to the spec of the with'ed
1954 -- unit.
1955 --
1956 -- In a compilation unit node, the usage depends on the unit type:
1957 --
1958 -- For a library unit body, Library_Unit points to the compilation unit
1959 -- node of the corresponding spec, unless it's a subprogram body with
1960 -- Acts_As_Spec set, in which case it points to itself.
1961 --
1962 -- For a spec, Library_Unit points to the compilation unit node of the
1963 -- corresponding body, if present. The body will be present if the spec
1964 -- is or contains generics that we needed to instantiate. Similarly, the
1965 -- body will be present if we needed it for inlining purposes. Thus, if
1966 -- we have a spec/body pair, both of which are present, they point to
1967 -- each other via Library_Unit.
1968 --
1969 -- For a subunit, Library_Unit points to the compilation unit node of
1970 -- the parent body.
1971 -- ??? not (always) true, in (at least some, maybe all?) cases it points
1972 -- to the corresponding spec for the parent body.
1973 --
1974 -- Note that this field is not used to hold the parent pointer for child
1975 -- unit (which might in any case need to use it for some other purpose as
1976 -- described above). Instead for a child unit, implicit with's are
1977 -- generated for all parents.
1978
1979 -- Local_Raise_Statements (Elist1)
1980 -- This field is present in exception handler nodes. It is set to
1981 -- No_Elist in the normal case. If there is at least one raise statement
1982 -- which can potentially be handled as a local raise, then this field
1983 -- points to a list of raise nodes, which are calls to a routine to raise
1984 -- an exception. These are raise nodes which can be optimized into gotos
1985 -- if the handler turns out to meet the conditions which permit this
1986 -- transformation. Note that this does NOT include instances of the
1987 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1988 -- handled by the back end (using the N_Push/N_Pop mechanism).
1989
1990 -- Loop_Actions (List5-Sem)
1991 -- A list present in Component_Association nodes in array aggregates.
1992 -- Used to collect actions that must be executed within the loop because
1993 -- they may need to be evaluated anew each time through.
1994
1995 -- Limited_View_Installed (Flag18-Sem)
1996 -- Present in With_Clauses and in package specifications. If set on
1997 -- with_clause, it indicates that this clause has created the current
1998 -- limited view of the designated package. On a package specification, it
1999 -- indicates that the limited view has already been created because the
2000 -- package is mentioned in a limited_with_clause in the closure of the
2001 -- unit being compiled.
2002
2003 -- Local_Raise_Not_OK (Flag7-Sem)
2004 -- Present in N_Exception_Handler nodes. Set if the handler contains
2005 -- a construct (reraise statement, or call to subprogram in package
2006 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
2007 -- for a local raise (one that could otherwise be converted to a goto).
2008
2009 -- Must_Be_Byte_Aligned (Flag14-Sem)
2010 -- This flag is present in N_Attribute_Reference nodes. It can be set
2011 -- only for the Address and Unrestricted_Access attributes. If set it
2012 -- means that the object for which the address/access is given must be on
2013 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
2014 -- of the object is to be made before taking the address (this copy is in
2015 -- the current scope on the stack frame). This is used for certain cases
2016 -- of code generated by the expander that passes parameters by address.
2017 --
2018 -- The reason the copy is not made by the front end is that the back end
2019 -- has more information about type layout and may be able to (but is not
2020 -- guaranteed to) prevent making unnecessary copies.
2021
2022 -- Must_Not_Freeze (Flag8-Sem)
2023 -- A flag present in all expression nodes. Normally expressions cause
2024 -- freezing as described in the RM. If this flag is set, then this is
2025 -- inhibited. This is used by the analyzer and expander to label nodes
2026 -- that are created by semantic analysis or expansion and which must not
2027 -- cause freezing even though they normally would. This flag is also
2028 -- present in an N_Subtype_Indication node, since we also use these in
2029 -- calls to Freeze_Expression.
2030
2031 -- Next_Entity (Node2-Sem)
2032 -- Present in defining identifiers, defining character literals, and
2033 -- defining operator symbols (i.e. in all entities). The entities of a
2034 -- scope are chained, and this field is used as the forward pointer for
2035 -- this list. See Einfo for further details.
2036
2037 -- Next_Exit_Statement (Node3-Sem)
2038 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
2039 -- chained (in reverse order of appearance) from the First_Exit_Statement
2040 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
2041 -- the next entry on this chain (Empty = end of list).
2042
2043 -- Next_Implicit_With (Node3-Sem)
2044 -- Present in N_With_Clause. Part of a chain of with_clauses generated
2045 -- in rtsfind to indicate implicit dependencies on predefined units. Used
2046 -- to prevent multiple with_clauses for the same unit in a given context.
2047 -- A postorder traversal of the tree whose nodes are units and whose
2048 -- links are with_clauses defines the order in which CodePeer must
2049 -- examine a compiled unit and its full context. This ordering ensures
2050 -- that any subprogram call is examined after the subprogram declaration
2051 -- has been seen.
2052
2053 -- Next_Named_Actual (Node4-Sem)
2054 -- Present in parameter association nodes. Set during semantic analysis
2055 -- to point to the next named parameter, where parameters are ordered by
2056 -- declaration order (as opposed to the actual order in the call, which
2057 -- may be different due to named associations). Not that this field
2058 -- points to the explicit actual parameter itself, not to the
2059 -- N_Parameter_Association node (its parent).
2060
2061 -- Next_Pragma (Node1-Sem)
2062 -- Present in N_Pragma nodes. Used to create a linked list of pragma
2063 -- nodes. Currently used for two purposes:
2064 --
2065 -- Create a list of linked Check_Policy pragmas. The head of this list
2066 -- is stored in Opt.Check_Policy_List (which has further details).
2067 --
2068 -- Used by processing for Pre/Postcondition pragmas to store a list of
2069 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
2070 -- details).
2071 --
2072 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
2073 -- the apply to the same construct. These are visible/private mode for
2074 -- a package spec and declarative/statement mode for package body.
2075
2076 -- Next_Rep_Item (Node5-Sem)
2077 -- Present in pragma nodes, attribute definition nodes, enumeration rep
2078 -- clauses, record rep clauses, aspect specification and null statement
2079 -- nodes. Used to link representation items that apply to an entity. See
2080 -- full description of First_Rep_Item field in Einfo for further details.
2081
2082 -- Next_Use_Clause (Node3-Sem)
2083 -- While use clauses are active during semantic processing, they are
2084 -- chained from the scope stack entry, using Next_Use_Clause as a link
2085 -- pointer, with Empty marking the end of the list. The head pointer is
2086 -- in the scope stack entry (First_Use_Clause). At the end of semantic
2087 -- processing (i.e. when Gigi sees the tree, the contents of this field
2088 -- is undefined and should not be read).
2089
2090 -- No_Ctrl_Actions (Flag7-Sem)
2091 -- Present in N_Assignment_Statement to indicate that no Finalize nor
2092 -- Adjust should take place on this assignment even though the RHS is
2093 -- controlled. Also indicates that the primitive _assign should not be
2094 -- used for a tagged assignment. This is used in init procs and aggregate
2095 -- expansions where the generated assignments are initializations, not
2096 -- real assignments.
2097
2098 -- No_Elaboration_Check (Flag4-Sem)
2099 -- NOTE: this flag is relevant only for the legacy ABE mechanism and
2100 -- should not be used outside of that context.
2101 --
2102 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
2103 -- that no elaboration check is needed on the call, because it appears in
2104 -- the context of a local Suppress pragma. This is used on calls within
2105 -- task bodies, where the actual elaboration checks are applied after
2106 -- analysis, when the local scope stack is not present
2107
2108 -- No_Entities_Ref_In_Spec (Flag8-Sem)
2109 -- Present in N_With_Clause nodes. Set if the with clause is on the
2110 -- package or subprogram spec where the main unit is the corresponding
2111 -- body, and no entities of the with'ed unit are referenced by the spec
2112 -- (an entity may still be referenced in the body, so this flag is used
2113 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
2114 -- full details).
2115
2116 -- No_Initialization (Flag13-Sem)
2117 -- Present in N_Object_Declaration and N_Allocator to indicate that the
2118 -- object must not be initialized (by Initialize or call to an init
2119 -- proc). This is needed for controlled aggregates. When the Object
2120 -- declaration has an expression, this flag means that this expression
2121 -- should not be taken into account (needed for in place initialization
2122 -- with aggregates, and for object with an address clause, which are
2123 -- initialized with an assignment at freeze time).
2124
2125 -- No_Minimize_Eliminate (Flag17-Sem)
2126 -- This flag is present in membership operator nodes (N_In/N_Not_In).
2127 -- It is used to indicate that processing for extended overflow checking
2128 -- modes is not required (this is used to prevent infinite recursion).
2129
2130 -- No_Side_Effect_Removal (Flag17-Sem)
2131 -- Present in N_Function_Call nodes. Set when a function call does not
2132 -- require side effect removal. This attribute suppresses the generation
2133 -- of a temporary to capture the result of the function which eventually
2134 -- replaces the function call.
2135
2136 -- No_Truncation (Flag17-Sem)
2137 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
2138 -- only if the RM_Size of the source is greater than the RM_Size of the
2139 -- target for scalar operands. Normally in such a case we truncate some
2140 -- higher order bits of the source, and then sign/zero extend the result
2141 -- to form the output value. But if this flag is set, then we do not do
2142 -- any truncation, so for example, if an 8 bit input is converted to 5
2143 -- bit result which is in fact stored in 8 bits, then the high order
2144 -- three bits of the target result will be copied from the source. This
2145 -- is used for properly setting out of range values for use by pragmas
2146 -- Initialize_Scalars and Normalize_Scalars.
2147
2148 -- Null_Excluding_Subtype (Flag16)
2149 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
2150 -- indication carries a null-exclusion indicator, which is distinct from
2151 -- the null-exclusion indicator that may precede the access keyword.
2152
2153 -- Original_Discriminant (Node2-Sem)
2154 -- Present in identifiers. Used in references to discriminants that
2155 -- appear in generic units. Because the names of the discriminants may be
2156 -- different in an instance, we use this field to recover the position of
2157 -- the discriminant in the original type, and replace it with the
2158 -- discriminant at the same position in the instantiated type.
2159
2160 -- Original_Entity (Node2-Sem)
2161 -- Present in numeric literals. Used to denote the named number that has
2162 -- been constant-folded into the given literal. If literal is from
2163 -- source, or the result of some other constant-folding operation, then
2164 -- Original_Entity is empty. This field is needed to handle properly
2165 -- named numbers in generic units, where the Associated_Node field
2166 -- interferes with the Entity field, making it impossible to preserve the
2167 -- original entity at the point of instantiation.
2168
2169 -- Others_Discrete_Choices (List1-Sem)
2170 -- When a case statement or variant is analyzed, the semantic checks
2171 -- determine the actual list of choices that correspond to an others
2172 -- choice. This list is materialized for later use by the expander and
2173 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
2174 -- this materialized list of choices, which is in standard format for a
2175 -- list of discrete choices, except that of course it cannot contain an
2176 -- N_Others_Choice entry.
2177
2178 -- Parent_Spec (Node4-Sem)
2179 -- For a library unit that is a child unit spec (package or subprogram
2180 -- declaration, generic declaration or instantiation, or library level
2181 -- rename) this field points to the compilation unit node for the parent
2182 -- package specification. This field is Empty for library bodies (the
2183 -- parent spec in this case can be found from the corresponding spec).
2184
2185 -- Parent_With (Flag1-Sem)
2186 -- Present in N_With_Clause nodes. The flag indicates that the clause
2187 -- was generated for an ancestor unit to provide proper visibility. A
2188 -- with clause for child unit A.B.C produces two implicit parent with
2189 -- clauses for A and A.B.
2190
2191 -- Premature_Use (Node5-Sem)
2192 -- Present in N_Incomplete_Type_Declaration node. Used for improved
2193 -- error diagnostics: if there is a premature usage of an incomplete
2194 -- type, a subsequently generated error message indicates the position
2195 -- of its full declaration.
2196
2197 -- Present_Expr (Uint3-Sem)
2198 -- Present in an N_Variant node. This has a meaningful value only after
2199 -- Gigi has back annotated the tree with representation information. At
2200 -- this point, it contains a reference to a gcc expression that depends
2201 -- on the values of one or more discriminants. Give a set of discriminant
2202 -- values, this expression evaluates to False (zero) if variant is not
2203 -- present, and True (non-zero) if it is present. See unit Repinfo for
2204 -- further details on gigi back annotation. This field is used during
2205 -- back-annotation processing (for -gnatR -gnatc) to determine if a field
2206 -- is present or not.
2207
2208 -- Prev_Use_Clause (Node1-Sem)
2209 -- Present in both N_Use_Package_Clause and N_Use_Type_Clause. Used in
2210 -- detection of ineffective use clauses by allowing a chain of related
2211 -- clauses together to avoid traversing the current scope stack.
2212
2213 -- Print_In_Hex (Flag13-Sem)
2214 -- Set on an N_Integer_Literal node to indicate that the value should be
2215 -- printed in hexadecimal in the sprint listing. Has no effect on
2216 -- legality or semantics of program, only on the displayed output. This
2217 -- is used to clarify output from the packed array cases.
2218
2219 -- Procedure_To_Call (Node2-Sem)
2220 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2221 -- and N_Extended_Return_Statement nodes. References the entity for the
2222 -- declaration of the procedure to be called to accomplish the required
2223 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
2224 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
2225 -- allocating the return value), and for the Deallocate procedure in the
2226 -- case of N_Free_Statement.
2227
2228 -- Raises_Constraint_Error (Flag7-Sem)
2229 -- Set on an expression whose evaluation will definitely fail constraint
2230 -- error check. See Sem_Eval for details.
2231
2232 -- Redundant_Use (Flag13-Sem)
2233 -- Present in nodes that can appear as an operand in a use clause or use
2234 -- type clause (identifiers, expanded names, attribute references). Set
2235 -- to indicate that a use is redundant (and therefore need not be undone
2236 -- on scope exit).
2237
2238 -- Renaming_Exception (Node2-Sem)
2239 -- Present in N_Exception_Declaration node. Used to point back to the
2240 -- exception renaming for an exception declared within a subprogram.
2241 -- What happens is that an exception declared in a subprogram is moved
2242 -- to the library level with a unique name, and the original exception
2243 -- becomes a renaming. This link from the library level exception to the
2244 -- renaming declaration allows registering of the proper exception name.
2245
2246 -- Return_Statement_Entity (Node5-Sem)
2247 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
2248 -- Points to an E_Return_Statement representing the return statement.
2249
2250 -- Return_Object_Declarations (List3)
2251 -- Present in N_Extended_Return_Statement. Points to a list initially
2252 -- containing a single N_Object_Declaration representing the return
2253 -- object. We use a list (instead of just a pointer to the object decl)
2254 -- because Analyze wants to insert extra actions on this list, before the
2255 -- N_Object_Declaration, which always remains last on the list.
2256
2257 -- Rounded_Result (Flag18-Sem)
2258 -- Present in N_Type_Conversion, N_Op_Divide, and N_Op_Multiply nodes.
2259 -- Used in the fixed-point cases to indicate that the result must be
2260 -- rounded as a result of the use of the 'Round attribute. Also used for
2261 -- integer N_Op_Divide nodes to indicate that the result should be
2262 -- rounded to the nearest integer (breaking ties away from zero), rather
2263 -- than truncated towards zero as usual. These rounded integer operations
2264 -- are the result of expansion of rounded fixed-point divide, conversion
2265 -- and multiplication operations.
2266
2267 -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
2268 -- Present in compilation unit nodes. Set when the elaboration mechanism
2269 -- must record all invocation constructs and invocation relations within
2270 -- the body of the compilation unit.
2271 --
2272 -- SCIL_Entity (Node4-Sem)
2273 -- Present in SCIL nodes. References the specific tagged type associated
2274 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
2275 -- the controlling type of the call; for an N_SCIL_Membership_Test node
2276 -- generated as part of testing membership in T'Class, this is T; for an
2277 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
2278
2279 -- SCIL_Controlling_Tag (Node5-Sem)
2280 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
2281 -- tag of a dispatching call. This is usually an N_Selected_Component
2282 -- node (for a _tag component), but may be an N_Object_Declaration or
2283 -- N_Parameter_Specification node in some cases (e.g., for a call to
2284 -- a classwide streaming operation or a call to an instance of
2285 -- Ada.Tags.Generic_Dispatching_Constructor).
2286
2287 -- SCIL_Tag_Value (Node5-Sem)
2288 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2289 -- of the value that is being tested.
2290
2291 -- SCIL_Target_Prim (Node2-Sem)
2292 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2293 -- operation named (statically) in a dispatching call.
2294
2295 -- Scope (Node3-Sem)
2296 -- Present in defining identifiers, defining character literals, and
2297 -- defining operator symbols (i.e. in all entities). The entities of a
2298 -- scope all use this field to reference the corresponding scope entity.
2299 -- See Einfo for further details.
2300
2301 -- Shift_Count_OK (Flag4-Sem)
2302 -- A flag present in shift nodes to indicate that the shift count is
2303 -- known to be in range, i.e. is in the range from zero to word length
2304 -- minus one. If this flag is not set, then the shift count may be
2305 -- outside this range, i.e. larger than the word length, and the code
2306 -- must ensure that such shift counts give the appropriate result.
2307
2308 -- Source_Type (Node1-Sem)
2309 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2310 -- source type entity for the unchecked conversion instantiation
2311 -- which gigi must do size validation for.
2312
2313 -- Split_PPC (Flag17)
2314 -- When a Pre or Post aspect specification is processed, it is broken
2315 -- into AND THEN sections. The leftmost section has Split_PPC set to
2316 -- False, indicating that it is the original specification (e.g. for
2317 -- posting errors). For other sections, Split_PPC is set to True.
2318 -- This flag is set in both the N_Aspect_Specification node itself,
2319 -- and in the pragma which is generated from this node.
2320
2321 -- Storage_Pool (Node1-Sem)
2322 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2323 -- and N_Extended_Return_Statement nodes. References the entity for the
2324 -- storage pool to be used for the allocate or free call or for the
2325 -- allocation of the returned value from function. Empty indicates that
2326 -- the global default pool is to be used. Note that in the case
2327 -- of a return statement, this field is set only if the function returns
2328 -- value of a type whose size is not known at compile time on the
2329 -- secondary stack.
2330
2331 -- Suppress_Assignment_Checks (Flag18-Sem)
2332 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2333 -- and range checks in cases where the generated code knows that the
2334 -- value being assigned is in range and satisfies any predicate. Also
2335 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2336 -- checks on the initializing value. In assignment statements it also
2337 -- suppresses access checks in the generated code for out- and in-out
2338 -- parameters in entry calls.
2339
2340 -- Suppress_Loop_Warnings (Flag17-Sem)
2341 -- Used in N_Loop_Statement node to indicate that warnings within the
2342 -- body of the loop should be suppressed. This is set when the range
2343 -- of a FOR loop is known to be null, or is probably null (loop would
2344 -- only execute if invalid values are present).
2345
2346 -- Target (Node1-Sem)
2347 -- Present in call and variable reference marker nodes. References the
2348 -- entity of the original entity, operator, or subprogram being invoked,
2349 -- or the original variable being read or written.
2350
2351 -- Target_Type (Node2-Sem)
2352 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2353 -- type entity for the unchecked conversion instantiation which gigi must
2354 -- do size validation for.
2355
2356 -- Then_Actions (List3-Sem)
2357 -- This field is present in if expression nodes. During code expansion
2358 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2359 -- at an appropriate place in the tree to get elaborated at the right
2360 -- time. For if expressions, we have to be sure that the actions for
2361 -- for the Then branch are only elaborated if the condition is True.
2362 -- The Then_Actions field is used as a temporary parking place for
2363 -- these actions. The final tree is always rewritten to eliminate the
2364 -- need for this field, so in the tree passed to Gigi, this field is
2365 -- always set to No_List.
2366
2367 -- TSS_Elist (Elist3-Sem)
2368 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2369 -- entries for each TSS (type support subprogram) associated with the
2370 -- frozen type. The elements of the list are the entities for the
2371 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2372 -- if there are no type support subprograms for the type or if the freeze
2373 -- node is not for a type.
2374
2375 -- Uneval_Old_Accept (Flag7-Sem)
2376 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
2377 -- (accept) at the point where the pragma is encountered (including the
2378 -- case of a pragma generated from an aspect specification). It is this
2379 -- setting that is relevant, rather than the setting at the point where
2380 -- a contract is finally analyzed after the delay till the freeze point.
2381
2382 -- Uneval_Old_Warn (Flag18-Sem)
2383 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
2384 -- (warn) at the point where the pragma is encountered (including the
2385 -- case of a pragma generated from an aspect specification). It is this
2386 -- setting that is relevant, rather than the setting at the point where
2387 -- a contract is finally analyzed after the delay till the freeze point.
2388
2389 -- Unreferenced_In_Spec (Flag7-Sem)
2390 -- Present in N_With_Clause nodes. Set if the with clause is on the
2391 -- package or subprogram spec where the main unit is the corresponding
2392 -- body, and is not referenced by the spec (it may still be referenced by
2393 -- the body, so this flag is used to generate the proper message (see
2394 -- Sem_Util.Check_Unused_Withs for details)
2395
2396 -- Uninitialized_Variable (Node3-Sem)
2397 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2398 -- Extension_Declarations. Indicates that a variable in a generic unit
2399 -- whose type is a formal private or derived type is read without being
2400 -- initialized. Used to warn if the corresponding actual type is not
2401 -- a fully initialized type.
2402
2403 -- Used_Operations (Elist2-Sem)
2404 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2405 -- are made potentially use-visible by the clause. Simplifies processing
2406 -- on exit from the scope of the use_type_clause, in particular in the
2407 -- case of Use_All_Type, when those operations several scopes.
2408
2409 -- Was_Attribute_Reference (Flag2-Sem)
2410 -- Present in N_Subprogram_Body. Set to True if the original source is an
2411 -- attribute reference which is an actual in a generic instantiation. The
2412 -- instantiation prologue renames these attributes, and expansion later
2413 -- converts them into subprogram bodies.
2414
2415 -- Was_Default_Init_Box_Association (Flag14-Sem)
2416 -- Present in N_Component_Association. Set to True if the original source
2417 -- is an aggregate component association with a box (<>) for a component
2418 -- that is initialized by default.
2419
2420 -- Was_Expression_Function (Flag18-Sem)
2421 -- Present in N_Subprogram_Body. True if the original source had an
2422 -- N_Expression_Function, which was converted to the N_Subprogram_Body
2423 -- by Analyze_Expression_Function.
2424
2425 -- Was_Originally_Stub (Flag13-Sem)
2426 -- This flag is set in the node for a proper body that replaces stub.
2427 -- During the analysis procedure, stubs in some situations get rewritten
2428 -- by the corresponding bodies, and we set this flag to remember that
2429 -- this happened. Note that it is not good enough to rely on the use of
2430 -- Original_Node here because of the case of nested instantiations where
2431 -- the substituted node can be copied.
2432
2433 --------------------------------------------------
2434 -- Note on Use of End_Label and End_Span Fields --
2435 --------------------------------------------------
2436
2437 -- Several constructs have end lines:
2438
2439 -- Loop Statement end loop [loop_IDENTIFIER];
2440 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2441 -- Task Definition end [task_IDENTIFIER]
2442 -- Protected Definition end [protected_IDENTIFIER]
2443 -- Protected Body end [protected_IDENTIFIER]
2444
2445 -- Block Statement end [block_IDENTIFIER];
2446 -- Subprogram Body end [DESIGNATOR];
2447 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2448 -- Task Body end [task_IDENTIFIER];
2449 -- Accept Statement end [entry_IDENTIFIER]];
2450 -- Entry Body end [entry_IDENTIFIER];
2451
2452 -- If Statement end if;
2453 -- Case Statement end case;
2454
2455 -- Record Definition end record;
2456 -- Enumeration Definition );
2457
2458 -- The End_Label and End_Span fields are used to mark the locations of
2459 -- these lines, and also keep track of the label in the case where a label
2460 -- is present.
2461
2462 -- For the first group above, the End_Label field of the corresponding node
2463 -- is used to point to the label identifier. In the case where there is no
2464 -- label in the source, the parser supplies a dummy identifier (with
2465 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2466 -- marks the location of the token following the END token.
2467
2468 -- For the second group, the use of End_Label is similar, but the End_Label
2469 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2470 -- simply because in some cases there is no room in the parent node.
2471
2472 -- For the third group, there is never any label, and instead of using
2473 -- End_Label, we use the End_Span field which gives the location of the
2474 -- token following END, relative to the starting Sloc of the construct,
2475 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2476 -- following the End_Label.
2477
2478 -- The record definition case is handled specially, we treat it as though
2479 -- it required an optional label which is never present, and so the parser
2480 -- always builds a dummy identifier with Comes From Source set False. The
2481 -- reason we do this, rather than using End_Span in this case, is that we
2482 -- want to generate a cross-ref entry for the end of a record, since it
2483 -- represents a scope for name declaration purposes.
2484
2485 -- The enumeration definition case is handled in an exactly similar manner,
2486 -- building a dummy identifier to get a cross-reference.
2487
2488 -- Note: the reason we store the difference as a Uint, instead of storing
2489 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2490 -- distinguished from other types of values, and we count on all general
2491 -- use fields being self describing. To make things easier for clients,
2492 -- note that we provide function End_Location, and procedure
2493 -- Set_End_Location to allow access to the logical value (which is the
2494 -- Source_Ptr value for the end token).
2495
2496 ---------------------
2497 -- Syntactic Nodes --
2498 ---------------------
2499
2500 ---------------------
2501 -- 2.3 Identifier --
2502 ---------------------
2503
2504 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2505 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2506
2507 -- An IDENTIFIER shall not be a reserved word
2508
2509 -- In the Ada grammar identifiers are the bottom level tokens which have
2510 -- very few semantics. Actual program identifiers are direct names. If
2511 -- we were being 100% honest with the grammar, then we would have a node
2512 -- called N_Direct_Name which would point to an identifier. However,
2513 -- that's too many extra nodes, so we just use the N_Identifier node
2514 -- directly as a direct name, and it contains the expression fields and
2515 -- Entity field that correspond to its use as a direct name. In those
2516 -- few cases where identifiers appear in contexts where they are not
2517 -- direct names (pragmas, pragma argument associations, attribute
2518 -- references and attribute definition clauses), the Chars field of the
2519 -- node contains the Name_Id for the identifier name.
2520
2521 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2522 -- cases. First, an incorrect use of a reserved word as an identifier is
2523 -- diagnosed and then treated as a normal identifier. Second, an
2524 -- attribute designator of the form of a reserved word (access, delta,
2525 -- digits, range) is treated as an identifier.
2526
2527 -- Note: The set of letters that is permitted in an identifier depends
2528 -- on the character set in use. See package Csets for full details.
2529
2530 -- N_Identifier
2531 -- Sloc points to identifier
2532 -- Chars (Name1) contains the Name_Id for the identifier
2533 -- Entity (Node4-Sem)
2534 -- Associated_Node (Node4-Sem)
2535 -- Original_Discriminant (Node2-Sem)
2536 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
2537 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
2538 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
2539 -- Has_Private_View (Flag11-Sem) (set in generic units)
2540 -- Redundant_Use (Flag13-Sem)
2541 -- Atomic_Sync_Required (Flag14-Sem)
2542 -- plus fields for expression
2543
2544 --------------------------
2545 -- 2.4 Numeric Literal --
2546 --------------------------
2547
2548 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2549
2550 ----------------------------
2551 -- 2.4.1 Decimal Literal --
2552 ----------------------------
2553
2554 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2555
2556 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2557
2558 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2559
2560 -- Decimal literals appear in the tree as either integer literal nodes
2561 -- or real literal nodes, depending on whether a period is present.
2562
2563 -- Note: literal nodes appear as a result of direct use of literals
2564 -- in the source program, and also as the result of evaluating
2565 -- expressions at compile time. In the latter case, it is possible
2566 -- to construct real literals that have no syntactic representation
2567 -- using the standard literal format. Such literals are listed by
2568 -- Sprint using the notation [numerator / denominator].
2569
2570 -- Note: the value of an integer literal node created by the front end
2571 -- is never outside the range of values of the base type. However, it
2572 -- can be the case that the created value is outside the range of the
2573 -- particular subtype. This happens in the case of integer overflows
2574 -- with checks suppressed.
2575
2576 -- N_Integer_Literal
2577 -- Sloc points to literal
2578 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2579 -- has been constant-folded into its literal value.
2580 -- Intval (Uint3) contains integer value of literal
2581 -- Print_In_Hex (Flag13-Sem)
2582 -- plus fields for expression
2583
2584 -- N_Real_Literal
2585 -- Sloc points to literal
2586 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2587 -- has been constant-folded into its literal value.
2588 -- Realval (Ureal3) contains real value of literal
2589 -- Corresponding_Integer_Value (Uint4-Sem)
2590 -- Is_Machine_Number (Flag11-Sem)
2591 -- plus fields for expression
2592
2593 --------------------------
2594 -- 2.4.2 Based Literal --
2595 --------------------------
2596
2597 -- BASED_LITERAL ::=
2598 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2599
2600 -- BASE ::= NUMERAL
2601
2602 -- BASED_NUMERAL ::=
2603 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2604
2605 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2606
2607 -- Based literals appear in the tree as either integer literal nodes
2608 -- or real literal nodes, depending on whether a period is present.
2609
2610 ----------------------------
2611 -- 2.5 Character Literal --
2612 ----------------------------
2613
2614 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2615
2616 -- N_Character_Literal
2617 -- Sloc points to literal
2618 -- Chars (Name1) contains the Name_Id for the identifier
2619 -- Char_Literal_Value (Uint2) contains the literal value
2620 -- Entity (Node4-Sem)
2621 -- Associated_Node (Node4-Sem)
2622 -- Has_Private_View (Flag11-Sem) set in generic units.
2623 -- plus fields for expression
2624
2625 -- Note: the Entity field will be missing (set to Empty) for character
2626 -- literals whose type is Standard.Wide_Character or Standard.Character
2627 -- or a type derived from one of these two. In this case the character
2628 -- literal stands for its own coding. The reason we take this irregular
2629 -- short cut is to avoid the need to build lots of junk defining
2630 -- character literal nodes.
2631
2632 -------------------------
2633 -- 2.6 String Literal --
2634 -------------------------
2635
2636 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2637
2638 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2639 -- single GRAPHIC_CHARACTER other than a quotation mark.
2640 --
2641 -- Is_Folded_In_Parser is True if the parser created this literal by
2642 -- folding a sequence of "&" operators. For example, if the source code
2643 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2644 -- is set. This flag is needed because the parser doesn't know about
2645 -- visibility, so the folded result might be wrong, and semantic
2646 -- analysis needs to check for that.
2647
2648 -- N_String_Literal
2649 -- Sloc points to literal
2650 -- Strval (Str3) contains Id of string value
2651 -- Has_Wide_Character (Flag11-Sem)
2652 -- Has_Wide_Wide_Character (Flag13-Sem)
2653 -- Is_Folded_In_Parser (Flag4)
2654 -- plus fields for expression
2655
2656 ------------------
2657 -- 2.7 Comment --
2658 ------------------
2659
2660 -- A COMMENT starts with two adjacent hyphens and extends up to the
2661 -- end of the line. A COMMENT may appear on any line of a program.
2662
2663 -- Comments are skipped by the scanner and do not appear in the tree.
2664 -- It is possible to reconstruct the position of comments with respect
2665 -- to the elements of the tree by using the source position (Sloc)
2666 -- pointers that appear in every tree node.
2667
2668 -----------------
2669 -- 2.8 Pragma --
2670 -----------------
2671
2672 -- PRAGMA ::= pragma IDENTIFIER
2673 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2674
2675 -- Note that a pragma may appear in the tree anywhere a declaration
2676 -- or a statement may appear, as well as in some other situations
2677 -- which are explicitly documented.
2678
2679 -- N_Pragma
2680 -- Sloc points to PRAGMA
2681 -- Next_Pragma (Node1-Sem)
2682 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2683 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2684 -- Pragma_Identifier (Node4)
2685 -- Next_Rep_Item (Node5-Sem)
2686 -- Is_Generic_Contract_Pragma (Flag2-Sem)
2687 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
2688 -- Is_Inherited_Pragma (Flag4-Sem)
2689 -- Is_Analyzed_Pragma (Flag5-Sem)
2690 -- Class_Present (Flag6) set if from Aspect with 'Class
2691 -- Uneval_Old_Accept (Flag7-Sem)
2692 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
2693 -- Is_Ignored (Flag9-Sem)
2694 -- Is_Checked (Flag11-Sem)
2695 -- From_Aspect_Specification (Flag13-Sem)
2696 -- Is_Delayed_Aspect (Flag14-Sem)
2697 -- Is_Disabled (Flag15-Sem)
2698 -- Import_Interface_Present (Flag16-Sem)
2699 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2700 -- Uneval_Old_Warn (Flag18-Sem)
2701
2702 -- Note: we should have a section on what pragmas are passed on to
2703 -- the back end to be processed. This section should note that pragma
2704 -- Psect_Object is always converted to Common_Object, but there are
2705 -- undoubtedly many other similar notes required ???
2706
2707 -- Note: utility functions Pragma_Name_Unmapped and Pragma_Name may be
2708 -- applied to pragma nodes to obtain the Chars or its mapped version.
2709
2710 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2711 -- aspect name, as does the Pragma_Identifier. In this case if the
2712 -- pragma has a local name argument (such as pragma Inline), it is
2713 -- resolved to point to the specific entity affected by the pragma.
2714
2715 --------------------------------------
2716 -- 2.8 Pragma Argument Association --
2717 --------------------------------------
2718
2719 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2720 -- [pragma_argument_IDENTIFIER =>] NAME
2721 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2722
2723 -- In Ada 2012, there are two more possibilities:
2724
2725 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2726 -- [pragma_argument_ASPECT_MARK =>] NAME
2727 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2728
2729 -- where the interesting allowed cases (which do not fit the syntax of
2730 -- the first alternative above) are
2731
2732 -- ASPECT_MARK => Pre'Class |
2733 -- Post'Class |
2734 -- Type_Invariant'Class |
2735 -- Invariant'Class
2736
2737 -- We allow this special usage in all Ada modes, but it would be a
2738 -- pain to allow these aspects to pervade the pragma syntax, and the
2739 -- representation of pragma nodes internally. So what we do is to
2740 -- replace these ASPECT_MARK forms with identifiers whose name is one
2741 -- of the special internal names _Pre, _Post, or _Type_Invariant.
2742
2743 -- We do a similar replacement of these Aspect_Mark forms in the
2744 -- Expression of a pragma argument association for the cases of
2745 -- the first arguments of any Check pragmas and Check_Policy pragmas
2746
2747 -- N_Pragma_Argument_Association
2748 -- Sloc points to first token in association
2749 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2750 -- Expression_Copy (Node2-Sem)
2751 -- Expression (Node3)
2752
2753 ------------------------
2754 -- 2.9 Reserved Word --
2755 ------------------------
2756
2757 -- Reserved words are parsed by the scanner, and returned as the
2758 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2759
2760 ----------------------------
2761 -- 3.1 Basic Declaration --
2762 ----------------------------
2763
2764 -- BASIC_DECLARATION ::=
2765 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2766 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2767 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2768 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2769 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2770 -- | GENERIC_INSTANTIATION
2771
2772 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2773 -- see further description in section on semantic nodes.
2774
2775 -- Also, in the tree that is constructed, a pragma may appear
2776 -- anywhere that a declaration may appear.
2777
2778 ------------------------------
2779 -- 3.1 Defining Identifier --
2780 ------------------------------
2781
2782 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2783
2784 -- A defining identifier is an entity, which has additional fields
2785 -- depending on the setting of the Ekind field. These additional
2786 -- fields are defined (and access subprograms declared) in package
2787 -- Einfo.
2788
2789 -- Note: N_Defining_Identifier is an extended node whose fields are
2790 -- deliberately laid out to match the layout of fields in an ordinary
2791 -- N_Identifier node allowing for easy alteration of an identifier
2792 -- node into a defining identifier node. For details, see procedure
2793 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2794
2795 -- N_Defining_Identifier
2796 -- Sloc points to identifier
2797 -- Chars (Name1) contains the Name_Id for the identifier
2798 -- Next_Entity (Node2-Sem)
2799 -- Scope (Node3-Sem)
2800 -- Etype (Node5-Sem)
2801
2802 -----------------------------
2803 -- 3.2.1 Type Declaration --
2804 -----------------------------
2805
2806 -- TYPE_DECLARATION ::=
2807 -- FULL_TYPE_DECLARATION
2808 -- | INCOMPLETE_TYPE_DECLARATION
2809 -- | PRIVATE_TYPE_DECLARATION
2810 -- | PRIVATE_EXTENSION_DECLARATION
2811
2812 ----------------------------------
2813 -- 3.2.1 Full Type Declaration --
2814 ----------------------------------
2815
2816 -- FULL_TYPE_DECLARATION ::=
2817 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2818 -- is TYPE_DEFINITION
2819 -- [ASPECT_SPECIFICATIONS];
2820 -- | TASK_TYPE_DECLARATION
2821 -- | PROTECTED_TYPE_DECLARATION
2822
2823 -- The full type declaration node is used only for the first case. The
2824 -- second case (concurrent type declaration), is represented directly
2825 -- by a task type declaration or a protected type declaration.
2826
2827 -- N_Full_Type_Declaration
2828 -- Sloc points to TYPE
2829 -- Defining_Identifier (Node1)
2830 -- Incomplete_View (Node2-Sem)
2831 -- Discriminant_Specifications (List4) (set to No_List if none)
2832 -- Type_Definition (Node3)
2833 -- Discr_Check_Funcs_Built (Flag11-Sem)
2834
2835 ----------------------------
2836 -- 3.2.1 Type Definition --
2837 ----------------------------
2838
2839 -- TYPE_DEFINITION ::=
2840 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2841 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2842 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2843 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2844
2845 --------------------------------
2846 -- 3.2.2 Subtype Declaration --
2847 --------------------------------
2848
2849 -- SUBTYPE_DECLARATION ::=
2850 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2851 -- [ASPECT_SPECIFICATIONS];
2852
2853 -- The subtype indication field is set to Empty for subtypes
2854 -- declared in package Standard (Positive, Natural).
2855
2856 -- N_Subtype_Declaration
2857 -- Sloc points to SUBTYPE
2858 -- Defining_Identifier (Node1)
2859 -- Null_Exclusion_Present (Flag11)
2860 -- Subtype_Indication (Node5)
2861 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2862 -- Exception_Junk (Flag8-Sem)
2863
2864 -------------------------------
2865 -- 3.2.2 Subtype Indication --
2866 -------------------------------
2867
2868 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2869
2870 -- Note: if no constraint is present, the subtype indication appears
2871 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2872 -- node is used only if a constraint is present.
2873
2874 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2875 -- with the null-exclusion part (see AI-231), we had to introduce a new
2876 -- attribute in all the parents of subtype_indication nodes to indicate
2877 -- if the null-exclusion is present.
2878
2879 -- Note: the reason that this node has expression fields is that a
2880 -- subtype indication can appear as an operand of a membership test.
2881
2882 -- N_Subtype_Indication
2883 -- Sloc points to first token of subtype mark
2884 -- Subtype_Mark (Node4)
2885 -- Constraint (Node3)
2886 -- Etype (Node5-Sem)
2887 -- Must_Not_Freeze (Flag8-Sem)
2888
2889 -- Note: Depending on context, the Etype is either the entity of the
2890 -- Subtype_Mark field, or it is an itype constructed to reify the
2891 -- subtype indication. In particular, such itypes are created for a
2892 -- subtype indication that appears in an array type declaration. This
2893 -- simplifies constraint checking in indexed components.
2894
2895 -- For subtype indications that appear in scalar type and subtype
2896 -- declarations, the Etype is the entity of the subtype mark.
2897
2898 -------------------------
2899 -- 3.2.2 Subtype Mark --
2900 -------------------------
2901
2902 -- SUBTYPE_MARK ::= subtype_NAME
2903
2904 -----------------------
2905 -- 3.2.2 Constraint --
2906 -----------------------
2907
2908 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2909
2910 ------------------------------
2911 -- 3.2.2 Scalar Constraint --
2912 ------------------------------
2913
2914 -- SCALAR_CONSTRAINT ::=
2915 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2916
2917 ---------------------------------
2918 -- 3.2.2 Composite Constraint --
2919 ---------------------------------
2920
2921 -- COMPOSITE_CONSTRAINT ::=
2922 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2923
2924 -------------------------------
2925 -- 3.3.1 Object Declaration --
2926 -------------------------------
2927
2928 -- OBJECT_DECLARATION ::=
2929 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2930 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2931 -- [ASPECT_SPECIFICATIONS];
2932 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2933 -- ACCESS_DEFINITION [:= EXPRESSION]
2934 -- [ASPECT_SPECIFICATIONS];
2935 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2936 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2937 -- [ASPECT_SPECIFICATIONS];
2938 -- | SINGLE_TASK_DECLARATION
2939 -- | SINGLE_PROTECTED_DECLARATION
2940
2941 -- Note: aliased is not permitted in Ada 83 mode
2942
2943 -- The N_Object_Declaration node is only for the first three cases.
2944 -- Single task declaration is handled by P_Task (9.1)
2945 -- Single protected declaration is handled by P_protected (9.5)
2946
2947 -- Although the syntax allows multiple identifiers in the list, the
2948 -- semantics is as though successive declarations were given with
2949 -- identical type definition and expression components. To simplify
2950 -- semantic processing, the parser represents a multiple declaration
2951 -- case as a sequence of single declarations, using the More_Ids and
2952 -- Prev_Ids flags to preserve the original source form as described
2953 -- in the section on "Handling of Defining Identifier Lists".
2954
2955 -- The flag Has_Init_Expression is set if an initializing expression
2956 -- is present. Normally it is set if and only if Expression contains
2957 -- a non-empty value, but there is an exception to this. When the
2958 -- initializing expression is an aggregate which requires explicit
2959 -- assignments, the Expression field gets set to Empty, but this flag
2960 -- is still set, so we don't forget we had an initializing expression.
2961
2962 -- Note: if a range check is required for the initialization
2963 -- expression then the Do_Range_Check flag is set in the Expression,
2964 -- with the check being done against the type given by the object
2965 -- definition, which is also the Etype of the defining identifier.
2966
2967 -- Note: the contents of the Expression field must be ignored (i.e.
2968 -- treated as though it were Empty) if No_Initialization is set True.
2969
2970 -- Note: the back end places some restrictions on the form of the
2971 -- Expression field. If the object being declared is Atomic, then
2972 -- the Expression may not have the form of an aggregate (since this
2973 -- might cause the back end to generate separate assignments). In this
2974 -- case the front end must generate an extra temporary and initialize
2975 -- this temporary as required (the temporary itself is not atomic).
2976
2977 -- Note: there is no node kind for object definition. Instead, the
2978 -- corresponding field holds a subtype indication, an array type
2979 -- definition, or (Ada 2005, AI-406) an access definition.
2980
2981 -- N_Object_Declaration
2982 -- Sloc points to first identifier
2983 -- Defining_Identifier (Node1)
2984 -- Aliased_Present (Flag4)
2985 -- Constant_Present (Flag17) set if CONSTANT appears
2986 -- Null_Exclusion_Present (Flag11)
2987 -- Object_Definition (Node4) subtype indic./array type def./access def.
2988 -- Expression (Node3) (set to Empty if not present)
2989 -- Handler_List_Entry (Node2-Sem)
2990 -- Corresponding_Generic_Association (Node5-Sem)
2991 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2992 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2993 -- No_Initialization (Flag13-Sem)
2994 -- Assignment_OK (Flag15-Sem)
2995 -- Exception_Junk (Flag8-Sem)
2996 -- Is_Subprogram_Descriptor (Flag16-Sem)
2997 -- Has_Init_Expression (Flag14)
2998 -- Suppress_Assignment_Checks (Flag18-Sem)
2999
3000 -------------------------------------
3001 -- 3.3.1 Defining Identifier List --
3002 -------------------------------------
3003
3004 -- DEFINING_IDENTIFIER_LIST ::=
3005 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
3006
3007 -------------------------------
3008 -- 3.3.2 Number Declaration --
3009 -------------------------------
3010
3011 -- NUMBER_DECLARATION ::=
3012 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
3013
3014 -- Although the syntax allows multiple identifiers in the list, the
3015 -- semantics is as though successive declarations were given with
3016 -- identical expressions. To simplify semantic processing, the parser
3017 -- represents a multiple declaration case as a sequence of single
3018 -- declarations, using the More_Ids and Prev_Ids flags to preserve
3019 -- the original source form as described in the section on "Handling
3020 -- of Defining Identifier Lists".
3021
3022 -- N_Number_Declaration
3023 -- Sloc points to first identifier
3024 -- Defining_Identifier (Node1)
3025 -- Expression (Node3)
3026 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3027 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3028
3029 ----------------------------------
3030 -- 3.4 Derived Type Definition --
3031 ----------------------------------
3032
3033 -- DERIVED_TYPE_DEFINITION ::=
3034 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
3035 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
3036
3037 -- Note: ABSTRACT, LIMITED, and record extension part are not permitted
3038 -- in Ada 83 mode.
3039
3040 -- Note: a record extension part is required if ABSTRACT is present
3041
3042 -- N_Derived_Type_Definition
3043 -- Sloc points to NEW
3044 -- Abstract_Present (Flag4)
3045 -- Null_Exclusion_Present (Flag11) (set to False if not present)
3046 -- Subtype_Indication (Node5)
3047 -- Record_Extension_Part (Node3) (set to Empty if not present)
3048 -- Limited_Present (Flag17)
3049 -- Task_Present (Flag5) set in task interfaces
3050 -- Protected_Present (Flag6) set in protected interfaces
3051 -- Synchronized_Present (Flag7) set in interfaces
3052 -- Interface_List (List2) (set to No_List if none)
3053 -- Interface_Present (Flag16) set in abstract interfaces
3054
3055 -- Note: Task_Present, Protected_Present, Synchronized_Present,
3056 -- Interface_List, and Interface_Present are used for abstract
3057 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3058
3059 ---------------------------
3060 -- 3.5 Range Constraint --
3061 ---------------------------
3062
3063 -- RANGE_CONSTRAINT ::= range RANGE
3064
3065 -- N_Range_Constraint
3066 -- Sloc points to RANGE
3067 -- Range_Expression (Node4)
3068
3069 ----------------
3070 -- 3.5 Range --
3071 ----------------
3072
3073 -- RANGE ::=
3074 -- RANGE_ATTRIBUTE_REFERENCE
3075 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
3076
3077 -- Note: the case of a range given as a range attribute reference
3078 -- appears directly in the tree as an attribute reference.
3079
3080 -- Note: the field name for a reference to a range is Range_Expression
3081 -- rather than Range, because range is a reserved keyword in Ada.
3082
3083 -- Note: the reason that this node has expression fields is that a
3084 -- range can appear as an operand of a membership test. The Etype
3085 -- field is the type of the range (we do NOT construct an implicit
3086 -- subtype to represent the range exactly).
3087
3088 -- N_Range
3089 -- Sloc points to ..
3090 -- Low_Bound (Node1)
3091 -- High_Bound (Node2)
3092 -- Includes_Infinities (Flag11)
3093 -- plus fields for expression
3094
3095 -- Note: if the range appears in a context, such as a subtype
3096 -- declaration, where range checks are required on one or both of
3097 -- the expression fields, then type conversion nodes are inserted
3098 -- to represent the required checks.
3099
3100 ----------------------------------------
3101 -- 3.5.1 Enumeration Type Definition --
3102 ----------------------------------------
3103
3104 -- ENUMERATION_TYPE_DEFINITION ::=
3105 -- (ENUMERATION_LITERAL_SPECIFICATION
3106 -- {, ENUMERATION_LITERAL_SPECIFICATION})
3107
3108 -- Note: the Literals field in the node described below is null for
3109 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
3110 -- which special processing handles these types as special cases.
3111
3112 -- N_Enumeration_Type_Definition
3113 -- Sloc points to left parenthesis
3114 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
3115 -- End_Label (Node4) (set to Empty if internally generated record)
3116
3117 ----------------------------------------------
3118 -- 3.5.1 Enumeration Literal Specification --
3119 ----------------------------------------------
3120
3121 -- ENUMERATION_LITERAL_SPECIFICATION ::=
3122 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
3123
3124 ---------------------------------------
3125 -- 3.5.1 Defining Character Literal --
3126 ---------------------------------------
3127
3128 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
3129
3130 -- A defining character literal is an entity, which has additional
3131 -- fields depending on the setting of the Ekind field. These
3132 -- additional fields are defined (and access subprograms declared)
3133 -- in package Einfo.
3134
3135 -- Note: N_Defining_Character_Literal is an extended node whose fields
3136 -- are deliberately laid out to match layout of fields in an ordinary
3137 -- N_Character_Literal node, allowing for easy alteration of a character
3138 -- literal node into a defining character literal node. For details, see
3139 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
3140
3141 -- N_Defining_Character_Literal
3142 -- Sloc points to literal
3143 -- Chars (Name1) contains the Name_Id for the identifier
3144 -- Next_Entity (Node2-Sem)
3145 -- Scope (Node3-Sem)
3146 -- Etype (Node5-Sem)
3147
3148 ------------------------------------
3149 -- 3.5.4 Integer Type Definition --
3150 ------------------------------------
3151
3152 -- Note: there is an error in this rule in the latest version of the
3153 -- grammar, so we have retained the old rule pending clarification.
3154
3155 -- INTEGER_TYPE_DEFINITION ::=
3156 -- SIGNED_INTEGER_TYPE_DEFINITION
3157 -- | MODULAR_TYPE_DEFINITION
3158
3159 -------------------------------------------
3160 -- 3.5.4 Signed Integer Type Definition --
3161 -------------------------------------------
3162
3163 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
3164 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3165
3166 -- Note: the Low_Bound and High_Bound fields are set to Empty
3167 -- for integer types defined in package Standard.
3168
3169 -- N_Signed_Integer_Type_Definition
3170 -- Sloc points to RANGE
3171 -- Low_Bound (Node1)
3172 -- High_Bound (Node2)
3173
3174 ------------------------------------
3175 -- 3.5.4 Modular Type Definition --
3176 ------------------------------------
3177
3178 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
3179
3180 -- N_Modular_Type_Definition
3181 -- Sloc points to MOD
3182 -- Expression (Node3)
3183
3184 ---------------------------------
3185 -- 3.5.6 Real Type Definition --
3186 ---------------------------------
3187
3188 -- REAL_TYPE_DEFINITION ::=
3189 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
3190
3191 --------------------------------------
3192 -- 3.5.7 Floating Point Definition --
3193 --------------------------------------
3194
3195 -- FLOATING_POINT_DEFINITION ::=
3196 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
3197
3198 -- Note: The Digits_Expression and Real_Range_Specifications fields
3199 -- are set to Empty for floating-point types declared in Standard.
3200
3201 -- N_Floating_Point_Definition
3202 -- Sloc points to DIGITS
3203 -- Digits_Expression (Node2)
3204 -- Real_Range_Specification (Node4) (set to Empty if not present)
3205
3206 -------------------------------------
3207 -- 3.5.7 Real Range Specification --
3208 -------------------------------------
3209
3210 -- REAL_RANGE_SPECIFICATION ::=
3211 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3212
3213 -- N_Real_Range_Specification
3214 -- Sloc points to RANGE
3215 -- Low_Bound (Node1)
3216 -- High_Bound (Node2)
3217
3218 -----------------------------------
3219 -- 3.5.9 Fixed Point Definition --
3220 -----------------------------------
3221
3222 -- FIXED_POINT_DEFINITION ::=
3223 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
3224
3225 --------------------------------------------
3226 -- 3.5.9 Ordinary Fixed Point Definition --
3227 --------------------------------------------
3228
3229 -- ORDINARY_FIXED_POINT_DEFINITION ::=
3230 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
3231
3232 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3233
3234 -- N_Ordinary_Fixed_Point_Definition
3235 -- Sloc points to DELTA
3236 -- Delta_Expression (Node3)
3237 -- Real_Range_Specification (Node4)
3238
3239 -------------------------------------------
3240 -- 3.5.9 Decimal Fixed Point Definition --
3241 -------------------------------------------
3242
3243 -- DECIMAL_FIXED_POINT_DEFINITION ::=
3244 -- delta static_EXPRESSION
3245 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
3246
3247 -- Note: decimal types are not permitted in Ada 83 mode
3248
3249 -- N_Decimal_Fixed_Point_Definition
3250 -- Sloc points to DELTA
3251 -- Delta_Expression (Node3)
3252 -- Digits_Expression (Node2)
3253 -- Real_Range_Specification (Node4) (set to Empty if not present)
3254
3255 ------------------------------
3256 -- 3.5.9 Digits Constraint --
3257 ------------------------------
3258
3259 -- DIGITS_CONSTRAINT ::=
3260 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
3261
3262 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3263 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
3264
3265 -- N_Digits_Constraint
3266 -- Sloc points to DIGITS
3267 -- Digits_Expression (Node2)
3268 -- Range_Constraint (Node4) (set to Empty if not present)
3269
3270 --------------------------------
3271 -- 3.6 Array Type Definition --
3272 --------------------------------
3273
3274 -- ARRAY_TYPE_DEFINITION ::=
3275 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
3276
3277 -----------------------------------------
3278 -- 3.6 Unconstrained Array Definition --
3279 -----------------------------------------
3280
3281 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
3282 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
3283 -- COMPONENT_DEFINITION
3284
3285 -- Note: dimensionality of array is indicated by number of entries in
3286 -- the Subtype_Marks list, which has one entry for each dimension.
3287
3288 -- N_Unconstrained_Array_Definition
3289 -- Sloc points to ARRAY
3290 -- Subtype_Marks (List2)
3291 -- Component_Definition (Node4)
3292
3293 -----------------------------------
3294 -- 3.6 Index Subtype Definition --
3295 -----------------------------------
3296
3297 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3298
3299 -- There is no explicit node in the tree for an index subtype
3300 -- definition since the N_Unconstrained_Array_Definition node
3301 -- incorporates the type marks which appear in this context.
3302
3303 ---------------------------------------
3304 -- 3.6 Constrained Array Definition --
3305 ---------------------------------------
3306
3307 -- CONSTRAINED_ARRAY_DEFINITION ::=
3308 -- array (DISCRETE_SUBTYPE_DEFINITION
3309 -- {, DISCRETE_SUBTYPE_DEFINITION})
3310 -- of COMPONENT_DEFINITION
3311
3312 -- Note: dimensionality of array is indicated by number of entries
3313 -- in the Discrete_Subtype_Definitions list, which has one entry
3314 -- for each dimension.
3315
3316 -- N_Constrained_Array_Definition
3317 -- Sloc points to ARRAY
3318 -- Discrete_Subtype_Definitions (List2)
3319 -- Component_Definition (Node4)
3320
3321 -- Note: although the language allows the full syntax for discrete
3322 -- subtype definitions (i.e. a discrete subtype indication or a range),
3323 -- in the generated tree, we always rewrite these as N_Range nodes.
3324
3325 --------------------------------------
3326 -- 3.6 Discrete Subtype Definition --
3327 --------------------------------------
3328
3329 -- DISCRETE_SUBTYPE_DEFINITION ::=
3330 -- discrete_SUBTYPE_INDICATION | RANGE
3331
3332 -------------------------------
3333 -- 3.6 Component Definition --
3334 -------------------------------
3335
3336 -- COMPONENT_DEFINITION ::=
3337 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3338
3339 -- Note: although the syntax does not permit a component definition to
3340 -- be an anonymous array (and the parser will diagnose such an attempt
3341 -- with an appropriate message), it is possible for anonymous arrays
3342 -- to appear as component definitions. The semantics and back end handle
3343 -- this case properly, and the expander in fact generates such cases.
3344 -- Access_Definition is an optional field that gives support to
3345 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3346 -- Subtype_Indication field or else the Access_Definition field.
3347
3348 -- N_Component_Definition
3349 -- Sloc points to ALIASED, ACCESS, or to first token of subtype mark
3350 -- Aliased_Present (Flag4)
3351 -- Null_Exclusion_Present (Flag11)
3352 -- Subtype_Indication (Node5) (set to Empty if not present)
3353 -- Access_Definition (Node3) (set to Empty if not present)
3354
3355 -----------------------------
3356 -- 3.6.1 Index Constraint --
3357 -----------------------------
3358
3359 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3360
3361 -- It is not in general possible to distinguish between discriminant
3362 -- constraints and index constraints at parse time, since a simple
3363 -- name could be either the subtype mark of a discrete range, or an
3364 -- expression in a discriminant association with no name. Either
3365 -- entry appears simply as the name, and the semantic parse must
3366 -- distinguish between the two cases. Thus we use a common tree
3367 -- node format for both of these constraint types.
3368
3369 -- See Discriminant_Constraint for format of node
3370
3371 ---------------------------
3372 -- 3.6.1 Discrete Range --
3373 ---------------------------
3374
3375 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3376
3377 ----------------------------
3378 -- 3.7 Discriminant Part --
3379 ----------------------------
3380
3381 -- DISCRIMINANT_PART ::=
3382 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3383
3384 ------------------------------------
3385 -- 3.7 Unknown Discriminant Part --
3386 ------------------------------------
3387
3388 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3389
3390 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3391
3392 -- There is no explicit node in the tree for an unknown discriminant
3393 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3394 -- parent node.
3395
3396 ----------------------------------
3397 -- 3.7 Known Discriminant Part --
3398 ----------------------------------
3399
3400 -- KNOWN_DISCRIMINANT_PART ::=
3401 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3402
3403 -------------------------------------
3404 -- 3.7 Discriminant Specification --
3405 -------------------------------------
3406
3407 -- DISCRIMINANT_SPECIFICATION ::=
3408 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3409 -- [:= DEFAULT_EXPRESSION]
3410 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3411 -- [:= DEFAULT_EXPRESSION]
3412
3413 -- Although the syntax allows multiple identifiers in the list, the
3414 -- semantics is as though successive specifications were given with
3415 -- identical type definition and expression components. To simplify
3416 -- semantic processing, the parser represents a multiple declaration
3417 -- case as a sequence of single specifications, using the More_Ids and
3418 -- Prev_Ids flags to preserve the original source form as described
3419 -- in the section on "Handling of Defining Identifier Lists".
3420
3421 -- N_Discriminant_Specification
3422 -- Sloc points to first identifier
3423 -- Defining_Identifier (Node1)
3424 -- Null_Exclusion_Present (Flag11)
3425 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3426 -- Expression (Node3) (set to Empty if no default expression)
3427 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3428 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3429
3430 -----------------------------
3431 -- 3.7 Default Expression --
3432 -----------------------------
3433
3434 -- DEFAULT_EXPRESSION ::= EXPRESSION
3435
3436 ------------------------------------
3437 -- 3.7.1 Discriminant Constraint --
3438 ------------------------------------
3439
3440 -- DISCRIMINANT_CONSTRAINT ::=
3441 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3442
3443 -- It is not in general possible to distinguish between discriminant
3444 -- constraints and index constraints at parse time, since a simple
3445 -- name could be either the subtype mark of a discrete range, or an
3446 -- expression in a discriminant association with no name. Either
3447 -- entry appears simply as the name, and the semantic parse must
3448 -- distinguish between the two cases. Thus we use a common tree
3449 -- node format for both of these constraint types.
3450
3451 -- N_Index_Or_Discriminant_Constraint
3452 -- Sloc points to left paren
3453 -- Constraints (List1) points to list of discrete ranges or
3454 -- discriminant associations
3455
3456 -------------------------------------
3457 -- 3.7.1 Discriminant Association --
3458 -------------------------------------
3459
3460 -- DISCRIMINANT_ASSOCIATION ::=
3461 -- [discriminant_SELECTOR_NAME
3462 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3463
3464 -- Note: a discriminant association that has no selector name list
3465 -- appears directly as an expression in the tree.
3466
3467 -- N_Discriminant_Association
3468 -- Sloc points to first token of discriminant association
3469 -- Selector_Names (List1) (always non-empty, since if no selector
3470 -- names are present, this node is not used, see comment above)
3471 -- Expression (Node3)
3472
3473 ---------------------------------
3474 -- 3.8 Record Type Definition --
3475 ---------------------------------
3476
3477 -- RECORD_TYPE_DEFINITION ::=
3478 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3479
3480 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3481
3482 -- There is no explicit node in the tree for a record type definition.
3483 -- Instead the flags for Tagged_Present and Limited_Present appear in
3484 -- the N_Record_Definition node for a record definition appearing in
3485 -- the context of a record type definition.
3486
3487 ----------------------------
3488 -- 3.8 Record Definition --
3489 ----------------------------
3490
3491 -- RECORD_DEFINITION ::=
3492 -- record
3493 -- COMPONENT_LIST
3494 -- end record
3495 -- | null record
3496
3497 -- Note: the Abstract_Present, Tagged_Present, and Limited_Present
3498 -- flags appear only for a record definition appearing in a record
3499 -- type definition.
3500
3501 -- Note: the NULL RECORD case is not permitted in Ada 83
3502
3503 -- N_Record_Definition
3504 -- Sloc points to RECORD or NULL
3505 -- End_Label (Node4) (set to Empty if internally generated record)
3506 -- Abstract_Present (Flag4)
3507 -- Tagged_Present (Flag15)
3508 -- Limited_Present (Flag17)
3509 -- Component_List (Node1) empty in null record case
3510 -- Null_Present (Flag13) set in null record case
3511 -- Task_Present (Flag5) set in task interfaces
3512 -- Protected_Present (Flag6) set in protected interfaces
3513 -- Synchronized_Present (Flag7) set in interfaces
3514 -- Interface_Present (Flag16) set in abstract interfaces
3515 -- Interface_List (List2) (set to No_List if none)
3516
3517 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3518 -- Interface_List and Interface_Present are used for abstract
3519 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3520
3521 -------------------------
3522 -- 3.8 Component List --
3523 -------------------------
3524
3525 -- COMPONENT_LIST ::=
3526 -- COMPONENT_ITEM {COMPONENT_ITEM}
3527 -- | {COMPONENT_ITEM} VARIANT_PART
3528 -- | null;
3529
3530 -- N_Component_List
3531 -- Sloc points to first token of component list
3532 -- Component_Items (List3)
3533 -- Variant_Part (Node4) (set to Empty if no variant part)
3534 -- Null_Present (Flag13)
3535
3536 -------------------------
3537 -- 3.8 Component Item --
3538 -------------------------
3539
3540 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3541
3542 -- Note: A component item can also be a pragma, and in the tree
3543 -- that is obtained after semantic processing, a component item
3544 -- can be an N_Null node resulting from a non-recognized pragma.
3545
3546 --------------------------------
3547 -- 3.8 Component Declaration --
3548 --------------------------------
3549
3550 -- COMPONENT_DECLARATION ::=
3551 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3552 -- [:= DEFAULT_EXPRESSION]
3553 -- [ASPECT_SPECIFICATIONS];
3554
3555 -- Note: although the syntax does not permit a component definition to
3556 -- be an anonymous array (and the parser will diagnose such an attempt
3557 -- with an appropriate message), it is possible for anonymous arrays
3558 -- to appear as component definitions. The semantics and back end handle
3559 -- this case properly, and the expander in fact generates such cases.
3560
3561 -- Although the syntax allows multiple identifiers in the list, the
3562 -- semantics is as though successive declarations were given with the
3563 -- same component definition and expression components. To simplify
3564 -- semantic processing, the parser represents a multiple declaration
3565 -- case as a sequence of single declarations, using the More_Ids and
3566 -- Prev_Ids flags to preserve the original source form as described
3567 -- in the section on "Handling of Defining Identifier Lists".
3568
3569 -- N_Component_Declaration
3570 -- Sloc points to first identifier
3571 -- Defining_Identifier (Node1)
3572 -- Component_Definition (Node4)
3573 -- Expression (Node3) (set to Empty if no default expression)
3574 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3575 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3576
3577 -------------------------
3578 -- 3.8.1 Variant Part --
3579 -------------------------
3580
3581 -- VARIANT_PART ::=
3582 -- case discriminant_DIRECT_NAME is
3583 -- VARIANT {VARIANT}
3584 -- end case;
3585
3586 -- Note: the variants list can contain pragmas as well as variants.
3587 -- In a properly formed program there is at least one variant.
3588
3589 -- N_Variant_Part
3590 -- Sloc points to CASE
3591 -- Name (Node2)
3592 -- Variants (List1)
3593
3594 --------------------
3595 -- 3.8.1 Variant --
3596 --------------------
3597
3598 -- VARIANT ::=
3599 -- when DISCRETE_CHOICE_LIST =>
3600 -- COMPONENT_LIST
3601
3602 -- N_Variant
3603 -- Sloc points to WHEN
3604 -- Discrete_Choices (List4)
3605 -- Component_List (Node1)
3606 -- Enclosing_Variant (Node2-Sem)
3607 -- Present_Expr (Uint3-Sem)
3608 -- Dcheck_Function (Node5-Sem)
3609 -- Has_SP_Choice (Flag15-Sem)
3610
3611 -- Note: in the list of Discrete_Choices, the tree passed to the back
3612 -- end does not have choice entries corresponding to names of statically
3613 -- predicated subtypes. Such entries are always expanded out to the list
3614 -- of equivalent values or ranges.
3615
3616 ---------------------------------
3617 -- 3.8.1 Discrete Choice List --
3618 ---------------------------------
3619
3620 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3621
3622 ----------------------------
3623 -- 3.8.1 Discrete Choice --
3624 ----------------------------
3625
3626 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3627
3628 -- Note: in Ada 83 mode, the expression must be a simple expression
3629
3630 -- The only choice that appears explicitly is the OTHERS choice, as
3631 -- defined here. Other cases of discrete choice (expression and
3632 -- discrete range) appear directly. This production is also used
3633 -- for the OTHERS possibility of an exception choice.
3634
3635 -- Note: in accordance with the syntax, the parser does not check that
3636 -- OTHERS appears at the end on its own in a choice list context. This
3637 -- is a semantic check.
3638
3639 -- N_Others_Choice
3640 -- Sloc points to OTHERS
3641 -- Others_Discrete_Choices (List1-Sem)
3642 -- All_Others (Flag11-Sem)
3643
3644 ----------------------------------
3645 -- 3.9.1 Record Extension Part --
3646 ----------------------------------
3647
3648 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3649
3650 -- Note: record extension parts are not permitted in Ada 83 mode
3651
3652 --------------------------------------
3653 -- 3.9.4 Interface Type Definition --
3654 --------------------------------------
3655
3656 -- INTERFACE_TYPE_DEFINITION ::=
3657 -- [limited | task | protected | synchronized]
3658 -- interface [interface_list]
3659
3660 -- Note: Interfaces are implemented with N_Record_Definition and
3661 -- N_Derived_Type_Definition nodes because most of the support
3662 -- for the analysis of abstract types has been reused to
3663 -- analyze abstract interfaces.
3664
3665 ----------------------------------
3666 -- 3.10 Access Type Definition --
3667 ----------------------------------
3668
3669 -- ACCESS_TYPE_DEFINITION ::=
3670 -- ACCESS_TO_OBJECT_DEFINITION
3671 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3672
3673 --------------------------
3674 -- 3.10 Null Exclusion --
3675 --------------------------
3676
3677 -- NULL_EXCLUSION ::= not null
3678
3679 ---------------------------------------
3680 -- 3.10 Access To Object Definition --
3681 ---------------------------------------
3682
3683 -- ACCESS_TO_OBJECT_DEFINITION ::=
3684 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3685 -- SUBTYPE_INDICATION
3686
3687 -- N_Access_To_Object_Definition
3688 -- Sloc points to ACCESS
3689 -- All_Present (Flag15)
3690 -- Null_Exclusion_Present (Flag11)
3691 -- Null_Excluding_Subtype (Flag16)
3692 -- Subtype_Indication (Node5)
3693 -- Constant_Present (Flag17)
3694
3695 -----------------------------------
3696 -- 3.10 General Access Modifier --
3697 -----------------------------------
3698
3699 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3700
3701 -- Note: general access modifiers are not permitted in Ada 83 mode
3702
3703 -- There is no explicit node in the tree for general access modifier.
3704 -- Instead the All_Present or Constant_Present flags are set in the
3705 -- parent node.
3706
3707 -------------------------------------------
3708 -- 3.10 Access To Subprogram Definition --
3709 -------------------------------------------
3710
3711 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3712 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3713 -- | [NULL_EXCLUSION] access [protected] function
3714 -- PARAMETER_AND_RESULT_PROFILE
3715
3716 -- Note: access to subprograms are not permitted in Ada 83 mode
3717
3718 -- N_Access_Function_Definition
3719 -- Sloc points to ACCESS
3720 -- Null_Exclusion_Present (Flag11)
3721 -- Null_Exclusion_In_Return_Present (Flag14)
3722 -- Protected_Present (Flag6)
3723 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3724 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3725
3726 -- N_Access_Procedure_Definition
3727 -- Sloc points to ACCESS
3728 -- Null_Exclusion_Present (Flag11)
3729 -- Protected_Present (Flag6)
3730 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3731
3732 -----------------------------
3733 -- 3.10 Access Definition --
3734 -----------------------------
3735
3736 -- ACCESS_DEFINITION ::=
3737 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3738 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3739
3740 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3741
3742 -- N_Access_Definition
3743 -- Sloc points to ACCESS
3744 -- Null_Exclusion_Present (Flag11)
3745 -- All_Present (Flag15)
3746 -- Constant_Present (Flag17)
3747 -- Subtype_Mark (Node4)
3748 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3749
3750 -----------------------------------------
3751 -- 3.10.1 Incomplete Type Declaration --
3752 -----------------------------------------
3753
3754 -- INCOMPLETE_TYPE_DECLARATION ::=
3755 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3756
3757 -- N_Incomplete_Type_Declaration
3758 -- Sloc points to TYPE
3759 -- Defining_Identifier (Node1)
3760 -- Discriminant_Specifications (List4) (set to No_List if no
3761 -- discriminant part, or if the discriminant part is an
3762 -- unknown discriminant part)
3763 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3764 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3765 -- Tagged_Present (Flag15)
3766
3767 ----------------------------
3768 -- 3.11 Declarative Part --
3769 ----------------------------
3770
3771 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3772
3773 -- Note: although the parser enforces the syntactic requirement that
3774 -- a declarative part can contain only declarations, the semantic
3775 -- processing may add statements to the list of actions in a
3776 -- declarative part, so the code generator should be prepared
3777 -- to accept a statement in this position.
3778
3779 ----------------------------
3780 -- 3.11 Declarative Item --
3781 ----------------------------
3782
3783 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3784
3785 ----------------------------------
3786 -- 3.11 Basic Declarative Item --
3787 ----------------------------------
3788
3789 -- BASIC_DECLARATIVE_ITEM ::=
3790 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3791
3792 ----------------
3793 -- 3.11 Body --
3794 ----------------
3795
3796 -- BODY ::= PROPER_BODY | BODY_STUB
3797
3798 -----------------------
3799 -- 3.11 Proper Body --
3800 -----------------------
3801
3802 -- PROPER_BODY ::=
3803 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3804
3805 ---------------
3806 -- 4.1 Name --
3807 ---------------
3808
3809 -- NAME ::=
3810 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3811 -- | INDEXED_COMPONENT | SLICE
3812 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3813 -- | TYPE_CONVERSION | FUNCTION_CALL
3814 -- | CHARACTER_LITERAL
3815
3816 ----------------------
3817 -- 4.1 Direct Name --
3818 ----------------------
3819
3820 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3821
3822 -----------------
3823 -- 4.1 Prefix --
3824 -----------------
3825
3826 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3827
3828 -------------------------------
3829 -- 4.1 Explicit Dereference --
3830 -------------------------------
3831
3832 -- EXPLICIT_DEREFERENCE ::= NAME . all
3833
3834 -- N_Explicit_Dereference
3835 -- Sloc points to ALL
3836 -- Prefix (Node3)
3837 -- Actual_Designated_Subtype (Node4-Sem)
3838 -- Has_Dereference_Action (Flag13-Sem)
3839 -- Atomic_Sync_Required (Flag14-Sem)
3840 -- plus fields for expression
3841
3842 -------------------------------
3843 -- 4.1 Implicit Dereference --
3844 -------------------------------
3845
3846 -- IMPLICIT_DEREFERENCE ::= NAME
3847
3848 ------------------------------
3849 -- 4.1.1 Indexed Component --
3850 ------------------------------
3851
3852 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3853
3854 -- Note: the parser may generate this node in some situations where it
3855 -- should be a function call. The semantic pass must correct this
3856 -- misidentification (which is inevitable at the parser level).
3857
3858 -- N_Indexed_Component
3859 -- Sloc contains a copy of the Sloc value of the Prefix
3860 -- Prefix (Node3)
3861 -- Expressions (List1)
3862 -- Generalized_Indexing (Node4-Sem)
3863 -- Atomic_Sync_Required (Flag14-Sem)
3864 -- plus fields for expression
3865
3866 -- Note: if any of the subscripts requires a range check, then the
3867 -- Do_Range_Check flag is set on the corresponding expression, with
3868 -- the index type being determined from the type of the Prefix, which
3869 -- references the array being indexed.
3870
3871 -- Note: in a fully analyzed and expanded indexed component node, and
3872 -- hence in any such node that gigi sees, if the prefix is an access
3873 -- type, then an explicit dereference operation has been inserted.
3874
3875 ------------------
3876 -- 4.1.2 Slice --
3877 ------------------
3878
3879 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3880
3881 -- Note: an implicit subtype is created to describe the resulting
3882 -- type, so that the bounds of this type are the bounds of the slice.
3883
3884 -- N_Slice
3885 -- Sloc points to first token of prefix
3886 -- Prefix (Node3)
3887 -- Discrete_Range (Node4)
3888 -- plus fields for expression
3889
3890 -------------------------------
3891 -- 4.1.3 Selected Component --
3892 -------------------------------
3893
3894 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3895
3896 -- Note: selected components that are semantically expanded names get
3897 -- changed during semantic processing into the separate N_Expanded_Name
3898 -- node. See description of this node in the section on semantic nodes.
3899
3900 -- N_Selected_Component
3901 -- Sloc points to the period
3902 -- Prefix (Node3)
3903 -- Selector_Name (Node2)
3904 -- Associated_Node (Node4-Sem)
3905 -- Do_Discriminant_Check (Flag3-Sem)
3906 -- Is_In_Discriminant_Check (Flag11-Sem)
3907 -- Atomic_Sync_Required (Flag14-Sem)
3908 -- Is_Prefixed_Call (Flag17-Sem)
3909 -- plus fields for expression
3910
3911 --------------------------
3912 -- 4.1.3 Selector Name --
3913 --------------------------
3914
3915 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3916
3917 --------------------------------
3918 -- 4.1.4 Attribute Reference --
3919 --------------------------------
3920
3921 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3922
3923 -- Note: the syntax is quite ambiguous at this point. Consider:
3924
3925 -- A'Length (X) X is part of the attribute designator
3926 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3927 -- A'Class (X) X is the expression of a type conversion
3928
3929 -- It would be possible for the parser to distinguish these cases
3930 -- by looking at the attribute identifier. However, that would mean
3931 -- more work in introducing new implementation defined attributes,
3932 -- and also it would mean that special processing for attributes
3933 -- would be scattered around, instead of being centralized in the
3934 -- semantic routine that handles an N_Attribute_Reference node.
3935 -- Consequently, the parser in all the above cases stores the
3936 -- expression (X in these examples) as a single element list in
3937 -- in the Expressions field of the N_Attribute_Reference node.
3938
3939 -- Similarly, for attributes like Max which take two arguments,
3940 -- we store the two arguments as a two element list in the
3941 -- Expressions field. Of course it is clear at parse time that
3942 -- this case is really a function call with an attribute as the
3943 -- prefix, but it turns out to be convenient to handle the two
3944 -- argument case in a similar manner to the one argument case,
3945 -- and indeed in general the parser will accept any number of
3946 -- expressions in this position and store them as a list in the
3947 -- attribute reference node. This allows for future addition of
3948 -- attributes that take more than two arguments.
3949
3950 -- Note: named associates are not permitted in function calls where
3951 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3952 -- to skip the normal subprogram argument processing.
3953
3954 -- Note: for the attributes whose designators are technically keywords,
3955 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3956 -- the corresponding name, even though no identifier is involved.
3957
3958 -- Note: the generated code may contain stream attributes applied to
3959 -- limited types for which no stream routines exist officially. In such
3960 -- case, the result is to use the stream attribute for the underlying
3961 -- full type, or in the case of a protected type, the components
3962 -- (including any discriminants) are merely streamed in order.
3963
3964 -- See Exp_Attr for a complete description of which attributes are
3965 -- passed onto Gigi, and which are handled entirely by the front end.
3966
3967 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3968 -- a non-standard enumeration type or a nonzero/zero semantics
3969 -- boolean type, so the value is simply the stored representation.
3970
3971 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3972 -- references a subprogram that is a renaming, then the front end must
3973 -- rewrite the attribute to refer directly to the renamed entity.
3974
3975 -- Note: syntactically the prefix of an attribute reference must be a
3976 -- name, and this (somewhat artificial) requirement is enforced by the
3977 -- parser. However, for many attributes, such as 'Valid, it is quite
3978 -- reasonable to apply the attribute to any value, and hence to any
3979 -- expression. Internally in the tree, the prefix is an expression which
3980 -- does not have to be a name, and this is handled fine by the semantic
3981 -- analysis and expansion, and back ends. This arises for the case of
3982 -- attribute references built by the expander (e.g. 'Valid for the case
3983 -- of an implicit validity check).
3984
3985 -- Note: In generated code, the Address and Unrestricted_Access
3986 -- attributes can be applied to any expression, and the meaning is
3987 -- to create an object containing the value (the object is in the
3988 -- current stack frame), and pass the address of this value. If the
3989 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3990 -- is taken must be on a byte (storage unit) boundary, and if it is
3991 -- not (or may not be), then the generated code must create a copy
3992 -- that is byte aligned, and pass the address of this copy.
3993
3994 -- N_Attribute_Reference
3995 -- Sloc points to apostrophe
3996 -- Prefix (Node3) (general expression, see note above)
3997 -- Attribute_Name (Name2) identifier name from attribute designator
3998 -- Expressions (List1) (set to No_List if no associated expressions)
3999 -- Entity (Node4-Sem) used if the attribute yields a type
4000 -- Associated_Node (Node4-Sem)
4001 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
4002 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
4003 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
4004 -- Header_Size_Added (Flag11-Sem)
4005 -- Redundant_Use (Flag13-Sem)
4006 -- Must_Be_Byte_Aligned (Flag14-Sem)
4007 -- plus fields for expression
4008
4009 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
4010 -- into equivalent if expressions, properly taking care of side effects.
4011
4012 ---------------------------------
4013 -- 4.1.4 Attribute Designator --
4014 ---------------------------------
4015
4016 -- ATTRIBUTE_DESIGNATOR ::=
4017 -- IDENTIFIER [(static_EXPRESSION)]
4018 -- | access | delta | digits
4019
4020 -- There is no explicit node in the tree for an attribute designator.
4021 -- Instead the Attribute_Name and Expressions fields of the parent
4022 -- node (N_Attribute_Reference node) hold the information.
4023
4024 -- Note: if ACCESS, DELTA, or DIGITS appears in an attribute
4025 -- designator, then they are treated as identifiers internally
4026 -- rather than the keywords of the same name.
4027
4028 --------------------------------------
4029 -- 4.1.4 Range Attribute Reference --
4030 --------------------------------------
4031
4032 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
4033
4034 -- A range attribute reference is represented in the tree using the
4035 -- normal N_Attribute_Reference node.
4036
4037 ---------------------------------------
4038 -- 4.1.4 Range Attribute Designator --
4039 ---------------------------------------
4040
4041 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
4042
4043 -- A range attribute designator is represented in the tree using the
4044 -- normal N_Attribute_Reference node.
4045
4046 --------------------
4047 -- 4.3 Aggregate --
4048 --------------------
4049
4050 -- AGGREGATE ::=
4051 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
4052
4053 -----------------------------
4054 -- 4.3.1 Record Aggregate --
4055 -----------------------------
4056
4057 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
4058
4059 -- N_Aggregate
4060 -- Sloc points to left parenthesis
4061 -- Expressions (List1) (set to No_List if none or null record case)
4062 -- Component_Associations (List2) (set to No_List if none)
4063 -- Null_Record_Present (Flag17)
4064 -- Aggregate_Bounds (Node3-Sem)
4065 -- Associated_Node (Node4-Sem)
4066 -- Compile_Time_Known_Aggregate (Flag18-Sem)
4067 -- Expansion_Delayed (Flag11-Sem)
4068 -- Has_Self_Reference (Flag13-Sem)
4069 -- Is_Homogeneous_Aggregate (Flag14)
4070 -- plus fields for expression
4071
4072 -- Note: this structure is used for both record and array aggregates
4073 -- since the two cases are not separable by the parser. The parser
4074 -- makes no attempt to enforce consistency here, so it is up to the
4075 -- semantic phase to make sure that the aggregate is consistent (i.e.
4076 -- that it is not a "half-and-half" case that mixes record and array
4077 -- syntax). In particular, for a record aggregate, the expressions
4078 -- field will be set if there are positional associations.
4079
4080 -- Note: N_Aggregate is not used for all aggregates; in particular,
4081 -- there is a separate node kind for extension aggregates.
4082
4083 -- Note: gigi/gcc can handle array aggregates correctly providing that
4084 -- they are entirely positional, and the array subtype involved has a
4085 -- known at compile time length and is not bit packed, or a convention
4086 -- Fortran array with more than one dimension. If these conditions
4087 -- are not met, then the front end must translate the aggregate into
4088 -- an appropriate set of assignments into a temporary.
4089
4090 -- Note: for the record aggregate case, gigi/gcc can handle most cases
4091 -- of record aggregates, including those for packed, and rep-claused
4092 -- records, and also variant records, providing that there are no
4093 -- variable length fields whose size is not known at compile time,
4094 -- and providing that the aggregate is presented in fully named form.
4095
4096 -- The other situation in which array aggregates and record aggregates
4097 -- cannot be passed to the back end is if assignment to one or more
4098 -- components itself needs expansion, e.g. in the case of an assignment
4099 -- of an object of a controlled type. In such cases, the front end
4100 -- must expand the aggregate to a series of assignments, and apply
4101 -- the required expansion to the individual assignment statements.
4102
4103 ----------------------------------------------
4104 -- 4.3.1 Record Component Association List --
4105 ----------------------------------------------
4106
4107 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
4108 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
4109 -- | null record
4110
4111 -- There is no explicit node in the tree for a record component
4112 -- association list. Instead the Null_Record_Present flag is set in
4113 -- the parent node for the NULL RECORD case.
4114
4115 ------------------------------------------------------
4116 -- 4.3.1 Record Component Association (also 4.3.3) --
4117 ------------------------------------------------------
4118
4119 -- RECORD_COMPONENT_ASSOCIATION ::=
4120 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
4121
4122 -- N_Component_Association
4123 -- Sloc points to first selector name
4124 -- Choices (List1)
4125 -- Expression (Node3) (empty if Box_Present)
4126 -- Loop_Actions (List5-Sem)
4127 -- Box_Present (Flag15)
4128 -- Was_Default_Init_Box_Association (Flag14)
4129 -- Inherited_Discriminant (Flag13)
4130
4131 -- Note: this structure is used for both record component associations
4132 -- and array component associations, since the two cases aren't always
4133 -- separable by the parser. The choices list may represent either a
4134 -- list of selector names in the record aggregate case, or a list of
4135 -- discrete choices in the array aggregate case or an N_Others_Choice
4136 -- node (which appears as a singleton list). Box_Present gives support
4137 -- to Ada 2005 (AI-287). Was_Default_Init_Box_Association is used for
4138 -- determining the need for Default_Initial_Condition check on component
4139 -- associations with a box.
4140
4141 ----------------------------------
4142 -- 4.3.1 Component Choice List --
4143 ----------------------------------
4144
4145 -- COMPONENT_CHOICE_LIST ::=
4146 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
4147 -- | others
4148
4149 -- The entries of a component choice list appear in the Choices list of
4150 -- the associated N_Component_Association, as either selector names, or
4151 -- as an N_Others_Choice node.
4152
4153 --------------------------------
4154 -- 4.3.2 Extension Aggregate --
4155 --------------------------------
4156
4157 -- EXTENSION_AGGREGATE ::=
4158 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
4159
4160 -- Note: extension aggregates are not permitted in Ada 83 mode
4161
4162 -- N_Extension_Aggregate
4163 -- Sloc points to left parenthesis
4164 -- Ancestor_Part (Node3)
4165 -- Associated_Node (Node4-Sem)
4166 -- Expressions (List1) (set to No_List if none or null record case)
4167 -- Component_Associations (List2) (set to No_List if none)
4168 -- Null_Record_Present (Flag17)
4169 -- Expansion_Delayed (Flag11-Sem)
4170 -- Has_Self_Reference (Flag13-Sem)
4171 -- plus fields for expression
4172
4173 --------------------------
4174 -- 4.3.2 Ancestor Part --
4175 --------------------------
4176
4177 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
4178
4179 ----------------------------
4180 -- 4.3.3 Array Aggregate --
4181 ----------------------------
4182
4183 -- ARRAY_AGGREGATE ::=
4184 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
4185
4186 ---------------------------------------
4187 -- 4.3.3 Positional Array Aggregate --
4188 ---------------------------------------
4189
4190 -- POSITIONAL_ARRAY_AGGREGATE ::=
4191 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
4192 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
4193
4194 -- See Record_Aggregate (4.3.1) for node structure
4195
4196 ----------------------------------
4197 -- 4.3.3 Named Array Aggregate --
4198 ----------------------------------
4199
4200 -- NAMED_ARRAY_AGGREGATE ::=
4201 -- (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
4202
4203 -- See Record_Aggregate (4.3.1) for node structure
4204
4205 ----------------------------------------
4206 -- 4.3.3 Array Component Association --
4207 ----------------------------------------
4208
4209 -- ARRAY_COMPONENT_ASSOCIATION ::=
4210 -- DISCRETE_CHOICE_LIST => EXPRESSION
4211 -- | ITERATED_COMPONENT_ASSOCIATION
4212
4213 -- See Record_Component_Association (4.3.1) for node structure
4214 -- The iterated_component_association is introduced into the
4215 -- Corrigendum of Ada_2012 by AI12-061.
4216
4217 ------------------------------------------
4218 -- 4.3.3 Iterated component Association --
4219 ------------------------------------------
4220
4221 -- ITERATED_COMPONENT_ASSOCIATION ::=
4222 -- for DEFINING_IDENTIFIER in DISCRETE_CHOICE_LIST => EXPRESSION
4223
4224 -- N_Iterated_Component_Association
4225 -- Sloc points to FOR
4226 -- Defining_Identifier (Node1)
4227 -- Iterator_Specification (Node2) (set to Empty if no Iterator_Spec)
4228 -- Expression (Node3)
4229 -- Discrete_Choices (List4)
4230 -- Loop_Actions (List5-Sem)
4231 -- Box_Present (Flag15)
4232
4233 -- Note that Box_Present is always False, but it is intentionally added
4234 -- for completeness.
4235
4236 ----------------------------
4237 -- 4.3.4 Delta Aggregate --
4238 ----------------------------
4239
4240 -- N_Delta_Aggregate
4241 -- Sloc points to left parenthesis
4242 -- Expression (Node3)
4243 -- Component_Associations (List2)
4244 -- Etype (Node5-Sem)
4245
4246 ---------------------------------
4247 -- 3.4.5 Comtainer_Aggregates --
4248 ---------------------------------
4249
4250 -- N_Iterated_Element_Association
4251 -- Key_Expression (Node1)
4252 -- Iterator_Specification (Node2)
4253 -- Expression (Node3)
4254 -- Loop_Parameter_Specification (Node4)
4255 -- Loop_Actions (List5-Sem)
4256 -- Box_Present (Flag15)
4257
4258 -- Exactly one of Iterator_Specification or Loop_Parameter_
4259 -- specification is present. If the Key_Expression is absent,
4260 -- the construct is parsed as an Iterated_Component_Association,
4261 -- and legality checks are performed during semantic analysis.
4262
4263 -- Both iterated associations are Ada2020 features that are
4264 -- expanded during aggregate construction, and do not appear in
4265 -- expanded code.
4266
4267 --------------------------------------------------
4268 -- 4.4 Expression/Relation/Term/Factor/Primary --
4269 --------------------------------------------------
4270
4271 -- EXPRESSION ::=
4272 -- RELATION {LOGICAL_OPERATOR RELATION}
4273
4274 -- CHOICE_EXPRESSION ::=
4275 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
4276
4277 -- CHOICE_RELATION ::=
4278 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
4279
4280 -- RELATION ::=
4281 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4282 -- | RAISE_EXPRESSION
4283
4284 -- MEMBERSHIP_CHOICE_LIST ::=
4285 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4286
4287 -- MEMBERSHIP_CHOICE ::=
4288 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4289
4290 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
4291
4292 -- SIMPLE_EXPRESSION ::=
4293 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
4294
4295 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
4296
4297 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
4298
4299 -- No nodes are generated for any of these constructs. Instead, the
4300 -- node for the operator appears directly. When we refer to an
4301 -- expression in this description, we mean any of the possible
4302 -- constituent components of an expression (e.g. identifier is
4303 -- an example of an expression).
4304
4305 -- Note: the above syntax is that Ada 2012 syntax which restricts
4306 -- choice relations to simple expressions to avoid ambiguities in
4307 -- some contexts with set membership notation. It has been decided
4308 -- that in retrospect, the Ada 95 change allowing general expressions
4309 -- in this context was a mistake, so we have reverted to the above
4310 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
4311 -- expressions was there in Ada 83 from the start).
4312
4313 ------------------
4314 -- 4.4 Primary --
4315 ------------------
4316
4317 -- PRIMARY ::=
4318 -- NUMERIC_LITERAL | null
4319 -- | STRING_LITERAL | AGGREGATE
4320 -- | NAME | QUALIFIED_EXPRESSION
4321 -- | ALLOCATOR | (EXPRESSION)
4322
4323 -- Usually there is no explicit node in the tree for primary. Instead
4324 -- the constituent (e.g. AGGREGATE) appears directly. There are two
4325 -- exceptions. First, there is an explicit node for a null primary.
4326
4327 -- N_Null
4328 -- Sloc points to NULL
4329 -- plus fields for expression
4330
4331 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
4332 -- that the parser keep track of which subexpressions are enclosed
4333 -- in parentheses, and how many levels of parentheses are used. This
4334 -- information is required for optimization purposes, and also for
4335 -- some semantic checks (e.g. (((1))) in a procedure spec does not
4336 -- conform with ((((1)))) in the body).
4337
4338 -- The parentheses are recorded by keeping a Paren_Count field in every
4339 -- subexpression node (it is actually present in all nodes, but only
4340 -- used in subexpression nodes). This count records the number of
4341 -- levels of parentheses. If the number of levels in the source exceeds
4342 -- the maximum accommodated by this count, then the count is simply left
4343 -- at the maximum value. This means that there are some pathological
4344 -- cases of failure to detect conformance failures (e.g. an expression
4345 -- with 500 levels of parens will conform with one with 501 levels),
4346 -- but we do not need to lose sleep over this.
4347
4348 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4349 -- type N_Parenthesized_Expression used to accurately record unlimited
4350 -- numbers of levels of parentheses. However, it turned out to be a
4351 -- real nuisance to have to take into account the possible presence of
4352 -- this node during semantic analysis, since basically parentheses have
4353 -- zero relevance to semantic analysis.
4354
4355 -- Note: the level of parentheses always present in things like
4356 -- aggregates does not count, only the parentheses in the primary
4357 -- (EXPRESSION) affect the setting of the Paren_Count field.
4358
4359 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4360 -- treated as though it were Empty) if No_Initialization is set True.
4361
4362 --------------------------------------
4363 -- 4.5 Short-Circuit Control Forms --
4364 --------------------------------------
4365
4366 -- EXPRESSION ::=
4367 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4368
4369 -- Gigi restriction: For both these control forms, the operand and
4370 -- result types are always Standard.Boolean. The expander inserts the
4371 -- required conversion operations where needed to ensure this is the
4372 -- case.
4373
4374 -- N_And_Then
4375 -- Sloc points to AND of AND THEN
4376 -- Left_Opnd (Node2)
4377 -- Right_Opnd (Node3)
4378 -- Actions (List1-Sem)
4379 -- plus fields for expression
4380
4381 -- N_Or_Else
4382 -- Sloc points to OR of OR ELSE
4383 -- Left_Opnd (Node2)
4384 -- Right_Opnd (Node3)
4385 -- Actions (List1-Sem)
4386 -- plus fields for expression
4387
4388 -- Note: The Actions field is used to hold actions associated with
4389 -- the right hand operand. These have to be treated specially since
4390 -- they are not unconditionally executed. See Insert_Actions for a
4391 -- more detailed description of how these actions are handled.
4392
4393 ---------------------------
4394 -- 4.5 Membership Tests --
4395 ---------------------------
4396
4397 -- RELATION ::=
4398 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4399
4400 -- MEMBERSHIP_CHOICE_LIST ::=
4401 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4402
4403 -- MEMBERSHIP_CHOICE ::=
4404 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4405
4406 -- Note: although the grammar above allows only a range or a subtype
4407 -- mark, the parser in fact will accept any simple expression in place
4408 -- of a subtype mark. This means that the semantic analyzer must be able
4409 -- to deal with, and diagnose a simple expression other than a name for
4410 -- the right operand. This simplifies error recovery in the parser.
4411
4412 -- The Alternatives field below is present only if there is more than
4413 -- one Membership_Choice present (which is legitimate only in Ada 2012
4414 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4415 -- the list of choices. In the tree passed to the back end, Alternatives
4416 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4417 -- expands out the complex set membership case using simple membership
4418 -- and equality operations).
4419
4420 -- Should we rename Alternatives here to Membership_Choices ???
4421
4422 -- N_In
4423 -- Sloc points to IN
4424 -- Left_Opnd (Node2)
4425 -- Right_Opnd (Node3)
4426 -- Alternatives (List4) (set to No_List if only one set alternative)
4427 -- No_Minimize_Eliminate (Flag17)
4428 -- plus fields for expression
4429
4430 -- N_Not_In
4431 -- Sloc points to NOT of NOT IN
4432 -- Left_Opnd (Node2)
4433 -- Right_Opnd (Node3)
4434 -- Alternatives (List4) (set to No_List if only one set alternative)
4435 -- No_Minimize_Eliminate (Flag17)
4436 -- plus fields for expression
4437
4438 --------------------
4439 -- 4.5 Operators --
4440 --------------------
4441
4442 -- LOGICAL_OPERATOR ::= and | or | xor
4443
4444 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4445
4446 -- BINARY_ADDING_OPERATOR ::= + | - | &
4447
4448 -- UNARY_ADDING_OPERATOR ::= + | -
4449
4450 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4451
4452 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4453
4454 -- Gigi restriction: Gigi will never be given * / mod rem nodes with
4455 -- fixed-point operands. All handling of smalls for multiplication and
4456 -- division is handled by the front end (mod and rem result only from
4457 -- expansion). Gigi thus never needs to worry about small values (for
4458 -- other operators operating on fixed-point, e.g. addition, the small
4459 -- value does not have any semantic effect anyway, these are always
4460 -- integer operations).
4461
4462 -- Gigi restriction: For all operators taking Boolean operands, the
4463 -- type is always Standard.Boolean. The expander inserts the required
4464 -- conversion operations where needed to ensure this is the case.
4465
4466 -- N_Op_And
4467 -- Sloc points to AND
4468 -- Do_Length_Check (Flag4-Sem)
4469 -- plus fields for binary operator
4470 -- plus fields for expression
4471
4472 -- N_Op_Or
4473 -- Sloc points to OR
4474 -- Do_Length_Check (Flag4-Sem)
4475 -- plus fields for binary operator
4476 -- plus fields for expression
4477
4478 -- N_Op_Xor
4479 -- Sloc points to XOR
4480 -- Do_Length_Check (Flag4-Sem)
4481 -- plus fields for binary operator
4482 -- plus fields for expression
4483
4484 -- N_Op_Eq
4485 -- Sloc points to =
4486 -- plus fields for binary operator
4487 -- plus fields for expression
4488
4489 -- N_Op_Ne
4490 -- Sloc points to /=
4491 -- plus fields for binary operator
4492 -- plus fields for expression
4493
4494 -- N_Op_Lt
4495 -- Sloc points to <
4496 -- plus fields for binary operator
4497 -- plus fields for expression
4498
4499 -- N_Op_Le
4500 -- Sloc points to <=
4501 -- plus fields for binary operator
4502 -- plus fields for expression
4503
4504 -- N_Op_Gt
4505 -- Sloc points to >
4506 -- plus fields for binary operator
4507 -- plus fields for expression
4508
4509 -- N_Op_Ge
4510 -- Sloc points to >=
4511 -- plus fields for binary operator
4512 -- plus fields for expression
4513
4514 -- N_Op_Add
4515 -- Sloc points to + (binary)
4516 -- plus fields for binary operator
4517 -- plus fields for expression
4518
4519 -- N_Op_Subtract
4520 -- Sloc points to - (binary)
4521 -- plus fields for binary operator
4522 -- plus fields for expression
4523
4524 -- N_Op_Concat
4525 -- Sloc points to &
4526 -- Is_Component_Left_Opnd (Flag13-Sem)
4527 -- Is_Component_Right_Opnd (Flag14-Sem)
4528 -- plus fields for binary operator
4529 -- plus fields for expression
4530
4531 -- N_Op_Multiply
4532 -- Sloc points to *
4533 -- Rounded_Result (Flag18-Sem)
4534 -- plus fields for binary operator
4535 -- plus fields for expression
4536
4537 -- N_Op_Divide
4538 -- Sloc points to /
4539 -- Do_Division_Check (Flag13-Sem)
4540 -- Rounded_Result (Flag18-Sem)
4541 -- plus fields for binary operator
4542 -- plus fields for expression
4543
4544 -- N_Op_Mod
4545 -- Sloc points to MOD
4546 -- Do_Division_Check (Flag13-Sem)
4547 -- plus fields for binary operator
4548 -- plus fields for expression
4549
4550 -- N_Op_Rem
4551 -- Sloc points to REM
4552 -- Do_Division_Check (Flag13-Sem)
4553 -- plus fields for binary operator
4554 -- plus fields for expression
4555
4556 -- N_Op_Expon
4557 -- Sloc points to **
4558 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4559 -- plus fields for binary operator
4560 -- plus fields for expression
4561
4562 -- N_Op_Plus
4563 -- Sloc points to + (unary)
4564 -- plus fields for unary operator
4565 -- plus fields for expression
4566
4567 -- N_Op_Minus
4568 -- Sloc points to - (unary)
4569 -- plus fields for unary operator
4570 -- plus fields for expression
4571
4572 -- N_Op_Abs
4573 -- Sloc points to ABS
4574 -- plus fields for unary operator
4575 -- plus fields for expression
4576
4577 -- N_Op_Not
4578 -- Sloc points to NOT
4579 -- plus fields for unary operator
4580 -- plus fields for expression
4581
4582 -- See also shift operators in section B.2
4583
4584 -- Note on fixed-point operations passed to Gigi: For adding operators,
4585 -- the semantics is to treat these simply as integer operations, with
4586 -- the small values being ignored (the bounds are already stored in
4587 -- units of small, so that constraint checking works as usual). For the
4588 -- case of multiply/divide/rem/mod operations, Gigi will never see them.
4589
4590 -- Note on equality/inequality tests for records. In the expanded tree,
4591 -- record comparisons are always expanded to be a series of component
4592 -- comparisons, so the back end will never see an equality or inequality
4593 -- operation with operands of a record type.
4594
4595 -- Note on overflow handling: When the overflow checking mode is set to
4596 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4597 -- be modified to use a larger type for the operands and result. In
4598 -- the case where the computed range exceeds that of Long_Long_Integer,
4599 -- and we are running in ELIMINATED mode, the operator node will be
4600 -- changed to be a call to the appropriate routine in System.Bignums.
4601
4602 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4603 -- for signed integer types (since there is no equivalent operator in
4604 -- C). Instead we rewrite such an operation in terms of REM (which is
4605 -- % in C) and other C-available operators.
4606
4607 ------------------------------------
4608 -- 4.5.7 Conditional Expressions --
4609 ------------------------------------
4610
4611 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4612
4613 --------------------------
4614 -- 4.5.7 If Expression --
4615 --------------------------
4616
4617 -- IF_EXPRESSION ::=
4618 -- if CONDITION then DEPENDENT_EXPRESSION
4619 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4620 -- [else DEPENDENT_EXPRESSION]
4621
4622 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4623
4624 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4625 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4626 -- the Is_Elsif flag is set on the inner if expression.
4627
4628 -- N_If_Expression
4629 -- Sloc points to IF or ELSIF keyword
4630 -- Expressions (List1)
4631 -- Then_Actions (List2-Sem)
4632 -- Else_Actions (List3-Sem)
4633 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4634 -- Do_Overflow_Check (Flag17-Sem)
4635 -- plus fields for expression
4636
4637 -- Expressions here is a three-element list, whose first element is the
4638 -- condition, the second element is the dependent expression after THEN
4639 -- and the third element is the dependent expression after the ELSE
4640 -- (explicitly set to True if missing).
4641
4642 -- Note: the Then_Actions and Else_Actions fields are always set to
4643 -- No_List in the tree passed to the back end. These are used only
4644 -- for temporary processing purposes in the expander. Even though they
4645 -- are semantic fields, their parent pointers are set because analysis
4646 -- of actions nodes in those lists may generate additional actions that
4647 -- need to know their insertion point (for example for the creation of
4648 -- transient scopes).
4649
4650 -- Note: in the tree passed to the back end, if the result type is
4651 -- an unconstrained array, the if expression can only appears in the
4652 -- initializing expression of an object declaration (this avoids the
4653 -- back end having to create a variable length temporary on the fly).
4654
4655 ----------------------------
4656 -- 4.5.7 Case Expression --
4657 ----------------------------
4658
4659 -- CASE_EXPRESSION ::=
4660 -- case SELECTING_EXPRESSION is
4661 -- CASE_EXPRESSION_ALTERNATIVE
4662 -- {,CASE_EXPRESSION_ALTERNATIVE}
4663
4664 -- Note that the Alternatives cannot include pragmas (this contrasts
4665 -- with the situation of case statements where pragmas are allowed).
4666
4667 -- N_Case_Expression
4668 -- Sloc points to CASE
4669 -- Expression (Node3) (the selecting expression)
4670 -- Alternatives (List4) (the case expression alternatives)
4671 -- Etype (Node5-Sem)
4672 -- Do_Overflow_Check (Flag17-Sem)
4673
4674 ----------------------------------------
4675 -- 4.5.7 Case Expression Alternative --
4676 ----------------------------------------
4677
4678 -- CASE_EXPRESSION_ALTERNATIVE ::=
4679 -- when DISCRETE_CHOICE_LIST =>
4680 -- DEPENDENT_EXPRESSION
4681
4682 -- N_Case_Expression_Alternative
4683 -- Sloc points to WHEN
4684 -- Actions (List1)
4685 -- Discrete_Choices (List4)
4686 -- Expression (Node3)
4687 -- Has_SP_Choice (Flag15-Sem)
4688
4689 -- Note: The Actions field temporarily holds any actions associated with
4690 -- evaluation of the Expression. During expansion of the case expression
4691 -- these actions are wrapped into an N_Expressions_With_Actions node
4692 -- replacing the original expression.
4693
4694 -- Note: this node never appears in the tree passed to the back end,
4695 -- since the expander converts case expressions into case statements.
4696
4697 ---------------------------------
4698 -- 4.5.8 Quantified Expression --
4699 ---------------------------------
4700
4701 -- QUANTIFIED_EXPRESSION ::=
4702 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4703 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4704 --
4705 -- QUANTIFIER ::= all | some
4706
4707 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4708 -- is present at a time, in which case the other one is empty.
4709
4710 -- N_Quantified_Expression
4711 -- Sloc points to FOR
4712 -- Iterator_Specification (Node2)
4713 -- Loop_Parameter_Specification (Node4)
4714 -- Condition (Node1)
4715 -- All_Present (Flag15)
4716
4717 --------------------------
4718 -- 4.6 Type Conversion --
4719 --------------------------
4720
4721 -- TYPE_CONVERSION ::=
4722 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4723
4724 -- In the (NAME) case, the name is stored as the expression
4725
4726 -- Note: the parser never generates a type conversion node, since it
4727 -- looks like an indexed component which is generated by preference.
4728 -- The semantic pass must correct this misidentification.
4729
4730 -- Gigi handles conversions that involve no change in the root type,
4731 -- and also all conversions from integer to floating-point types.
4732 -- Conversions from floating-point to integer are only handled in
4733 -- the case where Float_Truncate flag set. Other conversions from
4734 -- floating-point to integer (involving rounding) and all conversions
4735 -- involving fixed-point types are handled by the expander, unless the
4736 -- Conversion_OK flag is set.
4737
4738 -- Sprint syntax if Float_Truncate set: X^(Y)
4739 -- Sprint syntax if Conversion_OK set X?(Y)
4740 -- Sprint syntax if both flags set X?^(Y)
4741
4742 -- Note: If either the operand or result type is fixed-point, Gigi will
4743 -- only see a type conversion node with Conversion_OK set. The front end
4744 -- takes care of all handling of small's for fixed-point conversions.
4745
4746 -- N_Type_Conversion
4747 -- Sloc points to first token of subtype mark
4748 -- Subtype_Mark (Node4)
4749 -- Expression (Node3)
4750 -- Do_Discriminant_Check (Flag3-Sem)
4751 -- Do_Length_Check (Flag4-Sem)
4752 -- Float_Truncate (Flag11-Sem)
4753 -- Do_Tag_Check (Flag13-Sem)
4754 -- Conversion_OK (Flag14-Sem)
4755 -- Do_Overflow_Check (Flag17-Sem)
4756 -- Rounded_Result (Flag18-Sem)
4757 -- plus fields for expression
4758
4759 -- Note: if a range check is required, then the Do_Range_Check flag
4760 -- is set in the Expression with the check being done against the
4761 -- target type range (after the base type conversion, if any).
4762
4763 -------------------------------
4764 -- 4.7 Qualified Expression --
4765 -------------------------------
4766
4767 -- QUALIFIED_EXPRESSION ::=
4768 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4769
4770 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4771 -- the expression, so the Expression field of this node always points
4772 -- to a parenthesized expression in this case (i.e. Paren_Count will
4773 -- always be non-zero for the referenced expression if it is not an
4774 -- aggregate).
4775
4776 -- N_Qualified_Expression
4777 -- Sloc points to apostrophe
4778 -- Subtype_Mark (Node4)
4779 -- Expression (Node3) expression or aggregate
4780 -- Is_Qualified_Universal_Literal (Flag4-Sem)
4781 -- plus fields for expression
4782
4783 --------------------
4784 -- 4.8 Allocator --
4785 --------------------
4786
4787 -- ALLOCATOR ::=
4788 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4789 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4790 --
4791 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4792
4793 -- Sprint syntax (when storage pool present)
4794 -- new xxx (storage_pool = pool)
4795 -- or
4796 -- new (subpool) xxx (storage_pool = pool)
4797
4798 -- N_Allocator
4799 -- Sloc points to NEW
4800 -- Expression (Node3) subtype indication or qualified expression
4801 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4802 -- Storage_Pool (Node1-Sem)
4803 -- Procedure_To_Call (Node2-Sem)
4804 -- Alloc_For_BIP_Return (Flag1-Sem)
4805 -- Null_Exclusion_Present (Flag11)
4806 -- No_Initialization (Flag13-Sem)
4807 -- Is_Static_Coextension (Flag14-Sem)
4808 -- Do_Storage_Check (Flag17-Sem)
4809 -- Is_Dynamic_Coextension (Flag18-Sem)
4810 -- plus fields for expression
4811
4812 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4813 -- This flag has a special function in conjunction with the restriction
4814 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4815 -- is not set. This means that if a source allocator is replaced with
4816 -- a constructed allocator, the Comes_From_Source flag should be copied
4817 -- to the newly created allocator.
4818
4819 ---------------------------------
4820 -- 5.1 Sequence Of Statements --
4821 ---------------------------------
4822
4823 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4824
4825 -- Note: Although the parser will not accept a declaration as a
4826 -- statement, the semantic analyzer may insert declarations (e.g.
4827 -- declarations of implicit types needed for execution of other
4828 -- statements) into a sequence of statements, so the code generator
4829 -- should be prepared to accept a declaration where a statement is
4830 -- expected. Note also that pragmas can appear as statements.
4831
4832 --------------------
4833 -- 5.1 Statement --
4834 --------------------
4835
4836 -- STATEMENT ::=
4837 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4838
4839 -- There is no explicit node in the tree for a statement. Instead, the
4840 -- individual statement appears directly. Labels are treated as a
4841 -- kind of statement, i.e. they are linked into a statement list at
4842 -- the point they appear, so the labeled statement appears following
4843 -- the label or labels in the statement list.
4844
4845 ---------------------------
4846 -- 5.1 Simple Statement --
4847 ---------------------------
4848
4849 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4850 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4851 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4852 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4853 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4854 -- | ABORT_STATEMENT | RAISE_STATEMENT
4855 -- | CODE_STATEMENT
4856
4857 -----------------------------
4858 -- 5.1 Compound Statement --
4859 -----------------------------
4860
4861 -- COMPOUND_STATEMENT ::=
4862 -- IF_STATEMENT | CASE_STATEMENT
4863 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4864 -- | EXTENDED_RETURN_STATEMENT
4865 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4866
4867 -------------------------
4868 -- 5.1 Null Statement --
4869 -------------------------
4870
4871 -- NULL_STATEMENT ::= null;
4872
4873 -- N_Null_Statement
4874 -- Sloc points to NULL
4875 -- Next_Rep_Item (Node5-Sem)
4876
4877 ----------------
4878 -- 5.1 Label --
4879 ----------------
4880
4881 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4882
4883 -- Note that the occurrence of a label is not a defining identifier,
4884 -- but rather a referencing occurrence. The defining occurrence is
4885 -- in the implicit label declaration which occurs in the innermost
4886 -- enclosing block.
4887
4888 -- N_Label
4889 -- Sloc points to <<
4890 -- Identifier (Node1) direct name of statement identifier
4891 -- Exception_Junk (Flag8-Sem)
4892
4893 -- Note: Before Ada 2012, a label is always followed by a statement,
4894 -- and this is true in the tree even in Ada 2012 mode (the parser
4895 -- inserts a null statement marked with Comes_From_Source False).
4896
4897 -------------------------------
4898 -- 5.1 Statement Identifier --
4899 -------------------------------
4900
4901 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4902
4903 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4904 -- (not an OPERATOR_SYMBOL)
4905
4906 -------------------------------
4907 -- 5.2 Assignment Statement --
4908 -------------------------------
4909
4910 -- ASSIGNMENT_STATEMENT ::=
4911 -- variable_NAME := EXPRESSION;
4912
4913 -- N_Assignment_Statement
4914 -- Sloc points to :=
4915 -- Name (Node2)
4916 -- Expression (Node3)
4917 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
4918 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
4919 -- Do_Discriminant_Check (Flag3-Sem)
4920 -- Do_Length_Check (Flag4-Sem)
4921 -- Forwards_OK (Flag5-Sem)
4922 -- Backwards_OK (Flag6-Sem)
4923 -- No_Ctrl_Actions (Flag7-Sem)
4924 -- Has_Target_Names (Flag8-Sem)
4925 -- Is_Elaboration_Code (Flag9-Sem)
4926 -- Do_Tag_Check (Flag13-Sem)
4927 -- Componentwise_Assignment (Flag14-Sem)
4928 -- Suppress_Assignment_Checks (Flag18-Sem)
4929
4930 -- Note: if a range check is required, then the Do_Range_Check flag
4931 -- is set in the Expression (right hand side), with the check being
4932 -- done against the type of the Name (left hand side).
4933
4934 -- Note: the back end places some restrictions on the form of the
4935 -- Expression field. If the object being assigned to is Atomic, then
4936 -- the Expression may not have the form of an aggregate (since this
4937 -- might cause the back end to generate separate assignments). In this
4938 -- case the front end must generate an extra temporary and initialize
4939 -- this temporary as required (the temporary itself is not atomic).
4940
4941 ------------------
4942 -- Target_Name --
4943 ------------------
4944
4945 -- N_Target_Name
4946 -- Sloc points to @
4947 -- Etype (Node5-Sem)
4948
4949 -- Note (Ada 2020): node is used during analysis as a placeholder for
4950 -- the value of the LHS of the enclosing assignment statement. Node is
4951 -- eventually rewritten together with enclosing assignment, and backends
4952 -- are not aware of it.
4953
4954 -----------------------
4955 -- 5.3 If Statement --
4956 -----------------------
4957
4958 -- IF_STATEMENT ::=
4959 -- if CONDITION then
4960 -- SEQUENCE_OF_STATEMENTS
4961 -- {elsif CONDITION then
4962 -- SEQUENCE_OF_STATEMENTS}
4963 -- [else
4964 -- SEQUENCE_OF_STATEMENTS]
4965 -- end if;
4966
4967 -- Gigi restriction: This expander ensures that the type of the
4968 -- Condition fields is always Standard.Boolean, even if the type
4969 -- in the source is some non-standard boolean type.
4970
4971 -- N_If_Statement
4972 -- Sloc points to IF
4973 -- Condition (Node1)
4974 -- Then_Statements (List2)
4975 -- Elsif_Parts (List3) (set to No_List if none present)
4976 -- Else_Statements (List4) (set to No_List if no else part present)
4977 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4978 -- From_Conditional_Expression (Flag1-Sem)
4979
4980 -- N_Elsif_Part
4981 -- Sloc points to ELSIF
4982 -- Condition (Node1)
4983 -- Then_Statements (List2)
4984 -- Condition_Actions (List3-Sem)
4985
4986 --------------------
4987 -- 5.3 Condition --
4988 --------------------
4989
4990 -- CONDITION ::= boolean_EXPRESSION
4991
4992 -------------------------
4993 -- 5.4 Case Statement --
4994 -------------------------
4995
4996 -- CASE_STATEMENT ::=
4997 -- case EXPRESSION is
4998 -- CASE_STATEMENT_ALTERNATIVE
4999 -- {CASE_STATEMENT_ALTERNATIVE}
5000 -- end case;
5001
5002 -- Note: the Alternatives can contain pragmas. These only occur at
5003 -- the start of the list, since any pragmas occurring after the first
5004 -- alternative are absorbed into the corresponding statement sequence.
5005
5006 -- N_Case_Statement
5007 -- Sloc points to CASE
5008 -- Expression (Node3)
5009 -- Alternatives (List4)
5010 -- End_Span (Uint5) (set to Uint_0 if expander generated)
5011 -- From_Conditional_Expression (Flag1-Sem)
5012
5013 -- Note: Before Ada 2012, a pragma in a statement sequence is always
5014 -- followed by a statement, and this is true in the tree even in Ada
5015 -- 2012 mode (the parser inserts a null statement marked with the flag
5016 -- Comes_From_Source False).
5017
5018 -------------------------------------
5019 -- 5.4 Case Statement Alternative --
5020 -------------------------------------
5021
5022 -- CASE_STATEMENT_ALTERNATIVE ::=
5023 -- when DISCRETE_CHOICE_LIST =>
5024 -- SEQUENCE_OF_STATEMENTS
5025
5026 -- N_Case_Statement_Alternative
5027 -- Sloc points to WHEN
5028 -- Discrete_Choices (List4)
5029 -- Statements (List3)
5030 -- Has_SP_Choice (Flag15-Sem)
5031
5032 -- Note: in the list of Discrete_Choices, the tree passed to the back
5033 -- end does not have choice entries corresponding to names of statically
5034 -- predicated subtypes. Such entries are always expanded out to the list
5035 -- of equivalent values or ranges.
5036
5037 -------------------------
5038 -- 5.5 Loop Statement --
5039 -------------------------
5040
5041 -- LOOP_STATEMENT ::=
5042 -- [loop_STATEMENT_IDENTIFIER :]
5043 -- [ITERATION_SCHEME] loop
5044 -- SEQUENCE_OF_STATEMENTS
5045 -- end loop [loop_IDENTIFIER];
5046
5047 -- Note: The occurrence of a loop label is not a defining identifier
5048 -- but rather a referencing occurrence. The defining occurrence is in
5049 -- the implicit label declaration which occurs in the innermost
5050 -- enclosing block.
5051
5052 -- Note: there is always a loop statement identifier present in the
5053 -- tree, even if none was given in the source. In the case where no loop
5054 -- identifier is given in the source, the parser creates a name of the
5055 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
5056 -- that the loop names created in this manner do not conflict with any
5057 -- user defined identifiers), and the flag Has_Created_Identifier is set
5058 -- to True. The only exception to the rule that all loop statement nodes
5059 -- have identifiers occurs for loops constructed by the expander, and
5060 -- the semantic analyzer will create and supply dummy loop identifiers
5061 -- in these cases.
5062
5063 -- N_Loop_Statement
5064 -- Sloc points to LOOP
5065 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
5066 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
5067 -- Statements (List3)
5068 -- End_Label (Node4)
5069 -- Has_Created_Identifier (Flag15)
5070 -- Is_Null_Loop (Flag16)
5071 -- Suppress_Loop_Warnings (Flag17)
5072
5073 -- Note: the parser fills in the Identifier field if there is an
5074 -- explicit loop identifier. Otherwise the parser leaves this field
5075 -- set to Empty, and then the semantic processing for a loop statement
5076 -- creates an identifier, setting the Has_Created_Identifier flag to
5077 -- True. So after semantic analysis, the Identifier is always set,
5078 -- referencing an identifier whose entity has an Ekind of E_Loop.
5079
5080 ---------------------------
5081 -- 5.5 Iteration Scheme --
5082 ---------------------------
5083
5084 -- ITERATION_SCHEME ::=
5085 -- while CONDITION
5086 -- | for LOOP_PARAMETER_SPECIFICATION
5087 -- | for ITERATOR_SPECIFICATION
5088
5089 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
5090 -- is present at a time, in which case the other one is empty. Both are
5091 -- empty in the case of a WHILE loop.
5092
5093 -- Gigi restriction: The expander ensures that the type of the Condition
5094 -- field is always Standard.Boolean, even if the type in the source is
5095 -- some non-standard boolean type.
5096
5097 -- N_Iteration_Scheme
5098 -- Sloc points to WHILE or FOR
5099 -- Condition (Node1) (set to Empty if FOR case)
5100 -- Condition_Actions (List3-Sem)
5101 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
5102 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
5103
5104 ---------------------------------------
5105 -- 5.5 Loop Parameter Specification --
5106 ---------------------------------------
5107
5108 -- LOOP_PARAMETER_SPECIFICATION ::=
5109 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
5110 -- [Iterator_Filter]
5111
5112 -- Note; the optional Iterator_Filter is an Ada_2020 construct.
5113
5114 -- N_Loop_Parameter_Specification
5115 -- Sloc points to first identifier
5116 -- Defining_Identifier (Node1)
5117 -- Reverse_Present (Flag15)
5118 -- Iterator_Filter (Node3) (set to Empty if not present)
5119 -- Discrete_Subtype_Definition (Node4)
5120
5121 -----------------------------------
5122 -- 5.5.1 Iterator Specification --
5123 -----------------------------------
5124
5125 -- ITERATOR_SPECIFICATION ::=
5126 -- DEFINING_IDENTIFIER in [reverse] NAME
5127 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
5128
5129 -- N_Iterator_Specification
5130 -- Sloc points to defining identifier
5131 -- Defining_Identifier (Node1)
5132 -- Name (Node2)
5133 -- Reverse_Present (Flag15)
5134 -- Of_Present (Flag16)
5135 -- Iterator_Filter (Node3) (set to Empty if not present)
5136 -- Subtype_Indication (Node5)
5137
5138 -- Note: The Of_Present flag distinguishes the two forms
5139
5140 --------------------------
5141 -- 5.6 Block Statement --
5142 --------------------------
5143
5144 -- BLOCK_STATEMENT ::=
5145 -- [block_STATEMENT_IDENTIFIER:]
5146 -- [declare
5147 -- DECLARATIVE_PART]
5148 -- begin
5149 -- HANDLED_SEQUENCE_OF_STATEMENTS
5150 -- end [block_IDENTIFIER];
5151
5152 -- Note that the occurrence of a block identifier is not a defining
5153 -- identifier, but rather a referencing occurrence. The defining
5154 -- occurrence is an E_Block entity declared by the implicit label
5155 -- declaration which occurs in the innermost enclosing block statement
5156 -- or body; the block identifier denotes that E_Block.
5157
5158 -- For block statements that come from source code, there is always a
5159 -- block statement identifier present in the tree, denoting an E_Block.
5160 -- In the case where no block identifier is given in the source,
5161 -- the parser creates a name of the form B_n, where n is a decimal
5162 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
5163 -- constructed by the expander usually have no identifier, and no
5164 -- corresponding entity.
5165
5166 -- Note: the block statement created for an extended return statement
5167 -- has an entity, and this entity is an E_Return_Statement, rather than
5168 -- the usual E_Block.
5169
5170 -- Note: Exception_Junk is set for the wrapping blocks created during
5171 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
5172
5173 -- Note: from a control flow viewpoint, a block statement defines an
5174 -- extended basic block, i.e. the entry of the block dominates every
5175 -- statement in the sequence. When generating new statements with
5176 -- exception handlers in the expander at the end of a sequence that
5177 -- comes from source code, it can be necessary to wrap them all in a
5178 -- block statement in order to expose the implicit control flow to
5179 -- gigi and thus prevent it from issuing bogus control flow warnings.
5180
5181 -- N_Block_Statement
5182 -- Sloc points to DECLARE or BEGIN
5183 -- Identifier (Node1) block direct name (set to Empty if not present)
5184 -- Declarations (List2) (set to No_List if no DECLARE part)
5185 -- Handled_Statement_Sequence (Node4)
5186 -- Activation_Chain_Entity (Node3-Sem)
5187 -- Cleanup_Actions (List5-Sem)
5188 -- Has_Created_Identifier (Flag15)
5189 -- Is_Asynchronous_Call_Block (Flag7)
5190 -- Is_Task_Allocation_Block (Flag6)
5191 -- Exception_Junk (Flag8-Sem)
5192 -- Is_Abort_Block (Flag4-Sem)
5193 -- Is_Finalization_Wrapper (Flag9-Sem)
5194 -- Is_Initialization_Block (Flag1-Sem)
5195 -- Is_Task_Master (Flag5-Sem)
5196
5197 -------------------------
5198 -- 5.7 Exit Statement --
5199 -------------------------
5200
5201 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
5202
5203 -- Gigi restriction: The expander ensures that the type of the Condition
5204 -- field is always Standard.Boolean, even if the type in the source is
5205 -- some non-standard boolean type.
5206
5207 -- N_Exit_Statement
5208 -- Sloc points to EXIT
5209 -- Name (Node2) (set to Empty if no loop name present)
5210 -- Condition (Node1) (set to Empty if no WHEN part present)
5211 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
5212
5213 -------------------------
5214 -- 5.9 Goto Statement --
5215 -------------------------
5216
5217 -- GOTO_STATEMENT ::= goto label_NAME;
5218
5219 -- N_Goto_Statement
5220 -- Sloc points to GOTO
5221 -- Name (Node2)
5222 -- Exception_Junk (Flag8-Sem)
5223
5224 ---------------------------------
5225 -- 6.1 Subprogram Declaration --
5226 ---------------------------------
5227
5228 -- SUBPROGRAM_DECLARATION ::=
5229 -- SUBPROGRAM_SPECIFICATION
5230 -- [ASPECT_SPECIFICATIONS];
5231
5232 -- N_Subprogram_Declaration
5233 -- Sloc points to FUNCTION or PROCEDURE
5234 -- Specification (Node1)
5235 -- Body_To_Inline (Node3-Sem)
5236 -- Corresponding_Body (Node5-Sem)
5237 -- Parent_Spec (Node4-Sem)
5238 -- Is_Entry_Barrier_Function (Flag8-Sem)
5239 -- Is_Task_Body_Procedure (Flag1-Sem)
5240
5241 ------------------------------------------
5242 -- 6.1 Abstract Subprogram Declaration --
5243 ------------------------------------------
5244
5245 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
5246 -- SUBPROGRAM_SPECIFICATION is abstract
5247 -- [ASPECT_SPECIFICATIONS];
5248
5249 -- N_Abstract_Subprogram_Declaration
5250 -- Sloc points to ABSTRACT
5251 -- Specification (Node1)
5252
5253 -----------------------------------
5254 -- 6.1 Subprogram Specification --
5255 -----------------------------------
5256
5257 -- SUBPROGRAM_SPECIFICATION ::=
5258 -- [[not] overriding]
5259 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
5260 -- | [[not] overriding]
5261 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
5262
5263 -- Note: there are no separate nodes for the profiles, instead the
5264 -- information appears directly in the following nodes.
5265
5266 -- N_Function_Specification
5267 -- Sloc points to FUNCTION
5268 -- Defining_Unit_Name (Node1) (the designator)
5269 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5270 -- Null_Exclusion_Present (Flag11)
5271 -- Result_Definition (Node4) for result subtype
5272 -- Generic_Parent (Node5-Sem)
5273 -- Must_Override (Flag14) set if overriding indicator present
5274 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5275
5276 -- N_Procedure_Specification
5277 -- Sloc points to PROCEDURE
5278 -- Defining_Unit_Name (Node1)
5279 -- Null_Statement (Node2-Sem) NULL statement for body, if Null_Present
5280 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5281 -- Generic_Parent (Node5-Sem)
5282 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
5283 -- Must_Override (Flag14) set if overriding indicator present
5284 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5285
5286 -- Note: overriding indicator is an Ada 2005 feature
5287
5288 ---------------------
5289 -- 6.1 Designator --
5290 ---------------------
5291
5292 -- DESIGNATOR ::=
5293 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
5294
5295 -- Designators that are simply identifiers or operator symbols appear
5296 -- directly in the tree in this form. The following node is used only
5297 -- in the case where the designator has a parent unit name component.
5298
5299 -- N_Designator
5300 -- Sloc points to period
5301 -- Name (Node2) holds the parent unit name
5302 -- Identifier (Node1)
5303
5304 -- Note: Name is always non-Empty, since this node is only used for the
5305 -- case where a parent library unit package name is present.
5306
5307 -- Note that the identifier can also be an operator symbol here
5308
5309 ------------------------------
5310 -- 6.1 Defining Designator --
5311 ------------------------------
5312
5313 -- DEFINING_DESIGNATOR ::=
5314 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
5315
5316 -------------------------------------
5317 -- 6.1 Defining Program Unit Name --
5318 -------------------------------------
5319
5320 -- DEFINING_PROGRAM_UNIT_NAME ::=
5321 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
5322
5323 -- The parent unit name is present only in the case of a child unit name
5324 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
5325 -- at scope level one). If no such name is present, the defining program
5326 -- unit name is represented simply as the defining identifier. In the
5327 -- child unit case, the following node is used to represent the child
5328 -- unit name.
5329
5330 -- N_Defining_Program_Unit_Name
5331 -- Sloc points to period
5332 -- Name (Node2) holds the parent unit name
5333 -- Defining_Identifier (Node1)
5334
5335 -- Note: Name is always non-Empty, since this node is only used for the
5336 -- case where a parent unit name is present.
5337
5338 --------------------------
5339 -- 6.1 Operator Symbol --
5340 --------------------------
5341
5342 -- OPERATOR_SYMBOL ::= STRING_LITERAL
5343
5344 -- Note: the fields of the N_Operator_Symbol node are laid out to match
5345 -- the corresponding fields of an N_Character_Literal node. This allows
5346 -- easy conversion of the operator symbol node into a character literal
5347 -- node in the case where a string constant of the form of an operator
5348 -- symbol is scanned out as such, but turns out semantically to be a
5349 -- string literal that is not an operator. For details see Sinfo.CN.
5350 -- Change_Operator_Symbol_To_String_Literal.
5351
5352 -- N_Operator_Symbol
5353 -- Sloc points to literal
5354 -- Chars (Name1) contains the Name_Id for the operator symbol
5355 -- Strval (Str3) Id of string value. This is used if the operator
5356 -- symbol turns out to be a normal string after all.
5357 -- Entity (Node4-Sem)
5358 -- Associated_Node (Node4-Sem)
5359 -- Etype (Node5-Sem)
5360 -- Has_Private_View (Flag11-Sem) set in generic units
5361
5362 -- Note: the Strval field may be set to No_String for generated
5363 -- operator symbols that are known not to be string literals
5364 -- semantically.
5365
5366 -----------------------------------
5367 -- 6.1 Defining Operator Symbol --
5368 -----------------------------------
5369
5370 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5371
5372 -- A defining operator symbol is an entity, which has additional
5373 -- fields depending on the setting of the Ekind field. These
5374 -- additional fields are defined (and access subprograms declared)
5375 -- in package Einfo.
5376
5377 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
5378 -- are deliberately laid out to match the layout of fields in an
5379 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5380 -- an operator symbol node into a defining operator symbol node.
5381 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5382 -- for further details.
5383
5384 -- N_Defining_Operator_Symbol
5385 -- Sloc points to literal
5386 -- Chars (Name1) contains the Name_Id for the operator symbol
5387 -- Next_Entity (Node2-Sem)
5388 -- Scope (Node3-Sem)
5389 -- Etype (Node5-Sem)
5390
5391 ----------------------------
5392 -- 6.1 Parameter Profile --
5393 ----------------------------
5394
5395 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5396
5397 ---------------------------------------
5398 -- 6.1 Parameter and Result Profile --
5399 ---------------------------------------
5400
5401 -- PARAMETER_AND_RESULT_PROFILE ::=
5402 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5403 -- | [FORMAL_PART] return ACCESS_DEFINITION
5404
5405 -- There is no explicit node in the tree for a parameter and result
5406 -- profile. Instead the information appears directly in the parent.
5407
5408 ----------------------
5409 -- 6.1 Formal Part --
5410 ----------------------
5411
5412 -- FORMAL_PART ::=
5413 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5414
5415 ----------------------------------
5416 -- 6.1 Parameter Specification --
5417 ----------------------------------
5418
5419 -- PARAMETER_SPECIFICATION ::=
5420 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5421 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION] [ASPECT_SPECIFICATIONS]
5422 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5423 -- [:= DEFAULT_EXPRESSION] [ASPECT_SPECIFICATIONS]
5424
5425 -- Although the syntax allows multiple identifiers in the list, the
5426 -- semantics is as though successive specifications were given with
5427 -- identical type definition and expression components. To simplify
5428 -- semantic processing, the parser represents a multiple declaration
5429 -- case as a sequence of single Specifications, using the More_Ids and
5430 -- Prev_Ids flags to preserve the original source form as described
5431 -- in the section on "Handling of Defining Identifier Lists".
5432
5433 -- ALIASED can only be present in Ada 2012 mode
5434
5435 -- N_Parameter_Specification
5436 -- Sloc points to first identifier
5437 -- Defining_Identifier (Node1)
5438 -- Aliased_Present (Flag4)
5439 -- In_Present (Flag15)
5440 -- Out_Present (Flag17)
5441 -- Null_Exclusion_Present (Flag11)
5442 -- Parameter_Type (Node2) subtype mark or access definition
5443 -- Expression (Node3) (set to Empty if no default expression present)
5444 -- Do_Accessibility_Check (Flag13-Sem)
5445 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5446 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5447 -- Default_Expression (Node5-Sem)
5448
5449 ---------------
5450 -- 6.1 Mode --
5451 ---------------
5452
5453 -- MODE ::= [in] | in out | out
5454
5455 -- There is no explicit node in the tree for the Mode. Instead the
5456 -- In_Present and Out_Present flags are set in the parent node to
5457 -- record the presence of keywords specifying the mode.
5458
5459 --------------------------
5460 -- 6.3 Subprogram Body --
5461 --------------------------
5462
5463 -- SUBPROGRAM_BODY ::=
5464 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5465 -- DECLARATIVE_PART
5466 -- begin
5467 -- HANDLED_SEQUENCE_OF_STATEMENTS
5468 -- end [DESIGNATOR];
5469
5470 -- N_Subprogram_Body
5471 -- Sloc points to FUNCTION or PROCEDURE
5472 -- Specification (Node1)
5473 -- Declarations (List2)
5474 -- Handled_Statement_Sequence (Node4)
5475 -- Activation_Chain_Entity (Node3-Sem)
5476 -- Corresponding_Spec (Node5-Sem)
5477 -- Acts_As_Spec (Flag4-Sem)
5478 -- Bad_Is_Detected (Flag15) used only by parser
5479 -- Do_Storage_Check (Flag17-Sem)
5480 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5481 -- Is_Entry_Barrier_Function (Flag8-Sem)
5482 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5483 -- Is_Task_Body_Procedure (Flag1-Sem)
5484 -- Is_Task_Master (Flag5-Sem)
5485 -- Was_Attribute_Reference (Flag2-Sem)
5486 -- Was_Expression_Function (Flag18-Sem)
5487 -- Was_Originally_Stub (Flag13-Sem)
5488
5489 -----------------------------------
5490 -- 6.4 Procedure Call Statement --
5491 -----------------------------------
5492
5493 -- PROCEDURE_CALL_STATEMENT ::=
5494 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5495
5496 -- Note: the reason that a procedure call has expression fields is that
5497 -- it semantically resembles an expression, e.g. overloading is allowed
5498 -- and a type is concocted for semantic processing purposes. Certain of
5499 -- these fields, such as Parens are not relevant, but it is easier to
5500 -- just supply all of them together.
5501
5502 -- N_Procedure_Call_Statement
5503 -- Sloc points to first token of name or prefix
5504 -- Name (Node2) stores name or prefix
5505 -- Parameter_Associations (List3) (set to No_List if no
5506 -- actual parameter part)
5507 -- First_Named_Actual (Node4-Sem)
5508 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5509 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5510 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
5511 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
5512 -- No_Elaboration_Check (Flag4-Sem)
5513 -- Do_Tag_Check (Flag13-Sem)
5514 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
5515 -- plus fields for expression
5516
5517 -- If any IN parameter requires a range check, then the corresponding
5518 -- argument expression has the Do_Range_Check flag set, and the range
5519 -- check is done against the formal type. Note that this argument
5520 -- expression may appear directly in the Parameter_Associations list,
5521 -- or may be a descendant of an N_Parameter_Association node that
5522 -- appears in this list.
5523
5524 ------------------------
5525 -- 6.4 Function Call --
5526 ------------------------
5527
5528 -- FUNCTION_CALL ::=
5529 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5530
5531 -- Note: the parser may generate an indexed component node or simply
5532 -- a name node instead of a function call node. The semantic pass must
5533 -- correct this misidentification.
5534
5535 -- N_Function_Call
5536 -- Sloc points to first token of name or prefix
5537 -- Name (Node2) stores name or prefix
5538 -- Parameter_Associations (List3) (set to No_List if no
5539 -- actual parameter part)
5540 -- First_Named_Actual (Node4-Sem)
5541 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5542 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5543 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
5544 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
5545 -- No_Elaboration_Check (Flag4-Sem)
5546 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
5547 -- Do_Tag_Check (Flag13-Sem)
5548 -- No_Side_Effect_Removal (Flag17-Sem)
5549 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
5550 -- plus fields for expression
5551
5552 --------------------------------
5553 -- 6.4 Actual Parameter Part --
5554 --------------------------------
5555
5556 -- ACTUAL_PARAMETER_PART ::=
5557 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5558
5559 --------------------------------
5560 -- 6.4 Parameter Association --
5561 --------------------------------
5562
5563 -- PARAMETER_ASSOCIATION ::=
5564 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5565
5566 -- Note: the N_Parameter_Association node is built only if a formal
5567 -- parameter selector name is present, otherwise the parameter
5568 -- association appears in the tree simply as the node for the
5569 -- explicit actual parameter.
5570
5571 -- N_Parameter_Association
5572 -- Sloc points to formal parameter
5573 -- Selector_Name (Node2) (always non-Empty)
5574 -- Explicit_Actual_Parameter (Node3)
5575 -- Next_Named_Actual (Node4-Sem)
5576 -- Is_Accessibility_Actual (Flag13-Sem)
5577
5578 ---------------------------
5579 -- 6.4 Actual Parameter --
5580 ---------------------------
5581
5582 -- EXPLICIT_ACTUAL_PARAMETER ::=
5583 -- EXPRESSION | variable_NAME | REDUCTION_EXPRESSION_PARAMETER
5584
5585 ---------------------------
5586 -- 6.5 Return Statement --
5587 ---------------------------
5588
5589 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5590
5591 -- EXTENDED_RETURN_STATEMENT ::=
5592 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5593 -- [:= EXPRESSION] [do
5594 -- HANDLED_SEQUENCE_OF_STATEMENTS
5595 -- end return];
5596
5597 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5598
5599 -- The term "return statement" is defined in 6.5 to mean either a
5600 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5601 -- the use of this term, since it used to mean someting else in earlier
5602 -- versions of Ada.
5603
5604 -- N_Simple_Return_Statement
5605 -- Sloc points to RETURN
5606 -- Return_Statement_Entity (Node5-Sem)
5607 -- Expression (Node3) (set to Empty if no expression present)
5608 -- Storage_Pool (Node1-Sem)
5609 -- Procedure_To_Call (Node2-Sem)
5610 -- Do_Tag_Check (Flag13-Sem)
5611 -- By_Ref (Flag5-Sem)
5612 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5613
5614 -- Note: Return_Statement_Entity points to an E_Return_Statement
5615
5616 -- If a range check is required, then Do_Range_Check is set on the
5617 -- Expression. The check is against the return subtype of the function.
5618
5619 -- N_Extended_Return_Statement
5620 -- Sloc points to RETURN
5621 -- Return_Statement_Entity (Node5-Sem)
5622 -- Return_Object_Declarations (List3)
5623 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5624 -- Storage_Pool (Node1-Sem)
5625 -- Procedure_To_Call (Node2-Sem)
5626 -- Do_Tag_Check (Flag13-Sem)
5627 -- By_Ref (Flag5-Sem)
5628
5629 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5630
5631 -- Note that Return_Object_Declarations is a list containing the
5632 -- N_Object_Declaration -- see comment on this field above.
5633
5634 -- The declared object will have Is_Return_Object = True.
5635
5636 -- There is no such syntactic category as return_object_declaration
5637 -- in the RM. Return_Object_Declarations represents this portion of
5638 -- the syntax for EXTENDED_RETURN_STATEMENT:
5639 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5640 -- [:= EXPRESSION]
5641
5642 -- There are two entities associated with an extended_return_statement:
5643 -- the Return_Statement_Entity represents the statement itself,
5644 -- and the Defining_Identifier of the Object_Declaration in
5645 -- Return_Object_Declarations represents the object being
5646 -- returned. N_Simple_Return_Statement has only the former.
5647
5648 ------------------------------
5649 -- 6.8 Expression Function --
5650 ------------------------------
5651
5652 -- EXPRESSION_FUNCTION ::=
5653 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5654 -- [ASPECT_SPECIFICATIONS];
5655
5656 -- N_Expression_Function
5657 -- Sloc points to FUNCTION
5658 -- Specification (Node1)
5659 -- Expression (Node3)
5660 -- Corresponding_Spec (Node5-Sem)
5661
5662 ------------------------------
5663 -- 7.1 Package Declaration --
5664 ------------------------------
5665
5666 -- PACKAGE_DECLARATION ::=
5667 -- PACKAGE_SPECIFICATION;
5668
5669 -- Note: the activation chain entity for a package spec is used for
5670 -- all tasks declared in the package spec, or in the package body.
5671
5672 -- N_Package_Declaration
5673 -- Sloc points to PACKAGE
5674 -- Specification (Node1)
5675 -- Corresponding_Body (Node5-Sem)
5676 -- Parent_Spec (Node4-Sem)
5677 -- Activation_Chain_Entity (Node3-Sem)
5678
5679 --------------------------------
5680 -- 7.1 Package Specification --
5681 --------------------------------
5682
5683 -- PACKAGE_SPECIFICATION ::=
5684 -- package DEFINING_PROGRAM_UNIT_NAME
5685 -- [ASPECT_SPECIFICATIONS]
5686 -- is
5687 -- {BASIC_DECLARATIVE_ITEM}
5688 -- [private
5689 -- {BASIC_DECLARATIVE_ITEM}]
5690 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5691
5692 -- N_Package_Specification
5693 -- Sloc points to PACKAGE
5694 -- Defining_Unit_Name (Node1)
5695 -- Visible_Declarations (List2)
5696 -- Private_Declarations (List3) (set to No_List if no private
5697 -- part present)
5698 -- End_Label (Node4)
5699 -- Generic_Parent (Node5-Sem)
5700 -- Limited_View_Installed (Flag18-Sem)
5701
5702 -----------------------
5703 -- 7.1 Package Body --
5704 -----------------------
5705
5706 -- PACKAGE_BODY ::=
5707 -- package body DEFINING_PROGRAM_UNIT_NAME
5708 -- [ASPECT_SPECIFICATIONS]
5709 -- is
5710 -- DECLARATIVE_PART
5711 -- [begin
5712 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5713 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5714
5715 -- N_Package_Body
5716 -- Sloc points to PACKAGE
5717 -- Defining_Unit_Name (Node1)
5718 -- Declarations (List2)
5719 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5720 -- Corresponding_Spec (Node5-Sem)
5721 -- Was_Originally_Stub (Flag13-Sem)
5722
5723 -- Note: if a source level package does not contain a handled sequence
5724 -- of statements, then the parser supplies a dummy one with a null
5725 -- sequence of statements. Comes_From_Source will be False in this
5726 -- constructed sequence. The reason we need this is for the End_Label
5727 -- field in the HSS.
5728
5729 -----------------------------------
5730 -- 7.4 Private Type Declaration --
5731 -----------------------------------
5732
5733 -- PRIVATE_TYPE_DECLARATION ::=
5734 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5735 -- is [[abstract] tagged] [limited] private
5736 -- [ASPECT_SPECIFICATIONS];
5737
5738 -- Note: TAGGED is not permitted in Ada 83 mode
5739
5740 -- N_Private_Type_Declaration
5741 -- Sloc points to TYPE
5742 -- Defining_Identifier (Node1)
5743 -- Discriminant_Specifications (List4) (set to No_List if no
5744 -- discriminant part)
5745 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5746 -- Abstract_Present (Flag4)
5747 -- Tagged_Present (Flag15)
5748 -- Limited_Present (Flag17)
5749
5750 ----------------------------------------
5751 -- 7.4 Private Extension Declaration --
5752 ----------------------------------------
5753
5754 -- PRIVATE_EXTENSION_DECLARATION ::=
5755 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5756 -- [abstract] [limited | synchronized]
5757 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5758 -- with private [ASPECT_SPECIFICATIONS];
5759
5760 -- Note: LIMITED, and private extension declarations are not allowed
5761 -- in Ada 83 mode.
5762
5763 -- N_Private_Extension_Declaration
5764 -- Sloc points to TYPE
5765 -- Defining_Identifier (Node1)
5766 -- Uninitialized_Variable (Node3-Sem)
5767 -- Discriminant_Specifications (List4) (set to No_List if no
5768 -- discriminant part)
5769 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5770 -- Abstract_Present (Flag4)
5771 -- Limited_Present (Flag17)
5772 -- Synchronized_Present (Flag7)
5773 -- Subtype_Indication (Node5)
5774 -- Interface_List (List2) (set to No_List if none)
5775
5776 ---------------------
5777 -- 8.4 Use Clause --
5778 ---------------------
5779
5780 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5781
5782 -----------------------------
5783 -- 8.4 Use Package Clause --
5784 -----------------------------
5785
5786 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5787
5788 -- N_Use_Package_Clause
5789 -- Sloc points to USE
5790 -- Prev_Use_Clause (Node1-Sem)
5791 -- Name (Node2)
5792 -- Next_Use_Clause (Node3-Sem)
5793 -- Associated_Node (Node4-Sem)
5794 -- Hidden_By_Use_Clause (Elist5-Sem)
5795 -- Is_Effective_Use_Clause (Flag1)
5796 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5797 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5798
5799 --------------------------
5800 -- 8.4 Use Type Clause --
5801 --------------------------
5802
5803 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5804
5805 -- Note: use type clause is not permitted in Ada 83 mode
5806
5807 -- Note: the ALL keyword can appear only in Ada 2012 mode
5808
5809 -- N_Use_Type_Clause
5810 -- Sloc points to USE
5811 -- Prev_Use_Clause (Node1-Sem)
5812 -- Used_Operations (Elist2-Sem)
5813 -- Next_Use_Clause (Node3-Sem)
5814 -- Subtype_Mark (Node4)
5815 -- Hidden_By_Use_Clause (Elist5-Sem)
5816 -- Is_Effective_Use_Clause (Flag1)
5817 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5818 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5819 -- All_Present (Flag15)
5820
5821 -------------------------------
5822 -- 8.5 Renaming Declaration --
5823 -------------------------------
5824
5825 -- RENAMING_DECLARATION ::=
5826 -- OBJECT_RENAMING_DECLARATION
5827 -- | EXCEPTION_RENAMING_DECLARATION
5828 -- | PACKAGE_RENAMING_DECLARATION
5829 -- | SUBPROGRAM_RENAMING_DECLARATION
5830 -- | GENERIC_RENAMING_DECLARATION
5831
5832 --------------------------------------
5833 -- 8.5 Object Renaming Declaration --
5834 --------------------------------------
5835
5836 -- OBJECT_RENAMING_DECLARATION ::=
5837 -- DEFINING_IDENTIFIER :
5838 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5839 -- [ASPECT_SPECIFICATIONS];
5840 -- | DEFINING_IDENTIFIER :
5841 -- ACCESS_DEFINITION renames object_NAME
5842 -- [ASPECT_SPECIFICATIONS];
5843
5844 -- Note: Access_Definition is an optional field that gives support to
5845 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5846 -- Subtype_Indication field or else the Access_Definition field.
5847
5848 -- N_Object_Renaming_Declaration
5849 -- Sloc points to first identifier
5850 -- Defining_Identifier (Node1)
5851 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5852 -- Subtype_Mark (Node4) (set to Empty if not present)
5853 -- Access_Definition (Node3) (set to Empty if not present)
5854 -- Name (Node2)
5855 -- Corresponding_Generic_Association (Node5-Sem)
5856
5857 -----------------------------------------
5858 -- 8.5 Exception Renaming Declaration --
5859 -----------------------------------------
5860
5861 -- EXCEPTION_RENAMING_DECLARATION ::=
5862 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5863 -- [ASPECT_SPECIFICATIONS];
5864
5865 -- N_Exception_Renaming_Declaration
5866 -- Sloc points to first identifier
5867 -- Defining_Identifier (Node1)
5868 -- Name (Node2)
5869
5870 ---------------------------------------
5871 -- 8.5 Package Renaming Declaration --
5872 ---------------------------------------
5873
5874 -- PACKAGE_RENAMING_DECLARATION ::=
5875 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5876 -- [ASPECT_SPECIFICATIONS];
5877
5878 -- N_Package_Renaming_Declaration
5879 -- Sloc points to PACKAGE
5880 -- Defining_Unit_Name (Node1)
5881 -- Name (Node2)
5882 -- Parent_Spec (Node4-Sem)
5883
5884 ------------------------------------------
5885 -- 8.5 Subprogram Renaming Declaration --
5886 ------------------------------------------
5887
5888 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5889 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5890 -- [ASPECT_SPECIFICATIONS];
5891
5892 -- N_Subprogram_Renaming_Declaration
5893 -- Sloc points to RENAMES
5894 -- Specification (Node1)
5895 -- Name (Node2)
5896 -- Parent_Spec (Node4-Sem)
5897 -- Corresponding_Spec (Node5-Sem)
5898 -- Corresponding_Formal_Spec (Node3-Sem)
5899 -- From_Default (Flag6-Sem)
5900
5901 -----------------------------------------
5902 -- 8.5.5 Generic Renaming Declaration --
5903 -----------------------------------------
5904
5905 -- GENERIC_RENAMING_DECLARATION ::=
5906 -- generic package DEFINING_PROGRAM_UNIT_NAME
5907 -- renames generic_package_NAME
5908 -- [ASPECT_SPECIFICATIONS];
5909 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5910 -- renames generic_procedure_NAME
5911 -- [ASPECT_SPECIFICATIONS];
5912 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5913 -- renames generic_function_NAME
5914 -- [ASPECT_SPECIFICATIONS];
5915
5916 -- N_Generic_Package_Renaming_Declaration
5917 -- Sloc points to GENERIC
5918 -- Defining_Unit_Name (Node1)
5919 -- Name (Node2)
5920 -- Parent_Spec (Node4-Sem)
5921
5922 -- N_Generic_Procedure_Renaming_Declaration
5923 -- Sloc points to GENERIC
5924 -- Defining_Unit_Name (Node1)
5925 -- Name (Node2)
5926 -- Parent_Spec (Node4-Sem)
5927
5928 -- N_Generic_Function_Renaming_Declaration
5929 -- Sloc points to GENERIC
5930 -- Defining_Unit_Name (Node1)
5931 -- Name (Node2)
5932 -- Parent_Spec (Node4-Sem)
5933
5934 --------------------------------
5935 -- 9.1 Task Type Declaration --
5936 --------------------------------
5937
5938 -- TASK_TYPE_DECLARATION ::=
5939 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5940 -- [ASPECT_SPECIFICATIONS]
5941 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5942
5943 -- N_Task_Type_Declaration
5944 -- Sloc points to TASK
5945 -- Defining_Identifier (Node1)
5946 -- Discriminant_Specifications (List4) (set to No_List if no
5947 -- discriminant part)
5948 -- Interface_List (List2) (set to No_List if none)
5949 -- Task_Definition (Node3) (set to Empty if not present)
5950 -- Corresponding_Body (Node5-Sem)
5951
5952 ----------------------------------
5953 -- 9.1 Single Task Declaration --
5954 ----------------------------------
5955
5956 -- SINGLE_TASK_DECLARATION ::=
5957 -- task DEFINING_IDENTIFIER
5958 -- [ASPECT_SPECIFICATIONS]
5959 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5960
5961 -- N_Single_Task_Declaration
5962 -- Sloc points to TASK
5963 -- Defining_Identifier (Node1)
5964 -- Interface_List (List2) (set to No_List if none)
5965 -- Task_Definition (Node3) (set to Empty if not present)
5966
5967 --------------------------
5968 -- 9.1 Task Definition --
5969 --------------------------
5970
5971 -- TASK_DEFINITION ::=
5972 -- {TASK_ITEM}
5973 -- [private
5974 -- {TASK_ITEM}]
5975 -- end [task_IDENTIFIER]
5976
5977 -- Note: as a result of semantic analysis, the list of task items can
5978 -- include implicit type declarations resulting from entry families.
5979
5980 -- N_Task_Definition
5981 -- Sloc points to first token of task definition
5982 -- Visible_Declarations (List2)
5983 -- Private_Declarations (List3) (set to No_List if no private part)
5984 -- End_Label (Node4)
5985 -- Has_Storage_Size_Pragma (Flag5-Sem)
5986 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5987
5988 --------------------
5989 -- 9.1 Task Item --
5990 --------------------
5991
5992 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5993
5994 --------------------
5995 -- 9.1 Task Body --
5996 --------------------
5997
5998 -- TASK_BODY ::=
5999 -- task body task_DEFINING_IDENTIFIER
6000 -- [ASPECT_SPECIFICATIONS]
6001 -- is
6002 -- DECLARATIVE_PART
6003 -- begin
6004 -- HANDLED_SEQUENCE_OF_STATEMENTS
6005 -- end [task_IDENTIFIER];
6006
6007 -- Gigi restriction: This node never appears
6008
6009 -- N_Task_Body
6010 -- Sloc points to TASK
6011 -- Defining_Identifier (Node1)
6012 -- Declarations (List2)
6013 -- Handled_Statement_Sequence (Node4)
6014 -- Is_Task_Master (Flag5-Sem)
6015 -- Activation_Chain_Entity (Node3-Sem)
6016 -- Corresponding_Spec (Node5-Sem)
6017 -- Was_Originally_Stub (Flag13-Sem)
6018
6019 -------------------------------------
6020 -- 9.4 Protected Type Declaration --
6021 -------------------------------------
6022
6023 -- PROTECTED_TYPE_DECLARATION ::=
6024 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
6025 -- [ASPECT_SPECIFICATIONS]
6026 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
6027
6028 -- Note: protected type declarations are not permitted in Ada 83 mode
6029
6030 -- N_Protected_Type_Declaration
6031 -- Sloc points to PROTECTED
6032 -- Defining_Identifier (Node1)
6033 -- Discriminant_Specifications (List4) (set to No_List if no
6034 -- discriminant part)
6035 -- Interface_List (List2) (set to No_List if none)
6036 -- Protected_Definition (Node3)
6037 -- Corresponding_Body (Node5-Sem)
6038
6039 ---------------------------------------
6040 -- 9.4 Single Protected Declaration --
6041 ---------------------------------------
6042
6043 -- SINGLE_PROTECTED_DECLARATION ::=
6044 -- protected DEFINING_IDENTIFIER
6045 -- [ASPECT_SPECIFICATIONS]
6046 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
6047
6048 -- Note: single protected declarations are not allowed in Ada 83 mode
6049
6050 -- N_Single_Protected_Declaration
6051 -- Sloc points to PROTECTED
6052 -- Defining_Identifier (Node1)
6053 -- Interface_List (List2) (set to No_List if none)
6054 -- Protected_Definition (Node3)
6055
6056 -------------------------------
6057 -- 9.4 Protected Definition --
6058 -------------------------------
6059
6060 -- PROTECTED_DEFINITION ::=
6061 -- {PROTECTED_OPERATION_DECLARATION}
6062 -- [private
6063 -- {PROTECTED_ELEMENT_DECLARATION}]
6064 -- end [protected_IDENTIFIER]
6065
6066 -- N_Protected_Definition
6067 -- Sloc points to first token of protected definition
6068 -- Visible_Declarations (List2)
6069 -- Private_Declarations (List3) (set to No_List if no private part)
6070 -- End_Label (Node4)
6071
6072 ------------------------------------------
6073 -- 9.4 Protected Operation Declaration --
6074 ------------------------------------------
6075
6076 -- PROTECTED_OPERATION_DECLARATION ::=
6077 -- SUBPROGRAM_DECLARATION
6078 -- | ENTRY_DECLARATION
6079 -- | REPRESENTATION_CLAUSE
6080
6081 ----------------------------------------
6082 -- 9.4 Protected Element Declaration --
6083 ----------------------------------------
6084
6085 -- PROTECTED_ELEMENT_DECLARATION ::=
6086 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
6087
6088 -------------------------
6089 -- 9.4 Protected Body --
6090 -------------------------
6091
6092 -- PROTECTED_BODY ::=
6093 -- protected body DEFINING_IDENTIFIER
6094 -- [ASPECT_SPECIFICATIONS];
6095 -- is
6096 -- {PROTECTED_OPERATION_ITEM}
6097 -- end [protected_IDENTIFIER];
6098
6099 -- Note: protected bodies are not allowed in Ada 83 mode
6100
6101 -- Gigi restriction: This node never appears
6102
6103 -- N_Protected_Body
6104 -- Sloc points to PROTECTED
6105 -- Defining_Identifier (Node1)
6106 -- Declarations (List2) protected operation items (and pragmas)
6107 -- End_Label (Node4)
6108 -- Corresponding_Spec (Node5-Sem)
6109 -- Was_Originally_Stub (Flag13-Sem)
6110
6111 -----------------------------------
6112 -- 9.4 Protected Operation Item --
6113 -----------------------------------
6114
6115 -- PROTECTED_OPERATION_ITEM ::=
6116 -- SUBPROGRAM_DECLARATION
6117 -- | SUBPROGRAM_BODY
6118 -- | ENTRY_BODY
6119 -- | REPRESENTATION_CLAUSE
6120
6121 ------------------------------
6122 -- 9.5.2 Entry Declaration --
6123 ------------------------------
6124
6125 -- ENTRY_DECLARATION ::=
6126 -- [[not] overriding]
6127 -- entry DEFINING_IDENTIFIER
6128 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
6129 -- [ASPECT_SPECIFICATIONS];
6130
6131 -- N_Entry_Declaration
6132 -- Sloc points to ENTRY
6133 -- Defining_Identifier (Node1)
6134 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
6135 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6136 -- Corresponding_Body (Node5-Sem)
6137 -- Must_Override (Flag14) set if overriding indicator present
6138 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6139
6140 -- Note: overriding indicator is an Ada 2005 feature
6141
6142 -----------------------------
6143 -- 9.5.2 Accept statement --
6144 -----------------------------
6145
6146 -- ACCEPT_STATEMENT ::=
6147 -- accept entry_DIRECT_NAME
6148 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
6149 -- HANDLED_SEQUENCE_OF_STATEMENTS
6150 -- end [entry_IDENTIFIER]];
6151
6152 -- Gigi restriction: This node never appears
6153
6154 -- Note: there are no explicit declarations allowed in an accept
6155 -- statement. However, the implicit declarations for any statement
6156 -- identifiers (labels and block/loop identifiers) are declarations
6157 -- that belong logically to the accept statement, and that is why
6158 -- there is a Declarations field in this node.
6159
6160 -- N_Accept_Statement
6161 -- Sloc points to ACCEPT
6162 -- Entry_Direct_Name (Node1)
6163 -- Entry_Index (Node5) (set to Empty if not present)
6164 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6165 -- Handled_Statement_Sequence (Node4)
6166 -- Declarations (List2) (set to No_List if no declarations)
6167
6168 ------------------------
6169 -- 9.5.2 Entry Index --
6170 ------------------------
6171
6172 -- ENTRY_INDEX ::= EXPRESSION
6173
6174 -----------------------
6175 -- 9.5.2 Entry Body --
6176 -----------------------
6177
6178 -- ENTRY_BODY ::=
6179 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
6180 -- DECLARATIVE_PART
6181 -- begin
6182 -- HANDLED_SEQUENCE_OF_STATEMENTS
6183 -- end [entry_IDENTIFIER];
6184
6185 -- ENTRY_BARRIER ::= when CONDITION
6186
6187 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
6188 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
6189 -- too full (it would otherwise have too many fields)
6190
6191 -- Gigi restriction: This node never appears
6192
6193 -- N_Entry_Body
6194 -- Sloc points to ENTRY
6195 -- Defining_Identifier (Node1)
6196 -- Entry_Body_Formal_Part (Node5)
6197 -- Declarations (List2)
6198 -- Handled_Statement_Sequence (Node4)
6199 -- Activation_Chain_Entity (Node3-Sem)
6200
6201 -----------------------------------
6202 -- 9.5.2 Entry Body Formal Part --
6203 -----------------------------------
6204
6205 -- ENTRY_BODY_FORMAL_PART ::=
6206 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
6207
6208 -- Note that an entry body formal part node is present even if it is
6209 -- empty. This reflects the grammar, in which it is the components of
6210 -- the entry body formal part that are optional, not the entry body
6211 -- formal part itself. Also this means that the barrier condition
6212 -- always has somewhere to be stored.
6213
6214 -- Gigi restriction: This node never appears
6215
6216 -- N_Entry_Body_Formal_Part
6217 -- Sloc points to first token
6218 -- Entry_Index_Specification (Node4) (set to Empty if not present)
6219 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6220 -- Condition (Node1) from entry barrier of entry body
6221
6222 --------------------------
6223 -- 9.5.2 Entry Barrier --
6224 --------------------------
6225
6226 -- ENTRY_BARRIER ::= when CONDITION
6227
6228 --------------------------------------
6229 -- 9.5.2 Entry Index Specification --
6230 --------------------------------------
6231
6232 -- ENTRY_INDEX_SPECIFICATION ::=
6233 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
6234
6235 -- Gigi restriction: This node never appears
6236
6237 -- N_Entry_Index_Specification
6238 -- Sloc points to FOR
6239 -- Defining_Identifier (Node1)
6240 -- Discrete_Subtype_Definition (Node4)
6241
6242 ---------------------------------
6243 -- 9.5.3 Entry Call Statement --
6244 ---------------------------------
6245
6246 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
6247
6248 -- The parser may generate a procedure call for this construct. The
6249 -- semantic pass must correct this misidentification where needed.
6250
6251 -- Gigi restriction: This node never appears
6252
6253 -- N_Entry_Call_Statement
6254 -- Sloc points to first token of name
6255 -- Name (Node2)
6256 -- Parameter_Associations (List3) (set to No_List if no
6257 -- actual parameter part)
6258 -- First_Named_Actual (Node4-Sem)
6259 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6260 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
6261 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
6262
6263 ------------------------------
6264 -- 9.5.4 Requeue Statement --
6265 ------------------------------
6266
6267 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
6268
6269 -- Note: requeue statements are not permitted in Ada 83 mode
6270
6271 -- Gigi restriction: This node never appears
6272
6273 -- N_Requeue_Statement
6274 -- Sloc points to REQUEUE
6275 -- Name (Node2)
6276 -- Abort_Present (Flag15)
6277 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6278 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
6279 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
6280
6281 --------------------------
6282 -- 9.6 Delay Statement --
6283 --------------------------
6284
6285 -- DELAY_STATEMENT ::=
6286 -- DELAY_UNTIL_STATEMENT
6287 -- | DELAY_RELATIVE_STATEMENT
6288
6289 --------------------------------
6290 -- 9.6 Delay Until Statement --
6291 --------------------------------
6292
6293 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
6294
6295 -- Note: delay until statements are not permitted in Ada 83 mode
6296
6297 -- Gigi restriction: This node never appears
6298
6299 -- N_Delay_Until_Statement
6300 -- Sloc points to DELAY
6301 -- Expression (Node3)
6302
6303 -----------------------------------
6304 -- 9.6 Delay Relative Statement --
6305 -----------------------------------
6306
6307 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
6308
6309 -- Gigi restriction: This node never appears
6310
6311 -- N_Delay_Relative_Statement
6312 -- Sloc points to DELAY
6313 -- Expression (Node3)
6314
6315 ---------------------------
6316 -- 9.7 Select Statement --
6317 ---------------------------
6318
6319 -- SELECT_STATEMENT ::=
6320 -- SELECTIVE_ACCEPT
6321 -- | TIMED_ENTRY_CALL
6322 -- | CONDITIONAL_ENTRY_CALL
6323 -- | ASYNCHRONOUS_SELECT
6324
6325 -----------------------------
6326 -- 9.7.1 Selective Accept --
6327 -----------------------------
6328
6329 -- SELECTIVE_ACCEPT ::=
6330 -- select
6331 -- [GUARD]
6332 -- SELECT_ALTERNATIVE
6333 -- {or
6334 -- [GUARD]
6335 -- SELECT_ALTERNATIVE}
6336 -- [else
6337 -- SEQUENCE_OF_STATEMENTS]
6338 -- end select;
6339
6340 -- Gigi restriction: This node never appears
6341
6342 -- Note: the guard expression, if present, appears in the node for
6343 -- the select alternative.
6344
6345 -- N_Selective_Accept
6346 -- Sloc points to SELECT
6347 -- Select_Alternatives (List1)
6348 -- Else_Statements (List4) (set to No_List if no else part)
6349
6350 ------------------
6351 -- 9.7.1 Guard --
6352 ------------------
6353
6354 -- GUARD ::= when CONDITION =>
6355
6356 -- As noted above, the CONDITION that is part of a GUARD is included
6357 -- in the node for the select alternative for convenience.
6358
6359 -------------------------------
6360 -- 9.7.1 Select Alternative --
6361 -------------------------------
6362
6363 -- SELECT_ALTERNATIVE ::=
6364 -- ACCEPT_ALTERNATIVE
6365 -- | DELAY_ALTERNATIVE
6366 -- | TERMINATE_ALTERNATIVE
6367
6368 -------------------------------
6369 -- 9.7.1 Accept Alternative --
6370 -------------------------------
6371
6372 -- ACCEPT_ALTERNATIVE ::=
6373 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
6374
6375 -- Gigi restriction: This node never appears
6376
6377 -- N_Accept_Alternative
6378 -- Sloc points to ACCEPT
6379 -- Accept_Statement (Node2)
6380 -- Condition (Node1) from the guard (set to Empty if no guard present)
6381 -- Statements (List3) (set to Empty_List if no statements)
6382 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6383 -- Accept_Handler_Records (List5-Sem)
6384
6385 ------------------------------
6386 -- 9.7.1 Delay Alternative --
6387 ------------------------------
6388
6389 -- DELAY_ALTERNATIVE ::=
6390 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6391
6392 -- Gigi restriction: This node never appears
6393
6394 -- N_Delay_Alternative
6395 -- Sloc points to DELAY
6396 -- Delay_Statement (Node2)
6397 -- Condition (Node1) from the guard (set to Empty if no guard present)
6398 -- Statements (List3) (set to Empty_List if no statements)
6399 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6400
6401 ----------------------------------
6402 -- 9.7.1 Terminate Alternative --
6403 ----------------------------------
6404
6405 -- TERMINATE_ALTERNATIVE ::= terminate;
6406
6407 -- Gigi restriction: This node never appears
6408
6409 -- N_Terminate_Alternative
6410 -- Sloc points to TERMINATE
6411 -- Condition (Node1) from the guard (set to Empty if no guard present)
6412 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6413 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6414
6415 -----------------------------
6416 -- 9.7.2 Timed Entry Call --
6417 -----------------------------
6418
6419 -- TIMED_ENTRY_CALL ::=
6420 -- select
6421 -- ENTRY_CALL_ALTERNATIVE
6422 -- or
6423 -- DELAY_ALTERNATIVE
6424 -- end select;
6425
6426 -- Gigi restriction: This node never appears
6427
6428 -- N_Timed_Entry_Call
6429 -- Sloc points to SELECT
6430 -- Entry_Call_Alternative (Node1)
6431 -- Delay_Alternative (Node4)
6432
6433 -----------------------------------
6434 -- 9.7.2 Entry Call Alternative --
6435 -----------------------------------
6436
6437 -- ENTRY_CALL_ALTERNATIVE ::=
6438 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6439
6440 -- PROCEDURE_OR_ENTRY_CALL ::=
6441 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6442
6443 -- Gigi restriction: This node never appears
6444
6445 -- N_Entry_Call_Alternative
6446 -- Sloc points to first token of entry call statement
6447 -- Entry_Call_Statement (Node1)
6448 -- Statements (List3) (set to Empty_List if no statements)
6449 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6450
6451 -----------------------------------
6452 -- 9.7.3 Conditional Entry Call --
6453 -----------------------------------
6454
6455 -- CONDITIONAL_ENTRY_CALL ::=
6456 -- select
6457 -- ENTRY_CALL_ALTERNATIVE
6458 -- else
6459 -- SEQUENCE_OF_STATEMENTS
6460 -- end select;
6461
6462 -- Gigi restriction: This node never appears
6463
6464 -- N_Conditional_Entry_Call
6465 -- Sloc points to SELECT
6466 -- Entry_Call_Alternative (Node1)
6467 -- Else_Statements (List4)
6468
6469 --------------------------------
6470 -- 9.7.4 Asynchronous Select --
6471 --------------------------------
6472
6473 -- ASYNCHRONOUS_SELECT ::=
6474 -- select
6475 -- TRIGGERING_ALTERNATIVE
6476 -- then abort
6477 -- ABORTABLE_PART
6478 -- end select;
6479
6480 -- Note: asynchronous select is not permitted in Ada 83 mode
6481
6482 -- Gigi restriction: This node never appears
6483
6484 -- N_Asynchronous_Select
6485 -- Sloc points to SELECT
6486 -- Triggering_Alternative (Node1)
6487 -- Abortable_Part (Node2)
6488
6489 -----------------------------------
6490 -- 9.7.4 Triggering Alternative --
6491 -----------------------------------
6492
6493 -- TRIGGERING_ALTERNATIVE ::=
6494 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6495
6496 -- Gigi restriction: This node never appears
6497
6498 -- N_Triggering_Alternative
6499 -- Sloc points to first token of triggering statement
6500 -- Triggering_Statement (Node1)
6501 -- Statements (List3) (set to Empty_List if no statements)
6502 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6503
6504 ---------------------------------
6505 -- 9.7.4 Triggering Statement --
6506 ---------------------------------
6507
6508 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6509
6510 ---------------------------
6511 -- 9.7.4 Abortable Part --
6512 ---------------------------
6513
6514 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6515
6516 -- Gigi restriction: This node never appears
6517
6518 -- N_Abortable_Part
6519 -- Sloc points to ABORT
6520 -- Statements (List3)
6521
6522 --------------------------
6523 -- 9.8 Abort Statement --
6524 --------------------------
6525
6526 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6527
6528 -- Gigi restriction: This node never appears
6529
6530 -- N_Abort_Statement
6531 -- Sloc points to ABORT
6532 -- Names (List2)
6533
6534 -------------------------
6535 -- 10.1.1 Compilation --
6536 -------------------------
6537
6538 -- COMPILATION ::= {COMPILATION_UNIT}
6539
6540 -- There is no explicit node in the tree for a compilation, since in
6541 -- general the compiler is processing only a single compilation unit
6542 -- at a time. It is possible to parse multiple units in syntax check
6543 -- only mode, but the trees are discarded in that case.
6544
6545 ------------------------------
6546 -- 10.1.1 Compilation Unit --
6547 ------------------------------
6548
6549 -- COMPILATION_UNIT ::=
6550 -- CONTEXT_CLAUSE LIBRARY_ITEM
6551 -- | CONTEXT_CLAUSE SUBUNIT
6552
6553 -- The N_Compilation_Unit node itself represents the above syntax.
6554 -- However, there are two additional items not reflected in the above
6555 -- syntax. First we have the global declarations that are added by the
6556 -- code generator. These are outer level declarations (so they cannot
6557 -- be represented as being inside the units). An example is the wrapper
6558 -- subprograms that are created to do ABE checking. As always a list of
6559 -- declarations can contain actions as well (i.e. statements), and such
6560 -- statements are executed as part of the elaboration of the unit. Note
6561 -- that all such declarations are elaborated before the library unit.
6562
6563 -- Similarly, certain actions need to be elaborated at the completion
6564 -- of elaboration of the library unit (notably the statement that sets
6565 -- the Boolean flag indicating that elaboration is complete).
6566
6567 -- The third item not reflected in the syntax is pragmas that appear
6568 -- after the compilation unit. As always pragmas are a problem since
6569 -- they are not part of the formal syntax, but can be stuck into the
6570 -- source following a set of ad hoc rules, and we have to find an ad
6571 -- hoc way of sticking them into the tree. For pragmas that appear
6572 -- before the library unit, we just consider them to be part of the
6573 -- context clause, and pragmas can appear in the Context_Items list
6574 -- of the compilation unit. However, pragmas can also appear after
6575 -- the library item.
6576
6577 -- To deal with all these problems, we create an auxiliary node for
6578 -- a compilation unit, referenced from the N_Compilation_Unit node,
6579 -- that contains these items.
6580
6581 -- N_Compilation_Unit
6582 -- Sloc points to first token of defining unit name
6583 -- Context_Items (List1) context items and pragmas preceding unit
6584 -- Private_Present (Flag15) set if library unit has private keyword
6585 -- Unit (Node2) library item or subunit
6586 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6587 -- First_Inlined_Subprogram (Node3-Sem)
6588 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6589 -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
6590 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6591 -- Body_Required (Flag13-Sem) set for spec if body is required
6592 -- Has_Pragma_Suppress_All (Flag14-Sem)
6593 -- Context_Pending (Flag16-Sem)
6594 -- Has_No_Elaboration_Code (Flag17-Sem)
6595
6596 -- N_Compilation_Unit_Aux
6597 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6598 -- Declarations (List2) (set to No_List if no global declarations)
6599 -- Actions (List1) (set to No_List if no actions)
6600 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6601 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6602 -- Default_Storage_Pool (Node3-Sem)
6603
6604 --------------------------
6605 -- 10.1.1 Library Item --
6606 --------------------------
6607
6608 -- LIBRARY_ITEM ::=
6609 -- [private] LIBRARY_UNIT_DECLARATION
6610 -- | LIBRARY_UNIT_BODY
6611 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6612
6613 -- Note: PRIVATE is not allowed in Ada 83 mode
6614
6615 -- There is no explicit node in the tree for library item, instead
6616 -- the declaration or body, and the flag for private if present,
6617 -- appear in the N_Compilation_Unit node.
6618
6619 --------------------------------------
6620 -- 10.1.1 Library Unit Declaration --
6621 --------------------------------------
6622
6623 -- LIBRARY_UNIT_DECLARATION ::=
6624 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6625 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6626
6627 -----------------------------------------------
6628 -- 10.1.1 Library Unit Renaming Declaration --
6629 -----------------------------------------------
6630
6631 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6632 -- PACKAGE_RENAMING_DECLARATION
6633 -- | GENERIC_RENAMING_DECLARATION
6634 -- | SUBPROGRAM_RENAMING_DECLARATION
6635
6636 -------------------------------
6637 -- 10.1.1 Library unit body --
6638 -------------------------------
6639
6640 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6641
6642 ------------------------------
6643 -- 10.1.1 Parent Unit Name --
6644 ------------------------------
6645
6646 -- PARENT_UNIT_NAME ::= NAME
6647
6648 ----------------------------
6649 -- 10.1.2 Context clause --
6650 ----------------------------
6651
6652 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6653
6654 -- The context clause can include pragmas, and any pragmas that appear
6655 -- before the context clause proper (i.e. all configuration pragmas,
6656 -- also appear at the front of this list).
6657
6658 --------------------------
6659 -- 10.1.2 Context_Item --
6660 --------------------------
6661
6662 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6663
6664 -------------------------
6665 -- 10.1.2 With clause --
6666 -------------------------
6667
6668 -- WITH_CLAUSE ::=
6669 -- with library_unit_NAME {,library_unit_NAME};
6670
6671 -- A separate With clause is built for each name, so that we have
6672 -- a Corresponding_Spec field for each with'ed spec. The flags
6673 -- First_Name and Last_Name are used to reconstruct the exact
6674 -- source form. When a list of names appears in one with clause,
6675 -- the first name in the list has First_Name set, and the last
6676 -- has Last_Name set. If the with clause has only one name, then
6677 -- both of the flags First_Name and Last_Name are set in this name.
6678
6679 -- Note: in the case of implicit with's that are installed by the
6680 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6681 -- set to Standard_Location, but it is incorrect to test the Sloc
6682 -- to find out if a with clause is implicit, test the flag instead.
6683
6684 -- N_With_Clause
6685 -- Sloc points to first token of library unit name
6686 -- Name (Node2)
6687 -- Private_Present (Flag15) set if with_clause has private keyword
6688 -- Limited_Present (Flag17) set if LIMITED is present
6689 -- Next_Implicit_With (Node3-Sem)
6690 -- Library_Unit (Node4-Sem)
6691 -- Corresponding_Spec (Node5-Sem)
6692 -- First_Name (Flag5) (set to True if first name or only one name)
6693 -- Last_Name (Flag6) (set to True if last name or only one name)
6694 -- Context_Installed (Flag13-Sem)
6695 -- Elaborate_Present (Flag4-Sem)
6696 -- Elaborate_All_Present (Flag14-Sem)
6697 -- Elaborate_All_Desirable (Flag9-Sem)
6698 -- Elaborate_Desirable (Flag11-Sem)
6699 -- Implicit_With (Flag16-Sem)
6700 -- Limited_View_Installed (Flag18-Sem)
6701 -- Parent_With (Flag1-Sem)
6702 -- Unreferenced_In_Spec (Flag7-Sem)
6703 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6704
6705 -- Note: Limited_Present and Limited_View_Installed are used to support
6706 -- the implementation of Ada 2005 (AI-50217).
6707
6708 -- Similarly, Private_Present is used to support the implementation of
6709 -- Ada 2005 (AI-50262).
6710
6711 -- Note: if the WITH clause refers to a standard library unit, then a
6712 -- limited with clause is changed into a normal with clause, because we
6713 -- are not prepared to deal with limited with in the context of Rtsfind.
6714 -- So in this case, the Limited_Present flag will be False in the final
6715 -- tree.
6716
6717 ----------------------
6718 -- With_Type clause --
6719 ----------------------
6720
6721 -- This is a GNAT extension, used to implement mutually recursive
6722 -- types declared in different packages.
6723
6724 -- Note: this is now obsolete. The functionality of this construct
6725 -- is now implemented by the Ada 2005 limited_with_clause.
6726
6727 ---------------------
6728 -- 10.2 Body stub --
6729 ---------------------
6730
6731 -- BODY_STUB ::=
6732 -- SUBPROGRAM_BODY_STUB
6733 -- | PACKAGE_BODY_STUB
6734 -- | TASK_BODY_STUB
6735 -- | PROTECTED_BODY_STUB
6736
6737 ----------------------------------
6738 -- 10.1.3 Subprogram Body Stub --
6739 ----------------------------------
6740
6741 -- SUBPROGRAM_BODY_STUB ::=
6742 -- SUBPROGRAM_SPECIFICATION is separate
6743 -- [ASPECT_SPECIFICATION];
6744
6745 -- N_Subprogram_Body_Stub
6746 -- Sloc points to FUNCTION or PROCEDURE
6747 -- Specification (Node1)
6748 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6749 -- Library_Unit (Node4-Sem) points to the subunit
6750 -- Corresponding_Body (Node5-Sem)
6751
6752 -------------------------------
6753 -- 10.1.3 Package Body Stub --
6754 -------------------------------
6755
6756 -- PACKAGE_BODY_STUB ::=
6757 -- package body DEFINING_IDENTIFIER is separate
6758 -- [ASPECT_SPECIFICATION];
6759
6760 -- N_Package_Body_Stub
6761 -- Sloc points to PACKAGE
6762 -- Defining_Identifier (Node1)
6763 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6764 -- Library_Unit (Node4-Sem) points to the subunit
6765 -- Corresponding_Body (Node5-Sem)
6766
6767 ----------------------------
6768 -- 10.1.3 Task Body Stub --
6769 ----------------------------
6770
6771 -- TASK_BODY_STUB ::=
6772 -- task body DEFINING_IDENTIFIER is separate
6773 -- [ASPECT_SPECIFICATION];
6774
6775 -- N_Task_Body_Stub
6776 -- Sloc points to TASK
6777 -- Defining_Identifier (Node1)
6778 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6779 -- Library_Unit (Node4-Sem) points to the subunit
6780 -- Corresponding_Body (Node5-Sem)
6781
6782 ---------------------------------
6783 -- 10.1.3 Protected Body Stub --
6784 ---------------------------------
6785
6786 -- PROTECTED_BODY_STUB ::=
6787 -- protected body DEFINING_IDENTIFIER is separate
6788 -- [ASPECT_SPECIFICATION];
6789
6790 -- Note: protected body stubs are not allowed in Ada 83 mode
6791
6792 -- N_Protected_Body_Stub
6793 -- Sloc points to PROTECTED
6794 -- Defining_Identifier (Node1)
6795 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6796 -- Library_Unit (Node4-Sem) points to the subunit
6797 -- Corresponding_Body (Node5-Sem)
6798
6799 ---------------------
6800 -- 10.1.3 Subunit --
6801 ---------------------
6802
6803 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6804
6805 -- N_Subunit
6806 -- Sloc points to SEPARATE
6807 -- Name (Node2) is the name of the parent unit
6808 -- Proper_Body (Node1) is the subunit body
6809 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6810
6811 ---------------------------------
6812 -- 11.1 Exception Declaration --
6813 ---------------------------------
6814
6815 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6816 -- [ASPECT_SPECIFICATIONS];
6817
6818 -- For consistency with object declarations etc., the parser converts
6819 -- the case of multiple identifiers being declared to a series of
6820 -- declarations in which the expression is copied, using the More_Ids
6821 -- and Prev_Ids flags to remember the source form as described in the
6822 -- section on "Handling of Defining Identifier Lists".
6823
6824 -- N_Exception_Declaration
6825 -- Sloc points to EXCEPTION
6826 -- Defining_Identifier (Node1)
6827 -- Expression (Node3-Sem)
6828 -- Renaming_Exception (Node2-Sem)
6829 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6830 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6831
6832 ------------------------------------------
6833 -- 11.2 Handled Sequence Of Statements --
6834 ------------------------------------------
6835
6836 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6837 -- SEQUENCE_OF_STATEMENTS
6838 -- [exception
6839 -- EXCEPTION_HANDLER
6840 -- {EXCEPTION_HANDLER}]
6841 -- [at end
6842 -- cleanup_procedure_call (param, param, param, ...);]
6843
6844 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6845 -- used only internally currently, but is considered to be syntactic.
6846 -- At the moment, the only cleanup action allowed is a single call to
6847 -- a parameterless procedure, and the Identifier field of the node is
6848 -- the procedure to be called. The cleanup action occurs whenever the
6849 -- sequence of statements is left for any reason. The possible reasons
6850 -- are:
6851 -- 1. reaching the end of the sequence
6852 -- 2. exit, return, or goto
6853 -- 3. exception or abort
6854 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6855 -- entirely in the back end. In this case, a handled sequence of
6856 -- statements with an "at end" cannot also have exception handlers.
6857 -- For other back ends, such as gcc with front-end SJLJ, the
6858 -- implementation is split between the front end and back end; the front
6859 -- end implements 3, and the back end implements 1 and 2. In this case,
6860 -- if there is an "at end", the front end inserts the appropriate
6861 -- exception handler, and this handler takes precedence over "at end"
6862 -- in case of exception.
6863
6864 -- The inserted exception handler is of the form:
6865
6866 -- when all others =>
6867 -- cleanup;
6868 -- raise;
6869
6870 -- where cleanup is the procedure to be called. The reason we do this is
6871 -- so that the front end can handle the necessary entries in the
6872 -- exception tables, and other exception handler actions required as
6873 -- part of the normal handling for exception handlers.
6874
6875 -- The AT END cleanup handler protects only the sequence of statements
6876 -- (not the associated declarations of the parent), just like exception
6877 -- handlers. The big difference is that the cleanup procedure is called
6878 -- on either a normal or an abnormal exit from the statement sequence.
6879
6880 -- Note: the list of Exception_Handlers can contain pragmas as well
6881 -- as actual handlers. In practice these pragmas can only occur at
6882 -- the start of the list, since any pragmas occurring later on will
6883 -- be included in the statement list of the corresponding handler.
6884
6885 -- Note: although in the Ada syntax, the sequence of statements in
6886 -- a handled sequence of statements can only contain statements, we
6887 -- allow free mixing of declarations and statements in the resulting
6888 -- expanded tree. This is for example used to deal with the case of
6889 -- a cleanup procedure that must handle declarations as well as the
6890 -- statements of a block.
6891
6892 -- Note: the cleanup_procedure_call does not go through the common
6893 -- processing for calls, which in particular means that it will not be
6894 -- automatically inlined in all cases, even though the procedure to be
6895 -- called is marked inline. More specifically, if the procedure comes
6896 -- from another unit than the main source unit, for example a run-time
6897 -- unit, then it needs to be manually added to the list of bodies to be
6898 -- inlined by invoking Add_Inlined_Body on it.
6899
6900 -- N_Handled_Sequence_Of_Statements
6901 -- Sloc points to first token of first statement
6902 -- Statements (List3)
6903 -- End_Label (Node4) (set to Empty if expander generated)
6904 -- Exception_Handlers (List5) (set to No_List if none present)
6905 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6906 -- First_Real_Statement (Node2-Sem)
6907
6908 -- Note: the parent always contains a Declarations field which contains
6909 -- declarations associated with the handled sequence of statements. This
6910 -- is true even in the case of an accept statement (see description of
6911 -- the N_Accept_Statement node).
6912
6913 -- End_Label refers to the containing construct
6914
6915 -----------------------------
6916 -- 11.2 Exception Handler --
6917 -----------------------------
6918
6919 -- EXCEPTION_HANDLER ::=
6920 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6921 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6922 -- SEQUENCE_OF_STATEMENTS
6923
6924 -- Note: choice parameter specification is not allowed in Ada 83 mode
6925
6926 -- N_Exception_Handler
6927 -- Sloc points to WHEN
6928 -- Choice_Parameter (Node2) (set to Empty if not present)
6929 -- Exception_Choices (List4)
6930 -- Statements (List3)
6931 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6932 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6933 -- Local_Raise_Not_OK (Flag7-Sem)
6934 -- Has_Local_Raise (Flag8-Sem)
6935
6936 ------------------------------------------
6937 -- 11.2 Choice parameter specification --
6938 ------------------------------------------
6939
6940 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6941
6942 ----------------------------
6943 -- 11.2 Exception Choice --
6944 ----------------------------
6945
6946 -- EXCEPTION_CHOICE ::= exception_NAME | others
6947
6948 -- Except in the case of OTHERS, no explicit node appears in the tree
6949 -- for exception choice. Instead the exception name appears directly.
6950 -- An OTHERS choice is represented by a N_Others_Choice node (see
6951 -- section 3.8.1.
6952
6953 -- Note: for the exception choice created for an at end handler, the
6954 -- exception choice is an N_Others_Choice node with All_Others set.
6955
6956 ---------------------------
6957 -- 11.3 Raise Statement --
6958 ---------------------------
6959
6960 -- RAISE_STATEMENT ::= raise [exception_NAME];
6961
6962 -- In Ada 2005, we have
6963
6964 -- RAISE_STATEMENT ::=
6965 -- raise; | raise exception_NAME [with string_EXPRESSION];
6966
6967 -- N_Raise_Statement
6968 -- Sloc points to RAISE
6969 -- Name (Node2) (set to Empty if no exception name present)
6970 -- Expression (Node3) (set to Empty if no expression present)
6971 -- From_At_End (Flag4-Sem)
6972
6973 ----------------------------
6974 -- 11.3 Raise Expression --
6975 ----------------------------
6976
6977 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6978
6979 -- N_Raise_Expression
6980 -- Sloc points to RAISE
6981 -- Name (Node2) (always present)
6982 -- Expression (Node3) (set to Empty if no expression present)
6983 -- Convert_To_Return_False (Flag13-Sem)
6984 -- plus fields for expression
6985
6986 -------------------------------
6987 -- 12.1 Generic Declaration --
6988 -------------------------------
6989
6990 -- GENERIC_DECLARATION ::=
6991 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6992
6993 ------------------------------------------
6994 -- 12.1 Generic Subprogram Declaration --
6995 ------------------------------------------
6996
6997 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6998 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6999 -- [ASPECT_SPECIFICATIONS];
7000
7001 -- Note: Generic_Formal_Declarations can include pragmas
7002
7003 -- N_Generic_Subprogram_Declaration
7004 -- Sloc points to GENERIC
7005 -- Specification (Node1) subprogram specification
7006 -- Corresponding_Body (Node5-Sem)
7007 -- Generic_Formal_Declarations (List2) from generic formal part
7008 -- Parent_Spec (Node4-Sem)
7009
7010 ---------------------------------------
7011 -- 12.1 Generic Package Declaration --
7012 ---------------------------------------
7013
7014 -- GENERIC_PACKAGE_DECLARATION ::=
7015 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
7016 -- [ASPECT_SPECIFICATIONS];
7017
7018 -- Note: when we do generics right, the Activation_Chain_Entity entry
7019 -- for this node can be removed (since the expander won't see generic
7020 -- units any more)???.
7021
7022 -- Note: Generic_Formal_Declarations can include pragmas
7023
7024 -- N_Generic_Package_Declaration
7025 -- Sloc points to GENERIC
7026 -- Specification (Node1) package specification
7027 -- Corresponding_Body (Node5-Sem)
7028 -- Generic_Formal_Declarations (List2) from generic formal part
7029 -- Parent_Spec (Node4-Sem)
7030 -- Activation_Chain_Entity (Node3-Sem)
7031
7032 -------------------------------
7033 -- 12.1 Generic Formal Part --
7034 -------------------------------
7035
7036 -- GENERIC_FORMAL_PART ::=
7037 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
7038
7039 ------------------------------------------------
7040 -- 12.1 Generic Formal Parameter Declaration --
7041 ------------------------------------------------
7042
7043 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
7044 -- FORMAL_OBJECT_DECLARATION
7045 -- | FORMAL_TYPE_DECLARATION
7046 -- | FORMAL_SUBPROGRAM_DECLARATION
7047 -- | FORMAL_PACKAGE_DECLARATION
7048
7049 ---------------------------------
7050 -- 12.3 Generic Instantiation --
7051 ---------------------------------
7052
7053 -- GENERIC_INSTANTIATION ::=
7054 -- package DEFINING_PROGRAM_UNIT_NAME is
7055 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
7056 -- [ASPECT_SPECIFICATIONS];
7057 -- | [[not] overriding]
7058 -- procedure DEFINING_PROGRAM_UNIT_NAME is
7059 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
7060 -- [ASPECT_SPECIFICATIONS];
7061 -- | [[not] overriding]
7062 -- function DEFINING_DESIGNATOR is
7063 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
7064 -- [ASPECT_SPECIFICATIONS];
7065
7066 -- N_Package_Instantiation
7067 -- Sloc points to PACKAGE
7068 -- Defining_Unit_Name (Node1)
7069 -- Name (Node2)
7070 -- Generic_Associations (List3) (set to No_List if no
7071 -- generic actual part)
7072 -- Parent_Spec (Node4-Sem)
7073 -- Instance_Spec (Node5-Sem)
7074 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7075 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7076 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
7077 -- Is_Declaration_Level_Node (Flag5-Sem)
7078 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7079
7080 -- N_Procedure_Instantiation
7081 -- Sloc points to PROCEDURE
7082 -- Defining_Unit_Name (Node1)
7083 -- Name (Node2)
7084 -- Parent_Spec (Node4-Sem)
7085 -- Generic_Associations (List3) (set to No_List if no
7086 -- generic actual part)
7087 -- Instance_Spec (Node5-Sem)
7088 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7089 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7090 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
7091 -- Is_Declaration_Level_Node (Flag5-Sem)
7092 -- Must_Override (Flag14) set if overriding indicator present
7093 -- Must_Not_Override (Flag15) set if not_overriding indicator present
7094 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7095
7096 -- N_Function_Instantiation
7097 -- Sloc points to FUNCTION
7098 -- Defining_Unit_Name (Node1)
7099 -- Name (Node2)
7100 -- Generic_Associations (List3) (set to No_List if no
7101 -- generic actual part)
7102 -- Parent_Spec (Node4-Sem)
7103 -- Instance_Spec (Node5-Sem)
7104 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7105 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7106 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
7107 -- Is_Declaration_Level_Node (Flag5-Sem)
7108 -- Must_Override (Flag14) set if overriding indicator present
7109 -- Must_Not_Override (Flag15) set if not_overriding indicator present
7110 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7111
7112 -- Note: overriding indicator is an Ada 2005 feature
7113
7114 -------------------------------
7115 -- 12.3 Generic Actual Part --
7116 -------------------------------
7117
7118 -- GENERIC_ACTUAL_PART ::=
7119 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
7120
7121 -------------------------------
7122 -- 12.3 Generic Association --
7123 -------------------------------
7124
7125 -- GENERIC_ASSOCIATION ::=
7126 -- [generic_formal_parameter_SELECTOR_NAME =>]
7127
7128 -- Note: unlike the procedure call case, a generic association node
7129 -- is generated for every association, even if no formal parameter
7130 -- selector name is present. In this case the parser will leave the
7131 -- Selector_Name field set to Empty, to be filled in later by the
7132 -- semantic pass.
7133
7134 -- In Ada 2005, a formal may be associated with a box, if the
7135 -- association is part of the list of actuals for a formal package.
7136 -- If the association is given by OTHERS => <>, the association is
7137 -- an N_Others_Choice.
7138
7139 -- N_Generic_Association
7140 -- Sloc points to first token of generic association
7141 -- Selector_Name (Node2) (set to Empty if no formal
7142 -- parameter selector name)
7143 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
7144 -- Box_Present (Flag15) (for formal_package associations with a box)
7145
7146 ---------------------------------------------
7147 -- 12.3 Explicit Generic Actual Parameter --
7148 ---------------------------------------------
7149
7150 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
7151 -- EXPRESSION | variable_NAME | subprogram_NAME
7152 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
7153
7154 -------------------------------------
7155 -- 12.4 Formal Object Declaration --
7156 -------------------------------------
7157
7158 -- FORMAL_OBJECT_DECLARATION ::=
7159 -- DEFINING_IDENTIFIER_LIST :
7160 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
7161 -- [ASPECT_SPECIFICATIONS];
7162 -- | DEFINING_IDENTIFIER_LIST :
7163 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
7164 -- [ASPECT_SPECIFICATIONS];
7165
7166 -- Although the syntax allows multiple identifiers in the list, the
7167 -- semantics is as though successive declarations were given with
7168 -- identical type definition and expression components. To simplify
7169 -- semantic processing, the parser represents a multiple declaration
7170 -- case as a sequence of single declarations, using the More_Ids and
7171 -- Prev_Ids flags to preserve the original source form as described
7172 -- in the section on "Handling of Defining Identifier Lists".
7173
7174 -- N_Formal_Object_Declaration
7175 -- Sloc points to first identifier
7176 -- Defining_Identifier (Node1)
7177 -- In_Present (Flag15)
7178 -- Out_Present (Flag17)
7179 -- Null_Exclusion_Present (Flag11) (set to False if not present)
7180 -- Subtype_Mark (Node4) (set to Empty if not present)
7181 -- Access_Definition (Node3) (set to Empty if not present)
7182 -- Default_Expression (Node5) (set to Empty if no default expression)
7183 -- More_Ids (Flag5) (set to False if no more identifiers in list)
7184 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
7185
7186 -----------------------------------
7187 -- 12.5 Formal Type Declaration --
7188 -----------------------------------
7189
7190 -- FORMAL_TYPE_DECLARATION ::=
7191 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
7192 -- is FORMAL_TYPE_DEFINITION
7193 -- [ASPECT_SPECIFICATIONS];
7194 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
7195
7196 -- N_Formal_Type_Declaration
7197 -- Sloc points to TYPE
7198 -- Defining_Identifier (Node1)
7199 -- Formal_Type_Definition (Node3)
7200 -- Discriminant_Specifications (List4) (set to No_List if no
7201 -- discriminant part)
7202 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
7203
7204 ----------------------------------
7205 -- 12.5 Formal type definition --
7206 ----------------------------------
7207
7208 -- FORMAL_TYPE_DEFINITION ::=
7209 -- FORMAL_PRIVATE_TYPE_DEFINITION
7210 -- | FORMAL_DERIVED_TYPE_DEFINITION
7211 -- | FORMAL_DISCRETE_TYPE_DEFINITION
7212 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
7213 -- | FORMAL_MODULAR_TYPE_DEFINITION
7214 -- | FORMAL_FLOATING_POINT_DEFINITION
7215 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
7216 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
7217 -- | FORMAL_ARRAY_TYPE_DEFINITION
7218 -- | FORMAL_ACCESS_TYPE_DEFINITION
7219 -- | FORMAL_INTERFACE_TYPE_DEFINITION
7220 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
7221
7222 -- The Ada 2012 syntax introduces two new non-terminals:
7223 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
7224 -- the latter category. Here we introduce an incomplete type definition
7225 -- in order to preserve as much as possible the existing structure.
7226
7227 ---------------------------------------------
7228 -- 12.5.1 Formal Private Type Definition --
7229 ---------------------------------------------
7230
7231 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
7232 -- [[abstract] tagged] [limited] private
7233
7234 -- Note: TAGGED is not allowed in Ada 83 mode
7235
7236 -- N_Formal_Private_Type_Definition
7237 -- Sloc points to PRIVATE
7238 -- Uninitialized_Variable (Node3-Sem)
7239 -- Abstract_Present (Flag4)
7240 -- Tagged_Present (Flag15)
7241 -- Limited_Present (Flag17)
7242
7243 --------------------------------------------
7244 -- 12.5.1 Formal Derived Type Definition --
7245 --------------------------------------------
7246
7247 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
7248 -- [abstract] [limited | synchronized]
7249 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
7250 -- Note: this construct is not allowed in Ada 83 mode
7251
7252 -- N_Formal_Derived_Type_Definition
7253 -- Sloc points to NEW
7254 -- Subtype_Mark (Node4)
7255 -- Private_Present (Flag15)
7256 -- Abstract_Present (Flag4)
7257 -- Limited_Present (Flag17)
7258 -- Synchronized_Present (Flag7)
7259 -- Interface_List (List2) (set to No_List if none)
7260
7261 -----------------------------------------------
7262 -- 12.5.1 Formal Incomplete Type Definition --
7263 -----------------------------------------------
7264
7265 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
7266
7267 -- N_Formal_Incomplete_Type_Definition
7268 -- Sloc points to identifier of parent
7269 -- Tagged_Present (Flag15)
7270
7271 ---------------------------------------------
7272 -- 12.5.2 Formal Discrete Type Definition --
7273 ---------------------------------------------
7274
7275 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
7276
7277 -- N_Formal_Discrete_Type_Definition
7278 -- Sloc points to (
7279
7280 ---------------------------------------------------
7281 -- 12.5.2 Formal Signed Integer Type Definition --
7282 ---------------------------------------------------
7283
7284 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
7285
7286 -- N_Formal_Signed_Integer_Type_Definition
7287 -- Sloc points to RANGE
7288
7289 --------------------------------------------
7290 -- 12.5.2 Formal Modular Type Definition --
7291 --------------------------------------------
7292
7293 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
7294
7295 -- N_Formal_Modular_Type_Definition
7296 -- Sloc points to MOD
7297
7298 ----------------------------------------------
7299 -- 12.5.2 Formal Floating Point Definition --
7300 ----------------------------------------------
7301
7302 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
7303
7304 -- N_Formal_Floating_Point_Definition
7305 -- Sloc points to DIGITS
7306
7307 ----------------------------------------------------
7308 -- 12.5.2 Formal Ordinary Fixed Point Definition --
7309 ----------------------------------------------------
7310
7311 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
7312
7313 -- N_Formal_Ordinary_Fixed_Point_Definition
7314 -- Sloc points to DELTA
7315
7316 ---------------------------------------------------
7317 -- 12.5.2 Formal Decimal Fixed Point Definition --
7318 ---------------------------------------------------
7319
7320 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
7321
7322 -- Note: formal decimal fixed point definition not allowed in Ada 83
7323
7324 -- N_Formal_Decimal_Fixed_Point_Definition
7325 -- Sloc points to DELTA
7326
7327 ------------------------------------------
7328 -- 12.5.3 Formal Array Type Definition --
7329 ------------------------------------------
7330
7331 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
7332
7333 -------------------------------------------
7334 -- 12.5.4 Formal Access Type Definition --
7335 -------------------------------------------
7336
7337 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
7338
7339 ----------------------------------------------
7340 -- 12.5.5 Formal Interface Type Definition --
7341 ----------------------------------------------
7342
7343 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
7344
7345 -----------------------------------------
7346 -- 12.6 Formal Subprogram Declaration --
7347 -----------------------------------------
7348
7349 -- FORMAL_SUBPROGRAM_DECLARATION ::=
7350 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
7351 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
7352
7353 --------------------------------------------------
7354 -- 12.6 Formal Concrete Subprogram Declaration --
7355 --------------------------------------------------
7356
7357 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
7358 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
7359 -- [ASPECT_SPECIFICATIONS];
7360
7361 -- N_Formal_Concrete_Subprogram_Declaration
7362 -- Sloc points to WITH
7363 -- Specification (Node1)
7364 -- Default_Name (Node2) (set to Empty if no subprogram default)
7365 -- Box_Present (Flag15)
7366
7367 -- Note: if no subprogram default is present, then Name is set
7368 -- to Empty, and Box_Present is False.
7369
7370 --------------------------------------------------
7371 -- 12.6 Formal Abstract Subprogram Declaration --
7372 --------------------------------------------------
7373
7374 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
7375 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
7376 -- [ASPECT_SPECIFICATIONS];
7377
7378 -- N_Formal_Abstract_Subprogram_Declaration
7379 -- Sloc points to WITH
7380 -- Specification (Node1)
7381 -- Default_Name (Node2) (set to Empty if no subprogram default)
7382 -- Box_Present (Flag15)
7383
7384 -- Note: if no subprogram default is present, then Name is set
7385 -- to Empty, and Box_Present is False.
7386
7387 ------------------------------
7388 -- 12.6 Subprogram Default --
7389 ------------------------------
7390
7391 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
7392
7393 -- There is no separate node in the tree for a subprogram default.
7394 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
7395 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
7396 -- default name or box indication, as needed.
7397
7398 ------------------------
7399 -- 12.6 Default Name --
7400 ------------------------
7401
7402 -- DEFAULT_NAME ::= NAME
7403
7404 --------------------------------------
7405 -- 12.7 Formal Package Declaration --
7406 --------------------------------------
7407
7408 -- FORMAL_PACKAGE_DECLARATION ::=
7409 -- with package DEFINING_IDENTIFIER
7410 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
7411 -- [ASPECT_SPECIFICATIONS];
7412
7413 -- Note: formal package declarations not allowed in Ada 83 mode
7414
7415 -- N_Formal_Package_Declaration
7416 -- Sloc points to WITH
7417 -- Defining_Identifier (Node1)
7418 -- Name (Node2)
7419 -- Generic_Associations (List3) (set to No_List if (<>) case or
7420 -- empty generic actual part)
7421 -- Box_Present (Flag15)
7422 -- Instance_Spec (Node5-Sem)
7423 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7424
7425 --------------------------------------
7426 -- 12.7 Formal Package Actual Part --
7427 --------------------------------------
7428
7429 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7430 -- ([OTHERS] => <>)
7431 -- | [GENERIC_ACTUAL_PART]
7432 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7433
7434 -- FORMAL_PACKAGE_ASSOCIATION ::=
7435 -- GENERIC_ASSOCIATION
7436 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7437
7438 -- There is no explicit node in the tree for a formal package actual
7439 -- part. Instead the information appears in the parent node (i.e. the
7440 -- formal package declaration node itself).
7441
7442 -- There is no explicit node for a formal package association. All of
7443 -- them are represented either by a generic association, possibly with
7444 -- Box_Present, or by an N_Others_Choice.
7445
7446 ---------------------------------
7447 -- 13.1 Representation clause --
7448 ---------------------------------
7449
7450 -- REPRESENTATION_CLAUSE ::=
7451 -- ATTRIBUTE_DEFINITION_CLAUSE
7452 -- | ENUMERATION_REPRESENTATION_CLAUSE
7453 -- | RECORD_REPRESENTATION_CLAUSE
7454 -- | AT_CLAUSE
7455
7456 ----------------------
7457 -- 13.1 Local Name --
7458 ----------------------
7459
7460 -- LOCAL_NAME :=
7461 -- DIRECT_NAME
7462 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7463 -- | library_unit_NAME
7464
7465 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7466 -- as an attribute reference, which has essentially the same form.
7467
7468 ---------------------------------------
7469 -- 13.3 Attribute definition clause --
7470 ---------------------------------------
7471
7472 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7473 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7474 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7475
7476 -- In Ada 83, the expression must be a simple expression and the
7477 -- local name must be a direct name.
7478
7479 -- Note: the only attribute definition clause that is processed by
7480 -- gigi is an address clause. For all other cases, the information
7481 -- is extracted by the front end and either results in setting entity
7482 -- information, e.g. Esize for the Size clause, or in appropriate
7483 -- expansion actions (e.g. in the case of Storage_Size).
7484
7485 -- For an address clause, Gigi constructs the appropriate addressing
7486 -- code. It also ensures that no aliasing optimizations are made
7487 -- for the object for which the address clause appears.
7488
7489 -- Note: for an address clause used to achieve an overlay:
7490
7491 -- A : Integer;
7492 -- B : Integer;
7493 -- for B'Address use A'Address;
7494
7495 -- the above rule means that Gigi will ensure that no optimizations
7496 -- will be made for B that would violate the implementation advice
7497 -- of RM 13.3(19). However, this advice applies only to B and not
7498 -- to A, which seems unfortunate. The GNAT front end will mark the
7499 -- object A as volatile to also prevent unwanted optimization
7500 -- assumptions based on no aliasing being made for B.
7501
7502 -- N_Attribute_Definition_Clause
7503 -- Sloc points to FOR
7504 -- Name (Node2) the local name
7505 -- Chars (Name1) the identifier name from the attribute designator
7506 -- Expression (Node3) the expression or name
7507 -- Entity (Node4-Sem)
7508 -- Next_Rep_Item (Node5-Sem)
7509 -- From_At_Mod (Flag4-Sem)
7510 -- Check_Address_Alignment (Flag11-Sem)
7511 -- From_Aspect_Specification (Flag13-Sem)
7512 -- Is_Delayed_Aspect (Flag14-Sem)
7513 -- Address_Warning_Posted (Flag18-Sem)
7514
7515 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7516 -- aspect name, and Entity is resolved already to reference the entity
7517 -- to which the aspect applies.
7518
7519 -----------------------------------
7520 -- 13.3.1 Aspect Specifications --
7521 -----------------------------------
7522
7523 -- We modify the RM grammar here, the RM grammar is:
7524
7525 -- ASPECT_SPECIFICATION ::=
7526 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7527 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7528
7529 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7530
7531 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7532
7533 -- That's inconvenient, since there is no non-terminal name for a single
7534 -- entry in the list of aspects. So we use this grammar instead:
7535
7536 -- ASPECT_SPECIFICATIONS ::=
7537 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7538
7539 -- ASPECT_SPECIFICATION =>
7540 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7541
7542 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7543
7544 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7545
7546 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7547 -- aggregate with the elements of the aggregate corresponding to the
7548 -- successive arguments of the corresponding pragma.
7549
7550 -- See separate package Aspects for details on the incorporation of
7551 -- these nodes into the tree, and how aspect specifications for a given
7552 -- declaration node are associated with that node.
7553
7554 -- N_Aspect_Specification
7555 -- Sloc points to aspect identifier
7556 -- Identifier (Node1) aspect identifier
7557 -- Aspect_Rep_Item (Node2-Sem)
7558 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7559 -- Entity (Node4-Sem) entity to which the aspect applies
7560 -- Next_Rep_Item (Node5-Sem)
7561 -- Class_Present (Flag6) Set if 'Class present
7562 -- Is_Ignored (Flag9-Sem)
7563 -- Is_Checked (Flag11-Sem)
7564 -- Is_Delayed_Aspect (Flag14-Sem)
7565 -- Is_Disabled (Flag15-Sem)
7566 -- Is_Boolean_Aspect (Flag16-Sem)
7567 -- Split_PPC (Flag17) Set if split pre/post attribute
7568 -- Aspect_On_Partial_View (Flag18-Sem)
7569
7570 -- Note: Aspect_Specification is an Ada 2012 feature
7571
7572 -- Note: The Identifier serves to identify the aspect involved (it
7573 -- is the aspect whose name corresponds to the Chars field). This
7574 -- means that the other fields of this identifier are unused, and
7575 -- in particular we use the Entity field of this identifier to save
7576 -- a copy of the expression for visibility analysis, see spec of
7577 -- Sem_Ch13 for full details of this usage.
7578
7579 -- In the case of aspects of the form xxx'Class, the aspect identifier
7580 -- is for xxx, and Class_Present is set to True.
7581
7582 -- Note: When a Pre or Post aspect specification is processed, it is
7583 -- broken into AND THEN sections. The left most section has Split_PPC
7584 -- set to False, indicating that it is the original specification (e.g.
7585 -- for posting errors). For the other sections, Split_PPC is set True.
7586
7587 ---------------------------------------------
7588 -- 13.4 Enumeration representation clause --
7589 ---------------------------------------------
7590
7591 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7592 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7593
7594 -- In Ada 83, the name must be a direct name
7595
7596 -- N_Enumeration_Representation_Clause
7597 -- Sloc points to FOR
7598 -- Identifier (Node1) direct name
7599 -- Array_Aggregate (Node3)
7600 -- Next_Rep_Item (Node5-Sem)
7601
7602 ---------------------------------
7603 -- 13.4 Enumeration aggregate --
7604 ---------------------------------
7605
7606 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7607
7608 ------------------------------------------
7609 -- 13.5.1 Record representation clause --
7610 ------------------------------------------
7611
7612 -- RECORD_REPRESENTATION_CLAUSE ::=
7613 -- for first_subtype_LOCAL_NAME use
7614 -- record [MOD_CLAUSE]
7615 -- {COMPONENT_CLAUSE}
7616 -- end record;
7617
7618 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7619 -- replaced by a corresponding Alignment attribute definition clause).
7620
7621 -- Note: Component_Clauses can include pragmas
7622
7623 -- N_Record_Representation_Clause
7624 -- Sloc points to FOR
7625 -- Identifier (Node1) direct name
7626 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7627 -- Component_Clauses (List3)
7628 -- Next_Rep_Item (Node5-Sem)
7629
7630 ------------------------------
7631 -- 13.5.1 Component clause --
7632 ------------------------------
7633
7634 -- COMPONENT_CLAUSE ::=
7635 -- component_LOCAL_NAME at POSITION
7636 -- range FIRST_BIT .. LAST_BIT;
7637
7638 -- N_Component_Clause
7639 -- Sloc points to AT
7640 -- Component_Name (Node1) points to Name or Attribute_Reference
7641 -- Position (Node2)
7642 -- First_Bit (Node3)
7643 -- Last_Bit (Node4)
7644
7645 ----------------------
7646 -- 13.5.1 Position --
7647 ----------------------
7648
7649 -- POSITION ::= static_EXPRESSION
7650
7651 -----------------------
7652 -- 13.5.1 First_Bit --
7653 -----------------------
7654
7655 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7656
7657 ----------------------
7658 -- 13.5.1 Last_Bit --
7659 ----------------------
7660
7661 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7662
7663 --------------------------
7664 -- 13.8 Code statement --
7665 --------------------------
7666
7667 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7668
7669 -- Note: in GNAT, the qualified expression has the form
7670
7671 -- Asm_Insn'(Asm (...));
7672
7673 -- See package System.Machine_Code in file s-maccod.ads for details on
7674 -- the allowed parameters to Asm. There are two ways this node can
7675 -- arise, as a code statement, in which case the expression is the
7676 -- qualified expression, or as a result of the expansion of an intrinsic
7677 -- call to the Asm or Asm_Input procedure.
7678
7679 -- N_Code_Statement
7680 -- Sloc points to first token of the expression
7681 -- Expression (Node3)
7682
7683 -- Note: package Exp_Code contains an abstract functional interface
7684 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7685
7686 ------------------------
7687 -- 13.12 Restriction --
7688 ------------------------
7689
7690 -- RESTRICTION ::=
7691 -- restriction_IDENTIFIER
7692 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7693
7694 -- There is no explicit node for restrictions. Instead the restriction
7695 -- appears in normal pragma syntax as a pragma argument association,
7696 -- which has the same syntactic form.
7697
7698 --------------------------
7699 -- B.2 Shift Operators --
7700 --------------------------
7701
7702 -- Calls to the intrinsic shift functions are converted to one of
7703 -- the following shift nodes, which have the form of normal binary
7704 -- operator names. Note that for a given shift operation, one node
7705 -- covers all possible types, as for normal operators.
7706
7707 -- Note: it is perfectly permissible for the expander to generate
7708 -- shift operation nodes directly, in which case they will be analyzed
7709 -- and parsed in the usual manner.
7710
7711 -- Sprint syntax: shift-function-name!(expr, count)
7712
7713 -- Note: the Left_Opnd field holds the first argument (the value to
7714 -- be shifted). The Right_Opnd field holds the second argument (the
7715 -- shift count). The Chars field is the name of the intrinsic function.
7716
7717 -- N_Op_Rotate_Left
7718 -- Sloc points to the function name
7719 -- plus fields for binary operator
7720 -- plus fields for expression
7721 -- Shift_Count_OK (Flag4-Sem)
7722
7723 -- N_Op_Rotate_Right
7724 -- Sloc points to the function name
7725 -- plus fields for binary operator
7726 -- plus fields for expression
7727 -- Shift_Count_OK (Flag4-Sem)
7728
7729 -- N_Op_Shift_Left
7730 -- Sloc points to the function name
7731 -- plus fields for binary operator
7732 -- plus fields for expression
7733 -- Shift_Count_OK (Flag4-Sem)
7734
7735 -- N_Op_Shift_Right_Arithmetic
7736 -- Sloc points to the function name
7737 -- plus fields for binary operator
7738 -- plus fields for expression
7739 -- Shift_Count_OK (Flag4-Sem)
7740
7741 -- N_Op_Shift_Right
7742 -- Sloc points to the function name
7743 -- plus fields for binary operator
7744 -- plus fields for expression
7745 -- Shift_Count_OK (Flag4-Sem)
7746
7747 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7748 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7749
7750 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7751 -- always less than the word size if Modify_Tree_For_C mode is set.
7752
7753 --------------------------
7754 -- Obsolescent Features --
7755 --------------------------
7756
7757 -- The syntax descriptions and tree nodes for obsolescent features are
7758 -- grouped together, corresponding to their location in appendix I in
7759 -- the RM. However, parsing and semantic analysis for these constructs
7760 -- is located in an appropriate chapter (see individual notes).
7761
7762 ---------------------------
7763 -- J.3 Delta Constraint --
7764 ---------------------------
7765
7766 -- Note: the parse routine for this construct is located in section
7767 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7768 -- where delta constraint logically belongs.
7769
7770 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7771
7772 -- N_Delta_Constraint
7773 -- Sloc points to DELTA
7774 -- Delta_Expression (Node3)
7775 -- Range_Constraint (Node4) (set to Empty if not present)
7776
7777 --------------------
7778 -- J.7 At Clause --
7779 --------------------
7780
7781 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7782
7783 -- Note: the parse routine for this construct is located in Par-Ch13,
7784 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7785 -- belongs if it were not obsolescent.
7786
7787 -- Note: in Ada 83 the expression must be a simple expression
7788
7789 -- Gigi restriction: This node never appears, it is rewritten as an
7790 -- address attribute definition clause.
7791
7792 -- N_At_Clause
7793 -- Sloc points to FOR
7794 -- Identifier (Node1)
7795 -- Expression (Node3)
7796
7797 ---------------------
7798 -- J.8 Mod clause --
7799 ---------------------
7800
7801 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7802
7803 -- Note: the parse routine for this construct is located in Par-Ch13,
7804 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7805 -- belongs if it were not obsolescent.
7806
7807 -- Note: in Ada 83, the expression must be a simple expression
7808
7809 -- Gigi restriction: this node never appears. It is replaced
7810 -- by a corresponding Alignment attribute definition clause.
7811
7812 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7813 -- its name has "clause" in it. This is rather strange, but is quite
7814 -- definitely specified. The pragmas before are collected in the
7815 -- Pragmas_Before field of the mod clause node itself, and pragmas
7816 -- after are simply swallowed up in the list of component clauses.
7817
7818 -- N_Mod_Clause
7819 -- Sloc points to AT
7820 -- Expression (Node3)
7821 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7822
7823 --------------------
7824 -- Semantic Nodes --
7825 --------------------
7826
7827 -- These semantic nodes are used to hold additional semantic information.
7828 -- They are inserted into the tree as a result of semantic processing.
7829 -- Although there are no legitimate source syntax constructions that
7830 -- correspond directly to these nodes, we need a source syntax for the
7831 -- reconstructed tree printed by Sprint, and the node descriptions here
7832 -- show this syntax.
7833
7834 -----------------
7835 -- Call_Marker --
7836 -----------------
7837
7838 -- This node is created during the analysis/resolution of entry calls,
7839 -- requeues, and subprogram calls. It performs several functions:
7840
7841 -- * Call markers provide a uniform model for handling calls by the
7842 -- ABE mechanism, regardless of whether expansion took place.
7843
7844 -- * The call marker captures the target of the related call along
7845 -- with other attributes which are either unavailabe or expensive
7846 -- to recompute once analysis, resolution, and expansion are over.
7847
7848 -- * The call marker aids the ABE Processing phase by signaling the
7849 -- presence of a call in case the original call was transformed by
7850 -- expansion.
7851
7852 -- * The call marker acts as a reference point for the insertion of
7853 -- run-time conditional ABE checks or guaranteed ABE failures.
7854
7855 -- Sprint syntax: #target#
7856
7857 -- The Sprint syntax shown above is not enabled by default
7858
7859 -- N_Call_Marker
7860 -- Sloc points to Sloc of original call
7861 -- Target (Node1-Sem)
7862 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7863 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7864 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
7865 -- Is_Source_Call (Flag4-Sem)
7866 -- Is_Declaration_Level_Node (Flag5-Sem)
7867 -- Is_Dispatching_Call (Flag6-Sem)
7868 -- Is_Preelaborable_Call (Flag7-Sem)
7869 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7870
7871 ------------------------
7872 -- Compound Statement --
7873 ------------------------
7874
7875 -- This node is created by the analyzer/expander to handle some
7876 -- expansion cases where a sequence of actions needs to be captured
7877 -- within a single node (which acts as a container and allows the
7878 -- entire list of actions to be moved around as a whole) appearing
7879 -- in a sequence of statements.
7880
7881 -- This is the statement counterpart to the expression node
7882 -- N_Expression_With_Actions.
7883
7884 -- The required semantics is that the set of actions is executed in
7885 -- the order in which it appears, as though they appeared by themselves
7886 -- in the enclosing list of declarations or statements. Unlike what
7887 -- happens when using an N_Block_Statement, no new scope is introduced.
7888
7889 -- Note: for the time being, this is used only as a transient
7890 -- representation during expansion, and all compound statement nodes
7891 -- must be exploded back to their constituent statements before handing
7892 -- the tree to the back end.
7893
7894 -- Sprint syntax: do
7895 -- action;
7896 -- action;
7897 -- ...
7898 -- action;
7899 -- end;
7900
7901 -- N_Compound_Statement
7902 -- Actions (List1)
7903
7904 --------------
7905 -- Contract --
7906 --------------
7907
7908 -- This node is used to hold the various parts of an entry, subprogram
7909 -- [body] or package [body] contract, in particular:
7910 -- Abstract states declared by a package declaration
7911 -- Contract cases that apply to a subprogram
7912 -- Dependency relations of inputs and output of a subprogram
7913 -- Global annotations classifying data as input or output
7914 -- Initialization sequences for a package declaration
7915 -- Pre- and postconditions that apply to a subprogram
7916
7917 -- The node appears in an entry and [generic] subprogram [body] entity.
7918
7919 -- Sprint syntax: <none> as the node should not appear in the tree, but
7920 -- only attached to an entry or [generic] subprogram
7921 -- entity.
7922
7923 -- N_Contract
7924 -- Sloc points to the subprogram's name
7925 -- Pre_Post_Conditions (Node1-Sem) (set to Empty if none)
7926 -- Contract_Test_Cases (Node2-Sem) (set to Empty if none)
7927 -- Classifications (Node3-Sem) (set to Empty if none)
7928 -- Is_Expanded_Contract (Flag1-Sem)
7929
7930 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7931 -- to pre- and postconditions associated with an entry or a subprogram
7932 -- [body or stub]. The pragmas can either come from source or be the
7933 -- byproduct of aspect expansion. Currently the following pragmas appear
7934 -- in this list:
7935 -- Post
7936 -- Postcondition
7937 -- Pre
7938 -- Precondition
7939 -- Refined_Post
7940 -- The ordering in the list is in LIFO fashion.
7941
7942 -- Note that there might be multiple preconditions or postconditions
7943 -- in this list, either because they come from separate pragmas in the
7944 -- source, or because a Pre (resp. Post) aspect specification has been
7945 -- broken into AND THEN sections. See Split_PPC for details.
7946
7947 -- In GNATprove mode, the inherited classwide pre- and postconditions
7948 -- (suitably specialized for the specific type of the overriding
7949 -- operation) are also in this list.
7950
7951 -- Contract_Test_Cases contains a collection of pragmas that correspond
7952 -- to aspects/pragmas Contract_Cases, Test_Case and Subprogram_Variant.
7953 -- The ordering in the list is in LIFO fashion.
7954
7955 -- Classifications contains pragmas that either declare, categorize, or
7956 -- establish dependencies between subprogram or package inputs and
7957 -- outputs. Currently the following pragmas appear in this list:
7958 -- Abstract_States
7959 -- Async_Readers
7960 -- Async_Writers
7961 -- Constant_After_Elaboration
7962 -- Depends
7963 -- Effective_Reads
7964 -- Effective_Writes
7965 -- Extensions_Visible
7966 -- Global
7967 -- Initial_Condition
7968 -- Initializes
7969 -- Part_Of
7970 -- Refined_Depends
7971 -- Refined_Global
7972 -- Refined_States
7973 -- Volatile_Function
7974 -- The ordering is in LIFO fashion.
7975
7976 -------------------
7977 -- Expanded Name --
7978 -------------------
7979
7980 -- The N_Expanded_Name node is used to represent a selected component
7981 -- name that has been resolved to an expanded name. The semantic phase
7982 -- replaces N_Selected_Component nodes that represent names by the use
7983 -- of this node, leaving the N_Selected_Component node used only when
7984 -- the prefix is a record or protected type.
7985
7986 -- The fields of the N_Expanded_Name node are laid out identically
7987 -- to those of the N_Selected_Component node, allowing conversion of
7988 -- an expanded name node to a selected component node to be done
7989 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7990
7991 -- There is no special sprint syntax for an expanded name
7992
7993 -- N_Expanded_Name
7994 -- Sloc points to the period
7995 -- Chars (Name1) copy of Chars field of selector name
7996 -- Prefix (Node3)
7997 -- Selector_Name (Node2)
7998 -- Entity (Node4-Sem)
7999 -- Associated_Node (Node4-Sem)
8000 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
8001 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
8002 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
8003 -- Has_Private_View (Flag11-Sem) set in generic units
8004 -- Redundant_Use (Flag13-Sem)
8005 -- Atomic_Sync_Required (Flag14-Sem)
8006 -- plus fields for expression
8007
8008 -----------------------------
8009 -- Expression With Actions --
8010 -----------------------------
8011
8012 -- This node is created by the analyzer/expander to handle some
8013 -- expansion cases, notably short-circuit forms where there are
8014 -- actions associated with the right-hand side operand.
8015
8016 -- The N_Expression_With_Actions node represents an expression with
8017 -- an associated set of actions (which are executable statements and
8018 -- declarations, as might occur in a handled statement sequence).
8019
8020 -- The required semantics is that the set of actions is executed in
8021 -- the order in which it appears just before the expression is
8022 -- evaluated (and these actions must only be executed if the value
8023 -- of the expression is evaluated). The node is considered to be
8024 -- a subexpression, whose value is the value of the Expression after
8025 -- executing all the actions.
8026
8027 -- If the actions contain declarations, then these declarations may
8028 -- be referenced within the expression.
8029
8030 -- (AI12-0236-1): In Ada 2020, for a declare_expression, the parser
8031 -- generates an N_Expression_With_Actions. Declare_expressions have
8032 -- various restrictions, which we do not enforce on
8033 -- N_Expression_With_Actions nodes that are generated by the
8034 -- expander. The two cases can be distinguished by looking at
8035 -- Comes_From_Source.
8036
8037 -- ???Perhaps we should change the name of this node to
8038 -- N_Declare_Expression, and perhaps we should change the Sprint syntax
8039 -- to match the RM syntax for declare_expression.
8040
8041 -- Sprint syntax: do
8042 -- action;
8043 -- action;
8044 -- ...
8045 -- action;
8046 -- in expression end
8047
8048 -- N_Expression_With_Actions
8049 -- Actions (List1)
8050 -- Expression (Node3)
8051 -- plus fields for expression
8052
8053 -- Note: In the final generated tree presented to the code generator,
8054 -- the actions list is always non-null, since there is no point in this
8055 -- node if the actions are Empty. During semantic analysis there are
8056 -- cases where it is convenient to temporarily generate an empty actions
8057 -- list. This arises in cases where we create such an empty actions
8058 -- list, and it may or may not end up being a place where additional
8059 -- actions are inserted. The expander removes such empty cases after
8060 -- the expression of the node is fully analyzed and expanded, at which
8061 -- point it is safe to remove it, since no more actions can be inserted.
8062
8063 -- Note: In Modify_Tree_For_C, we never generate any declarations in
8064 -- the action list, which can contain only non-declarative statements.
8065
8066 --------------------
8067 -- Free Statement --
8068 --------------------
8069
8070 -- The N_Free_Statement node is generated as a result of a call to an
8071 -- instantiation of Unchecked_Deallocation. The instantiation of this
8072 -- generic is handled specially and generates this node directly.
8073
8074 -- Sprint syntax: free expression
8075
8076 -- N_Free_Statement
8077 -- Sloc is copied from the unchecked deallocation call
8078 -- Expression (Node3) argument to unchecked deallocation call
8079 -- Storage_Pool (Node1-Sem)
8080 -- Procedure_To_Call (Node2-Sem)
8081 -- Actual_Designated_Subtype (Node4-Sem)
8082
8083 -- Note: in the case where a debug source file is generated, the Sloc
8084 -- for this node points to the FREE keyword in the Sprint file output.
8085
8086 -------------------
8087 -- Freeze Entity --
8088 -------------------
8089
8090 -- This node marks the point in a declarative part at which an entity
8091 -- declared therein becomes frozen. The expander places initialization
8092 -- procedures for types at those points. Gigi uses the freezing point
8093 -- to elaborate entities that may depend on previous private types.
8094
8095 -- See the section in Einfo "Delayed Freezing and Elaboration" for
8096 -- a full description of the use of this node.
8097
8098 -- The Entity field points back to the entity for the type (whose
8099 -- Freeze_Node field points back to this freeze node).
8100
8101 -- The Actions field contains a list of declarations and statements
8102 -- generated by the expander which are associated with the freeze
8103 -- node, and are elaborated as though the freeze node were replaced
8104 -- by this sequence of actions.
8105
8106 -- Note: the Sloc field in the freeze node references a construct
8107 -- associated with the freezing point. This is used for posting
8108 -- messages in some error/warning situations, e.g. the case where
8109 -- a primitive operation of a tagged type is declared too late.
8110
8111 -- Sprint syntax: freeze entity-name [
8112 -- freeze actions
8113 -- ]
8114
8115 -- N_Freeze_Entity
8116 -- Sloc points near freeze point (see above special note)
8117 -- Entity (Node4-Sem)
8118 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
8119 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
8120 -- Actions (List1) (set to No_List if no freeze actions)
8121 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
8122
8123 -- The Actions field holds actions associated with the freeze. These
8124 -- actions are elaborated at the point where the type is frozen.
8125
8126 -- Note: in the case where a debug source file is generated, the Sloc
8127 -- for this node points to the FREEZE keyword in the Sprint file output.
8128
8129 ---------------------------
8130 -- Freeze Generic Entity --
8131 ---------------------------
8132
8133 -- The freeze point of an entity indicates the point at which the
8134 -- information needed to generate code for the entity is complete.
8135 -- The freeze node for an entity triggers expander activities, such as
8136 -- build initialization procedures, and backend activities, such as
8137 -- completing the elaboration of packages.
8138
8139 -- For entities declared within a generic unit, for which no code is
8140 -- generated, the freeze point is not equally meaningful. However, in
8141 -- Ada 2012 several semantic checks on declarations must be delayed to
8142 -- the freeze point, and we need to include such a mark in the tree to
8143 -- trigger these checks. The Freeze_Generic_Entity node plays no other
8144 -- role, and is ignored by the expander and the back-end.
8145
8146 -- Sprint syntax: freeze_generic entity-name
8147
8148 -- N_Freeze_Generic_Entity
8149 -- Sloc points near freeze point
8150 -- Entity (Node4-Sem)
8151
8152 --------------------------------
8153 -- Implicit Label Declaration --
8154 --------------------------------
8155
8156 -- An implicit label declaration is created for every occurrence of a
8157 -- label on a statement or a label on a block or loop. It is chained
8158 -- in the declarations of the innermost enclosing block as specified
8159 -- in RM section 5.1 (3).
8160
8161 -- The Defining_Identifier is the actual identifier for the statement
8162 -- identifier. Note that the occurrence of the label is a reference, NOT
8163 -- the defining occurrence. The defining occurrence occurs at the head
8164 -- of the innermost enclosing block, and is represented by this node.
8165
8166 -- Note: from the grammar, this might better be called an implicit
8167 -- statement identifier declaration, but the term we choose seems
8168 -- friendlier, since at least informally statement identifiers are
8169 -- called labels in both cases (i.e. when used in labels, and when
8170 -- used as the identifiers of blocks and loops).
8171
8172 -- Note: although this is logically a semantic node, since it does not
8173 -- correspond directly to a source syntax construction, these nodes are
8174 -- actually created by the parser in a post pass done just after parsing
8175 -- is complete, before semantic analysis is started (see Par.Labl).
8176
8177 -- Sprint syntax: labelname : label;
8178
8179 -- N_Implicit_Label_Declaration
8180 -- Sloc points to the << token for a statement identifier, or to the
8181 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
8182 -- Defining_Identifier (Node1)
8183 -- Label_Construct (Node2-Sem)
8184
8185 -- Note: in the case where a debug source file is generated, the Sloc
8186 -- for this node points to the label name in the generated declaration.
8187
8188 ---------------------
8189 -- Itype Reference --
8190 ---------------------
8191
8192 -- This node is used to create a reference to an Itype. The only purpose
8193 -- is to make sure the Itype is defined if this is the first reference.
8194
8195 -- A typical use of this node is when an Itype is to be referenced in
8196 -- two branches of an IF statement. In this case it is important that
8197 -- the first use of the Itype not be inside the conditional, since then
8198 -- it might not be defined if the other branch of the IF is taken, in
8199 -- the case where the definition generates elaboration code.
8200
8201 -- The Itype field points to the referenced Itype
8202
8203 -- Sprint syntax: reference itype-name
8204
8205 -- N_Itype_Reference
8206 -- Sloc points to the node generating the reference
8207 -- Itype (Node1-Sem)
8208
8209 -- Note: in the case where a debug source file is generated, the Sloc
8210 -- for this node points to the REFERENCE keyword in the file output.
8211
8212 ---------------------
8213 -- Raise xxx Error --
8214 ---------------------
8215
8216 -- One of these nodes is created during semantic analysis to replace
8217 -- a node for an expression that is determined to definitely raise
8218 -- the corresponding exception.
8219
8220 -- The N_Raise_xxx_Error node may also stand alone in place
8221 -- of a declaration or statement, in which case it simply causes
8222 -- the exception to be raised (i.e. it is equivalent to a raise
8223 -- statement that raises the corresponding exception). This use
8224 -- is distinguished by the fact that the Etype in this case is
8225 -- Standard_Void_Type; in the subexpression case, the Etype is the
8226 -- same as the type of the subexpression which it replaces.
8227
8228 -- If Condition is empty, then the raise is unconditional. If the
8229 -- Condition field is non-empty, it is a boolean expression which is
8230 -- first evaluated, and the exception is raised only if the value of the
8231 -- expression is True. In the unconditional case, the creation of this
8232 -- node is usually accompanied by a warning message (unless it appears
8233 -- within the right operand of a short-circuit form whose left argument
8234 -- is static and decisively eliminates elaboration of the raise
8235 -- operation). The condition field can ONLY be present when the node is
8236 -- used as a statement form; it must NOT be present in the case where
8237 -- the node appears within an expression.
8238
8239 -- The exception is generated with a message that contains the
8240 -- file name and line number, and then appended text. The Reason
8241 -- code shows the text to be added. The Reason code is an element
8242 -- of the type Types.RT_Exception_Code, and indicates both the
8243 -- message to be added, and the exception to be raised (which must
8244 -- match the node type). The value is stored by storing a Uint which
8245 -- is the Pos value of the enumeration element in this type.
8246
8247 -- Gigi restriction: This expander ensures that the type of the
8248 -- Condition field is always Standard.Boolean, even if the type
8249 -- in the source is some non-standard boolean type.
8250
8251 -- Sprint syntax: [xxx_error "msg"]
8252 -- or: [xxx_error when condition "msg"]
8253
8254 -- N_Raise_Constraint_Error
8255 -- Sloc references related construct
8256 -- Condition (Node1) (set to Empty if no condition)
8257 -- Reason (Uint3)
8258 -- plus fields for expression
8259
8260 -- N_Raise_Program_Error
8261 -- Sloc references related construct
8262 -- Condition (Node1) (set to Empty if no condition)
8263 -- Reason (Uint3)
8264 -- plus fields for expression
8265
8266 -- N_Raise_Storage_Error
8267 -- Sloc references related construct
8268 -- Condition (Node1) (set to Empty if no condition)
8269 -- Reason (Uint3)
8270 -- plus fields for expression
8271
8272 -- Note: Sloc is copied from the expression generating the exception.
8273 -- In the case where a debug source file is generated, the Sloc for
8274 -- this node points to the left bracket in the Sprint file output.
8275
8276 -- Note: the back end may be required to translate these nodes into
8277 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
8278
8279 ---------------------------------------------
8280 -- Optimization of Exception Raise to Goto --
8281 ---------------------------------------------
8282
8283 -- In some cases, the front end will determine that any exception raised
8284 -- by the back end for a certain exception should be transformed into a
8285 -- goto statement.
8286
8287 -- There are three kinds of exceptions raised by the back end (note that
8288 -- for this purpose we consider gigi to be part of the back end in the
8289 -- gcc case):
8290
8291 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
8292 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
8293 -- 3. Other cases not specifically marked by the front end
8294
8295 -- Normally all such exceptions are translated into calls to the proper
8296 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
8297 -- and the exception message.
8298
8299 -- The front end may determine that for a particular sequence of code,
8300 -- exceptions in any of these three categories for a particular builtin
8301 -- exception should result in a goto, rather than a call to Rcheck_xx.
8302 -- The exact sequence to be generated is:
8303
8304 -- Local_Raise (exception'Identity);
8305 -- goto Label
8306
8307 -- The front end marks such a sequence of code by bracketing it with
8308 -- push and pop nodes:
8309
8310 -- N_Push_xxx_Label (referencing the label)
8311 -- ...
8312 -- (code where transformation is expected for exception xxx)
8313 -- ...
8314 -- N_Pop_xxx_Label
8315
8316 -- The use of push/pop reflects the fact that such regions can properly
8317 -- nest, and one special case is a subregion in which no transformation
8318 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
8319 -- Exception_Label field is Empty.
8320
8321 -- N_Push_Constraint_Error_Label
8322 -- Sloc references first statement in region covered
8323 -- Exception_Label (Node5-Sem)
8324
8325 -- N_Push_Program_Error_Label
8326 -- Sloc references first statement in region covered
8327 -- Exception_Label (Node5-Sem)
8328
8329 -- N_Push_Storage_Error_Label
8330 -- Sloc references first statement in region covered
8331 -- Exception_Label (Node5-Sem)
8332
8333 -- N_Pop_Constraint_Error_Label
8334 -- Sloc references last statement in region covered
8335
8336 -- N_Pop_Program_Error_Label
8337 -- Sloc references last statement in region covered
8338
8339 -- N_Pop_Storage_Error_Label
8340 -- Sloc references last statement in region covered
8341
8342 ---------------
8343 -- Reference --
8344 ---------------
8345
8346 -- For a number of purposes, we need to construct references to objects.
8347 -- These references are subsequently treated as normal access values.
8348 -- An example is the construction of the parameter block passed to a
8349 -- task entry. The N_Reference node is provided for this purpose. It is
8350 -- similar in effect to the use of the Unrestricted_Access attribute,
8351 -- and like Unrestricted_Access can be applied to objects which would
8352 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
8353 -- objects which are not aliased, and slices). In addition it can be
8354 -- applied to composite type values as well as objects, including string
8355 -- values and aggregates.
8356
8357 -- Note: we use the Prefix field for this expression so that the
8358 -- resulting node can be treated using common code with the attribute
8359 -- nodes for the 'Access and related attributes. Logically it would make
8360 -- more sense to call it an Expression field, but then we would have to
8361 -- special case the treatment of the N_Reference node.
8362
8363 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
8364 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
8365 -- a temporary initialized to a N_Reference node in order to eliminate
8366 -- superfluous access checks.
8367
8368 -- Sprint syntax: prefix'reference
8369
8370 -- N_Reference
8371 -- Sloc is copied from the expression
8372 -- Prefix (Node3)
8373 -- plus fields for expression
8374
8375 -- Note: in the case where a debug source file is generated, the Sloc
8376 -- for this node points to the quote in the Sprint file output.
8377
8378 ----------------
8379 -- SCIL Nodes --
8380 ----------------
8381
8382 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
8383 -- is active. They are only generated if SCIL generation is enabled.
8384 -- A standard tree-walk will not encounter these nodes even if they
8385 -- are present; these nodes are only accessible via the function
8386 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
8387 -- semantics.
8388
8389 -- Sprint syntax: [ <node kind> ]
8390 -- No semantic field values are displayed.
8391
8392 -- N_SCIL_Dispatch_Table_Tag_Init
8393 -- Sloc references a node for a tag initialization
8394 -- SCIL_Entity (Node4-Sem)
8395 --
8396 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
8397 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
8398 -- the declaration of the dispatch table for a tagged type.
8399
8400 -- N_SCIL_Dispatching_Call
8401 -- Sloc references the node of a dispatching call
8402 -- SCIL_Target_Prim (Node2-Sem)
8403 -- SCIL_Entity (Node4-Sem)
8404 -- SCIL_Controlling_Tag (Node5-Sem)
8405 --
8406 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
8407 -- with the N_Procedure_Call_Statement or N_Function_Call node (or a
8408 -- rewriting thereof) corresponding to a dispatching call.
8409
8410 -- N_SCIL_Membership_Test
8411 -- Sloc references the node of a membership test
8412 -- SCIL_Tag_Value (Node5-Sem)
8413 -- SCIL_Entity (Node4-Sem)
8414 --
8415 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
8416 -- with the N_In node (or a rewriting thereof) corresponding to a
8417 -- classwide membership test.
8418
8419 --------------------------
8420 -- Unchecked Expression --
8421 --------------------------
8422
8423 -- An unchecked expression is one that must be analyzed and resolved
8424 -- with all checks off, regardless of the current setting of scope
8425 -- suppress flags.
8426
8427 -- Sprint syntax: `(expression)
8428
8429 -- Note: this node is always removed from the tree (and replaced by
8430 -- its constituent expression) on completion of analysis, so it only
8431 -- appears in intermediate trees, and will never be seen by Gigi.
8432
8433 -- N_Unchecked_Expression
8434 -- Sloc is a copy of the Sloc of the expression
8435 -- Expression (Node3)
8436 -- plus fields for expression
8437
8438 -- Note: in the case where a debug source file is generated, the Sloc
8439 -- for this node points to the back quote in the Sprint file output.
8440
8441 -------------------------------
8442 -- Unchecked Type Conversion --
8443 -------------------------------
8444
8445 -- An unchecked type conversion node represents the semantic action
8446 -- corresponding to a call to an instantiation of Unchecked_Conversion.
8447 -- It is generated as a result of actual use of Unchecked_Conversion
8448 -- and also the expander generates unchecked type conversion nodes
8449 -- directly for expansion of complex semantic actions.
8450
8451 -- Note: an unchecked type conversion is a variable as far as the
8452 -- semantics are concerned, which is convenient for the expander.
8453 -- This does not change what Ada source programs are legal, since
8454 -- clearly a function call to an instantiation of Unchecked_Conversion
8455 -- is not a variable in any case.
8456
8457 -- Sprint syntax: subtype-mark!(expression)
8458
8459 -- N_Unchecked_Type_Conversion
8460 -- Sloc points to related node in source
8461 -- Subtype_Mark (Node4)
8462 -- Expression (Node3)
8463 -- Kill_Range_Check (Flag11-Sem)
8464 -- No_Truncation (Flag17-Sem)
8465 -- plus fields for expression
8466
8467 -- Note: in the case where a debug source file is generated, the Sloc
8468 -- for this node points to the exclamation in the Sprint file output.
8469
8470 -----------------------------------
8471 -- Validate_Unchecked_Conversion --
8472 -----------------------------------
8473
8474 -- The front end does most of the validation of unchecked conversion,
8475 -- including checking sizes (this is done after the back end is called
8476 -- to take advantage of back-annotation of calculated sizes).
8477
8478 -- The front end also deals with specific cases that are not allowed
8479 -- e.g. involving unconstrained array types.
8480
8481 -- For the case of the standard gigi backend, this means that all
8482 -- checks are done in the front end.
8483
8484 -- However, in the case of specialized back-ends, in particular the JVM
8485 -- backend in the past, additional requirements and restrictions may
8486 -- apply to unchecked conversion, and these are most conveniently
8487 -- performed in the specialized back-end.
8488
8489 -- To accommodate this requirement, for such back ends, the following
8490 -- special node is generated recording an unchecked conversion that
8491 -- needs to be validated. The back end should post an appropriate
8492 -- error message if the unchecked conversion is invalid or warrants
8493 -- a special warning message.
8494
8495 -- Source_Type and Target_Type point to the entities for the two
8496 -- types involved in the unchecked conversion instantiation that
8497 -- is to be validated.
8498
8499 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8500
8501 -- N_Validate_Unchecked_Conversion
8502 -- Sloc points to instantiation (location for warning message)
8503 -- Source_Type (Node1-Sem)
8504 -- Target_Type (Node2-Sem)
8505
8506 -- Note: in the case where a debug source file is generated, the Sloc
8507 -- for this node points to the VALIDATE keyword in the file output.
8508
8509 -------------------------------
8510 -- Variable_Reference_Marker --
8511 -------------------------------
8512
8513 -- This node is created during the analysis of direct or expanded names,
8514 -- and the resolution of entry and subprogram calls. It performs several
8515 -- functions:
8516
8517 -- * Variable reference markers provide a uniform model for handling
8518 -- variable references by the ABE mechanism, regardless of whether
8519 -- expansion took place.
8520
8521 -- * The variable reference marker captures the entity of the variable
8522 -- being read or written.
8523
8524 -- * The variable reference markers aid the ABE Processing phase by
8525 -- signaling the presence of a call in case the original variable
8526 -- reference was transformed by expansion.
8527
8528 -- Sprint syntax: r#target# -- for a read
8529 -- rw#target# -- for a read/write
8530 -- w#target# -- for a write
8531
8532 -- The Sprint syntax shown above is not enabled by default
8533
8534 -- N_Variable_Reference_Marker
8535 -- Sloc points to Sloc of original variable reference
8536 -- Target (Node1-Sem)
8537 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
8538 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
8539 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
8540 -- Is_Read (Flag4-Sem)
8541 -- Is_Write (Flag5-Sem)
8542
8543 -----------
8544 -- Empty --
8545 -----------
8546
8547 -- Used as the contents of the Nkind field of the dummy Empty node and in
8548 -- some other situations to indicate an uninitialized value.
8549
8550 -- N_Empty
8551 -- Chars (Name1) is set to No_Name
8552
8553 -----------
8554 -- Error --
8555 -----------
8556
8557 -- Used as the contents of the Nkind field of the dummy Error node.
8558 -- Has an Etype field, which gets set to Any_Type later on, to help
8559 -- error recovery (Error_Posted is also set in the Error node).
8560
8561 -- N_Error
8562 -- Chars (Name1) is set to Error_Name
8563 -- Etype (Node5-Sem)
8564
8565 --------------------------
8566 -- Node Type Definition --
8567 --------------------------
8568
8569 -- The following is the definition of the Node_Kind type. As previously
8570 -- discussed, this is separated off to allow rearrangement of the order to
8571 -- facilitate definition of subtype ranges. The comments show the subtype
8572 -- classes which apply to each set of node kinds. The first entry in the
8573 -- comment characterizes the following list of nodes.
8574
8575 type Node_Kind is (
8576 N_Unused_At_Start,
8577
8578 -- N_Representation_Clause
8579
8580 N_At_Clause,
8581 N_Component_Clause,
8582 N_Enumeration_Representation_Clause,
8583 N_Mod_Clause,
8584 N_Record_Representation_Clause,
8585
8586 -- N_Representation_Clause, N_Has_Chars
8587
8588 N_Attribute_Definition_Clause,
8589
8590 -- N_Has_Chars
8591
8592 N_Empty,
8593 N_Pragma_Argument_Association,
8594
8595 -- N_Has_Etype, N_Has_Chars
8596
8597 -- Note: of course N_Error does not really have Etype or Chars fields,
8598 -- and any attempt to access these fields in N_Error will cause an
8599 -- error, but historically this always has been positioned so that an
8600 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8601 -- Most likely this makes coding easier somewhere but still seems
8602 -- undesirable. To be investigated some time ???
8603
8604 N_Error,
8605
8606 -- N_Entity, N_Has_Etype, N_Has_Chars
8607
8608 N_Defining_Character_Literal,
8609 N_Defining_Identifier,
8610 N_Defining_Operator_Symbol,
8611
8612 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8613
8614 N_Expanded_Name,
8615
8616 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8617 -- N_Has_Chars, N_Has_Entity
8618
8619 N_Identifier,
8620 N_Operator_Symbol,
8621
8622 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8623 -- N_Has_Chars, N_Has_Entity
8624
8625 N_Character_Literal,
8626
8627 -- N_Binary_Op, N_Op, N_Subexpr,
8628 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8629
8630 N_Op_Add,
8631 N_Op_Concat,
8632 N_Op_Expon,
8633 N_Op_Subtract,
8634
8635 -- N_Binary_Op, N_Op, N_Subexpr,
8636 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8637
8638 N_Op_Divide,
8639 N_Op_Mod,
8640 N_Op_Multiply,
8641 N_Op_Rem,
8642
8643 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8644 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8645
8646 N_Op_And,
8647
8648 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8649 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8650
8651 N_Op_Eq,
8652 N_Op_Ge,
8653 N_Op_Gt,
8654 N_Op_Le,
8655 N_Op_Lt,
8656 N_Op_Ne,
8657
8658 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8659 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8660
8661 N_Op_Or,
8662 N_Op_Xor,
8663
8664 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8665 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8666
8667 N_Op_Rotate_Left,
8668 N_Op_Rotate_Right,
8669 N_Op_Shift_Left,
8670 N_Op_Shift_Right,
8671 N_Op_Shift_Right_Arithmetic,
8672
8673 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8674 -- N_Has_Chars, N_Has_Entity
8675
8676 N_Op_Abs,
8677 N_Op_Minus,
8678 N_Op_Not,
8679 N_Op_Plus,
8680
8681 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8682
8683 N_Attribute_Reference,
8684
8685 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8686
8687 N_In,
8688 N_Not_In,
8689
8690 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8691
8692 N_And_Then,
8693 N_Or_Else,
8694
8695 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8696
8697 N_Function_Call,
8698 N_Procedure_Call_Statement,
8699
8700 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8701
8702 N_Raise_Constraint_Error,
8703 N_Raise_Program_Error,
8704 N_Raise_Storage_Error,
8705
8706 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8707
8708 N_Integer_Literal,
8709 N_Real_Literal,
8710 N_String_Literal,
8711
8712 -- N_Subexpr, N_Has_Etype
8713
8714 N_Explicit_Dereference,
8715 N_Expression_With_Actions,
8716 N_If_Expression,
8717 N_Indexed_Component,
8718 N_Null,
8719 N_Qualified_Expression,
8720 N_Quantified_Expression,
8721 N_Aggregate,
8722 N_Allocator,
8723 N_Case_Expression,
8724 N_Delta_Aggregate,
8725 N_Extension_Aggregate,
8726 N_Raise_Expression,
8727 N_Range,
8728 N_Reference,
8729 N_Selected_Component,
8730 N_Slice,
8731 N_Target_Name,
8732 N_Type_Conversion,
8733 N_Unchecked_Expression,
8734 N_Unchecked_Type_Conversion,
8735
8736 -- N_Has_Etype
8737
8738 N_Subtype_Indication,
8739
8740 -- N_Declaration
8741
8742 N_Component_Declaration,
8743 N_Entry_Declaration,
8744 N_Expression_Function,
8745 N_Formal_Object_Declaration,
8746 N_Formal_Type_Declaration,
8747 N_Full_Type_Declaration,
8748 N_Incomplete_Type_Declaration,
8749 N_Iterator_Specification,
8750 N_Loop_Parameter_Specification,
8751 N_Object_Declaration,
8752 N_Protected_Type_Declaration,
8753 N_Private_Extension_Declaration,
8754 N_Private_Type_Declaration,
8755 N_Subtype_Declaration,
8756
8757 -- N_Subprogram_Specification, N_Declaration
8758
8759 N_Function_Specification,
8760 N_Procedure_Specification,
8761
8762 -- N_Access_To_Subprogram_Definition
8763
8764 N_Access_Function_Definition,
8765 N_Access_Procedure_Definition,
8766
8767 -- N_Later_Decl_Item
8768
8769 N_Task_Type_Declaration,
8770
8771 -- N_Body_Stub, N_Later_Decl_Item
8772
8773 N_Package_Body_Stub,
8774 N_Protected_Body_Stub,
8775 N_Subprogram_Body_Stub,
8776 N_Task_Body_Stub,
8777
8778 -- N_Generic_Instantiation, N_Later_Decl_Item
8779 -- N_Subprogram_Instantiation
8780
8781 N_Function_Instantiation,
8782 N_Procedure_Instantiation,
8783
8784 -- N_Generic_Instantiation, N_Later_Decl_Item
8785
8786 N_Package_Instantiation,
8787
8788 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8789
8790 N_Package_Body,
8791 N_Subprogram_Body,
8792
8793 -- N_Later_Decl_Item, N_Proper_Body
8794
8795 N_Protected_Body,
8796 N_Task_Body,
8797
8798 -- N_Later_Decl_Item
8799
8800 N_Implicit_Label_Declaration,
8801 N_Package_Declaration,
8802 N_Single_Task_Declaration,
8803 N_Subprogram_Declaration,
8804 N_Use_Package_Clause,
8805
8806 -- N_Generic_Declaration, N_Later_Decl_Item
8807
8808 N_Generic_Package_Declaration,
8809 N_Generic_Subprogram_Declaration,
8810
8811 -- N_Array_Type_Definition
8812
8813 N_Constrained_Array_Definition,
8814 N_Unconstrained_Array_Definition,
8815
8816 -- N_Renaming_Declaration
8817
8818 N_Exception_Renaming_Declaration,
8819 N_Object_Renaming_Declaration,
8820 N_Package_Renaming_Declaration,
8821 N_Subprogram_Renaming_Declaration,
8822
8823 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8824
8825 N_Generic_Function_Renaming_Declaration,
8826 N_Generic_Package_Renaming_Declaration,
8827 N_Generic_Procedure_Renaming_Declaration,
8828
8829 -- N_Statement_Other_Than_Procedure_Call
8830
8831 N_Abort_Statement,
8832 N_Accept_Statement,
8833 N_Assignment_Statement,
8834 N_Asynchronous_Select,
8835 N_Block_Statement,
8836 N_Case_Statement,
8837 N_Code_Statement,
8838 N_Compound_Statement,
8839 N_Conditional_Entry_Call,
8840
8841 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8842
8843 N_Delay_Relative_Statement,
8844 N_Delay_Until_Statement,
8845
8846 -- N_Statement_Other_Than_Procedure_Call
8847
8848 N_Entry_Call_Statement,
8849 N_Free_Statement,
8850 N_Goto_Statement,
8851 N_Loop_Statement,
8852 N_Null_Statement,
8853 N_Raise_Statement,
8854 N_Requeue_Statement,
8855 N_Simple_Return_Statement,
8856 N_Extended_Return_Statement,
8857 N_Selective_Accept,
8858 N_Timed_Entry_Call,
8859
8860 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8861
8862 N_Exit_Statement,
8863 N_If_Statement,
8864
8865 -- N_Has_Condition
8866
8867 N_Accept_Alternative,
8868 N_Delay_Alternative,
8869 N_Elsif_Part,
8870 N_Entry_Body_Formal_Part,
8871 N_Iteration_Scheme,
8872 N_Terminate_Alternative,
8873
8874 -- N_Formal_Subprogram_Declaration
8875
8876 N_Formal_Abstract_Subprogram_Declaration,
8877 N_Formal_Concrete_Subprogram_Declaration,
8878
8879 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8880
8881 N_Push_Constraint_Error_Label,
8882 N_Push_Program_Error_Label,
8883 N_Push_Storage_Error_Label,
8884
8885 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8886
8887 N_Pop_Constraint_Error_Label,
8888 N_Pop_Program_Error_Label,
8889 N_Pop_Storage_Error_Label,
8890
8891 -- SCIL nodes
8892
8893 N_SCIL_Dispatch_Table_Tag_Init,
8894 N_SCIL_Dispatching_Call,
8895 N_SCIL_Membership_Test,
8896
8897 -- Other nodes (not part of any subtype class)
8898
8899 N_Abortable_Part,
8900 N_Abstract_Subprogram_Declaration,
8901 N_Access_Definition,
8902 N_Access_To_Object_Definition,
8903 N_Aspect_Specification,
8904 N_Call_Marker,
8905 N_Case_Expression_Alternative,
8906 N_Case_Statement_Alternative,
8907 N_Compilation_Unit,
8908 N_Compilation_Unit_Aux,
8909 N_Component_Association,
8910 N_Component_Definition,
8911 N_Component_List,
8912 N_Contract,
8913 N_Derived_Type_Definition,
8914 N_Decimal_Fixed_Point_Definition,
8915 N_Defining_Program_Unit_Name,
8916 N_Delta_Constraint,
8917 N_Designator,
8918 N_Digits_Constraint,
8919 N_Discriminant_Association,
8920 N_Discriminant_Specification,
8921 N_Enumeration_Type_Definition,
8922 N_Entry_Body,
8923 N_Entry_Call_Alternative,
8924 N_Entry_Index_Specification,
8925 N_Exception_Declaration,
8926 N_Exception_Handler,
8927 N_Floating_Point_Definition,
8928 N_Formal_Decimal_Fixed_Point_Definition,
8929 N_Formal_Derived_Type_Definition,
8930 N_Formal_Discrete_Type_Definition,
8931 N_Formal_Floating_Point_Definition,
8932 N_Formal_Modular_Type_Definition,
8933 N_Formal_Ordinary_Fixed_Point_Definition,
8934 N_Formal_Package_Declaration,
8935 N_Formal_Private_Type_Definition,
8936 N_Formal_Incomplete_Type_Definition,
8937 N_Formal_Signed_Integer_Type_Definition,
8938 N_Freeze_Entity,
8939 N_Freeze_Generic_Entity,
8940 N_Generic_Association,
8941 N_Handled_Sequence_Of_Statements,
8942 N_Index_Or_Discriminant_Constraint,
8943 N_Iterated_Component_Association,
8944 N_Iterated_Element_Association,
8945 N_Itype_Reference,
8946 N_Label,
8947 N_Modular_Type_Definition,
8948 N_Number_Declaration,
8949 N_Ordinary_Fixed_Point_Definition,
8950 N_Others_Choice,
8951 N_Package_Specification,
8952 N_Parameter_Association,
8953 N_Parameter_Specification,
8954 N_Pragma,
8955 N_Protected_Definition,
8956 N_Range_Constraint,
8957 N_Real_Range_Specification,
8958 N_Record_Definition,
8959 N_Signed_Integer_Type_Definition,
8960 N_Single_Protected_Declaration,
8961 N_Subunit,
8962 N_Task_Definition,
8963 N_Triggering_Alternative,
8964 N_Use_Type_Clause,
8965 N_Validate_Unchecked_Conversion,
8966 N_Variable_Reference_Marker,
8967 N_Variant,
8968 N_Variant_Part,
8969 N_With_Clause,
8970 N_Unused_At_End);
8971
8972 for Node_Kind'Size use 8;
8973 -- The data structures in Atree assume this
8974
8975 ----------------------------
8976 -- Node Class Definitions --
8977 ----------------------------
8978
8979 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8980 N_Access_Function_Definition ..
8981 N_Access_Procedure_Definition;
8982
8983 subtype N_Array_Type_Definition is Node_Kind range
8984 N_Constrained_Array_Definition ..
8985 N_Unconstrained_Array_Definition;
8986
8987 subtype N_Binary_Op is Node_Kind range
8988 N_Op_Add ..
8989 N_Op_Shift_Right_Arithmetic;
8990
8991 subtype N_Body_Stub is Node_Kind range
8992 N_Package_Body_Stub ..
8993 N_Task_Body_Stub;
8994
8995 subtype N_Declaration is Node_Kind range
8996 N_Component_Declaration ..
8997 N_Procedure_Specification;
8998 -- Note: this includes all constructs normally thought of as declarations
8999 -- except those which are separately grouped as later declarations.
9000
9001 subtype N_Delay_Statement is Node_Kind range
9002 N_Delay_Relative_Statement ..
9003 N_Delay_Until_Statement;
9004
9005 subtype N_Direct_Name is Node_Kind range
9006 N_Identifier ..
9007 N_Character_Literal;
9008
9009 subtype N_Entity is Node_Kind range
9010 N_Defining_Character_Literal ..
9011 N_Defining_Operator_Symbol;
9012
9013 subtype N_Formal_Subprogram_Declaration is Node_Kind range
9014 N_Formal_Abstract_Subprogram_Declaration ..
9015 N_Formal_Concrete_Subprogram_Declaration;
9016
9017 subtype N_Generic_Declaration is Node_Kind range
9018 N_Generic_Package_Declaration ..
9019 N_Generic_Subprogram_Declaration;
9020
9021 subtype N_Generic_Instantiation is Node_Kind range
9022 N_Function_Instantiation ..
9023 N_Package_Instantiation;
9024
9025 subtype N_Generic_Renaming_Declaration is Node_Kind range
9026 N_Generic_Function_Renaming_Declaration ..
9027 N_Generic_Procedure_Renaming_Declaration;
9028
9029 subtype N_Has_Chars is Node_Kind range
9030 N_Attribute_Definition_Clause ..
9031 N_Op_Plus;
9032
9033 subtype N_Has_Entity is Node_Kind range
9034 N_Expanded_Name ..
9035 N_Attribute_Reference;
9036 -- Nodes that have Entity fields
9037 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
9038 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
9039
9040 subtype N_Has_Etype is Node_Kind range
9041 N_Error ..
9042 N_Subtype_Indication;
9043
9044 subtype N_Multiplying_Operator is Node_Kind range
9045 N_Op_Divide ..
9046 N_Op_Rem;
9047
9048 subtype N_Later_Decl_Item is Node_Kind range
9049 N_Task_Type_Declaration ..
9050 N_Generic_Subprogram_Declaration;
9051 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
9052 -- only those items which can appear as later declarative items. This also
9053 -- includes N_Implicit_Label_Declaration which is not specifically in the
9054 -- grammar but may appear as a valid later declarative items. It does NOT
9055 -- include N_Pragma which can also appear among later declarative items.
9056 -- It does however include N_Protected_Body, which is a bit peculiar, but
9057 -- harmless since this cannot appear in Ada 83 mode anyway.
9058
9059 subtype N_Membership_Test is Node_Kind range
9060 N_In ..
9061 N_Not_In;
9062
9063 subtype N_Numeric_Or_String_Literal is Node_Kind range
9064 N_Integer_Literal ..
9065 N_String_Literal;
9066
9067 subtype N_Op is Node_Kind range
9068 N_Op_Add ..
9069 N_Op_Plus;
9070
9071 subtype N_Op_Boolean is Node_Kind range
9072 N_Op_And ..
9073 N_Op_Xor;
9074 -- Binary operators which take operands of a boolean type, and yield
9075 -- a result of a boolean type.
9076
9077 subtype N_Op_Compare is Node_Kind range
9078 N_Op_Eq ..
9079 N_Op_Ne;
9080
9081 subtype N_Op_Shift is Node_Kind range
9082 N_Op_Rotate_Left ..
9083 N_Op_Shift_Right_Arithmetic;
9084
9085 subtype N_Proper_Body is Node_Kind range
9086 N_Package_Body ..
9087 N_Task_Body;
9088
9089 subtype N_Push_xxx_Label is Node_Kind range
9090 N_Push_Constraint_Error_Label ..
9091 N_Push_Storage_Error_Label;
9092
9093 subtype N_Pop_xxx_Label is Node_Kind range
9094 N_Pop_Constraint_Error_Label ..
9095 N_Pop_Storage_Error_Label;
9096
9097 subtype N_Push_Pop_xxx_Label is Node_Kind range
9098 N_Push_Constraint_Error_Label ..
9099 N_Pop_Storage_Error_Label;
9100
9101 subtype N_Raise_xxx_Error is Node_Kind range
9102 N_Raise_Constraint_Error ..
9103 N_Raise_Storage_Error;
9104
9105 subtype N_Renaming_Declaration is Node_Kind range
9106 N_Exception_Renaming_Declaration ..
9107 N_Generic_Procedure_Renaming_Declaration;
9108
9109 subtype N_Representation_Clause is Node_Kind range
9110 N_At_Clause ..
9111 N_Attribute_Definition_Clause;
9112
9113 subtype N_Short_Circuit is Node_Kind range
9114 N_And_Then ..
9115 N_Or_Else;
9116
9117 subtype N_SCIL_Node is Node_Kind range
9118 N_SCIL_Dispatch_Table_Tag_Init ..
9119 N_SCIL_Membership_Test;
9120
9121 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
9122 N_Abort_Statement ..
9123 N_If_Statement;
9124 -- Note that this includes all statement types except for the cases of the
9125 -- N_Procedure_Call_Statement which is considered to be a subexpression
9126 -- (since overloading is possible, so it needs to go through the normal
9127 -- overloading resolution for expressions).
9128
9129 subtype N_Subprogram_Call is Node_Kind range
9130 N_Function_Call ..
9131 N_Procedure_Call_Statement;
9132
9133 subtype N_Subprogram_Instantiation is Node_Kind range
9134 N_Function_Instantiation ..
9135 N_Procedure_Instantiation;
9136
9137 subtype N_Has_Condition is Node_Kind range
9138 N_Exit_Statement ..
9139 N_Terminate_Alternative;
9140 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
9141
9142 subtype N_Subexpr is Node_Kind range
9143 N_Expanded_Name ..
9144 N_Unchecked_Type_Conversion;
9145 -- Nodes with expression fields
9146
9147 subtype N_Subprogram_Specification is Node_Kind range
9148 N_Function_Specification ..
9149 N_Procedure_Specification;
9150
9151 subtype N_Unary_Op is Node_Kind range
9152 N_Op_Abs ..
9153 N_Op_Plus;
9154
9155 subtype N_Unit_Body is Node_Kind range
9156 N_Package_Body ..
9157 N_Subprogram_Body;
9158
9159 ---------------------------
9160 -- Node Access Functions --
9161 ---------------------------
9162
9163 -- The following functions return the contents of the indicated field of
9164 -- the node referenced by the argument, which is a Node_Id. They provide
9165 -- logical access to fields in the node which could be accessed using the
9166 -- Atree.Unchecked_Access package, but the idea is always to use these
9167 -- higher level routines which preserve strong typing. In debug mode,
9168 -- these routines check that they are being applied to an appropriate
9169 -- node, as well as checking that the node is in range.
9170
9171 function Abort_Present
9172 (N : Node_Id) return Boolean; -- Flag15
9173
9174 function Abortable_Part
9175 (N : Node_Id) return Node_Id; -- Node2
9176
9177 function Abstract_Present
9178 (N : Node_Id) return Boolean; -- Flag4
9179
9180 function Accept_Handler_Records
9181 (N : Node_Id) return List_Id; -- List5
9182
9183 function Accept_Statement
9184 (N : Node_Id) return Node_Id; -- Node2
9185
9186 function Access_Definition
9187 (N : Node_Id) return Node_Id; -- Node3
9188
9189 function Access_To_Subprogram_Definition
9190 (N : Node_Id) return Node_Id; -- Node3
9191
9192 function Access_Types_To_Process
9193 (N : Node_Id) return Elist_Id; -- Elist2
9194
9195 function Actions
9196 (N : Node_Id) return List_Id; -- List1
9197
9198 function Activation_Chain_Entity
9199 (N : Node_Id) return Node_Id; -- Node3
9200
9201 function Acts_As_Spec
9202 (N : Node_Id) return Boolean; -- Flag4
9203
9204 function Actual_Designated_Subtype
9205 (N : Node_Id) return Node_Id; -- Node4
9206
9207 function Address_Warning_Posted
9208 (N : Node_Id) return Boolean; -- Flag18
9209
9210 function Aggregate_Bounds
9211 (N : Node_Id) return Node_Id; -- Node3
9212
9213 function Aliased_Present
9214 (N : Node_Id) return Boolean; -- Flag4
9215
9216 function Alloc_For_BIP_Return
9217 (N : Node_Id) return Boolean; -- Flag1
9218
9219 function All_Others
9220 (N : Node_Id) return Boolean; -- Flag11
9221
9222 function All_Present
9223 (N : Node_Id) return Boolean; -- Flag15
9224
9225 function Alternatives
9226 (N : Node_Id) return List_Id; -- List4
9227
9228 function Ancestor_Part
9229 (N : Node_Id) return Node_Id; -- Node3
9230
9231 function Atomic_Sync_Required
9232 (N : Node_Id) return Boolean; -- Flag14
9233
9234 function Array_Aggregate
9235 (N : Node_Id) return Node_Id; -- Node3
9236
9237 function Aspect_On_Partial_View
9238 (N : Node_Id) return Boolean; -- Flag18
9239
9240 function Aspect_Rep_Item
9241 (N : Node_Id) return Node_Id; -- Node2
9242
9243 function Assignment_OK
9244 (N : Node_Id) return Boolean; -- Flag15
9245
9246 function Associated_Node
9247 (N : Node_Id) return Node_Id; -- Node4
9248
9249 function At_End_Proc
9250 (N : Node_Id) return Node_Id; -- Node1
9251
9252 function Attribute_Name
9253 (N : Node_Id) return Name_Id; -- Name2
9254
9255 function Aux_Decls_Node
9256 (N : Node_Id) return Node_Id; -- Node5
9257
9258 function Backwards_OK
9259 (N : Node_Id) return Boolean; -- Flag6
9260
9261 function Bad_Is_Detected
9262 (N : Node_Id) return Boolean; -- Flag15
9263
9264 function By_Ref
9265 (N : Node_Id) return Boolean; -- Flag5
9266
9267 function Body_Required
9268 (N : Node_Id) return Boolean; -- Flag13
9269
9270 function Body_To_Inline
9271 (N : Node_Id) return Node_Id; -- Node3
9272
9273 function Box_Present
9274 (N : Node_Id) return Boolean; -- Flag15
9275
9276 function Char_Literal_Value
9277 (N : Node_Id) return Uint; -- Uint2
9278
9279 function Chars
9280 (N : Node_Id) return Name_Id; -- Name1
9281
9282 function Check_Address_Alignment
9283 (N : Node_Id) return Boolean; -- Flag11
9284
9285 function Choice_Parameter
9286 (N : Node_Id) return Node_Id; -- Node2
9287
9288 function Choices
9289 (N : Node_Id) return List_Id; -- List1
9290
9291 function Class_Present
9292 (N : Node_Id) return Boolean; -- Flag6
9293
9294 function Classifications
9295 (N : Node_Id) return Node_Id; -- Node3
9296
9297 function Cleanup_Actions
9298 (N : Node_Id) return List_Id; -- List5
9299
9300 function Comes_From_Extended_Return_Statement
9301 (N : Node_Id) return Boolean; -- Flag18
9302
9303 function Compile_Time_Known_Aggregate
9304 (N : Node_Id) return Boolean; -- Flag18
9305
9306 function Component_Associations
9307 (N : Node_Id) return List_Id; -- List2
9308
9309 function Component_Clauses
9310 (N : Node_Id) return List_Id; -- List3
9311
9312 function Component_Definition
9313 (N : Node_Id) return Node_Id; -- Node4
9314
9315 function Component_Items
9316 (N : Node_Id) return List_Id; -- List3
9317
9318 function Component_List
9319 (N : Node_Id) return Node_Id; -- Node1
9320
9321 function Component_Name
9322 (N : Node_Id) return Node_Id; -- Node1
9323
9324 function Componentwise_Assignment
9325 (N : Node_Id) return Boolean; -- Flag14
9326
9327 function Condition
9328 (N : Node_Id) return Node_Id; -- Node1
9329
9330 function Condition_Actions
9331 (N : Node_Id) return List_Id; -- List3
9332
9333 function Config_Pragmas
9334 (N : Node_Id) return List_Id; -- List4
9335
9336 function Constant_Present
9337 (N : Node_Id) return Boolean; -- Flag17
9338
9339 function Constraint
9340 (N : Node_Id) return Node_Id; -- Node3
9341
9342 function Constraints
9343 (N : Node_Id) return List_Id; -- List1
9344
9345 function Context_Installed
9346 (N : Node_Id) return Boolean; -- Flag13
9347
9348 function Context_Pending
9349 (N : Node_Id) return Boolean; -- Flag16
9350
9351 function Context_Items
9352 (N : Node_Id) return List_Id; -- List1
9353
9354 function Contract_Test_Cases
9355 (N : Node_Id) return Node_Id; -- Node2
9356
9357 function Controlling_Argument
9358 (N : Node_Id) return Node_Id; -- Node1
9359
9360 function Conversion_OK
9361 (N : Node_Id) return Boolean; -- Flag14
9362
9363 function Convert_To_Return_False
9364 (N : Node_Id) return Boolean; -- Flag13
9365
9366 function Corresponding_Aspect
9367 (N : Node_Id) return Node_Id; -- Node3
9368
9369 function Corresponding_Body
9370 (N : Node_Id) return Node_Id; -- Node5
9371
9372 function Corresponding_Formal_Spec
9373 (N : Node_Id) return Node_Id; -- Node3
9374
9375 function Corresponding_Generic_Association
9376 (N : Node_Id) return Node_Id; -- Node5
9377
9378 function Corresponding_Integer_Value
9379 (N : Node_Id) return Uint; -- Uint4
9380
9381 function Corresponding_Spec
9382 (N : Node_Id) return Entity_Id; -- Node5
9383
9384 function Corresponding_Spec_Of_Stub
9385 (N : Node_Id) return Node_Id; -- Node2
9386
9387 function Corresponding_Stub
9388 (N : Node_Id) return Node_Id; -- Node3
9389
9390 function Dcheck_Function
9391 (N : Node_Id) return Entity_Id; -- Node5
9392
9393 function Declarations
9394 (N : Node_Id) return List_Id; -- List2
9395
9396 function Default_Expression
9397 (N : Node_Id) return Node_Id; -- Node5
9398
9399 function Default_Storage_Pool
9400 (N : Node_Id) return Node_Id; -- Node3
9401
9402 function Default_Name
9403 (N : Node_Id) return Node_Id; -- Node2
9404
9405 function Defining_Identifier
9406 (N : Node_Id) return Entity_Id; -- Node1
9407
9408 function Defining_Unit_Name
9409 (N : Node_Id) return Node_Id; -- Node1
9410
9411 function Delay_Alternative
9412 (N : Node_Id) return Node_Id; -- Node4
9413
9414 function Delay_Statement
9415 (N : Node_Id) return Node_Id; -- Node2
9416
9417 function Delta_Expression
9418 (N : Node_Id) return Node_Id; -- Node3
9419
9420 function Digits_Expression
9421 (N : Node_Id) return Node_Id; -- Node2
9422
9423 function Discr_Check_Funcs_Built
9424 (N : Node_Id) return Boolean; -- Flag11
9425
9426 function Discrete_Choices
9427 (N : Node_Id) return List_Id; -- List4
9428
9429 function Discrete_Range
9430 (N : Node_Id) return Node_Id; -- Node4
9431
9432 function Discrete_Subtype_Definition
9433 (N : Node_Id) return Node_Id; -- Node4
9434
9435 function Discrete_Subtype_Definitions
9436 (N : Node_Id) return List_Id; -- List2
9437
9438 function Discriminant_Specifications
9439 (N : Node_Id) return List_Id; -- List4
9440
9441 function Discriminant_Type
9442 (N : Node_Id) return Node_Id; -- Node5
9443
9444 function Do_Accessibility_Check
9445 (N : Node_Id) return Boolean; -- Flag13
9446
9447 function Do_Discriminant_Check
9448 (N : Node_Id) return Boolean; -- Flag3
9449
9450 function Do_Division_Check
9451 (N : Node_Id) return Boolean; -- Flag13
9452
9453 function Do_Length_Check
9454 (N : Node_Id) return Boolean; -- Flag4
9455
9456 function Do_Overflow_Check
9457 (N : Node_Id) return Boolean; -- Flag17
9458
9459 function Do_Range_Check
9460 (N : Node_Id) return Boolean; -- Flag9
9461
9462 function Do_Storage_Check
9463 (N : Node_Id) return Boolean; -- Flag17
9464
9465 function Do_Tag_Check
9466 (N : Node_Id) return Boolean; -- Flag13
9467
9468 function Elaborate_All_Desirable
9469 (N : Node_Id) return Boolean; -- Flag9
9470
9471 function Elaborate_All_Present
9472 (N : Node_Id) return Boolean; -- Flag14
9473
9474 function Elaborate_Desirable
9475 (N : Node_Id) return Boolean; -- Flag11
9476
9477 function Elaborate_Present
9478 (N : Node_Id) return Boolean; -- Flag4
9479
9480 function Else_Actions
9481 (N : Node_Id) return List_Id; -- List3
9482
9483 function Else_Statements
9484 (N : Node_Id) return List_Id; -- List4
9485
9486 function Elsif_Parts
9487 (N : Node_Id) return List_Id; -- List3
9488
9489 function Enclosing_Variant
9490 (N : Node_Id) return Node_Id; -- Node2
9491
9492 function End_Label
9493 (N : Node_Id) return Node_Id; -- Node4
9494
9495 function End_Span
9496 (N : Node_Id) return Uint; -- Uint5
9497
9498 function Entity
9499 (N : Node_Id) return Node_Id; -- Node4
9500
9501 function Entity_Or_Associated_Node
9502 (N : Node_Id) return Node_Id; -- Node4
9503
9504 function Entry_Body_Formal_Part
9505 (N : Node_Id) return Node_Id; -- Node5
9506
9507 function Entry_Call_Alternative
9508 (N : Node_Id) return Node_Id; -- Node1
9509
9510 function Entry_Call_Statement
9511 (N : Node_Id) return Node_Id; -- Node1
9512
9513 function Entry_Direct_Name
9514 (N : Node_Id) return Node_Id; -- Node1
9515
9516 function Entry_Index
9517 (N : Node_Id) return Node_Id; -- Node5
9518
9519 function Entry_Index_Specification
9520 (N : Node_Id) return Node_Id; -- Node4
9521
9522 function Etype
9523 (N : Node_Id) return Node_Id; -- Node5
9524
9525 function Exception_Choices
9526 (N : Node_Id) return List_Id; -- List4
9527
9528 function Exception_Handlers
9529 (N : Node_Id) return List_Id; -- List5
9530
9531 function Exception_Junk
9532 (N : Node_Id) return Boolean; -- Flag8
9533
9534 function Exception_Label
9535 (N : Node_Id) return Node_Id; -- Node5
9536
9537 function Explicit_Actual_Parameter
9538 (N : Node_Id) return Node_Id; -- Node3
9539
9540 function Expansion_Delayed
9541 (N : Node_Id) return Boolean; -- Flag11
9542
9543 function Explicit_Generic_Actual_Parameter
9544 (N : Node_Id) return Node_Id; -- Node1
9545
9546 function Expression
9547 (N : Node_Id) return Node_Id; -- Node3
9548
9549 function Expression_Copy
9550 (N : Node_Id) return Node_Id; -- Node2
9551
9552 function Expressions
9553 (N : Node_Id) return List_Id; -- List1
9554
9555 function First_Bit
9556 (N : Node_Id) return Node_Id; -- Node3
9557
9558 function First_Inlined_Subprogram
9559 (N : Node_Id) return Entity_Id; -- Node3
9560
9561 function First_Name
9562 (N : Node_Id) return Boolean; -- Flag5
9563
9564 function First_Named_Actual
9565 (N : Node_Id) return Node_Id; -- Node4
9566
9567 function First_Real_Statement
9568 (N : Node_Id) return Node_Id; -- Node2
9569
9570 function First_Subtype_Link
9571 (N : Node_Id) return Entity_Id; -- Node5
9572
9573 function Float_Truncate
9574 (N : Node_Id) return Boolean; -- Flag11
9575
9576 function Formal_Type_Definition
9577 (N : Node_Id) return Node_Id; -- Node3
9578
9579 function Forwards_OK
9580 (N : Node_Id) return Boolean; -- Flag5
9581
9582 function From_Aspect_Specification
9583 (N : Node_Id) return Boolean; -- Flag13
9584
9585 function From_At_End
9586 (N : Node_Id) return Boolean; -- Flag4
9587
9588 function From_At_Mod
9589 (N : Node_Id) return Boolean; -- Flag4
9590
9591 function From_Conditional_Expression
9592 (N : Node_Id) return Boolean; -- Flag1
9593
9594 function From_Default
9595 (N : Node_Id) return Boolean; -- Flag6
9596
9597 function Generalized_Indexing
9598 (N : Node_Id) return Node_Id; -- Node4
9599
9600 function Generic_Associations
9601 (N : Node_Id) return List_Id; -- List3
9602
9603 function Generic_Formal_Declarations
9604 (N : Node_Id) return List_Id; -- List2
9605
9606 function Generic_Parent
9607 (N : Node_Id) return Node_Id; -- Node5
9608
9609 function Generic_Parent_Type
9610 (N : Node_Id) return Node_Id; -- Node4
9611
9612 function Handled_Statement_Sequence
9613 (N : Node_Id) return Node_Id; -- Node4
9614
9615 function Handler_List_Entry
9616 (N : Node_Id) return Node_Id; -- Node2
9617
9618 function Has_Created_Identifier
9619 (N : Node_Id) return Boolean; -- Flag15
9620
9621 function Has_Dereference_Action
9622 (N : Node_Id) return Boolean; -- Flag13
9623
9624 function Has_Dynamic_Length_Check
9625 (N : Node_Id) return Boolean; -- Flag10
9626
9627 function Has_Init_Expression
9628 (N : Node_Id) return Boolean; -- Flag14
9629
9630 function Has_Local_Raise
9631 (N : Node_Id) return Boolean; -- Flag8
9632
9633 function Has_No_Elaboration_Code
9634 (N : Node_Id) return Boolean; -- Flag17
9635
9636 function Has_Pragma_Suppress_All
9637 (N : Node_Id) return Boolean; -- Flag14
9638
9639 function Has_Private_View
9640 (N : Node_Id) return Boolean; -- Flag11
9641
9642 function Has_Relative_Deadline_Pragma
9643 (N : Node_Id) return Boolean; -- Flag9
9644
9645 function Has_Self_Reference
9646 (N : Node_Id) return Boolean; -- Flag13
9647
9648 function Has_SP_Choice
9649 (N : Node_Id) return Boolean; -- Flag15
9650
9651 function Has_Storage_Size_Pragma
9652 (N : Node_Id) return Boolean; -- Flag5
9653
9654 function Has_Target_Names
9655 (N : Node_Id) return Boolean; -- Flag8
9656
9657 function Has_Wide_Character
9658 (N : Node_Id) return Boolean; -- Flag11
9659
9660 function Has_Wide_Wide_Character
9661 (N : Node_Id) return Boolean; -- Flag13
9662
9663 function Header_Size_Added
9664 (N : Node_Id) return Boolean; -- Flag11
9665
9666 function Hidden_By_Use_Clause
9667 (N : Node_Id) return Elist_Id; -- Elist5
9668
9669 function High_Bound
9670 (N : Node_Id) return Node_Id; -- Node2
9671
9672 function Identifier
9673 (N : Node_Id) return Node_Id; -- Node1
9674
9675 function Interface_List
9676 (N : Node_Id) return List_Id; -- List2
9677
9678 function Interface_Present
9679 (N : Node_Id) return Boolean; -- Flag16
9680
9681 function Implicit_With
9682 (N : Node_Id) return Boolean; -- Flag16
9683
9684 function Import_Interface_Present
9685 (N : Node_Id) return Boolean; -- Flag16
9686
9687 function In_Present
9688 (N : Node_Id) return Boolean; -- Flag15
9689
9690 function Includes_Infinities
9691 (N : Node_Id) return Boolean; -- Flag11
9692
9693 function Incomplete_View
9694 (N : Node_Id) return Node_Id; -- Node2
9695
9696 function Inherited_Discriminant
9697 (N : Node_Id) return Boolean; -- Flag13
9698
9699 function Instance_Spec
9700 (N : Node_Id) return Node_Id; -- Node5
9701
9702 function Intval
9703 (N : Node_Id) return Uint; -- Uint3
9704
9705 function Is_Abort_Block
9706 (N : Node_Id) return Boolean; -- Flag4
9707
9708 function Is_Accessibility_Actual
9709 (N : Node_Id) return Boolean; -- Flag13
9710
9711 function Is_Analyzed_Pragma
9712 (N : Node_Id) return Boolean; -- Flag5
9713
9714 function Is_Asynchronous_Call_Block
9715 (N : Node_Id) return Boolean; -- Flag7
9716
9717 function Is_Boolean_Aspect
9718 (N : Node_Id) return Boolean; -- Flag16
9719
9720 function Is_Checked
9721 (N : Node_Id) return Boolean; -- Flag11
9722
9723 function Is_Checked_Ghost_Pragma
9724 (N : Node_Id) return Boolean; -- Flag3
9725
9726 function Is_Component_Left_Opnd
9727 (N : Node_Id) return Boolean; -- Flag13
9728
9729 function Is_Component_Right_Opnd
9730 (N : Node_Id) return Boolean; -- Flag14
9731
9732 function Is_Controlling_Actual
9733 (N : Node_Id) return Boolean; -- Flag16
9734
9735 function Is_Declaration_Level_Node
9736 (N : Node_Id) return Boolean; -- Flag5
9737
9738 function Is_Delayed_Aspect
9739 (N : Node_Id) return Boolean; -- Flag14
9740
9741 function Is_Disabled
9742 (N : Node_Id) return Boolean; -- Flag15
9743
9744 function Is_Dispatching_Call
9745 (N : Node_Id) return Boolean; -- Flag6
9746
9747 function Is_Dynamic_Coextension
9748 (N : Node_Id) return Boolean; -- Flag18
9749
9750 function Is_Effective_Use_Clause
9751 (N : Node_Id) return Boolean; -- Flag1
9752
9753 function Is_Elaboration_Checks_OK_Node
9754 (N : Node_Id) return Boolean; -- Flag1
9755
9756 function Is_Elaboration_Code
9757 (N : Node_Id) return Boolean; -- Flag9
9758
9759 function Is_Elaboration_Warnings_OK_Node
9760 (N : Node_Id) return Boolean; -- Flag3
9761
9762 function Is_Elsif
9763 (N : Node_Id) return Boolean; -- Flag13
9764
9765 function Is_Entry_Barrier_Function
9766 (N : Node_Id) return Boolean; -- Flag8
9767
9768 function Is_Expanded_Build_In_Place_Call
9769 (N : Node_Id) return Boolean; -- Flag11
9770
9771 function Is_Expanded_Contract
9772 (N : Node_Id) return Boolean; -- Flag1
9773
9774 function Is_Finalization_Wrapper
9775 (N : Node_Id) return Boolean; -- Flag9
9776
9777 function Is_Folded_In_Parser
9778 (N : Node_Id) return Boolean; -- Flag4
9779
9780 function Is_Generic_Contract_Pragma
9781 (N : Node_Id) return Boolean; -- Flag2
9782
9783 function Is_Homogeneous_Aggregate
9784 (N : Node_Id) return Boolean; -- Flag14
9785
9786 function Is_Ignored
9787 (N : Node_Id) return Boolean; -- Flag9
9788
9789 function Is_Ignored_Ghost_Pragma
9790 (N : Node_Id) return Boolean; -- Flag8
9791
9792 function Is_In_Discriminant_Check
9793 (N : Node_Id) return Boolean; -- Flag11
9794
9795 function Is_Inherited_Pragma
9796 (N : Node_Id) return Boolean; -- Flag4
9797
9798 function Is_Initialization_Block
9799 (N : Node_Id) return Boolean; -- Flag1
9800
9801 function Is_Known_Guaranteed_ABE
9802 (N : Node_Id) return Boolean; -- Flag18
9803
9804 function Is_Machine_Number
9805 (N : Node_Id) return Boolean; -- Flag11
9806
9807 function Is_Null_Loop
9808 (N : Node_Id) return Boolean; -- Flag16
9809
9810 function Is_Overloaded
9811 (N : Node_Id) return Boolean; -- Flag5
9812
9813 function Is_Power_Of_2_For_Shift
9814 (N : Node_Id) return Boolean; -- Flag13
9815
9816 function Is_Preelaborable_Call
9817 (N : Node_Id) return Boolean; -- Flag7
9818
9819 function Is_Prefixed_Call
9820 (N : Node_Id) return Boolean; -- Flag17
9821
9822 function Is_Protected_Subprogram_Body
9823 (N : Node_Id) return Boolean; -- Flag7
9824
9825 function Is_Qualified_Universal_Literal
9826 (N : Node_Id) return Boolean; -- Flag4
9827
9828 function Is_Read
9829 (N : Node_Id) return Boolean; -- Flag4
9830
9831 function Is_Source_Call
9832 (N : Node_Id) return Boolean; -- Flag4
9833
9834 function Is_SPARK_Mode_On_Node
9835 (N : Node_Id) return Boolean; -- Flag2
9836
9837 function Is_Static_Coextension
9838 (N : Node_Id) return Boolean; -- Flag14
9839
9840 function Is_Static_Expression
9841 (N : Node_Id) return Boolean; -- Flag6
9842
9843 function Is_Subprogram_Descriptor
9844 (N : Node_Id) return Boolean; -- Flag16
9845
9846 function Is_Task_Allocation_Block
9847 (N : Node_Id) return Boolean; -- Flag6
9848
9849 function Is_Task_Body_Procedure
9850 (N : Node_Id) return Boolean; -- Flag1
9851
9852 function Is_Task_Master
9853 (N : Node_Id) return Boolean; -- Flag5
9854
9855 function Is_Write
9856 (N : Node_Id) return Boolean; -- Flag5
9857
9858 function Iteration_Scheme
9859 (N : Node_Id) return Node_Id; -- Node2
9860
9861 function Iterator_Filter
9862 (N : Node_Id) return Node_Id; -- Node3
9863
9864 function Iterator_Specification
9865 (N : Node_Id) return Node_Id; -- Node2
9866
9867 function Itype
9868 (N : Node_Id) return Entity_Id; -- Node1
9869
9870 function Key_Expression
9871 (N : Node_Id) return Node_Id; -- Node1
9872
9873 function Kill_Range_Check
9874 (N : Node_Id) return Boolean; -- Flag11
9875
9876 function Label_Construct
9877 (N : Node_Id) return Node_Id; -- Node2
9878
9879 function Left_Opnd
9880 (N : Node_Id) return Node_Id; -- Node2
9881
9882 function Last_Bit
9883 (N : Node_Id) return Node_Id; -- Node4
9884
9885 function Last_Name
9886 (N : Node_Id) return Boolean; -- Flag6
9887
9888 function Library_Unit
9889 (N : Node_Id) return Node_Id; -- Node4
9890
9891 function Limited_View_Installed
9892 (N : Node_Id) return Boolean; -- Flag18
9893
9894 function Limited_Present
9895 (N : Node_Id) return Boolean; -- Flag17
9896
9897 function Literals
9898 (N : Node_Id) return List_Id; -- List1
9899
9900 function Local_Raise_Not_OK
9901 (N : Node_Id) return Boolean; -- Flag7
9902
9903 function Local_Raise_Statements
9904 (N : Node_Id) return Elist_Id; -- Elist1
9905
9906 function Loop_Actions
9907 (N : Node_Id) return List_Id; -- List5
9908
9909 function Loop_Parameter_Specification
9910 (N : Node_Id) return Node_Id; -- Node4
9911
9912 function Low_Bound
9913 (N : Node_Id) return Node_Id; -- Node1
9914
9915 function Mod_Clause
9916 (N : Node_Id) return Node_Id; -- Node2
9917
9918 function More_Ids
9919 (N : Node_Id) return Boolean; -- Flag5
9920
9921 function Must_Be_Byte_Aligned
9922 (N : Node_Id) return Boolean; -- Flag14
9923
9924 function Must_Not_Freeze
9925 (N : Node_Id) return Boolean; -- Flag8
9926
9927 function Must_Not_Override
9928 (N : Node_Id) return Boolean; -- Flag15
9929
9930 function Must_Override
9931 (N : Node_Id) return Boolean; -- Flag14
9932
9933 function Name
9934 (N : Node_Id) return Node_Id; -- Node2
9935
9936 function Names
9937 (N : Node_Id) return List_Id; -- List2
9938
9939 function Next_Entity
9940 (N : Node_Id) return Node_Id; -- Node2
9941
9942 function Next_Exit_Statement
9943 (N : Node_Id) return Node_Id; -- Node3
9944
9945 function Next_Implicit_With
9946 (N : Node_Id) return Node_Id; -- Node3
9947
9948 function Next_Named_Actual
9949 (N : Node_Id) return Node_Id; -- Node4
9950
9951 function Next_Pragma
9952 (N : Node_Id) return Node_Id; -- Node1
9953
9954 function Next_Rep_Item
9955 (N : Node_Id) return Node_Id; -- Node5
9956
9957 function Next_Use_Clause
9958 (N : Node_Id) return Node_Id; -- Node3
9959
9960 function No_Ctrl_Actions
9961 (N : Node_Id) return Boolean; -- Flag7
9962
9963 function No_Elaboration_Check
9964 (N : Node_Id) return Boolean; -- Flag4
9965
9966 function No_Entities_Ref_In_Spec
9967 (N : Node_Id) return Boolean; -- Flag8
9968
9969 function No_Initialization
9970 (N : Node_Id) return Boolean; -- Flag13
9971
9972 function No_Minimize_Eliminate
9973 (N : Node_Id) return Boolean; -- Flag17
9974
9975 function No_Side_Effect_Removal
9976 (N : Node_Id) return Boolean; -- Flag17
9977
9978 function No_Truncation
9979 (N : Node_Id) return Boolean; -- Flag17
9980
9981 function Null_Excluding_Subtype
9982 (N : Node_Id) return Boolean; -- Flag16
9983
9984 function Null_Exclusion_Present
9985 (N : Node_Id) return Boolean; -- Flag11
9986
9987 function Null_Exclusion_In_Return_Present
9988 (N : Node_Id) return Boolean; -- Flag14
9989
9990 function Null_Present
9991 (N : Node_Id) return Boolean; -- Flag13
9992
9993 function Null_Record_Present
9994 (N : Node_Id) return Boolean; -- Flag17
9995
9996 function Null_Statement
9997 (N : Node_Id) return Node_Id; -- Node2
9998
9999 function Object_Definition
10000 (N : Node_Id) return Node_Id; -- Node4
10001
10002 function Of_Present
10003 (N : Node_Id) return Boolean; -- Flag16
10004
10005 function Original_Discriminant
10006 (N : Node_Id) return Node_Id; -- Node2
10007
10008 function Original_Entity
10009 (N : Node_Id) return Entity_Id; -- Node2
10010
10011 function Others_Discrete_Choices
10012 (N : Node_Id) return List_Id; -- List1
10013
10014 function Out_Present
10015 (N : Node_Id) return Boolean; -- Flag17
10016
10017 function Parameter_Associations
10018 (N : Node_Id) return List_Id; -- List3
10019
10020 function Parameter_Specifications
10021 (N : Node_Id) return List_Id; -- List3
10022
10023 function Parameter_Type
10024 (N : Node_Id) return Node_Id; -- Node2
10025
10026 function Parent_Spec
10027 (N : Node_Id) return Node_Id; -- Node4
10028
10029 function Parent_With
10030 (N : Node_Id) return Boolean; -- Flag1
10031
10032 function Position
10033 (N : Node_Id) return Node_Id; -- Node2
10034
10035 function Pragma_Argument_Associations
10036 (N : Node_Id) return List_Id; -- List2
10037
10038 function Pragma_Identifier
10039 (N : Node_Id) return Node_Id; -- Node4
10040
10041 function Pragmas_After
10042 (N : Node_Id) return List_Id; -- List5
10043
10044 function Pragmas_Before
10045 (N : Node_Id) return List_Id; -- List4
10046
10047 function Pre_Post_Conditions
10048 (N : Node_Id) return Node_Id; -- Node1
10049
10050 function Prefix
10051 (N : Node_Id) return Node_Id; -- Node3
10052
10053 function Premature_Use
10054 (N : Node_Id) return Node_Id; -- Node5
10055
10056 function Present_Expr
10057 (N : Node_Id) return Uint; -- Uint3
10058
10059 function Prev_Ids
10060 (N : Node_Id) return Boolean; -- Flag6
10061
10062 function Prev_Use_Clause
10063 (N : Node_Id) return Node_Id; -- Node1
10064
10065 function Print_In_Hex
10066 (N : Node_Id) return Boolean; -- Flag13
10067
10068 function Private_Declarations
10069 (N : Node_Id) return List_Id; -- List3
10070
10071 function Private_Present
10072 (N : Node_Id) return Boolean; -- Flag15
10073
10074 function Procedure_To_Call
10075 (N : Node_Id) return Node_Id; -- Node2
10076
10077 function Proper_Body
10078 (N : Node_Id) return Node_Id; -- Node1
10079
10080 function Protected_Definition
10081 (N : Node_Id) return Node_Id; -- Node3
10082
10083 function Protected_Present
10084 (N : Node_Id) return Boolean; -- Flag6
10085
10086 function Raises_Constraint_Error
10087 (N : Node_Id) return Boolean; -- Flag7
10088
10089 function Range_Constraint
10090 (N : Node_Id) return Node_Id; -- Node4
10091
10092 function Range_Expression
10093 (N : Node_Id) return Node_Id; -- Node4
10094
10095 function Real_Range_Specification
10096 (N : Node_Id) return Node_Id; -- Node4
10097
10098 function Realval
10099 (N : Node_Id) return Ureal; -- Ureal3
10100
10101 function Reason
10102 (N : Node_Id) return Uint; -- Uint3
10103
10104 function Record_Extension_Part
10105 (N : Node_Id) return Node_Id; -- Node3
10106
10107 function Redundant_Use
10108 (N : Node_Id) return Boolean; -- Flag13
10109
10110 function Renaming_Exception
10111 (N : Node_Id) return Node_Id; -- Node2
10112
10113 function Result_Definition
10114 (N : Node_Id) return Node_Id; -- Node4
10115
10116 function Return_Object_Declarations
10117 (N : Node_Id) return List_Id; -- List3
10118
10119 function Return_Statement_Entity
10120 (N : Node_Id) return Node_Id; -- Node5
10121
10122 function Reverse_Present
10123 (N : Node_Id) return Boolean; -- Flag15
10124
10125 function Right_Opnd
10126 (N : Node_Id) return Node_Id; -- Node3
10127
10128 function Rounded_Result
10129 (N : Node_Id) return Boolean; -- Flag18
10130
10131 function Save_Invocation_Graph_Of_Body
10132 (N : Node_Id) return Boolean; -- Flag1
10133
10134 function SCIL_Controlling_Tag
10135 (N : Node_Id) return Node_Id; -- Node5
10136
10137 function SCIL_Entity
10138 (N : Node_Id) return Node_Id; -- Node4
10139
10140 function SCIL_Tag_Value
10141 (N : Node_Id) return Node_Id; -- Node5
10142
10143 function SCIL_Target_Prim
10144 (N : Node_Id) return Node_Id; -- Node2
10145
10146 function Scope
10147 (N : Node_Id) return Node_Id; -- Node3
10148
10149 function Select_Alternatives
10150 (N : Node_Id) return List_Id; -- List1
10151
10152 function Selector_Name
10153 (N : Node_Id) return Node_Id; -- Node2
10154
10155 function Selector_Names
10156 (N : Node_Id) return List_Id; -- List1
10157
10158 function Shift_Count_OK
10159 (N : Node_Id) return Boolean; -- Flag4
10160
10161 function Source_Type
10162 (N : Node_Id) return Entity_Id; -- Node1
10163
10164 function Specification
10165 (N : Node_Id) return Node_Id; -- Node1
10166
10167 function Split_PPC
10168 (N : Node_Id) return Boolean; -- Flag17
10169
10170 function Statements
10171 (N : Node_Id) return List_Id; -- List3
10172
10173 function Storage_Pool
10174 (N : Node_Id) return Node_Id; -- Node1
10175
10176 function Subpool_Handle_Name
10177 (N : Node_Id) return Node_Id; -- Node4
10178
10179 function Strval
10180 (N : Node_Id) return String_Id; -- Str3
10181
10182 function Subtype_Indication
10183 (N : Node_Id) return Node_Id; -- Node5
10184
10185 function Subtype_Mark
10186 (N : Node_Id) return Node_Id; -- Node4
10187
10188 function Subtype_Marks
10189 (N : Node_Id) return List_Id; -- List2
10190
10191 function Suppress_Assignment_Checks
10192 (N : Node_Id) return Boolean; -- Flag18
10193
10194 function Suppress_Loop_Warnings
10195 (N : Node_Id) return Boolean; -- Flag17
10196
10197 function Synchronized_Present
10198 (N : Node_Id) return Boolean; -- Flag7
10199
10200 function Tagged_Present
10201 (N : Node_Id) return Boolean; -- Flag15
10202
10203 function Target
10204 (N : Node_Id) return Entity_Id; -- Node1
10205
10206 function Target_Type
10207 (N : Node_Id) return Entity_Id; -- Node2
10208
10209 function Task_Definition
10210 (N : Node_Id) return Node_Id; -- Node3
10211
10212 function Task_Present
10213 (N : Node_Id) return Boolean; -- Flag5
10214
10215 function Then_Actions
10216 (N : Node_Id) return List_Id; -- List2
10217
10218 function Then_Statements
10219 (N : Node_Id) return List_Id; -- List2
10220
10221 function Triggering_Alternative
10222 (N : Node_Id) return Node_Id; -- Node1
10223
10224 function Triggering_Statement
10225 (N : Node_Id) return Node_Id; -- Node1
10226
10227 function TSS_Elist
10228 (N : Node_Id) return Elist_Id; -- Elist3
10229
10230 function Type_Definition
10231 (N : Node_Id) return Node_Id; -- Node3
10232
10233 function Uneval_Old_Accept
10234 (N : Node_Id) return Boolean; -- Flag7
10235
10236 function Uneval_Old_Warn
10237 (N : Node_Id) return Boolean; -- Flag18
10238
10239 function Unit
10240 (N : Node_Id) return Node_Id; -- Node2
10241
10242 function Unknown_Discriminants_Present
10243 (N : Node_Id) return Boolean; -- Flag13
10244
10245 function Unreferenced_In_Spec
10246 (N : Node_Id) return Boolean; -- Flag7
10247
10248 function Variant_Part
10249 (N : Node_Id) return Node_Id; -- Node4
10250
10251 function Variants
10252 (N : Node_Id) return List_Id; -- List1
10253
10254 function Visible_Declarations
10255 (N : Node_Id) return List_Id; -- List2
10256
10257 function Uninitialized_Variable
10258 (N : Node_Id) return Node_Id; -- Node3
10259
10260 function Used_Operations
10261 (N : Node_Id) return Elist_Id; -- Elist2
10262
10263 function Was_Attribute_Reference
10264 (N : Node_Id) return Boolean; -- Flag2
10265
10266 function Was_Default_Init_Box_Association
10267 (N : Node_Id) return Boolean; -- Flag14
10268
10269 function Was_Expression_Function
10270 (N : Node_Id) return Boolean; -- Flag18
10271
10272 function Was_Originally_Stub
10273 (N : Node_Id) return Boolean; -- Flag13
10274
10275 -- End functions (note used by xsinfo utility program to end processing)
10276
10277 ----------------------------
10278 -- Node Update Procedures --
10279 ----------------------------
10280
10281 -- These are the corresponding node update routines, which again provide
10282 -- a high level logical access with type checking. In addition to setting
10283 -- the indicated field of the node N to the given Val, in the case of
10284 -- tree pointers (List1-4), the parent pointer of the Val node is set to
10285 -- point back to node N. This automates the setting of the parent pointer.
10286
10287 -- WARNING: There is a matching C declaration of a few subprograms in fe.h
10288
10289 procedure Set_Abort_Present
10290 (N : Node_Id; Val : Boolean := True); -- Flag15
10291
10292 procedure Set_Abortable_Part
10293 (N : Node_Id; Val : Node_Id); -- Node2
10294
10295 procedure Set_Abstract_Present
10296 (N : Node_Id; Val : Boolean := True); -- Flag4
10297
10298 procedure Set_Accept_Handler_Records
10299 (N : Node_Id; Val : List_Id); -- List5
10300
10301 procedure Set_Accept_Statement
10302 (N : Node_Id; Val : Node_Id); -- Node2
10303
10304 procedure Set_Access_Definition
10305 (N : Node_Id; Val : Node_Id); -- Node3
10306
10307 procedure Set_Access_To_Subprogram_Definition
10308 (N : Node_Id; Val : Node_Id); -- Node3
10309
10310 procedure Set_Access_Types_To_Process
10311 (N : Node_Id; Val : Elist_Id); -- Elist2
10312
10313 procedure Set_Actions
10314 (N : Node_Id; Val : List_Id); -- List1
10315
10316 procedure Set_Activation_Chain_Entity
10317 (N : Node_Id; Val : Node_Id); -- Node3
10318
10319 procedure Set_Acts_As_Spec
10320 (N : Node_Id; Val : Boolean := True); -- Flag4
10321
10322 procedure Set_Actual_Designated_Subtype
10323 (N : Node_Id; Val : Node_Id); -- Node4
10324
10325 procedure Set_Address_Warning_Posted
10326 (N : Node_Id; Val : Boolean := True); -- Flag18
10327
10328 procedure Set_Aggregate_Bounds
10329 (N : Node_Id; Val : Node_Id); -- Node3
10330
10331 procedure Set_Aliased_Present
10332 (N : Node_Id; Val : Boolean := True); -- Flag4
10333
10334 procedure Set_Alloc_For_BIP_Return
10335 (N : Node_Id; Val : Boolean := True); -- Flag1
10336
10337 procedure Set_All_Others
10338 (N : Node_Id; Val : Boolean := True); -- Flag11
10339
10340 procedure Set_All_Present
10341 (N : Node_Id; Val : Boolean := True); -- Flag15
10342
10343 procedure Set_Alternatives
10344 (N : Node_Id; Val : List_Id); -- List4
10345
10346 procedure Set_Ancestor_Part
10347 (N : Node_Id; Val : Node_Id); -- Node3
10348
10349 procedure Set_Atomic_Sync_Required
10350 (N : Node_Id; Val : Boolean := True); -- Flag14
10351
10352 procedure Set_Array_Aggregate
10353 (N : Node_Id; Val : Node_Id); -- Node3
10354
10355 procedure Set_Aspect_On_Partial_View
10356 (N : Node_Id; Val : Boolean := True); -- Flag18
10357
10358 procedure Set_Aspect_Rep_Item
10359 (N : Node_Id; Val : Node_Id); -- Node2
10360
10361 procedure Set_Assignment_OK
10362 (N : Node_Id; Val : Boolean := True); -- Flag15
10363
10364 procedure Set_Associated_Node
10365 (N : Node_Id; Val : Node_Id); -- Node4
10366
10367 procedure Set_Attribute_Name
10368 (N : Node_Id; Val : Name_Id); -- Name2
10369
10370 procedure Set_At_End_Proc
10371 (N : Node_Id; Val : Node_Id); -- Node1
10372
10373 procedure Set_Aux_Decls_Node
10374 (N : Node_Id; Val : Node_Id); -- Node5
10375
10376 procedure Set_Backwards_OK
10377 (N : Node_Id; Val : Boolean := True); -- Flag6
10378
10379 procedure Set_Bad_Is_Detected
10380 (N : Node_Id; Val : Boolean := True); -- Flag15
10381
10382 procedure Set_Body_Required
10383 (N : Node_Id; Val : Boolean := True); -- Flag13
10384
10385 procedure Set_Body_To_Inline
10386 (N : Node_Id; Val : Node_Id); -- Node3
10387
10388 procedure Set_Box_Present
10389 (N : Node_Id; Val : Boolean := True); -- Flag15
10390
10391 procedure Set_By_Ref
10392 (N : Node_Id; Val : Boolean := True); -- Flag5
10393
10394 procedure Set_Char_Literal_Value
10395 (N : Node_Id; Val : Uint); -- Uint2
10396
10397 procedure Set_Chars
10398 (N : Node_Id; Val : Name_Id); -- Name1
10399
10400 procedure Set_Check_Address_Alignment
10401 (N : Node_Id; Val : Boolean := True); -- Flag11
10402
10403 procedure Set_Choice_Parameter
10404 (N : Node_Id; Val : Node_Id); -- Node2
10405
10406 procedure Set_Choices
10407 (N : Node_Id; Val : List_Id); -- List1
10408
10409 procedure Set_Class_Present
10410 (N : Node_Id; Val : Boolean := True); -- Flag6
10411
10412 procedure Set_Classifications
10413 (N : Node_Id; Val : Node_Id); -- Node3
10414
10415 procedure Set_Cleanup_Actions
10416 (N : Node_Id; Val : List_Id); -- List5
10417
10418 procedure Set_Comes_From_Extended_Return_Statement
10419 (N : Node_Id; Val : Boolean := True); -- Flag18
10420
10421 procedure Set_Compile_Time_Known_Aggregate
10422 (N : Node_Id; Val : Boolean := True); -- Flag18
10423
10424 procedure Set_Component_Associations
10425 (N : Node_Id; Val : List_Id); -- List2
10426
10427 procedure Set_Component_Clauses
10428 (N : Node_Id; Val : List_Id); -- List3
10429
10430 procedure Set_Component_Definition
10431 (N : Node_Id; Val : Node_Id); -- Node4
10432
10433 procedure Set_Component_Items
10434 (N : Node_Id; Val : List_Id); -- List3
10435
10436 procedure Set_Component_List
10437 (N : Node_Id; Val : Node_Id); -- Node1
10438
10439 procedure Set_Component_Name
10440 (N : Node_Id; Val : Node_Id); -- Node1
10441
10442 procedure Set_Componentwise_Assignment
10443 (N : Node_Id; Val : Boolean := True); -- Flag14
10444
10445 procedure Set_Condition
10446 (N : Node_Id; Val : Node_Id); -- Node1
10447
10448 procedure Set_Condition_Actions
10449 (N : Node_Id; Val : List_Id); -- List3
10450
10451 procedure Set_Config_Pragmas
10452 (N : Node_Id; Val : List_Id); -- List4
10453
10454 procedure Set_Constant_Present
10455 (N : Node_Id; Val : Boolean := True); -- Flag17
10456
10457 procedure Set_Constraint
10458 (N : Node_Id; Val : Node_Id); -- Node3
10459
10460 procedure Set_Constraints
10461 (N : Node_Id; Val : List_Id); -- List1
10462
10463 procedure Set_Context_Installed
10464 (N : Node_Id; Val : Boolean := True); -- Flag13
10465
10466 procedure Set_Context_Items
10467 (N : Node_Id; Val : List_Id); -- List1
10468
10469 procedure Set_Context_Pending
10470 (N : Node_Id; Val : Boolean := True); -- Flag16
10471
10472 procedure Set_Contract_Test_Cases
10473 (N : Node_Id; Val : Node_Id); -- Node2
10474
10475 procedure Set_Controlling_Argument
10476 (N : Node_Id; Val : Node_Id); -- Node1
10477
10478 procedure Set_Conversion_OK
10479 (N : Node_Id; Val : Boolean := True); -- Flag14
10480
10481 procedure Set_Convert_To_Return_False
10482 (N : Node_Id; Val : Boolean := True); -- Flag13
10483
10484 procedure Set_Corresponding_Aspect
10485 (N : Node_Id; Val : Node_Id); -- Node3
10486
10487 procedure Set_Corresponding_Body
10488 (N : Node_Id; Val : Node_Id); -- Node5
10489
10490 procedure Set_Corresponding_Formal_Spec
10491 (N : Node_Id; Val : Node_Id); -- Node3
10492
10493 procedure Set_Corresponding_Generic_Association
10494 (N : Node_Id; Val : Node_Id); -- Node5
10495
10496 procedure Set_Corresponding_Integer_Value
10497 (N : Node_Id; Val : Uint); -- Uint4
10498
10499 procedure Set_Corresponding_Spec
10500 (N : Node_Id; Val : Entity_Id); -- Node5
10501
10502 procedure Set_Corresponding_Spec_Of_Stub
10503 (N : Node_Id; Val : Node_Id); -- Node2
10504
10505 procedure Set_Corresponding_Stub
10506 (N : Node_Id; Val : Node_Id); -- Node3
10507
10508 procedure Set_Dcheck_Function
10509 (N : Node_Id; Val : Entity_Id); -- Node5
10510
10511 procedure Set_Declarations
10512 (N : Node_Id; Val : List_Id); -- List2
10513
10514 procedure Set_Default_Expression
10515 (N : Node_Id; Val : Node_Id); -- Node5
10516
10517 procedure Set_Default_Storage_Pool
10518 (N : Node_Id; Val : Node_Id); -- Node3
10519
10520 procedure Set_Default_Name
10521 (N : Node_Id; Val : Node_Id); -- Node2
10522
10523 procedure Set_Defining_Identifier
10524 (N : Node_Id; Val : Entity_Id); -- Node1
10525
10526 procedure Set_Defining_Unit_Name
10527 (N : Node_Id; Val : Node_Id); -- Node1
10528
10529 procedure Set_Delay_Alternative
10530 (N : Node_Id; Val : Node_Id); -- Node4
10531
10532 procedure Set_Delay_Statement
10533 (N : Node_Id; Val : Node_Id); -- Node2
10534
10535 procedure Set_Delta_Expression
10536 (N : Node_Id; Val : Node_Id); -- Node3
10537
10538 procedure Set_Digits_Expression
10539 (N : Node_Id; Val : Node_Id); -- Node2
10540
10541 procedure Set_Discr_Check_Funcs_Built
10542 (N : Node_Id; Val : Boolean := True); -- Flag11
10543
10544 procedure Set_Discrete_Choices
10545 (N : Node_Id; Val : List_Id); -- List4
10546
10547 procedure Set_Discrete_Range
10548 (N : Node_Id; Val : Node_Id); -- Node4
10549
10550 procedure Set_Discrete_Subtype_Definition
10551 (N : Node_Id; Val : Node_Id); -- Node4
10552
10553 procedure Set_Discrete_Subtype_Definitions
10554 (N : Node_Id; Val : List_Id); -- List2
10555
10556 procedure Set_Discriminant_Specifications
10557 (N : Node_Id; Val : List_Id); -- List4
10558
10559 procedure Set_Discriminant_Type
10560 (N : Node_Id; Val : Node_Id); -- Node5
10561
10562 procedure Set_Do_Accessibility_Check
10563 (N : Node_Id; Val : Boolean := True); -- Flag13
10564
10565 procedure Set_Do_Discriminant_Check
10566 (N : Node_Id; Val : Boolean := True); -- Flag3
10567
10568 procedure Set_Do_Division_Check
10569 (N : Node_Id; Val : Boolean := True); -- Flag13
10570
10571 procedure Set_Do_Length_Check
10572 (N : Node_Id; Val : Boolean := True); -- Flag4
10573
10574 procedure Set_Do_Overflow_Check
10575 (N : Node_Id; Val : Boolean := True); -- Flag17
10576
10577 procedure Set_Do_Range_Check
10578 (N : Node_Id; Val : Boolean := True); -- Flag9
10579
10580 procedure Set_Do_Storage_Check
10581 (N : Node_Id; Val : Boolean := True); -- Flag17
10582
10583 procedure Set_Do_Tag_Check
10584 (N : Node_Id; Val : Boolean := True); -- Flag13
10585
10586 procedure Set_Elaborate_All_Desirable
10587 (N : Node_Id; Val : Boolean := True); -- Flag9
10588
10589 procedure Set_Elaborate_All_Present
10590 (N : Node_Id; Val : Boolean := True); -- Flag14
10591
10592 procedure Set_Elaborate_Desirable
10593 (N : Node_Id; Val : Boolean := True); -- Flag11
10594
10595 procedure Set_Elaborate_Present
10596 (N : Node_Id; Val : Boolean := True); -- Flag4
10597
10598 procedure Set_Else_Actions
10599 (N : Node_Id; Val : List_Id); -- List3
10600
10601 procedure Set_Else_Statements
10602 (N : Node_Id; Val : List_Id); -- List4
10603
10604 procedure Set_Elsif_Parts
10605 (N : Node_Id; Val : List_Id); -- List3
10606
10607 procedure Set_Enclosing_Variant
10608 (N : Node_Id; Val : Node_Id); -- Node2
10609
10610 procedure Set_End_Label
10611 (N : Node_Id; Val : Node_Id); -- Node4
10612
10613 procedure Set_End_Span
10614 (N : Node_Id; Val : Uint); -- Uint5
10615
10616 procedure Set_Entity
10617 (N : Node_Id; Val : Node_Id); -- Node4
10618
10619 procedure Set_Entry_Body_Formal_Part
10620 (N : Node_Id; Val : Node_Id); -- Node5
10621
10622 procedure Set_Entry_Call_Alternative
10623 (N : Node_Id; Val : Node_Id); -- Node1
10624
10625 procedure Set_Entry_Call_Statement
10626 (N : Node_Id; Val : Node_Id); -- Node1
10627
10628 procedure Set_Entry_Direct_Name
10629 (N : Node_Id; Val : Node_Id); -- Node1
10630
10631 procedure Set_Entry_Index
10632 (N : Node_Id; Val : Node_Id); -- Node5
10633
10634 procedure Set_Entry_Index_Specification
10635 (N : Node_Id; Val : Node_Id); -- Node4
10636
10637 procedure Set_Etype
10638 (N : Node_Id; Val : Node_Id); -- Node5
10639
10640 procedure Set_Exception_Choices
10641 (N : Node_Id; Val : List_Id); -- List4
10642
10643 procedure Set_Exception_Handlers
10644 (N : Node_Id; Val : List_Id); -- List5
10645
10646 procedure Set_Exception_Junk
10647 (N : Node_Id; Val : Boolean := True); -- Flag8
10648
10649 procedure Set_Exception_Label
10650 (N : Node_Id; Val : Node_Id); -- Node5
10651
10652 procedure Set_Expansion_Delayed
10653 (N : Node_Id; Val : Boolean := True); -- Flag11
10654
10655 procedure Set_Explicit_Actual_Parameter
10656 (N : Node_Id; Val : Node_Id); -- Node3
10657
10658 procedure Set_Explicit_Generic_Actual_Parameter
10659 (N : Node_Id; Val : Node_Id); -- Node1
10660
10661 procedure Set_Expression
10662 (N : Node_Id; Val : Node_Id); -- Node3
10663
10664 procedure Set_Expression_Copy
10665 (N : Node_Id; Val : Node_Id); -- Node2
10666
10667 procedure Set_Expressions
10668 (N : Node_Id; Val : List_Id); -- List1
10669
10670 procedure Set_First_Bit
10671 (N : Node_Id; Val : Node_Id); -- Node3
10672
10673 procedure Set_First_Inlined_Subprogram
10674 (N : Node_Id; Val : Entity_Id); -- Node3
10675
10676 procedure Set_First_Name
10677 (N : Node_Id; Val : Boolean := True); -- Flag5
10678
10679 procedure Set_First_Named_Actual
10680 (N : Node_Id; Val : Node_Id); -- Node4
10681
10682 procedure Set_First_Real_Statement
10683 (N : Node_Id; Val : Node_Id); -- Node2
10684
10685 procedure Set_First_Subtype_Link
10686 (N : Node_Id; Val : Entity_Id); -- Node5
10687
10688 procedure Set_Float_Truncate
10689 (N : Node_Id; Val : Boolean := True); -- Flag11
10690
10691 procedure Set_Formal_Type_Definition
10692 (N : Node_Id; Val : Node_Id); -- Node3
10693
10694 procedure Set_Forwards_OK
10695 (N : Node_Id; Val : Boolean := True); -- Flag5
10696
10697 procedure Set_From_Aspect_Specification
10698 (N : Node_Id; Val : Boolean := True); -- Flag13
10699
10700 procedure Set_From_At_End
10701 (N : Node_Id; Val : Boolean := True); -- Flag4
10702
10703 procedure Set_From_At_Mod
10704 (N : Node_Id; Val : Boolean := True); -- Flag4
10705
10706 procedure Set_From_Conditional_Expression
10707 (N : Node_Id; Val : Boolean := True); -- Flag1
10708
10709 procedure Set_From_Default
10710 (N : Node_Id; Val : Boolean := True); -- Flag6
10711
10712 procedure Set_Generalized_Indexing
10713 (N : Node_Id; Val : Node_Id); -- Node4
10714
10715 procedure Set_Generic_Associations
10716 (N : Node_Id; Val : List_Id); -- List3
10717
10718 procedure Set_Generic_Formal_Declarations
10719 (N : Node_Id; Val : List_Id); -- List2
10720
10721 procedure Set_Generic_Parent
10722 (N : Node_Id; Val : Node_Id); -- Node5
10723
10724 procedure Set_Generic_Parent_Type
10725 (N : Node_Id; Val : Node_Id); -- Node4
10726
10727 procedure Set_Handled_Statement_Sequence
10728 (N : Node_Id; Val : Node_Id); -- Node4
10729
10730 procedure Set_Handler_List_Entry
10731 (N : Node_Id; Val : Node_Id); -- Node2
10732
10733 procedure Set_Has_Created_Identifier
10734 (N : Node_Id; Val : Boolean := True); -- Flag15
10735
10736 procedure Set_Has_Dereference_Action
10737 (N : Node_Id; Val : Boolean := True); -- Flag13
10738
10739 procedure Set_Has_Dynamic_Length_Check
10740 (N : Node_Id; Val : Boolean := True); -- Flag10
10741
10742 procedure Set_Has_Init_Expression
10743 (N : Node_Id; Val : Boolean := True); -- Flag14
10744
10745 procedure Set_Has_Local_Raise
10746 (N : Node_Id; Val : Boolean := True); -- Flag8
10747
10748 procedure Set_Has_No_Elaboration_Code
10749 (N : Node_Id; Val : Boolean := True); -- Flag17
10750
10751 procedure Set_Has_Pragma_Suppress_All
10752 (N : Node_Id; Val : Boolean := True); -- Flag14
10753
10754 procedure Set_Has_Private_View
10755 (N : Node_Id; Val : Boolean := True); -- Flag11
10756
10757 procedure Set_Has_Relative_Deadline_Pragma
10758 (N : Node_Id; Val : Boolean := True); -- Flag9
10759
10760 procedure Set_Has_Self_Reference
10761 (N : Node_Id; Val : Boolean := True); -- Flag13
10762
10763 procedure Set_Has_SP_Choice
10764 (N : Node_Id; Val : Boolean := True); -- Flag15
10765
10766 procedure Set_Has_Storage_Size_Pragma
10767 (N : Node_Id; Val : Boolean := True); -- Flag5
10768
10769 procedure Set_Has_Target_Names
10770 (N : Node_Id; Val : Boolean := True); -- Flag8
10771
10772 procedure Set_Has_Wide_Character
10773 (N : Node_Id; Val : Boolean := True); -- Flag11
10774
10775 procedure Set_Has_Wide_Wide_Character
10776 (N : Node_Id; Val : Boolean := True); -- Flag13
10777
10778 procedure Set_Header_Size_Added
10779 (N : Node_Id; Val : Boolean := True); -- Flag11
10780
10781 procedure Set_Hidden_By_Use_Clause
10782 (N : Node_Id; Val : Elist_Id); -- Elist5
10783
10784 procedure Set_High_Bound
10785 (N : Node_Id; Val : Node_Id); -- Node2
10786
10787 procedure Set_Identifier
10788 (N : Node_Id; Val : Node_Id); -- Node1
10789
10790 procedure Set_Interface_List
10791 (N : Node_Id; Val : List_Id); -- List2
10792
10793 procedure Set_Interface_Present
10794 (N : Node_Id; Val : Boolean := True); -- Flag16
10795
10796 procedure Set_Implicit_With
10797 (N : Node_Id; Val : Boolean := True); -- Flag16
10798
10799 procedure Set_Import_Interface_Present
10800 (N : Node_Id; Val : Boolean := True); -- Flag16
10801
10802 procedure Set_In_Present
10803 (N : Node_Id; Val : Boolean := True); -- Flag15
10804
10805 procedure Set_Includes_Infinities
10806 (N : Node_Id; Val : Boolean := True); -- Flag11
10807
10808 procedure Set_Incomplete_View
10809 (N : Node_Id; Val : Node_Id); -- Node2
10810
10811 procedure Set_Inherited_Discriminant
10812 (N : Node_Id; Val : Boolean := True); -- Flag13
10813
10814 procedure Set_Instance_Spec
10815 (N : Node_Id; Val : Node_Id); -- Node5
10816
10817 procedure Set_Intval
10818 (N : Node_Id; Val : Uint); -- Uint3
10819
10820 procedure Set_Is_Abort_Block
10821 (N : Node_Id; Val : Boolean := True); -- Flag4
10822
10823 procedure Set_Is_Accessibility_Actual
10824 (N : Node_Id; Val : Boolean := True); -- Flag13
10825
10826 procedure Set_Is_Analyzed_Pragma
10827 (N : Node_Id; Val : Boolean := True); -- Flag5
10828
10829 procedure Set_Is_Asynchronous_Call_Block
10830 (N : Node_Id; Val : Boolean := True); -- Flag7
10831
10832 procedure Set_Is_Boolean_Aspect
10833 (N : Node_Id; Val : Boolean := True); -- Flag16
10834
10835 procedure Set_Is_Checked
10836 (N : Node_Id; Val : Boolean := True); -- Flag11
10837
10838 procedure Set_Is_Checked_Ghost_Pragma
10839 (N : Node_Id; Val : Boolean := True); -- Flag3
10840
10841 procedure Set_Is_Component_Left_Opnd
10842 (N : Node_Id; Val : Boolean := True); -- Flag13
10843
10844 procedure Set_Is_Component_Right_Opnd
10845 (N : Node_Id; Val : Boolean := True); -- Flag14
10846
10847 procedure Set_Is_Controlling_Actual
10848 (N : Node_Id; Val : Boolean := True); -- Flag16
10849
10850 procedure Set_Is_Declaration_Level_Node
10851 (N : Node_Id; Val : Boolean := True); -- Flag5
10852
10853 procedure Set_Is_Delayed_Aspect
10854 (N : Node_Id; Val : Boolean := True); -- Flag14
10855
10856 procedure Set_Is_Disabled
10857 (N : Node_Id; Val : Boolean := True); -- Flag15
10858
10859 procedure Set_Is_Dispatching_Call
10860 (N : Node_Id; Val : Boolean := True); -- Flag6
10861
10862 procedure Set_Is_Dynamic_Coextension
10863 (N : Node_Id; Val : Boolean := True); -- Flag18
10864
10865 procedure Set_Is_Effective_Use_Clause
10866 (N : Node_Id; Val : Boolean := True); -- Flag1
10867
10868 procedure Set_Is_Elaboration_Checks_OK_Node
10869 (N : Node_Id; Val : Boolean := True); -- Flag1
10870
10871 procedure Set_Is_Elaboration_Code
10872 (N : Node_Id; Val : Boolean := True); -- Flag9
10873
10874 procedure Set_Is_Elaboration_Warnings_OK_Node
10875 (N : Node_Id; Val : Boolean := True); -- Flag3
10876
10877 procedure Set_Is_Elsif
10878 (N : Node_Id; Val : Boolean := True); -- Flag13
10879
10880 procedure Set_Is_Entry_Barrier_Function
10881 (N : Node_Id; Val : Boolean := True); -- Flag8
10882
10883 procedure Set_Is_Expanded_Build_In_Place_Call
10884 (N : Node_Id; Val : Boolean := True); -- Flag11
10885
10886 procedure Set_Is_Expanded_Contract
10887 (N : Node_Id; Val : Boolean := True); -- Flag1
10888
10889 procedure Set_Is_Finalization_Wrapper
10890 (N : Node_Id; Val : Boolean := True); -- Flag9
10891
10892 procedure Set_Is_Folded_In_Parser
10893 (N : Node_Id; Val : Boolean := True); -- Flag4
10894
10895 procedure Set_Is_Generic_Contract_Pragma
10896 (N : Node_Id; Val : Boolean := True); -- Flag2
10897
10898 procedure Set_Is_Homogeneous_Aggregate
10899 (N : Node_Id; Val : Boolean := True); -- Flag14
10900
10901 procedure Set_Is_Ignored
10902 (N : Node_Id; Val : Boolean := True); -- Flag9
10903
10904 procedure Set_Is_Ignored_Ghost_Pragma
10905 (N : Node_Id; Val : Boolean := True); -- Flag8
10906
10907 procedure Set_Is_In_Discriminant_Check
10908 (N : Node_Id; Val : Boolean := True); -- Flag11
10909
10910 procedure Set_Is_Inherited_Pragma
10911 (N : Node_Id; Val : Boolean := True); -- Flag4
10912
10913 procedure Set_Is_Initialization_Block
10914 (N : Node_Id; Val : Boolean := True); -- Flag1
10915
10916 procedure Set_Is_Known_Guaranteed_ABE
10917 (N : Node_Id; Val : Boolean := True); -- Flag18
10918
10919 procedure Set_Is_Machine_Number
10920 (N : Node_Id; Val : Boolean := True); -- Flag11
10921
10922 procedure Set_Is_Null_Loop
10923 (N : Node_Id; Val : Boolean := True); -- Flag16
10924
10925 procedure Set_Is_Overloaded
10926 (N : Node_Id; Val : Boolean := True); -- Flag5
10927
10928 procedure Set_Is_Power_Of_2_For_Shift
10929 (N : Node_Id; Val : Boolean := True); -- Flag13
10930
10931 procedure Set_Is_Preelaborable_Call
10932 (N : Node_Id; Val : Boolean := True); -- Flag7
10933
10934 procedure Set_Is_Prefixed_Call
10935 (N : Node_Id; Val : Boolean := True); -- Flag17
10936
10937 procedure Set_Is_Protected_Subprogram_Body
10938 (N : Node_Id; Val : Boolean := True); -- Flag7
10939
10940 procedure Set_Is_Qualified_Universal_Literal
10941 (N : Node_Id; Val : Boolean := True); -- Flag4
10942
10943 procedure Set_Is_Read
10944 (N : Node_Id; Val : Boolean := True); -- Flag4
10945
10946 procedure Set_Is_Source_Call
10947 (N : Node_Id; Val : Boolean := True); -- Flag4
10948
10949 procedure Set_Is_SPARK_Mode_On_Node
10950 (N : Node_Id; Val : Boolean := True); -- Flag2
10951
10952 procedure Set_Is_Static_Coextension
10953 (N : Node_Id; Val : Boolean := True); -- Flag14
10954
10955 procedure Set_Is_Static_Expression
10956 (N : Node_Id; Val : Boolean := True); -- Flag6
10957
10958 procedure Set_Is_Subprogram_Descriptor
10959 (N : Node_Id; Val : Boolean := True); -- Flag16
10960
10961 procedure Set_Is_Task_Allocation_Block
10962 (N : Node_Id; Val : Boolean := True); -- Flag6
10963
10964 procedure Set_Is_Task_Body_Procedure
10965 (N : Node_Id; Val : Boolean := True); -- Flag1
10966
10967 procedure Set_Is_Task_Master
10968 (N : Node_Id; Val : Boolean := True); -- Flag5
10969
10970 procedure Set_Is_Write
10971 (N : Node_Id; Val : Boolean := True); -- Flag5
10972
10973 procedure Set_Iterator_Filter
10974 (N : Node_Id; Val : Node_Id); -- Node3
10975
10976 procedure Set_Iteration_Scheme
10977 (N : Node_Id; Val : Node_Id); -- Node2
10978
10979 procedure Set_Iterator_Specification
10980 (N : Node_Id; Val : Node_Id); -- Node2
10981
10982 procedure Set_Itype
10983 (N : Node_Id; Val : Entity_Id); -- Node1
10984
10985 procedure Set_Key_Expression
10986 (N : Node_Id; Val : Node_Id); -- Node1
10987
10988 procedure Set_Kill_Range_Check
10989 (N : Node_Id; Val : Boolean := True); -- Flag11
10990
10991 procedure Set_Last_Bit
10992 (N : Node_Id; Val : Node_Id); -- Node4
10993
10994 procedure Set_Last_Name
10995 (N : Node_Id; Val : Boolean := True); -- Flag6
10996
10997 procedure Set_Library_Unit
10998 (N : Node_Id; Val : Node_Id); -- Node4
10999
11000 procedure Set_Label_Construct
11001 (N : Node_Id; Val : Node_Id); -- Node2
11002
11003 procedure Set_Left_Opnd
11004 (N : Node_Id; Val : Node_Id); -- Node2
11005
11006 procedure Set_Limited_View_Installed
11007 (N : Node_Id; Val : Boolean := True); -- Flag18
11008
11009 procedure Set_Limited_Present
11010 (N : Node_Id; Val : Boolean := True); -- Flag17
11011
11012 procedure Set_Literals
11013 (N : Node_Id; Val : List_Id); -- List1
11014
11015 procedure Set_Local_Raise_Not_OK
11016 (N : Node_Id; Val : Boolean := True); -- Flag7
11017
11018 procedure Set_Local_Raise_Statements
11019 (N : Node_Id; Val : Elist_Id); -- Elist1
11020
11021 procedure Set_Loop_Actions
11022 (N : Node_Id; Val : List_Id); -- List5
11023
11024 procedure Set_Loop_Parameter_Specification
11025 (N : Node_Id; Val : Node_Id); -- Node4
11026
11027 procedure Set_Low_Bound
11028 (N : Node_Id; Val : Node_Id); -- Node1
11029
11030 procedure Set_Mod_Clause
11031 (N : Node_Id; Val : Node_Id); -- Node2
11032
11033 procedure Set_More_Ids
11034 (N : Node_Id; Val : Boolean := True); -- Flag5
11035
11036 procedure Set_Must_Be_Byte_Aligned
11037 (N : Node_Id; Val : Boolean := True); -- Flag14
11038
11039 procedure Set_Must_Not_Freeze
11040 (N : Node_Id; Val : Boolean := True); -- Flag8
11041
11042 procedure Set_Must_Not_Override
11043 (N : Node_Id; Val : Boolean := True); -- Flag15
11044
11045 procedure Set_Must_Override
11046 (N : Node_Id; Val : Boolean := True); -- Flag14
11047
11048 procedure Set_Name
11049 (N : Node_Id; Val : Node_Id); -- Node2
11050
11051 procedure Set_Names
11052 (N : Node_Id; Val : List_Id); -- List2
11053
11054 procedure Set_Next_Entity
11055 (N : Node_Id; Val : Node_Id); -- Node2
11056
11057 procedure Set_Next_Exit_Statement
11058 (N : Node_Id; Val : Node_Id); -- Node3
11059
11060 procedure Set_Next_Implicit_With
11061 (N : Node_Id; Val : Node_Id); -- Node3
11062
11063 procedure Set_Next_Named_Actual
11064 (N : Node_Id; Val : Node_Id); -- Node4
11065
11066 procedure Set_Next_Pragma
11067 (N : Node_Id; Val : Node_Id); -- Node1
11068
11069 procedure Set_Next_Rep_Item
11070 (N : Node_Id; Val : Node_Id); -- Node5
11071
11072 procedure Set_Next_Use_Clause
11073 (N : Node_Id; Val : Node_Id); -- Node3
11074
11075 procedure Set_No_Ctrl_Actions
11076 (N : Node_Id; Val : Boolean := True); -- Flag7
11077
11078 procedure Set_No_Elaboration_Check
11079 (N : Node_Id; Val : Boolean := True); -- Flag4
11080
11081 procedure Set_No_Entities_Ref_In_Spec
11082 (N : Node_Id; Val : Boolean := True); -- Flag8
11083
11084 procedure Set_No_Initialization
11085 (N : Node_Id; Val : Boolean := True); -- Flag13
11086
11087 procedure Set_No_Minimize_Eliminate
11088 (N : Node_Id; Val : Boolean := True); -- Flag17
11089
11090 procedure Set_No_Side_Effect_Removal
11091 (N : Node_Id; Val : Boolean := True); -- Flag17
11092
11093 procedure Set_No_Truncation
11094 (N : Node_Id; Val : Boolean := True); -- Flag17
11095
11096 procedure Set_Null_Excluding_Subtype
11097 (N : Node_Id; Val : Boolean := True); -- Flag16
11098
11099 procedure Set_Null_Exclusion_Present
11100 (N : Node_Id; Val : Boolean := True); -- Flag11
11101
11102 procedure Set_Null_Exclusion_In_Return_Present
11103 (N : Node_Id; Val : Boolean := True); -- Flag14
11104
11105 procedure Set_Null_Present
11106 (N : Node_Id; Val : Boolean := True); -- Flag13
11107
11108 procedure Set_Null_Record_Present
11109 (N : Node_Id; Val : Boolean := True); -- Flag17
11110
11111 procedure Set_Null_Statement
11112 (N : Node_Id; Val : Node_Id); -- Node2
11113
11114 procedure Set_Object_Definition
11115 (N : Node_Id; Val : Node_Id); -- Node4
11116
11117 procedure Set_Of_Present
11118 (N : Node_Id; Val : Boolean := True); -- Flag16
11119
11120 procedure Set_Original_Discriminant
11121 (N : Node_Id; Val : Node_Id); -- Node2
11122
11123 procedure Set_Original_Entity
11124 (N : Node_Id; Val : Entity_Id); -- Node2
11125
11126 procedure Set_Others_Discrete_Choices
11127 (N : Node_Id; Val : List_Id); -- List1
11128
11129 procedure Set_Out_Present
11130 (N : Node_Id; Val : Boolean := True); -- Flag17
11131
11132 procedure Set_Parameter_Associations
11133 (N : Node_Id; Val : List_Id); -- List3
11134
11135 procedure Set_Parameter_Specifications
11136 (N : Node_Id; Val : List_Id); -- List3
11137
11138 procedure Set_Parameter_Type
11139 (N : Node_Id; Val : Node_Id); -- Node2
11140
11141 procedure Set_Parent_Spec
11142 (N : Node_Id; Val : Node_Id); -- Node4
11143
11144 procedure Set_Parent_With
11145 (N : Node_Id; Val : Boolean := True); -- Flag1
11146
11147 procedure Set_Position
11148 (N : Node_Id; Val : Node_Id); -- Node2
11149
11150 procedure Set_Pragma_Argument_Associations
11151 (N : Node_Id; Val : List_Id); -- List2
11152
11153 procedure Set_Pragma_Identifier
11154 (N : Node_Id; Val : Node_Id); -- Node4
11155
11156 procedure Set_Pragmas_After
11157 (N : Node_Id; Val : List_Id); -- List5
11158
11159 procedure Set_Pragmas_Before
11160 (N : Node_Id; Val : List_Id); -- List4
11161
11162 procedure Set_Pre_Post_Conditions
11163 (N : Node_Id; Val : Node_Id); -- Node1
11164
11165 procedure Set_Prefix
11166 (N : Node_Id; Val : Node_Id); -- Node3
11167
11168 procedure Set_Premature_Use
11169 (N : Node_Id; Val : Node_Id); -- Node5
11170
11171 procedure Set_Present_Expr
11172 (N : Node_Id; Val : Uint); -- Uint3
11173
11174 procedure Set_Prev_Ids
11175 (N : Node_Id; Val : Boolean := True); -- Flag6
11176
11177 procedure Set_Prev_Use_Clause
11178 (N : Node_Id; Val : Node_Id); -- Node1
11179
11180 procedure Set_Print_In_Hex
11181 (N : Node_Id; Val : Boolean := True); -- Flag13
11182
11183 procedure Set_Private_Declarations
11184 (N : Node_Id; Val : List_Id); -- List3
11185
11186 procedure Set_Private_Present
11187 (N : Node_Id; Val : Boolean := True); -- Flag15
11188
11189 procedure Set_Procedure_To_Call
11190 (N : Node_Id; Val : Node_Id); -- Node2
11191
11192 procedure Set_Proper_Body
11193 (N : Node_Id; Val : Node_Id); -- Node1
11194
11195 procedure Set_Protected_Definition
11196 (N : Node_Id; Val : Node_Id); -- Node3
11197
11198 procedure Set_Protected_Present
11199 (N : Node_Id; Val : Boolean := True); -- Flag6
11200
11201 procedure Set_Raises_Constraint_Error
11202 (N : Node_Id; Val : Boolean := True); -- Flag7
11203
11204 procedure Set_Range_Constraint
11205 (N : Node_Id; Val : Node_Id); -- Node4
11206
11207 procedure Set_Range_Expression
11208 (N : Node_Id; Val : Node_Id); -- Node4
11209
11210 procedure Set_Real_Range_Specification
11211 (N : Node_Id; Val : Node_Id); -- Node4
11212
11213 procedure Set_Realval
11214 (N : Node_Id; Val : Ureal); -- Ureal3
11215
11216 procedure Set_Reason
11217 (N : Node_Id; Val : Uint); -- Uint3
11218
11219 procedure Set_Record_Extension_Part
11220 (N : Node_Id; Val : Node_Id); -- Node3
11221
11222 procedure Set_Redundant_Use
11223 (N : Node_Id; Val : Boolean := True); -- Flag13
11224
11225 procedure Set_Renaming_Exception
11226 (N : Node_Id; Val : Node_Id); -- Node2
11227
11228 procedure Set_Result_Definition
11229 (N : Node_Id; Val : Node_Id); -- Node4
11230
11231 procedure Set_Return_Object_Declarations
11232 (N : Node_Id; Val : List_Id); -- List3
11233
11234 procedure Set_Return_Statement_Entity
11235 (N : Node_Id; Val : Node_Id); -- Node5
11236
11237 procedure Set_Reverse_Present
11238 (N : Node_Id; Val : Boolean := True); -- Flag15
11239
11240 procedure Set_Right_Opnd
11241 (N : Node_Id; Val : Node_Id); -- Node3
11242
11243 procedure Set_Rounded_Result
11244 (N : Node_Id; Val : Boolean := True); -- Flag18
11245
11246 procedure Set_Save_Invocation_Graph_Of_Body
11247 (N : Node_Id; Val : Boolean := True); -- Flag1
11248
11249 procedure Set_SCIL_Controlling_Tag
11250 (N : Node_Id; Val : Node_Id); -- Node5
11251
11252 procedure Set_SCIL_Entity
11253 (N : Node_Id; Val : Node_Id); -- Node4
11254
11255 procedure Set_SCIL_Tag_Value
11256 (N : Node_Id; Val : Node_Id); -- Node5
11257
11258 procedure Set_SCIL_Target_Prim
11259 (N : Node_Id; Val : Node_Id); -- Node2
11260
11261 procedure Set_Scope
11262 (N : Node_Id; Val : Node_Id); -- Node3
11263
11264 procedure Set_Select_Alternatives
11265 (N : Node_Id; Val : List_Id); -- List1
11266
11267 procedure Set_Selector_Name
11268 (N : Node_Id; Val : Node_Id); -- Node2
11269
11270 procedure Set_Selector_Names
11271 (N : Node_Id; Val : List_Id); -- List1
11272
11273 procedure Set_Shift_Count_OK
11274 (N : Node_Id; Val : Boolean := True); -- Flag4
11275
11276 procedure Set_Source_Type
11277 (N : Node_Id; Val : Entity_Id); -- Node1
11278
11279 procedure Set_Specification
11280 (N : Node_Id; Val : Node_Id); -- Node1
11281
11282 procedure Set_Split_PPC
11283 (N : Node_Id; Val : Boolean); -- Flag17
11284
11285 procedure Set_Statements
11286 (N : Node_Id; Val : List_Id); -- List3
11287
11288 procedure Set_Storage_Pool
11289 (N : Node_Id; Val : Node_Id); -- Node1
11290
11291 procedure Set_Subpool_Handle_Name
11292 (N : Node_Id; Val : Node_Id); -- Node4
11293
11294 procedure Set_Strval
11295 (N : Node_Id; Val : String_Id); -- Str3
11296
11297 procedure Set_Subtype_Indication
11298 (N : Node_Id; Val : Node_Id); -- Node5
11299
11300 procedure Set_Subtype_Mark
11301 (N : Node_Id; Val : Node_Id); -- Node4
11302
11303 procedure Set_Subtype_Marks
11304 (N : Node_Id; Val : List_Id); -- List2
11305
11306 procedure Set_Suppress_Assignment_Checks
11307 (N : Node_Id; Val : Boolean := True); -- Flag18
11308
11309 procedure Set_Suppress_Loop_Warnings
11310 (N : Node_Id; Val : Boolean := True); -- Flag17
11311
11312 procedure Set_Synchronized_Present
11313 (N : Node_Id; Val : Boolean := True); -- Flag7
11314
11315 procedure Set_Tagged_Present
11316 (N : Node_Id; Val : Boolean := True); -- Flag15
11317
11318 procedure Set_Target
11319 (N : Node_Id; Val : Entity_Id); -- Node1
11320
11321 procedure Set_Target_Type
11322 (N : Node_Id; Val : Entity_Id); -- Node2
11323
11324 procedure Set_Task_Definition
11325 (N : Node_Id; Val : Node_Id); -- Node3
11326
11327 procedure Set_Task_Present
11328 (N : Node_Id; Val : Boolean := True); -- Flag5
11329
11330 procedure Set_Then_Actions
11331 (N : Node_Id; Val : List_Id); -- List2
11332
11333 procedure Set_Then_Statements
11334 (N : Node_Id; Val : List_Id); -- List2
11335
11336 procedure Set_Triggering_Alternative
11337 (N : Node_Id; Val : Node_Id); -- Node1
11338
11339 procedure Set_Triggering_Statement
11340 (N : Node_Id; Val : Node_Id); -- Node1
11341
11342 procedure Set_TSS_Elist
11343 (N : Node_Id; Val : Elist_Id); -- Elist3
11344
11345 procedure Set_Type_Definition
11346 (N : Node_Id; Val : Node_Id); -- Node3
11347
11348 procedure Set_Uneval_Old_Accept
11349 (N : Node_Id; Val : Boolean := True); -- Flag7
11350
11351 procedure Set_Uneval_Old_Warn
11352 (N : Node_Id; Val : Boolean := True); -- Flag18
11353
11354 procedure Set_Unit
11355 (N : Node_Id; Val : Node_Id); -- Node2
11356
11357 procedure Set_Unknown_Discriminants_Present
11358 (N : Node_Id; Val : Boolean := True); -- Flag13
11359
11360 procedure Set_Unreferenced_In_Spec
11361 (N : Node_Id; Val : Boolean := True); -- Flag7
11362
11363 procedure Set_Variant_Part
11364 (N : Node_Id; Val : Node_Id); -- Node4
11365
11366 procedure Set_Variants
11367 (N : Node_Id; Val : List_Id); -- List1
11368
11369 procedure Set_Visible_Declarations
11370 (N : Node_Id; Val : List_Id); -- List2
11371
11372 procedure Set_Uninitialized_Variable
11373 (N : Node_Id; Val : Node_Id); -- Node3
11374
11375 procedure Set_Used_Operations
11376 (N : Node_Id; Val : Elist_Id); -- Elist2
11377
11378 procedure Set_Was_Attribute_Reference
11379 (N : Node_Id; Val : Boolean := True); -- Flag2
11380
11381 procedure Set_Was_Default_Init_Box_Association
11382 (N : Node_Id; Val : Boolean := True); -- Flag14
11383
11384 procedure Set_Was_Expression_Function
11385 (N : Node_Id; Val : Boolean := True); -- Flag18
11386
11387 procedure Set_Was_Originally_Stub
11388 (N : Node_Id; Val : Boolean := True); -- Flag13
11389
11390 -------------------------
11391 -- Iterator Procedures --
11392 -------------------------
11393
11394 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
11395
11396 procedure Next_Entity (N : in out Node_Id);
11397 procedure Next_Named_Actual (N : in out Node_Id);
11398 procedure Next_Rep_Item (N : in out Node_Id);
11399 procedure Next_Use_Clause (N : in out Node_Id);
11400
11401 -------------------------------------------
11402 -- Miscellaneous Tree Access Subprograms --
11403 -------------------------------------------
11404
11405 function End_Location (N : Node_Id) return Source_Ptr;
11406 -- N is an N_If_Statement or N_Case_Statement node, and this function
11407 -- returns the location of the IF token in the END IF sequence by
11408 -- translating the value of the End_Span field.
11409
11410 -- WARNING: There is a matching C declaration of this subprogram in fe.h
11411
11412 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
11413 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
11414 -- the End_Span field to correspond to the given value S. In other words,
11415 -- End_Span is set to the difference between S and Sloc (N), the starting
11416 -- location.
11417
11418 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
11419 -- Given an argument to a pragma Arg, this function returns the expression
11420 -- for the argument. This is Arg itself, or, in the case where Arg is a
11421 -- pragma argument association node, the expression from this node.
11422
11423 -----------------------
11424 -- Utility Functions --
11425 -----------------------
11426
11427 procedure Map_Pragma_Name (From, To : Name_Id);
11428 -- Used in the implementation of pragma Rename_Pragma. Maps pragma name
11429 -- From to pragma name To, so From can be used as a synonym for To.
11430
11431 Too_Many_Pragma_Mappings : exception;
11432 -- Raised if Map_Pragma_Name is called too many times. We expect that few
11433 -- programs will use it at all, and those that do will use it approximately
11434 -- once or twice.
11435
11436 function Pragma_Name (N : Node_Id) return Name_Id;
11437 -- Obtain the name of pragma N from the Chars field of its identifier. If
11438 -- the pragma has been renamed using Rename_Pragma, this routine returns
11439 -- the name of the renaming.
11440
11441 function Pragma_Name_Unmapped (N : Node_Id) return Name_Id;
11442 -- Obtain the name of pragma N from the Chars field of its identifier. This
11443 -- form of name extraction does not take into account renamings performed
11444 -- by Rename_Pragma.
11445
11446 -----------------------------
11447 -- Syntactic Parent Tables --
11448 -----------------------------
11449
11450 -- These tables show for each node, and for each of the five fields,
11451 -- whether the corresponding field is syntactic (True) or semantic (False).
11452 -- Unused entries are also set to False.
11453
11454 subtype Field_Num is Natural range 1 .. 5;
11455
11456 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
11457
11458 -- Following entries can be built automatically from the sinfo sources
11459 -- using the makeisf utility (currently this program is in spitbol).
11460
11461 N_Identifier =>
11462 (1 => True, -- Chars (Name1)
11463 2 => False, -- Original_Discriminant (Node2-Sem)
11464 3 => False, -- unused
11465 4 => False, -- Entity (Node4-Sem)
11466 5 => False), -- Etype (Node5-Sem)
11467
11468 N_Integer_Literal =>
11469 (1 => False, -- unused
11470 2 => False, -- Original_Entity (Node2-Sem)
11471 3 => True, -- Intval (Uint3)
11472 4 => False, -- unused
11473 5 => False), -- Etype (Node5-Sem)
11474
11475 N_Real_Literal =>
11476 (1 => False, -- unused
11477 2 => False, -- Original_Entity (Node2-Sem)
11478 3 => True, -- Realval (Ureal3)
11479 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
11480 5 => False), -- Etype (Node5-Sem)
11481
11482 N_Character_Literal =>
11483 (1 => True, -- Chars (Name1)
11484 2 => True, -- Char_Literal_Value (Uint2)
11485 3 => False, -- unused
11486 4 => False, -- Entity (Node4-Sem)
11487 5 => False), -- Etype (Node5-Sem)
11488
11489 N_String_Literal =>
11490 (1 => False, -- unused
11491 2 => False, -- unused
11492 3 => True, -- Strval (Str3)
11493 4 => False, -- unused
11494 5 => False), -- Etype (Node5-Sem)
11495
11496 N_Pragma =>
11497 (1 => False, -- Next_Pragma (Node1-Sem)
11498 2 => True, -- Pragma_Argument_Associations (List2)
11499 3 => False, -- Corresponding_Aspect (Node3-Sem)
11500 4 => True, -- Pragma_Identifier (Node4)
11501 5 => False), -- Next_Rep_Item (Node5-Sem)
11502
11503 N_Pragma_Argument_Association =>
11504 (1 => True, -- Chars (Name1)
11505 2 => False, -- Expression_Copy (Node2-Sem)
11506 3 => True, -- Expression (Node3)
11507 4 => False, -- unused
11508 5 => False), -- unused
11509
11510 N_Defining_Identifier =>
11511 (1 => True, -- Chars (Name1)
11512 2 => False, -- Next_Entity (Node2-Sem)
11513 3 => False, -- Scope (Node3-Sem)
11514 4 => False, -- unused
11515 5 => False), -- Etype (Node5-Sem)
11516
11517 N_Full_Type_Declaration =>
11518 (1 => True, -- Defining_Identifier (Node1)
11519 2 => False, -- Incomplete_View (Node2-Sem)
11520 3 => True, -- Type_Definition (Node3)
11521 4 => True, -- Discriminant_Specifications (List4)
11522 5 => False), -- unused
11523
11524 N_Subtype_Declaration =>
11525 (1 => True, -- Defining_Identifier (Node1)
11526 2 => False, -- unused
11527 3 => False, -- unused
11528 4 => False, -- Generic_Parent_Type (Node4-Sem)
11529 5 => True), -- Subtype_Indication (Node5)
11530
11531 N_Subtype_Indication =>
11532 (1 => False, -- unused
11533 2 => False, -- unused
11534 3 => True, -- Constraint (Node3)
11535 4 => True, -- Subtype_Mark (Node4)
11536 5 => False), -- Etype (Node5-Sem)
11537
11538 N_Object_Declaration =>
11539 (1 => True, -- Defining_Identifier (Node1)
11540 2 => False, -- Handler_List_Entry (Node2-Sem)
11541 3 => True, -- Expression (Node3)
11542 4 => True, -- Object_Definition (Node4)
11543 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11544
11545 N_Number_Declaration =>
11546 (1 => True, -- Defining_Identifier (Node1)
11547 2 => False, -- unused
11548 3 => True, -- Expression (Node3)
11549 4 => False, -- unused
11550 5 => False), -- unused
11551
11552 N_Derived_Type_Definition =>
11553 (1 => False, -- unused
11554 2 => True, -- Interface_List (List2)
11555 3 => True, -- Record_Extension_Part (Node3)
11556 4 => False, -- unused
11557 5 => True), -- Subtype_Indication (Node5)
11558
11559 N_Range_Constraint =>
11560 (1 => False, -- unused
11561 2 => False, -- unused
11562 3 => False, -- unused
11563 4 => True, -- Range_Expression (Node4)
11564 5 => False), -- unused
11565
11566 N_Range =>
11567 (1 => True, -- Low_Bound (Node1)
11568 2 => True, -- High_Bound (Node2)
11569 3 => False, -- unused
11570 4 => False, -- unused
11571 5 => False), -- Etype (Node5-Sem)
11572
11573 N_Enumeration_Type_Definition =>
11574 (1 => True, -- Literals (List1)
11575 2 => False, -- unused
11576 3 => False, -- unused
11577 4 => True, -- End_Label (Node4)
11578 5 => False), -- unused
11579
11580 N_Defining_Character_Literal =>
11581 (1 => True, -- Chars (Name1)
11582 2 => False, -- Next_Entity (Node2-Sem)
11583 3 => False, -- Scope (Node3-Sem)
11584 4 => False, -- unused
11585 5 => False), -- Etype (Node5-Sem)
11586
11587 N_Signed_Integer_Type_Definition =>
11588 (1 => True, -- Low_Bound (Node1)
11589 2 => True, -- High_Bound (Node2)
11590 3 => False, -- unused
11591 4 => False, -- unused
11592 5 => False), -- unused
11593
11594 N_Modular_Type_Definition =>
11595 (1 => False, -- unused
11596 2 => False, -- unused
11597 3 => True, -- Expression (Node3)
11598 4 => False, -- unused
11599 5 => False), -- unused
11600
11601 N_Floating_Point_Definition =>
11602 (1 => False, -- unused
11603 2 => True, -- Digits_Expression (Node2)
11604 3 => False, -- unused
11605 4 => True, -- Real_Range_Specification (Node4)
11606 5 => False), -- unused
11607
11608 N_Real_Range_Specification =>
11609 (1 => True, -- Low_Bound (Node1)
11610 2 => True, -- High_Bound (Node2)
11611 3 => False, -- unused
11612 4 => False, -- unused
11613 5 => False), -- unused
11614
11615 N_Ordinary_Fixed_Point_Definition =>
11616 (1 => False, -- unused
11617 2 => False, -- unused
11618 3 => True, -- Delta_Expression (Node3)
11619 4 => True, -- Real_Range_Specification (Node4)
11620 5 => False), -- unused
11621
11622 N_Decimal_Fixed_Point_Definition =>
11623 (1 => False, -- unused
11624 2 => True, -- Digits_Expression (Node2)
11625 3 => True, -- Delta_Expression (Node3)
11626 4 => True, -- Real_Range_Specification (Node4)
11627 5 => False), -- unused
11628
11629 N_Digits_Constraint =>
11630 (1 => False, -- unused
11631 2 => True, -- Digits_Expression (Node2)
11632 3 => False, -- unused
11633 4 => True, -- Range_Constraint (Node4)
11634 5 => False), -- unused
11635
11636 N_Unconstrained_Array_Definition =>
11637 (1 => False, -- unused
11638 2 => True, -- Subtype_Marks (List2)
11639 3 => False, -- unused
11640 4 => True, -- Component_Definition (Node4)
11641 5 => False), -- unused
11642
11643 N_Constrained_Array_Definition =>
11644 (1 => False, -- unused
11645 2 => True, -- Discrete_Subtype_Definitions (List2)
11646 3 => False, -- unused
11647 4 => True, -- Component_Definition (Node4)
11648 5 => False), -- unused
11649
11650 N_Component_Definition =>
11651 (1 => False, -- unused
11652 2 => False, -- unused
11653 3 => True, -- Access_Definition (Node3)
11654 4 => False, -- unused
11655 5 => True), -- Subtype_Indication (Node5)
11656
11657 N_Discriminant_Specification =>
11658 (1 => True, -- Defining_Identifier (Node1)
11659 2 => False, -- unused
11660 3 => True, -- Expression (Node3)
11661 4 => False, -- unused
11662 5 => True), -- Discriminant_Type (Node5)
11663
11664 N_Index_Or_Discriminant_Constraint =>
11665 (1 => True, -- Constraints (List1)
11666 2 => False, -- unused
11667 3 => False, -- unused
11668 4 => False, -- unused
11669 5 => False), -- unused
11670
11671 N_Discriminant_Association =>
11672 (1 => True, -- Selector_Names (List1)
11673 2 => False, -- unused
11674 3 => True, -- Expression (Node3)
11675 4 => False, -- unused
11676 5 => False), -- unused
11677
11678 N_Record_Definition =>
11679 (1 => True, -- Component_List (Node1)
11680 2 => True, -- Interface_List (List2)
11681 3 => False, -- unused
11682 4 => True, -- End_Label (Node4)
11683 5 => False), -- unused
11684
11685 N_Component_List =>
11686 (1 => False, -- unused
11687 2 => False, -- unused
11688 3 => True, -- Component_Items (List3)
11689 4 => True, -- Variant_Part (Node4)
11690 5 => False), -- unused
11691
11692 N_Component_Declaration =>
11693 (1 => True, -- Defining_Identifier (Node1)
11694 2 => False, -- unused
11695 3 => True, -- Expression (Node3)
11696 4 => True, -- Component_Definition (Node4)
11697 5 => False), -- unused
11698
11699 N_Variant_Part =>
11700 (1 => True, -- Variants (List1)
11701 2 => True, -- Name (Node2)
11702 3 => False, -- unused
11703 4 => False, -- unused
11704 5 => False), -- unused
11705
11706 N_Variant =>
11707 (1 => True, -- Component_List (Node1)
11708 2 => False, -- Enclosing_Variant (Node2-Sem)
11709 3 => False, -- Present_Expr (Uint3-Sem)
11710 4 => True, -- Discrete_Choices (List4)
11711 5 => False), -- Dcheck_Function (Node5-Sem)
11712
11713 N_Others_Choice =>
11714 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11715 2 => False, -- unused
11716 3 => False, -- unused
11717 4 => False, -- unused
11718 5 => False), -- unused
11719
11720 N_Access_To_Object_Definition =>
11721 (1 => False, -- unused
11722 2 => False, -- unused
11723 3 => False, -- unused
11724 4 => False, -- unused
11725 5 => True), -- Subtype_Indication (Node5)
11726
11727 N_Access_Function_Definition =>
11728 (1 => False, -- unused
11729 2 => False, -- unused
11730 3 => True, -- Parameter_Specifications (List3)
11731 4 => True, -- Result_Definition (Node4)
11732 5 => False), -- unused
11733
11734 N_Access_Procedure_Definition =>
11735 (1 => False, -- unused
11736 2 => False, -- unused
11737 3 => True, -- Parameter_Specifications (List3)
11738 4 => False, -- unused
11739 5 => False), -- unused
11740
11741 N_Access_Definition =>
11742 (1 => False, -- unused
11743 2 => False, -- unused
11744 3 => True, -- Access_To_Subprogram_Definition (Node3)
11745 4 => True, -- Subtype_Mark (Node4)
11746 5 => False), -- unused
11747
11748 N_Incomplete_Type_Declaration =>
11749 (1 => True, -- Defining_Identifier (Node1)
11750 2 => False, -- unused
11751 3 => False, -- unused
11752 4 => True, -- Discriminant_Specifications (List4)
11753 5 => False), -- Premature_Use
11754
11755 N_Explicit_Dereference =>
11756 (1 => False, -- unused
11757 2 => False, -- unused
11758 3 => True, -- Prefix (Node3)
11759 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11760 5 => False), -- Etype (Node5-Sem)
11761
11762 N_Indexed_Component =>
11763 (1 => True, -- Expressions (List1)
11764 2 => False, -- unused
11765 3 => True, -- Prefix (Node3)
11766 4 => False, -- Generalized_Indexing (Node4-Sem)
11767 5 => False), -- Etype (Node5-Sem)
11768
11769 N_Slice =>
11770 (1 => False, -- unused
11771 2 => False, -- unused
11772 3 => True, -- Prefix (Node3)
11773 4 => True, -- Discrete_Range (Node4)
11774 5 => False), -- Etype (Node5-Sem)
11775
11776 N_Selected_Component =>
11777 (1 => False, -- unused
11778 2 => True, -- Selector_Name (Node2)
11779 3 => True, -- Prefix (Node3)
11780 4 => False, -- unused
11781 5 => False), -- Etype (Node5-Sem)
11782
11783 N_Attribute_Reference =>
11784 (1 => True, -- Expressions (List1)
11785 2 => True, -- Attribute_Name (Name2)
11786 3 => True, -- Prefix (Node3)
11787 4 => False, -- Entity (Node4-Sem)
11788 5 => False), -- Etype (Node5-Sem)
11789
11790 N_Aggregate =>
11791 (1 => True, -- Expressions (List1)
11792 2 => True, -- Component_Associations (List2)
11793 3 => False, -- Aggregate_Bounds (Node3-Sem)
11794 4 => False, -- unused
11795 5 => False), -- Etype (Node5-Sem)
11796
11797 N_Component_Association =>
11798 (1 => True, -- Choices (List1)
11799 2 => False, -- unused
11800 3 => True, -- Expression (Node3)
11801 4 => False, -- unused
11802 5 => True), -- Loop_Actions (List5-Sem);
11803
11804 N_Iterated_Component_Association =>
11805 (1 => True, -- Defining_Identifier (Node1)
11806 2 => True, -- Iterator_Specification
11807 3 => True, -- Expression (Node3)
11808 4 => True, -- Discrete_Choices (List4)
11809 5 => True), -- Loop_Actions (List5-Sem);
11810
11811 N_Iterated_Element_Association =>
11812 (1 => True, -- Key_expression
11813 2 => True, -- Iterator_Specification
11814 3 => True, -- Expression (Node3)
11815 4 => True, -- Loop_Parameter_Specification
11816 5 => True), -- Loop_Actions (List5-Sem);
11817
11818 N_Delta_Aggregate =>
11819 (1 => False, -- Unused
11820 2 => True, -- Component_Associations (List2)
11821 3 => True, -- Expression (Node3)
11822 4 => False, -- Unused
11823 5 => False), -- Etype (Node5-Sem)
11824
11825 N_Extension_Aggregate =>
11826 (1 => True, -- Expressions (List1)
11827 2 => True, -- Component_Associations (List2)
11828 3 => True, -- Ancestor_Part (Node3)
11829 4 => False, -- unused
11830 5 => False), -- Etype (Node5-Sem)
11831
11832 N_Null =>
11833 (1 => False, -- unused
11834 2 => False, -- unused
11835 3 => False, -- unused
11836 4 => False, -- unused
11837 5 => False), -- Etype (Node5-Sem)
11838
11839 N_And_Then =>
11840 (1 => False, -- Actions (List1-Sem)
11841 2 => True, -- Left_Opnd (Node2)
11842 3 => True, -- Right_Opnd (Node3)
11843 4 => False, -- unused
11844 5 => False), -- Etype (Node5-Sem)
11845
11846 N_Or_Else =>
11847 (1 => False, -- Actions (List1-Sem)
11848 2 => True, -- Left_Opnd (Node2)
11849 3 => True, -- Right_Opnd (Node3)
11850 4 => False, -- unused
11851 5 => False), -- Etype (Node5-Sem)
11852
11853 N_In =>
11854 (1 => False, -- unused
11855 2 => True, -- Left_Opnd (Node2)
11856 3 => True, -- Right_Opnd (Node3)
11857 4 => True, -- Alternatives (List4)
11858 5 => False), -- Etype (Node5-Sem)
11859
11860 N_Not_In =>
11861 (1 => False, -- unused
11862 2 => True, -- Left_Opnd (Node2)
11863 3 => True, -- Right_Opnd (Node3)
11864 4 => True, -- Alternatives (List4)
11865 5 => False), -- Etype (Node5-Sem)
11866
11867 N_Op_And =>
11868 (1 => True, -- Chars (Name1)
11869 2 => True, -- Left_Opnd (Node2)
11870 3 => True, -- Right_Opnd (Node3)
11871 4 => False, -- Entity (Node4-Sem)
11872 5 => False), -- Etype (Node5-Sem)
11873
11874 N_Op_Or =>
11875 (1 => True, -- Chars (Name1)
11876 2 => True, -- Left_Opnd (Node2)
11877 3 => True, -- Right_Opnd (Node3)
11878 4 => False, -- Entity (Node4-Sem)
11879 5 => False), -- Etype (Node5-Sem)
11880
11881 N_Op_Xor =>
11882 (1 => True, -- Chars (Name1)
11883 2 => True, -- Left_Opnd (Node2)
11884 3 => True, -- Right_Opnd (Node3)
11885 4 => False, -- Entity (Node4-Sem)
11886 5 => False), -- Etype (Node5-Sem)
11887
11888 N_Op_Eq =>
11889 (1 => True, -- Chars (Name1)
11890 2 => True, -- Left_Opnd (Node2)
11891 3 => True, -- Right_Opnd (Node3)
11892 4 => False, -- Entity (Node4-Sem)
11893 5 => False), -- Etype (Node5-Sem)
11894
11895 N_Op_Ne =>
11896 (1 => True, -- Chars (Name1)
11897 2 => True, -- Left_Opnd (Node2)
11898 3 => True, -- Right_Opnd (Node3)
11899 4 => False, -- Entity (Node4-Sem)
11900 5 => False), -- Etype (Node5-Sem)
11901
11902 N_Op_Lt =>
11903 (1 => True, -- Chars (Name1)
11904 2 => True, -- Left_Opnd (Node2)
11905 3 => True, -- Right_Opnd (Node3)
11906 4 => False, -- Entity (Node4-Sem)
11907 5 => False), -- Etype (Node5-Sem)
11908
11909 N_Op_Le =>
11910 (1 => True, -- Chars (Name1)
11911 2 => True, -- Left_Opnd (Node2)
11912 3 => True, -- Right_Opnd (Node3)
11913 4 => False, -- Entity (Node4-Sem)
11914 5 => False), -- Etype (Node5-Sem)
11915
11916 N_Op_Gt =>
11917 (1 => True, -- Chars (Name1)
11918 2 => True, -- Left_Opnd (Node2)
11919 3 => True, -- Right_Opnd (Node3)
11920 4 => False, -- Entity (Node4-Sem)
11921 5 => False), -- Etype (Node5-Sem)
11922
11923 N_Op_Ge =>
11924 (1 => True, -- Chars (Name1)
11925 2 => True, -- Left_Opnd (Node2)
11926 3 => True, -- Right_Opnd (Node3)
11927 4 => False, -- Entity (Node4-Sem)
11928 5 => False), -- Etype (Node5-Sem)
11929
11930 N_Op_Add =>
11931 (1 => True, -- Chars (Name1)
11932 2 => True, -- Left_Opnd (Node2)
11933 3 => True, -- Right_Opnd (Node3)
11934 4 => False, -- Entity (Node4-Sem)
11935 5 => False), -- Etype (Node5-Sem)
11936
11937 N_Op_Subtract =>
11938 (1 => True, -- Chars (Name1)
11939 2 => True, -- Left_Opnd (Node2)
11940 3 => True, -- Right_Opnd (Node3)
11941 4 => False, -- Entity (Node4-Sem)
11942 5 => False), -- Etype (Node5-Sem)
11943
11944 N_Op_Concat =>
11945 (1 => True, -- Chars (Name1)
11946 2 => True, -- Left_Opnd (Node2)
11947 3 => True, -- Right_Opnd (Node3)
11948 4 => False, -- Entity (Node4-Sem)
11949 5 => False), -- Etype (Node5-Sem)
11950
11951 N_Op_Multiply =>
11952 (1 => True, -- Chars (Name1)
11953 2 => True, -- Left_Opnd (Node2)
11954 3 => True, -- Right_Opnd (Node3)
11955 4 => False, -- Entity (Node4-Sem)
11956 5 => False), -- Etype (Node5-Sem)
11957
11958 N_Op_Divide =>
11959 (1 => True, -- Chars (Name1)
11960 2 => True, -- Left_Opnd (Node2)
11961 3 => True, -- Right_Opnd (Node3)
11962 4 => False, -- Entity (Node4-Sem)
11963 5 => False), -- Etype (Node5-Sem)
11964
11965 N_Op_Mod =>
11966 (1 => True, -- Chars (Name1)
11967 2 => True, -- Left_Opnd (Node2)
11968 3 => True, -- Right_Opnd (Node3)
11969 4 => False, -- Entity (Node4-Sem)
11970 5 => False), -- Etype (Node5-Sem)
11971
11972 N_Op_Rem =>
11973 (1 => True, -- Chars (Name1)
11974 2 => True, -- Left_Opnd (Node2)
11975 3 => True, -- Right_Opnd (Node3)
11976 4 => False, -- Entity (Node4-Sem)
11977 5 => False), -- Etype (Node5-Sem)
11978
11979 N_Op_Expon =>
11980 (1 => True, -- Chars (Name1)
11981 2 => True, -- Left_Opnd (Node2)
11982 3 => True, -- Right_Opnd (Node3)
11983 4 => False, -- Entity (Node4-Sem)
11984 5 => False), -- Etype (Node5-Sem)
11985
11986 N_Op_Plus =>
11987 (1 => True, -- Chars (Name1)
11988 2 => False, -- unused
11989 3 => True, -- Right_Opnd (Node3)
11990 4 => False, -- Entity (Node4-Sem)
11991 5 => False), -- Etype (Node5-Sem)
11992
11993 N_Op_Minus =>
11994 (1 => True, -- Chars (Name1)
11995 2 => False, -- unused
11996 3 => True, -- Right_Opnd (Node3)
11997 4 => False, -- Entity (Node4-Sem)
11998 5 => False), -- Etype (Node5-Sem)
11999
12000 N_Op_Abs =>
12001 (1 => True, -- Chars (Name1)
12002 2 => False, -- unused
12003 3 => True, -- Right_Opnd (Node3)
12004 4 => False, -- Entity (Node4-Sem)
12005 5 => False), -- Etype (Node5-Sem)
12006
12007 N_Op_Not =>
12008 (1 => True, -- Chars (Name1)
12009 2 => False, -- unused
12010 3 => True, -- Right_Opnd (Node3)
12011 4 => False, -- Entity (Node4-Sem)
12012 5 => False), -- Etype (Node5-Sem)
12013
12014 N_Type_Conversion =>
12015 (1 => False, -- unused
12016 2 => False, -- unused
12017 3 => True, -- Expression (Node3)
12018 4 => True, -- Subtype_Mark (Node4)
12019 5 => False), -- Etype (Node5-Sem)
12020
12021 N_Qualified_Expression =>
12022 (1 => False, -- unused
12023 2 => False, -- unused
12024 3 => True, -- Expression (Node3)
12025 4 => True, -- Subtype_Mark (Node4)
12026 5 => False), -- Etype (Node5-Sem)
12027
12028 N_Quantified_Expression =>
12029 (1 => True, -- Condition (Node1)
12030 2 => True, -- Iterator_Specification (Node2)
12031 3 => False, -- unused
12032 4 => True, -- Loop_Parameter_Specification (Node4)
12033 5 => False), -- unused
12034
12035 N_Allocator =>
12036 (1 => False, -- Storage_Pool (Node1-Sem)
12037 2 => False, -- Procedure_To_Call (Node2-Sem)
12038 3 => True, -- Expression (Node3)
12039 4 => True, -- Subpool_Handle_Name (Node4)
12040 5 => False), -- Etype (Node5-Sem)
12041
12042 N_Null_Statement =>
12043 (1 => False, -- unused
12044 2 => False, -- unused
12045 3 => False, -- unused
12046 4 => False, -- unused
12047 5 => False), -- unused
12048
12049 N_Label =>
12050 (1 => True, -- Identifier (Node1)
12051 2 => False, -- unused
12052 3 => False, -- unused
12053 4 => False, -- unused
12054 5 => False), -- unused
12055
12056 N_Assignment_Statement =>
12057 (1 => False, -- unused
12058 2 => True, -- Name (Node2)
12059 3 => True, -- Expression (Node3)
12060 4 => False, -- unused
12061 5 => False), -- unused
12062
12063 N_Target_Name =>
12064 (1 => False, -- unused
12065 2 => False, -- unused
12066 3 => False, -- unused
12067 4 => False, -- unused
12068 5 => False), -- Etype (Node5-Sem)
12069
12070 N_If_Statement =>
12071 (1 => True, -- Condition (Node1)
12072 2 => True, -- Then_Statements (List2)
12073 3 => True, -- Elsif_Parts (List3)
12074 4 => True, -- Else_Statements (List4)
12075 5 => True), -- End_Span (Uint5)
12076
12077 N_Elsif_Part =>
12078 (1 => True, -- Condition (Node1)
12079 2 => True, -- Then_Statements (List2)
12080 3 => False, -- Condition_Actions (List3-Sem)
12081 4 => False, -- unused
12082 5 => False), -- unused
12083
12084 N_Case_Expression =>
12085 (1 => False, -- unused
12086 2 => False, -- unused
12087 3 => True, -- Expression (Node3)
12088 4 => True, -- Alternatives (List4)
12089 5 => False), -- Etype (Node5-Sem)
12090
12091 N_Case_Expression_Alternative =>
12092 (1 => False, -- Actions (List1-Sem)
12093 2 => False, -- unused
12094 3 => True, -- Expression (Node3)
12095 4 => True, -- Discrete_Choices (List4)
12096 5 => False), -- unused
12097
12098 N_Case_Statement =>
12099 (1 => False, -- unused
12100 2 => False, -- unused
12101 3 => True, -- Expression (Node3)
12102 4 => True, -- Alternatives (List4)
12103 5 => True), -- End_Span (Uint5)
12104
12105 N_Case_Statement_Alternative =>
12106 (1 => False, -- unused
12107 2 => False, -- unused
12108 3 => True, -- Statements (List3)
12109 4 => True, -- Discrete_Choices (List4)
12110 5 => False), -- unused
12111
12112 N_Loop_Statement =>
12113 (1 => True, -- Identifier (Node1)
12114 2 => True, -- Iteration_Scheme (Node2)
12115 3 => True, -- Statements (List3)
12116 4 => True, -- End_Label (Node4)
12117 5 => False), -- unused
12118
12119 N_Iteration_Scheme =>
12120 (1 => True, -- Condition (Node1)
12121 2 => True, -- Iterator_Specification (Node2)
12122 3 => False, -- Condition_Actions (List3-Sem)
12123 4 => True, -- Loop_Parameter_Specification (Node4)
12124 5 => False), -- unused
12125
12126 N_Loop_Parameter_Specification =>
12127 (1 => True, -- Defining_Identifier (Node1)
12128 2 => False, -- unused
12129 3 => False, -- unused
12130 4 => True, -- Discrete_Subtype_Definition (Node4)
12131 5 => True), -- Iterator_Filter (Node5)
12132
12133 N_Iterator_Specification =>
12134 (1 => True, -- Defining_Identifier (Node1)
12135 2 => True, -- Name (Node2)
12136 3 => False, -- Unused
12137 4 => False, -- Unused
12138 5 => True), -- Subtype_Indication (Node5)
12139
12140 N_Block_Statement =>
12141 (1 => True, -- Identifier (Node1)
12142 2 => True, -- Declarations (List2)
12143 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12144 4 => True, -- Handled_Statement_Sequence (Node4)
12145 5 => False), -- unused
12146
12147 N_Exit_Statement =>
12148 (1 => True, -- Condition (Node1)
12149 2 => True, -- Name (Node2)
12150 3 => False, -- unused
12151 4 => False, -- unused
12152 5 => False), -- unused
12153
12154 N_Goto_Statement =>
12155 (1 => False, -- unused
12156 2 => True, -- Name (Node2)
12157 3 => False, -- unused
12158 4 => False, -- unused
12159 5 => False), -- unused
12160
12161 N_Subprogram_Declaration =>
12162 (1 => True, -- Specification (Node1)
12163 2 => False, -- unused
12164 3 => False, -- Body_To_Inline (Node3-Sem)
12165 4 => False, -- Parent_Spec (Node4-Sem)
12166 5 => False), -- Corresponding_Body (Node5-Sem)
12167
12168 N_Abstract_Subprogram_Declaration =>
12169 (1 => True, -- Specification (Node1)
12170 2 => False, -- unused
12171 3 => False, -- unused
12172 4 => False, -- unused
12173 5 => False), -- unused
12174
12175 N_Function_Specification =>
12176 (1 => True, -- Defining_Unit_Name (Node1)
12177 2 => False, -- unused
12178 3 => True, -- Parameter_Specifications (List3)
12179 4 => True, -- Result_Definition (Node4)
12180 5 => False), -- Generic_Parent (Node5-Sem)
12181
12182 N_Procedure_Specification =>
12183 (1 => True, -- Defining_Unit_Name (Node1)
12184 2 => False, -- Null_Statement (Node2-Sem)
12185 3 => True, -- Parameter_Specifications (List3)
12186 4 => False, -- unused
12187 5 => False), -- Generic_Parent (Node5-Sem)
12188
12189 N_Designator =>
12190 (1 => True, -- Identifier (Node1)
12191 2 => True, -- Name (Node2)
12192 3 => False, -- unused
12193 4 => False, -- unused
12194 5 => False), -- unused
12195
12196 N_Defining_Program_Unit_Name =>
12197 (1 => True, -- Defining_Identifier (Node1)
12198 2 => True, -- Name (Node2)
12199 3 => False, -- unused
12200 4 => False, -- unused
12201 5 => False), -- unused
12202
12203 N_Operator_Symbol =>
12204 (1 => True, -- Chars (Name1)
12205 2 => False, -- unused
12206 3 => True, -- Strval (Str3)
12207 4 => False, -- Entity (Node4-Sem)
12208 5 => False), -- Etype (Node5-Sem)
12209
12210 N_Defining_Operator_Symbol =>
12211 (1 => True, -- Chars (Name1)
12212 2 => False, -- Next_Entity (Node2-Sem)
12213 3 => False, -- Scope (Node3-Sem)
12214 4 => False, -- unused
12215 5 => False), -- Etype (Node5-Sem)
12216
12217 N_Parameter_Specification =>
12218 (1 => True, -- Defining_Identifier (Node1)
12219 2 => True, -- Parameter_Type (Node2)
12220 3 => True, -- Expression (Node3)
12221 4 => False, -- unused
12222 5 => False), -- Default_Expression (Node5-Sem)
12223
12224 N_Subprogram_Body =>
12225 (1 => True, -- Specification (Node1)
12226 2 => True, -- Declarations (List2)
12227 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12228 4 => True, -- Handled_Statement_Sequence (Node4)
12229 5 => False), -- Corresponding_Spec (Node5-Sem)
12230
12231 N_Expression_Function =>
12232 (1 => True, -- Specification (Node1)
12233 2 => False, -- unused
12234 3 => True, -- Expression (Node3)
12235 4 => False, -- unused
12236 5 => False), -- unused
12237
12238 N_Procedure_Call_Statement =>
12239 (1 => False, -- Controlling_Argument (Node1-Sem)
12240 2 => True, -- Name (Node2)
12241 3 => True, -- Parameter_Associations (List3)
12242 4 => False, -- First_Named_Actual (Node4-Sem)
12243 5 => False), -- Etype (Node5-Sem)
12244
12245 N_Function_Call =>
12246 (1 => False, -- Controlling_Argument (Node1-Sem)
12247 2 => True, -- Name (Node2)
12248 3 => True, -- Parameter_Associations (List3)
12249 4 => False, -- First_Named_Actual (Node4-Sem)
12250 5 => False), -- Etype (Node5-Sem)
12251
12252 N_Parameter_Association =>
12253 (1 => False, -- unused
12254 2 => True, -- Selector_Name (Node2)
12255 3 => True, -- Explicit_Actual_Parameter (Node3)
12256 4 => False, -- Next_Named_Actual (Node4-Sem)
12257 5 => False), -- unused
12258
12259 N_Simple_Return_Statement =>
12260 (1 => False, -- Storage_Pool (Node1-Sem)
12261 2 => False, -- Procedure_To_Call (Node2-Sem)
12262 3 => True, -- Expression (Node3)
12263 4 => False, -- unused
12264 5 => False), -- Return_Statement_Entity (Node5-Sem)
12265
12266 N_Extended_Return_Statement =>
12267 (1 => False, -- Storage_Pool (Node1-Sem)
12268 2 => False, -- Procedure_To_Call (Node2-Sem)
12269 3 => True, -- Return_Object_Declarations (List3)
12270 4 => True, -- Handled_Statement_Sequence (Node4)
12271 5 => False), -- Return_Statement_Entity (Node5-Sem)
12272
12273 N_Package_Declaration =>
12274 (1 => True, -- Specification (Node1)
12275 2 => False, -- unused
12276 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12277 4 => False, -- Parent_Spec (Node4-Sem)
12278 5 => False), -- Corresponding_Body (Node5-Sem)
12279
12280 N_Package_Specification =>
12281 (1 => True, -- Defining_Unit_Name (Node1)
12282 2 => True, -- Visible_Declarations (List2)
12283 3 => True, -- Private_Declarations (List3)
12284 4 => True, -- End_Label (Node4)
12285 5 => False), -- Generic_Parent (Node5-Sem)
12286
12287 N_Package_Body =>
12288 (1 => True, -- Defining_Unit_Name (Node1)
12289 2 => True, -- Declarations (List2)
12290 3 => False, -- unused
12291 4 => True, -- Handled_Statement_Sequence (Node4)
12292 5 => False), -- Corresponding_Spec (Node5-Sem)
12293
12294 N_Private_Type_Declaration =>
12295 (1 => True, -- Defining_Identifier (Node1)
12296 2 => False, -- unused
12297 3 => False, -- unused
12298 4 => True, -- Discriminant_Specifications (List4)
12299 5 => False), -- unused
12300
12301 N_Private_Extension_Declaration =>
12302 (1 => True, -- Defining_Identifier (Node1)
12303 2 => True, -- Interface_List (List2)
12304 3 => False, -- unused
12305 4 => True, -- Discriminant_Specifications (List4)
12306 5 => True), -- Subtype_Indication (Node5)
12307
12308 N_Use_Package_Clause =>
12309 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12310 2 => True, -- Name (Node2)
12311 3 => False, -- Next_Use_Clause (Node3-Sem)
12312 4 => False, -- Associated_Node (Node4-Sem)
12313 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
12314
12315 N_Use_Type_Clause =>
12316 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12317 2 => False, -- Used_Operations (Elist2-Sem)
12318 3 => False, -- Next_Use_Clause (Node3-Sem)
12319 4 => True, -- Subtype_Mark (Node4)
12320 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
12321
12322 N_Object_Renaming_Declaration =>
12323 (1 => True, -- Defining_Identifier (Node1)
12324 2 => True, -- Name (Node2)
12325 3 => True, -- Access_Definition (Node3)
12326 4 => True, -- Subtype_Mark (Node4)
12327 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
12328
12329 N_Exception_Renaming_Declaration =>
12330 (1 => True, -- Defining_Identifier (Node1)
12331 2 => True, -- Name (Node2)
12332 3 => False, -- unused
12333 4 => False, -- unused
12334 5 => False), -- unused
12335
12336 N_Package_Renaming_Declaration =>
12337 (1 => True, -- Defining_Unit_Name (Node1)
12338 2 => True, -- Name (Node2)
12339 3 => False, -- unused
12340 4 => False, -- Parent_Spec (Node4-Sem)
12341 5 => False), -- unused
12342
12343 N_Subprogram_Renaming_Declaration =>
12344 (1 => True, -- Specification (Node1)
12345 2 => True, -- Name (Node2)
12346 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
12347 4 => False, -- Parent_Spec (Node4-Sem)
12348 5 => False), -- Corresponding_Spec (Node5-Sem)
12349
12350 N_Generic_Package_Renaming_Declaration =>
12351 (1 => True, -- Defining_Unit_Name (Node1)
12352 2 => True, -- Name (Node2)
12353 3 => False, -- unused
12354 4 => False, -- Parent_Spec (Node4-Sem)
12355 5 => False), -- unused
12356
12357 N_Generic_Procedure_Renaming_Declaration =>
12358 (1 => True, -- Defining_Unit_Name (Node1)
12359 2 => True, -- Name (Node2)
12360 3 => False, -- unused
12361 4 => False, -- Parent_Spec (Node4-Sem)
12362 5 => False), -- unused
12363
12364 N_Generic_Function_Renaming_Declaration =>
12365 (1 => True, -- Defining_Unit_Name (Node1)
12366 2 => True, -- Name (Node2)
12367 3 => False, -- unused
12368 4 => False, -- Parent_Spec (Node4-Sem)
12369 5 => False), -- unused
12370
12371 N_Task_Type_Declaration =>
12372 (1 => True, -- Defining_Identifier (Node1)
12373 2 => True, -- Interface_List (List2)
12374 3 => True, -- Task_Definition (Node3)
12375 4 => True, -- Discriminant_Specifications (List4)
12376 5 => False), -- Corresponding_Body (Node5-Sem)
12377
12378 N_Single_Task_Declaration =>
12379 (1 => True, -- Defining_Identifier (Node1)
12380 2 => True, -- Interface_List (List2)
12381 3 => True, -- Task_Definition (Node3)
12382 4 => False, -- unused
12383 5 => False), -- unused
12384
12385 N_Task_Definition =>
12386 (1 => False, -- unused
12387 2 => True, -- Visible_Declarations (List2)
12388 3 => True, -- Private_Declarations (List3)
12389 4 => True, -- End_Label (Node4)
12390 5 => False), -- unused
12391
12392 N_Task_Body =>
12393 (1 => True, -- Defining_Identifier (Node1)
12394 2 => True, -- Declarations (List2)
12395 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12396 4 => True, -- Handled_Statement_Sequence (Node4)
12397 5 => False), -- Corresponding_Spec (Node5-Sem)
12398
12399 N_Protected_Type_Declaration =>
12400 (1 => True, -- Defining_Identifier (Node1)
12401 2 => True, -- Interface_List (List2)
12402 3 => True, -- Protected_Definition (Node3)
12403 4 => True, -- Discriminant_Specifications (List4)
12404 5 => False), -- Corresponding_Body (Node5-Sem)
12405
12406 N_Single_Protected_Declaration =>
12407 (1 => True, -- Defining_Identifier (Node1)
12408 2 => True, -- Interface_List (List2)
12409 3 => True, -- Protected_Definition (Node3)
12410 4 => False, -- unused
12411 5 => False), -- unused
12412
12413 N_Protected_Definition =>
12414 (1 => False, -- unused
12415 2 => True, -- Visible_Declarations (List2)
12416 3 => True, -- Private_Declarations (List3)
12417 4 => True, -- End_Label (Node4)
12418 5 => False), -- unused
12419
12420 N_Protected_Body =>
12421 (1 => True, -- Defining_Identifier (Node1)
12422 2 => True, -- Declarations (List2)
12423 3 => False, -- unused
12424 4 => True, -- End_Label (Node4)
12425 5 => False), -- Corresponding_Spec (Node5-Sem)
12426
12427 N_Entry_Declaration =>
12428 (1 => True, -- Defining_Identifier (Node1)
12429 2 => False, -- unused
12430 3 => True, -- Parameter_Specifications (List3)
12431 4 => True, -- Discrete_Subtype_Definition (Node4)
12432 5 => False), -- Corresponding_Body (Node5-Sem)
12433
12434 N_Accept_Statement =>
12435 (1 => True, -- Entry_Direct_Name (Node1)
12436 2 => True, -- Declarations (List2)
12437 3 => True, -- Parameter_Specifications (List3)
12438 4 => True, -- Handled_Statement_Sequence (Node4)
12439 5 => True), -- Entry_Index (Node5)
12440
12441 N_Entry_Body =>
12442 (1 => True, -- Defining_Identifier (Node1)
12443 2 => True, -- Declarations (List2)
12444 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12445 4 => True, -- Handled_Statement_Sequence (Node4)
12446 5 => True), -- Entry_Body_Formal_Part (Node5)
12447
12448 N_Entry_Body_Formal_Part =>
12449 (1 => True, -- Condition (Node1)
12450 2 => False, -- unused
12451 3 => True, -- Parameter_Specifications (List3)
12452 4 => True, -- Entry_Index_Specification (Node4)
12453 5 => False), -- unused
12454
12455 N_Entry_Index_Specification =>
12456 (1 => True, -- Defining_Identifier (Node1)
12457 2 => False, -- unused
12458 3 => False, -- unused
12459 4 => True, -- Discrete_Subtype_Definition (Node4)
12460 5 => False), -- unused
12461
12462 N_Entry_Call_Statement =>
12463 (1 => False, -- unused
12464 2 => True, -- Name (Node2)
12465 3 => True, -- Parameter_Associations (List3)
12466 4 => False, -- First_Named_Actual (Node4-Sem)
12467 5 => False), -- unused
12468
12469 N_Requeue_Statement =>
12470 (1 => False, -- unused
12471 2 => True, -- Name (Node2)
12472 3 => False, -- unused
12473 4 => False, -- unused
12474 5 => False), -- unused
12475
12476 N_Delay_Until_Statement =>
12477 (1 => False, -- unused
12478 2 => False, -- unused
12479 3 => True, -- Expression (Node3)
12480 4 => False, -- unused
12481 5 => False), -- unused
12482
12483 N_Delay_Relative_Statement =>
12484 (1 => False, -- unused
12485 2 => False, -- unused
12486 3 => True, -- Expression (Node3)
12487 4 => False, -- unused
12488 5 => False), -- unused
12489
12490 N_Selective_Accept =>
12491 (1 => True, -- Select_Alternatives (List1)
12492 2 => False, -- unused
12493 3 => False, -- unused
12494 4 => True, -- Else_Statements (List4)
12495 5 => False), -- unused
12496
12497 N_Accept_Alternative =>
12498 (1 => True, -- Condition (Node1)
12499 2 => True, -- Accept_Statement (Node2)
12500 3 => True, -- Statements (List3)
12501 4 => True, -- Pragmas_Before (List4)
12502 5 => False), -- Accept_Handler_Records (List5-Sem)
12503
12504 N_Delay_Alternative =>
12505 (1 => True, -- Condition (Node1)
12506 2 => True, -- Delay_Statement (Node2)
12507 3 => True, -- Statements (List3)
12508 4 => True, -- Pragmas_Before (List4)
12509 5 => False), -- unused
12510
12511 N_Terminate_Alternative =>
12512 (1 => True, -- Condition (Node1)
12513 2 => False, -- unused
12514 3 => False, -- unused
12515 4 => True, -- Pragmas_Before (List4)
12516 5 => True), -- Pragmas_After (List5)
12517
12518 N_Timed_Entry_Call =>
12519 (1 => True, -- Entry_Call_Alternative (Node1)
12520 2 => False, -- unused
12521 3 => False, -- unused
12522 4 => True, -- Delay_Alternative (Node4)
12523 5 => False), -- unused
12524
12525 N_Entry_Call_Alternative =>
12526 (1 => True, -- Entry_Call_Statement (Node1)
12527 2 => False, -- unused
12528 3 => True, -- Statements (List3)
12529 4 => True, -- Pragmas_Before (List4)
12530 5 => False), -- unused
12531
12532 N_Conditional_Entry_Call =>
12533 (1 => True, -- Entry_Call_Alternative (Node1)
12534 2 => False, -- unused
12535 3 => False, -- unused
12536 4 => True, -- Else_Statements (List4)
12537 5 => False), -- unused
12538
12539 N_Asynchronous_Select =>
12540 (1 => True, -- Triggering_Alternative (Node1)
12541 2 => True, -- Abortable_Part (Node2)
12542 3 => False, -- unused
12543 4 => False, -- unused
12544 5 => False), -- unused
12545
12546 N_Triggering_Alternative =>
12547 (1 => True, -- Triggering_Statement (Node1)
12548 2 => False, -- unused
12549 3 => True, -- Statements (List3)
12550 4 => True, -- Pragmas_Before (List4)
12551 5 => False), -- unused
12552
12553 N_Abortable_Part =>
12554 (1 => False, -- unused
12555 2 => False, -- unused
12556 3 => True, -- Statements (List3)
12557 4 => False, -- unused
12558 5 => False), -- unused
12559
12560 N_Abort_Statement =>
12561 (1 => False, -- unused
12562 2 => True, -- Names (List2)
12563 3 => False, -- unused
12564 4 => False, -- unused
12565 5 => False), -- unused
12566
12567 N_Compilation_Unit =>
12568 (1 => True, -- Context_Items (List1)
12569 2 => True, -- Unit (Node2)
12570 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
12571 4 => False, -- Library_Unit (Node4-Sem)
12572 5 => True), -- Aux_Decls_Node (Node5)
12573
12574 N_Compilation_Unit_Aux =>
12575 (1 => True, -- Actions (List1)
12576 2 => True, -- Declarations (List2)
12577 3 => False, -- Default_Storage_Pool (Node3)
12578 4 => True, -- Config_Pragmas (List4)
12579 5 => True), -- Pragmas_After (List5)
12580
12581 N_With_Clause =>
12582 (1 => False, -- unused
12583 2 => True, -- Name (Node2)
12584 3 => False, -- unused
12585 4 => False, -- Library_Unit (Node4-Sem)
12586 5 => False), -- Corresponding_Spec (Node5-Sem)
12587
12588 N_Subprogram_Body_Stub =>
12589 (1 => True, -- Specification (Node1)
12590 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12591 3 => False, -- unused
12592 4 => False, -- Library_Unit (Node4-Sem)
12593 5 => False), -- Corresponding_Body (Node5-Sem)
12594
12595 N_Package_Body_Stub =>
12596 (1 => True, -- Defining_Identifier (Node1)
12597 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12598 3 => False, -- unused
12599 4 => False, -- Library_Unit (Node4-Sem)
12600 5 => False), -- Corresponding_Body (Node5-Sem)
12601
12602 N_Task_Body_Stub =>
12603 (1 => True, -- Defining_Identifier (Node1)
12604 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12605 3 => False, -- unused
12606 4 => False, -- Library_Unit (Node4-Sem)
12607 5 => False), -- Corresponding_Body (Node5-Sem)
12608
12609 N_Protected_Body_Stub =>
12610 (1 => True, -- Defining_Identifier (Node1)
12611 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12612 3 => False, -- unused
12613 4 => False, -- Library_Unit (Node4-Sem)
12614 5 => False), -- Corresponding_Body (Node5-Sem)
12615
12616 N_Subunit =>
12617 (1 => True, -- Proper_Body (Node1)
12618 2 => True, -- Name (Node2)
12619 3 => False, -- Corresponding_Stub (Node3-Sem)
12620 4 => False, -- unused
12621 5 => False), -- unused
12622
12623 N_Exception_Declaration =>
12624 (1 => True, -- Defining_Identifier (Node1)
12625 2 => False, -- unused
12626 3 => False, -- Expression (Node3-Sem)
12627 4 => False, -- unused
12628 5 => False), -- unused
12629
12630 N_Handled_Sequence_Of_Statements =>
12631 (1 => True, -- At_End_Proc (Node1)
12632 2 => False, -- First_Real_Statement (Node2-Sem)
12633 3 => True, -- Statements (List3)
12634 4 => True, -- End_Label (Node4)
12635 5 => True), -- Exception_Handlers (List5)
12636
12637 N_Exception_Handler =>
12638 (1 => False, -- Local_Raise_Statements (Elist1)
12639 2 => True, -- Choice_Parameter (Node2)
12640 3 => True, -- Statements (List3)
12641 4 => True, -- Exception_Choices (List4)
12642 5 => False), -- Exception_Label (Node5)
12643
12644 N_Raise_Statement =>
12645 (1 => False, -- unused
12646 2 => True, -- Name (Node2)
12647 3 => True, -- Expression (Node3)
12648 4 => False, -- unused
12649 5 => False), -- unused
12650
12651 N_Raise_Expression =>
12652 (1 => False, -- unused
12653 2 => True, -- Name (Node2)
12654 3 => True, -- Expression (Node3)
12655 4 => False, -- unused
12656 5 => False), -- Etype (Node5-Sem)
12657
12658 N_Generic_Subprogram_Declaration =>
12659 (1 => True, -- Specification (Node1)
12660 2 => True, -- Generic_Formal_Declarations (List2)
12661 3 => False, -- unused
12662 4 => False, -- Parent_Spec (Node4-Sem)
12663 5 => False), -- Corresponding_Body (Node5-Sem)
12664
12665 N_Generic_Package_Declaration =>
12666 (1 => True, -- Specification (Node1)
12667 2 => True, -- Generic_Formal_Declarations (List2)
12668 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12669 4 => False, -- Parent_Spec (Node4-Sem)
12670 5 => False), -- Corresponding_Body (Node5-Sem)
12671
12672 N_Package_Instantiation =>
12673 (1 => True, -- Defining_Unit_Name (Node1)
12674 2 => True, -- Name (Node2)
12675 3 => True, -- Generic_Associations (List3)
12676 4 => False, -- Parent_Spec (Node4-Sem)
12677 5 => False), -- Instance_Spec (Node5-Sem)
12678
12679 N_Procedure_Instantiation =>
12680 (1 => True, -- Defining_Unit_Name (Node1)
12681 2 => True, -- Name (Node2)
12682 3 => True, -- Generic_Associations (List3)
12683 4 => False, -- Parent_Spec (Node4-Sem)
12684 5 => False), -- Instance_Spec (Node5-Sem)
12685
12686 N_Function_Instantiation =>
12687 (1 => True, -- Defining_Unit_Name (Node1)
12688 2 => True, -- Name (Node2)
12689 3 => True, -- Generic_Associations (List3)
12690 4 => False, -- Parent_Spec (Node4-Sem)
12691 5 => False), -- Instance_Spec (Node5-Sem)
12692
12693 N_Generic_Association =>
12694 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12695 2 => True, -- Selector_Name (Node2)
12696 3 => False, -- unused
12697 4 => False, -- unused
12698 5 => False), -- unused
12699
12700 N_Formal_Object_Declaration =>
12701 (1 => True, -- Defining_Identifier (Node1)
12702 2 => False, -- unused
12703 3 => True, -- Access_Definition (Node3)
12704 4 => True, -- Subtype_Mark (Node4)
12705 5 => True), -- Default_Expression (Node5)
12706
12707 N_Formal_Type_Declaration =>
12708 (1 => True, -- Defining_Identifier (Node1)
12709 2 => False, -- unused
12710 3 => True, -- Formal_Type_Definition (Node3)
12711 4 => True, -- Discriminant_Specifications (List4)
12712 5 => False), -- unused
12713
12714 N_Formal_Private_Type_Definition =>
12715 (1 => False, -- unused
12716 2 => False, -- unused
12717 3 => False, -- unused
12718 4 => False, -- unused
12719 5 => False), -- unused
12720
12721 N_Formal_Incomplete_Type_Definition =>
12722 (1 => False, -- unused
12723 2 => False, -- unused
12724 3 => False, -- unused
12725 4 => False, -- unused
12726 5 => False), -- unused
12727
12728 N_Formal_Derived_Type_Definition =>
12729 (1 => False, -- unused
12730 2 => True, -- Interface_List (List2)
12731 3 => False, -- unused
12732 4 => True, -- Subtype_Mark (Node4)
12733 5 => False), -- unused
12734
12735 N_Formal_Discrete_Type_Definition =>
12736 (1 => False, -- unused
12737 2 => False, -- unused
12738 3 => False, -- unused
12739 4 => False, -- unused
12740 5 => False), -- unused
12741
12742 N_Formal_Signed_Integer_Type_Definition =>
12743 (1 => False, -- unused
12744 2 => False, -- unused
12745 3 => False, -- unused
12746 4 => False, -- unused
12747 5 => False), -- unused
12748
12749 N_Formal_Modular_Type_Definition =>
12750 (1 => False, -- unused
12751 2 => False, -- unused
12752 3 => False, -- unused
12753 4 => False, -- unused
12754 5 => False), -- unused
12755
12756 N_Formal_Floating_Point_Definition =>
12757 (1 => False, -- unused
12758 2 => False, -- unused
12759 3 => False, -- unused
12760 4 => False, -- unused
12761 5 => False), -- unused
12762
12763 N_Formal_Ordinary_Fixed_Point_Definition =>
12764 (1 => False, -- unused
12765 2 => False, -- unused
12766 3 => False, -- unused
12767 4 => False, -- unused
12768 5 => False), -- unused
12769
12770 N_Formal_Decimal_Fixed_Point_Definition =>
12771 (1 => False, -- unused
12772 2 => False, -- unused
12773 3 => False, -- unused
12774 4 => False, -- unused
12775 5 => False), -- unused
12776
12777 N_Formal_Concrete_Subprogram_Declaration =>
12778 (1 => True, -- Specification (Node1)
12779 2 => True, -- Default_Name (Node2)
12780 3 => False, -- unused
12781 4 => False, -- unused
12782 5 => False), -- unused
12783
12784 N_Formal_Abstract_Subprogram_Declaration =>
12785 (1 => True, -- Specification (Node1)
12786 2 => True, -- Default_Name (Node2)
12787 3 => False, -- unused
12788 4 => False, -- unused
12789 5 => False), -- unused
12790
12791 N_Formal_Package_Declaration =>
12792 (1 => True, -- Defining_Identifier (Node1)
12793 2 => True, -- Name (Node2)
12794 3 => True, -- Generic_Associations (List3)
12795 4 => False, -- unused
12796 5 => False), -- Instance_Spec (Node5-Sem)
12797
12798 N_Attribute_Definition_Clause =>
12799 (1 => True, -- Chars (Name1)
12800 2 => True, -- Name (Node2)
12801 3 => True, -- Expression (Node3)
12802 4 => False, -- unused
12803 5 => False), -- Next_Rep_Item (Node5-Sem)
12804
12805 N_Aspect_Specification =>
12806 (1 => True, -- Identifier (Node1)
12807 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12808 3 => True, -- Expression (Node3)
12809 4 => False, -- Entity (Node4-Sem)
12810 5 => False), -- Next_Rep_Item (Node5-Sem)
12811
12812 N_Enumeration_Representation_Clause =>
12813 (1 => True, -- Identifier (Node1)
12814 2 => False, -- unused
12815 3 => True, -- Array_Aggregate (Node3)
12816 4 => False, -- unused
12817 5 => False), -- Next_Rep_Item (Node5-Sem)
12818
12819 N_Record_Representation_Clause =>
12820 (1 => True, -- Identifier (Node1)
12821 2 => True, -- Mod_Clause (Node2)
12822 3 => True, -- Component_Clauses (List3)
12823 4 => False, -- unused
12824 5 => False), -- Next_Rep_Item (Node5-Sem)
12825
12826 N_Component_Clause =>
12827 (1 => True, -- Component_Name (Node1)
12828 2 => True, -- Position (Node2)
12829 3 => True, -- First_Bit (Node3)
12830 4 => True, -- Last_Bit (Node4)
12831 5 => False), -- unused
12832
12833 N_Code_Statement =>
12834 (1 => False, -- unused
12835 2 => False, -- unused
12836 3 => True, -- Expression (Node3)
12837 4 => False, -- unused
12838 5 => False), -- unused
12839
12840 N_Op_Rotate_Left =>
12841 (1 => True, -- Chars (Name1)
12842 2 => True, -- Left_Opnd (Node2)
12843 3 => True, -- Right_Opnd (Node3)
12844 4 => False, -- Entity (Node4-Sem)
12845 5 => False), -- Etype (Node5-Sem)
12846
12847 N_Op_Rotate_Right =>
12848 (1 => True, -- Chars (Name1)
12849 2 => True, -- Left_Opnd (Node2)
12850 3 => True, -- Right_Opnd (Node3)
12851 4 => False, -- Entity (Node4-Sem)
12852 5 => False), -- Etype (Node5-Sem)
12853
12854 N_Op_Shift_Left =>
12855 (1 => True, -- Chars (Name1)
12856 2 => True, -- Left_Opnd (Node2)
12857 3 => True, -- Right_Opnd (Node3)
12858 4 => False, -- Entity (Node4-Sem)
12859 5 => False), -- Etype (Node5-Sem)
12860
12861 N_Op_Shift_Right_Arithmetic =>
12862 (1 => True, -- Chars (Name1)
12863 2 => True, -- Left_Opnd (Node2)
12864 3 => True, -- Right_Opnd (Node3)
12865 4 => False, -- Entity (Node4-Sem)
12866 5 => False), -- Etype (Node5-Sem)
12867
12868 N_Op_Shift_Right =>
12869 (1 => True, -- Chars (Name1)
12870 2 => True, -- Left_Opnd (Node2)
12871 3 => True, -- Right_Opnd (Node3)
12872 4 => False, -- Entity (Node4-Sem)
12873 5 => False), -- Etype (Node5-Sem)
12874
12875 N_Delta_Constraint =>
12876 (1 => False, -- unused
12877 2 => False, -- unused
12878 3 => True, -- Delta_Expression (Node3)
12879 4 => True, -- Range_Constraint (Node4)
12880 5 => False), -- unused
12881
12882 N_At_Clause =>
12883 (1 => True, -- Identifier (Node1)
12884 2 => False, -- unused
12885 3 => True, -- Expression (Node3)
12886 4 => False, -- unused
12887 5 => False), -- unused
12888
12889 N_Mod_Clause =>
12890 (1 => False, -- unused
12891 2 => False, -- unused
12892 3 => True, -- Expression (Node3)
12893 4 => True, -- Pragmas_Before (List4)
12894 5 => False), -- unused
12895
12896 N_If_Expression =>
12897 (1 => True, -- Expressions (List1)
12898 2 => False, -- Then_Actions (List2-Sem)
12899 3 => False, -- Else_Actions (List3-Sem)
12900 4 => False, -- unused
12901 5 => False), -- Etype (Node5-Sem)
12902
12903 N_Compound_Statement =>
12904 (1 => True, -- Actions (List1)
12905 2 => False, -- unused
12906 3 => False, -- unused
12907 4 => False, -- unused
12908 5 => False), -- unused
12909
12910 N_Contract =>
12911 (1 => False, -- Pre_Post_Conditions (Node1-Sem)
12912 2 => False, -- Contract_Test_Cases (Node2-Sem)
12913 3 => False, -- Classifications (Node3-Sem)
12914 4 => False, -- unused
12915 5 => False), -- unused
12916
12917 N_Expanded_Name =>
12918 (1 => True, -- Chars (Name1)
12919 2 => True, -- Selector_Name (Node2)
12920 3 => True, -- Prefix (Node3)
12921 4 => False, -- Entity (Node4-Sem)
12922 5 => False), -- Etype (Node5-Sem)
12923
12924 N_Expression_With_Actions =>
12925 (1 => True, -- Actions (List1)
12926 2 => False, -- unused
12927 3 => True, -- Expression (Node3)
12928 4 => False, -- unused
12929 5 => False), -- unused
12930
12931 N_Free_Statement =>
12932 (1 => False, -- Storage_Pool (Node1-Sem)
12933 2 => False, -- Procedure_To_Call (Node2-Sem)
12934 3 => True, -- Expression (Node3)
12935 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12936 5 => False), -- unused
12937
12938 N_Freeze_Entity =>
12939 (1 => True, -- Actions (List1)
12940 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12941 3 => False, -- TSS_Elist (Elist3-Sem)
12942 4 => False, -- Entity (Node4-Sem)
12943 5 => False), -- First_Subtype_Link (Node5-Sem)
12944
12945 N_Freeze_Generic_Entity =>
12946 (1 => False, -- unused
12947 2 => False, -- unused
12948 3 => False, -- unused
12949 4 => False, -- Entity (Node4-Sem)
12950 5 => False), -- unused
12951
12952 N_Implicit_Label_Declaration =>
12953 (1 => True, -- Defining_Identifier (Node1)
12954 2 => False, -- Label_Construct (Node2-Sem)
12955 3 => False, -- unused
12956 4 => False, -- unused
12957 5 => False), -- unused
12958
12959 N_Itype_Reference =>
12960 (1 => False, -- Itype (Node1-Sem)
12961 2 => False, -- unused
12962 3 => False, -- unused
12963 4 => False, -- unused
12964 5 => False), -- unused
12965
12966 N_Raise_Constraint_Error =>
12967 (1 => True, -- Condition (Node1)
12968 2 => False, -- unused
12969 3 => True, -- Reason (Uint3)
12970 4 => False, -- unused
12971 5 => False), -- Etype (Node5-Sem)
12972
12973 N_Raise_Program_Error =>
12974 (1 => True, -- Condition (Node1)
12975 2 => False, -- unused
12976 3 => True, -- Reason (Uint3)
12977 4 => False, -- unused
12978 5 => False), -- Etype (Node5-Sem)
12979
12980 N_Raise_Storage_Error =>
12981 (1 => True, -- Condition (Node1)
12982 2 => False, -- unused
12983 3 => True, -- Reason (Uint3)
12984 4 => False, -- unused
12985 5 => False), -- Etype (Node5-Sem)
12986
12987 N_Push_Constraint_Error_Label =>
12988 (1 => False, -- unused
12989 2 => False, -- unused
12990 3 => False, -- unused
12991 4 => False, -- unused
12992 5 => False), -- unused
12993
12994 N_Push_Program_Error_Label =>
12995 (1 => False, -- unused
12996 2 => False, -- unused
12997 3 => False, -- unused
12998 4 => False, -- unused
12999 5 => False), -- Exception_Label
13000
13001 N_Push_Storage_Error_Label =>
13002 (1 => False, -- unused
13003 2 => False, -- unused
13004 3 => False, -- unused
13005 4 => False, -- unused
13006 5 => False), -- Exception_Label
13007
13008 N_Pop_Constraint_Error_Label =>
13009 (1 => False, -- unused
13010 2 => False, -- unused
13011 3 => False, -- unused
13012 4 => False, -- unused
13013 5 => False), -- unused
13014
13015 N_Pop_Program_Error_Label =>
13016 (1 => False, -- unused
13017 2 => False, -- unused
13018 3 => False, -- unused
13019 4 => False, -- unused
13020 5 => False), -- unused
13021
13022 N_Pop_Storage_Error_Label =>
13023 (1 => False, -- unused
13024 2 => False, -- unused
13025 3 => False, -- unused
13026 4 => False, -- unused
13027 5 => False), -- unused
13028
13029 N_Reference =>
13030 (1 => False, -- unused
13031 2 => False, -- unused
13032 3 => True, -- Prefix (Node3)
13033 4 => False, -- unused
13034 5 => False), -- Etype (Node5-Sem)
13035
13036 N_Unchecked_Expression =>
13037 (1 => False, -- unused
13038 2 => False, -- unused
13039 3 => True, -- Expression (Node3)
13040 4 => False, -- unused
13041 5 => False), -- Etype (Node5-Sem)
13042
13043 N_Unchecked_Type_Conversion =>
13044 (1 => False, -- unused
13045 2 => False, -- unused
13046 3 => True, -- Expression (Node3)
13047 4 => True, -- Subtype_Mark (Node4)
13048 5 => False), -- Etype (Node5-Sem)
13049
13050 N_Validate_Unchecked_Conversion =>
13051 (1 => False, -- Source_Type (Node1-Sem)
13052 2 => False, -- Target_Type (Node2-Sem)
13053 3 => False, -- unused
13054 4 => False, -- unused
13055 5 => False), -- unused
13056
13057 -- Entries for SCIL nodes
13058
13059 N_SCIL_Dispatch_Table_Tag_Init =>
13060 (1 => False, -- unused
13061 2 => False, -- unused
13062 3 => False, -- unused
13063 4 => False, -- SCIL_Entity (Node4-Sem)
13064 5 => False), -- unused
13065
13066 N_SCIL_Dispatching_Call =>
13067 (1 => False, -- unused
13068 2 => False, -- SCIL_Target_Prim (Node2-Sem)
13069 3 => False, -- unused
13070 4 => False, -- SCIL_Entity (Node4-Sem)
13071 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
13072
13073 N_SCIL_Membership_Test =>
13074 (1 => False, -- unused
13075 2 => False, -- unused
13076 3 => False, -- unused
13077 4 => False, -- SCIL_Entity (Node4-Sem)
13078 5 => False), -- SCIL_Tag_Value (Node5-Sem)
13079
13080 N_Call_Marker =>
13081 (1 => False, -- Target (Node1-Sem)
13082 2 => False, -- unused
13083 3 => False, -- unused
13084 4 => False, -- unused
13085 5 => False), -- unused
13086
13087 N_Variable_Reference_Marker =>
13088 (1 => False, -- Target (Node1-Sem)
13089 2 => False, -- unused
13090 3 => False, -- unused
13091 4 => False, -- unused
13092 5 => False), -- unused
13093
13094 -- Entries for Empty, Error, and Unused. Even though these have a Chars
13095 -- field for debugging purposes, they are not really syntactic fields, so
13096 -- we mark all fields as unused.
13097
13098 N_Empty =>
13099 (1 => False, -- unused
13100 2 => False, -- unused
13101 3 => False, -- unused
13102 4 => False, -- unused
13103 5 => False), -- unused
13104
13105 N_Error =>
13106 (1 => False, -- unused
13107 2 => False, -- unused
13108 3 => False, -- unused
13109 4 => False, -- unused
13110 5 => False), -- unused
13111
13112 N_Unused_At_Start =>
13113 (1 => False, -- unused
13114 2 => False, -- unused
13115 3 => False, -- unused
13116 4 => False, -- unused
13117 5 => False), -- unused
13118
13119 N_Unused_At_End =>
13120 (1 => False, -- unused
13121 2 => False, -- unused
13122 3 => False, -- unused
13123 4 => False, -- unused
13124 5 => False)); -- unused
13125
13126 --------------------
13127 -- Inline Pragmas --
13128 --------------------
13129
13130 pragma Inline (Abort_Present);
13131 pragma Inline (Abortable_Part);
13132 pragma Inline (Abstract_Present);
13133 pragma Inline (Accept_Handler_Records);
13134 pragma Inline (Accept_Statement);
13135 pragma Inline (Access_Definition);
13136 pragma Inline (Access_To_Subprogram_Definition);
13137 pragma Inline (Access_Types_To_Process);
13138 pragma Inline (Actions);
13139 pragma Inline (Activation_Chain_Entity);
13140 pragma Inline (Acts_As_Spec);
13141 pragma Inline (Actual_Designated_Subtype);
13142 pragma Inline (Address_Warning_Posted);
13143 pragma Inline (Aggregate_Bounds);
13144 pragma Inline (Aliased_Present);
13145 pragma Inline (Alloc_For_BIP_Return);
13146 pragma Inline (All_Others);
13147 pragma Inline (All_Present);
13148 pragma Inline (Alternatives);
13149 pragma Inline (Ancestor_Part);
13150 pragma Inline (Atomic_Sync_Required);
13151 pragma Inline (Array_Aggregate);
13152 pragma Inline (Aspect_On_Partial_View);
13153 pragma Inline (Aspect_Rep_Item);
13154 pragma Inline (Assignment_OK);
13155 pragma Inline (Associated_Node);
13156 pragma Inline (At_End_Proc);
13157 pragma Inline (Attribute_Name);
13158 pragma Inline (Aux_Decls_Node);
13159 pragma Inline (Backwards_OK);
13160 pragma Inline (Bad_Is_Detected);
13161 pragma Inline (Body_To_Inline);
13162 pragma Inline (Body_Required);
13163 pragma Inline (By_Ref);
13164 pragma Inline (Box_Present);
13165 pragma Inline (Char_Literal_Value);
13166 pragma Inline (Chars);
13167 pragma Inline (Check_Address_Alignment);
13168 pragma Inline (Choice_Parameter);
13169 pragma Inline (Choices);
13170 pragma Inline (Class_Present);
13171 pragma Inline (Classifications);
13172 pragma Inline (Cleanup_Actions);
13173 pragma Inline (Comes_From_Extended_Return_Statement);
13174 pragma Inline (Compile_Time_Known_Aggregate);
13175 pragma Inline (Component_Associations);
13176 pragma Inline (Component_Clauses);
13177 pragma Inline (Component_Definition);
13178 pragma Inline (Component_Items);
13179 pragma Inline (Component_List);
13180 pragma Inline (Component_Name);
13181 pragma Inline (Componentwise_Assignment);
13182 pragma Inline (Condition);
13183 pragma Inline (Condition_Actions);
13184 pragma Inline (Config_Pragmas);
13185 pragma Inline (Constant_Present);
13186 pragma Inline (Constraint);
13187 pragma Inline (Constraints);
13188 pragma Inline (Context_Installed);
13189 pragma Inline (Context_Items);
13190 pragma Inline (Context_Pending);
13191 pragma Inline (Contract_Test_Cases);
13192 pragma Inline (Controlling_Argument);
13193 pragma Inline (Convert_To_Return_False);
13194 pragma Inline (Conversion_OK);
13195 pragma Inline (Corresponding_Aspect);
13196 pragma Inline (Corresponding_Body);
13197 pragma Inline (Corresponding_Formal_Spec);
13198 pragma Inline (Corresponding_Generic_Association);
13199 pragma Inline (Corresponding_Integer_Value);
13200 pragma Inline (Corresponding_Spec);
13201 pragma Inline (Corresponding_Spec_Of_Stub);
13202 pragma Inline (Corresponding_Stub);
13203 pragma Inline (Dcheck_Function);
13204 pragma Inline (Declarations);
13205 pragma Inline (Default_Expression);
13206 pragma Inline (Default_Storage_Pool);
13207 pragma Inline (Default_Name);
13208 pragma Inline (Defining_Identifier);
13209 pragma Inline (Defining_Unit_Name);
13210 pragma Inline (Delay_Alternative);
13211 pragma Inline (Delay_Statement);
13212 pragma Inline (Delta_Expression);
13213 pragma Inline (Digits_Expression);
13214 pragma Inline (Discr_Check_Funcs_Built);
13215 pragma Inline (Discrete_Choices);
13216 pragma Inline (Discrete_Range);
13217 pragma Inline (Discrete_Subtype_Definition);
13218 pragma Inline (Discrete_Subtype_Definitions);
13219 pragma Inline (Discriminant_Specifications);
13220 pragma Inline (Discriminant_Type);
13221 pragma Inline (Do_Accessibility_Check);
13222 pragma Inline (Do_Discriminant_Check);
13223 pragma Inline (Do_Length_Check);
13224 pragma Inline (Do_Division_Check);
13225 pragma Inline (Do_Overflow_Check);
13226 pragma Inline (Do_Range_Check);
13227 pragma Inline (Do_Storage_Check);
13228 pragma Inline (Do_Tag_Check);
13229 pragma Inline (Elaborate_All_Desirable);
13230 pragma Inline (Elaborate_All_Present);
13231 pragma Inline (Elaborate_Desirable);
13232 pragma Inline (Elaborate_Present);
13233 pragma Inline (Else_Actions);
13234 pragma Inline (Else_Statements);
13235 pragma Inline (Elsif_Parts);
13236 pragma Inline (Enclosing_Variant);
13237 pragma Inline (End_Label);
13238 pragma Inline (End_Span);
13239 pragma Inline (Entity);
13240 pragma Inline (Entity_Or_Associated_Node);
13241 pragma Inline (Entry_Body_Formal_Part);
13242 pragma Inline (Entry_Call_Alternative);
13243 pragma Inline (Entry_Call_Statement);
13244 pragma Inline (Entry_Direct_Name);
13245 pragma Inline (Entry_Index);
13246 pragma Inline (Entry_Index_Specification);
13247 pragma Inline (Etype);
13248 pragma Inline (Exception_Choices);
13249 pragma Inline (Exception_Handlers);
13250 pragma Inline (Exception_Junk);
13251 pragma Inline (Exception_Label);
13252 pragma Inline (Expansion_Delayed);
13253 pragma Inline (Explicit_Actual_Parameter);
13254 pragma Inline (Explicit_Generic_Actual_Parameter);
13255 pragma Inline (Expression);
13256 pragma Inline (Expression_Copy);
13257 pragma Inline (Expressions);
13258 pragma Inline (First_Bit);
13259 pragma Inline (First_Inlined_Subprogram);
13260 pragma Inline (First_Name);
13261 pragma Inline (First_Named_Actual);
13262 pragma Inline (First_Real_Statement);
13263 pragma Inline (First_Subtype_Link);
13264 pragma Inline (Float_Truncate);
13265 pragma Inline (Formal_Type_Definition);
13266 pragma Inline (Forwards_OK);
13267 pragma Inline (From_Aspect_Specification);
13268 pragma Inline (From_At_End);
13269 pragma Inline (From_At_Mod);
13270 pragma Inline (From_Conditional_Expression);
13271 pragma Inline (From_Default);
13272 pragma Inline (Generalized_Indexing);
13273 pragma Inline (Generic_Associations);
13274 pragma Inline (Generic_Formal_Declarations);
13275 pragma Inline (Generic_Parent);
13276 pragma Inline (Generic_Parent_Type);
13277 pragma Inline (Handled_Statement_Sequence);
13278 pragma Inline (Handler_List_Entry);
13279 pragma Inline (Has_Created_Identifier);
13280 pragma Inline (Has_Dereference_Action);
13281 pragma Inline (Has_Dynamic_Length_Check);
13282 pragma Inline (Has_Init_Expression);
13283 pragma Inline (Has_Local_Raise);
13284 pragma Inline (Has_Self_Reference);
13285 pragma Inline (Has_SP_Choice);
13286 pragma Inline (Has_No_Elaboration_Code);
13287 pragma Inline (Has_Pragma_Suppress_All);
13288 pragma Inline (Has_Private_View);
13289 pragma Inline (Has_Relative_Deadline_Pragma);
13290 pragma Inline (Has_Storage_Size_Pragma);
13291 pragma Inline (Has_Target_Names);
13292 pragma Inline (Has_Wide_Character);
13293 pragma Inline (Has_Wide_Wide_Character);
13294 pragma Inline (Header_Size_Added);
13295 pragma Inline (Hidden_By_Use_Clause);
13296 pragma Inline (High_Bound);
13297 pragma Inline (Identifier);
13298 pragma Inline (Implicit_With);
13299 pragma Inline (Interface_List);
13300 pragma Inline (Interface_Present);
13301 pragma Inline (Includes_Infinities);
13302 pragma Inline (Import_Interface_Present);
13303 pragma Inline (In_Present);
13304 pragma Inline (Incomplete_View);
13305 pragma Inline (Inherited_Discriminant);
13306 pragma Inline (Instance_Spec);
13307 pragma Inline (Intval);
13308 pragma Inline (Iterator_Specification);
13309 pragma Inline (Is_Abort_Block);
13310 pragma Inline (Is_Accessibility_Actual);
13311 pragma Inline (Is_Analyzed_Pragma);
13312 pragma Inline (Is_Asynchronous_Call_Block);
13313 pragma Inline (Is_Boolean_Aspect);
13314 pragma Inline (Is_Checked);
13315 pragma Inline (Is_Checked_Ghost_Pragma);
13316 pragma Inline (Is_Component_Left_Opnd);
13317 pragma Inline (Is_Component_Right_Opnd);
13318 pragma Inline (Is_Controlling_Actual);
13319 pragma Inline (Is_Declaration_Level_Node);
13320 pragma Inline (Is_Delayed_Aspect);
13321 pragma Inline (Is_Disabled);
13322 pragma Inline (Is_Dispatching_Call);
13323 pragma Inline (Is_Dynamic_Coextension);
13324 pragma Inline (Is_Effective_Use_Clause);
13325 pragma Inline (Is_Elaboration_Checks_OK_Node);
13326 pragma Inline (Is_Elaboration_Code);
13327 pragma Inline (Is_Elaboration_Warnings_OK_Node);
13328 pragma Inline (Is_Elsif);
13329 pragma Inline (Is_Entry_Barrier_Function);
13330 pragma Inline (Is_Expanded_Build_In_Place_Call);
13331 pragma Inline (Is_Expanded_Contract);
13332 pragma Inline (Is_Finalization_Wrapper);
13333 pragma Inline (Is_Folded_In_Parser);
13334 pragma Inline (Is_Generic_Contract_Pragma);
13335 pragma Inline (Is_Homogeneous_Aggregate);
13336 pragma Inline (Is_Ignored);
13337 pragma Inline (Is_Ignored_Ghost_Pragma);
13338 pragma Inline (Is_In_Discriminant_Check);
13339 pragma Inline (Is_Inherited_Pragma);
13340 pragma Inline (Is_Initialization_Block);
13341 pragma Inline (Is_Known_Guaranteed_ABE);
13342 pragma Inline (Is_Machine_Number);
13343 pragma Inline (Is_Null_Loop);
13344 pragma Inline (Is_Overloaded);
13345 pragma Inline (Is_Power_Of_2_For_Shift);
13346 pragma Inline (Is_Preelaborable_Call);
13347 pragma Inline (Is_Prefixed_Call);
13348 pragma Inline (Is_Protected_Subprogram_Body);
13349 pragma Inline (Is_Qualified_Universal_Literal);
13350 pragma Inline (Is_Read);
13351 pragma Inline (Is_Source_Call);
13352 pragma Inline (Is_SPARK_Mode_On_Node);
13353 pragma Inline (Is_Static_Coextension);
13354 pragma Inline (Is_Static_Expression);
13355 pragma Inline (Is_Subprogram_Descriptor);
13356 pragma Inline (Is_Task_Allocation_Block);
13357 pragma Inline (Is_Task_Body_Procedure);
13358 pragma Inline (Is_Task_Master);
13359 pragma Inline (Is_Write);
13360 pragma Inline (Iterator_Filter);
13361 pragma Inline (Iteration_Scheme);
13362 pragma Inline (Itype);
13363 pragma Inline (Key_Expression);
13364 pragma Inline (Kill_Range_Check);
13365 pragma Inline (Last_Bit);
13366 pragma Inline (Last_Name);
13367 pragma Inline (Library_Unit);
13368 pragma Inline (Label_Construct);
13369 pragma Inline (Left_Opnd);
13370 pragma Inline (Limited_View_Installed);
13371 pragma Inline (Limited_Present);
13372 pragma Inline (Literals);
13373 pragma Inline (Local_Raise_Not_OK);
13374 pragma Inline (Local_Raise_Statements);
13375 pragma Inline (Loop_Actions);
13376 pragma Inline (Loop_Parameter_Specification);
13377 pragma Inline (Low_Bound);
13378 pragma Inline (Mod_Clause);
13379 pragma Inline (More_Ids);
13380 pragma Inline (Must_Be_Byte_Aligned);
13381 pragma Inline (Must_Not_Freeze);
13382 pragma Inline (Must_Not_Override);
13383 pragma Inline (Must_Override);
13384 pragma Inline (Name);
13385 pragma Inline (Names);
13386 pragma Inline (Next_Entity);
13387 pragma Inline (Next_Exit_Statement);
13388 pragma Inline (Next_Implicit_With);
13389 pragma Inline (Next_Named_Actual);
13390 pragma Inline (Next_Pragma);
13391 pragma Inline (Next_Rep_Item);
13392 pragma Inline (Next_Use_Clause);
13393 pragma Inline (No_Ctrl_Actions);
13394 pragma Inline (No_Elaboration_Check);
13395 pragma Inline (No_Entities_Ref_In_Spec);
13396 pragma Inline (No_Initialization);
13397 pragma Inline (No_Minimize_Eliminate);
13398 pragma Inline (No_Side_Effect_Removal);
13399 pragma Inline (No_Truncation);
13400 pragma Inline (Null_Excluding_Subtype);
13401 pragma Inline (Null_Exclusion_Present);
13402 pragma Inline (Null_Exclusion_In_Return_Present);
13403 pragma Inline (Null_Present);
13404 pragma Inline (Null_Record_Present);
13405 pragma Inline (Null_Statement);
13406 pragma Inline (Object_Definition);
13407 pragma Inline (Of_Present);
13408 pragma Inline (Original_Discriminant);
13409 pragma Inline (Original_Entity);
13410 pragma Inline (Others_Discrete_Choices);
13411 pragma Inline (Out_Present);
13412 pragma Inline (Parameter_Associations);
13413 pragma Inline (Parameter_Specifications);
13414 pragma Inline (Parameter_Type);
13415 pragma Inline (Parent_Spec);
13416 pragma Inline (Parent_With);
13417 pragma Inline (Position);
13418 pragma Inline (Pragma_Argument_Associations);
13419 pragma Inline (Pragma_Identifier);
13420 pragma Inline (Pragmas_After);
13421 pragma Inline (Pragmas_Before);
13422 pragma Inline (Pre_Post_Conditions);
13423 pragma Inline (Prefix);
13424 pragma Inline (Premature_Use);
13425 pragma Inline (Present_Expr);
13426 pragma Inline (Prev_Ids);
13427 pragma Inline (Prev_Use_Clause);
13428 pragma Inline (Print_In_Hex);
13429 pragma Inline (Private_Declarations);
13430 pragma Inline (Private_Present);
13431 pragma Inline (Procedure_To_Call);
13432 pragma Inline (Proper_Body);
13433 pragma Inline (Protected_Definition);
13434 pragma Inline (Protected_Present);
13435 pragma Inline (Raises_Constraint_Error);
13436 pragma Inline (Range_Constraint);
13437 pragma Inline (Range_Expression);
13438 pragma Inline (Real_Range_Specification);
13439 pragma Inline (Realval);
13440 pragma Inline (Reason);
13441 pragma Inline (Record_Extension_Part);
13442 pragma Inline (Redundant_Use);
13443 pragma Inline (Renaming_Exception);
13444 pragma Inline (Result_Definition);
13445 pragma Inline (Return_Object_Declarations);
13446 pragma Inline (Return_Statement_Entity);
13447 pragma Inline (Reverse_Present);
13448 pragma Inline (Right_Opnd);
13449 pragma Inline (Rounded_Result);
13450 pragma Inline (Save_Invocation_Graph_Of_Body);
13451 pragma Inline (SCIL_Controlling_Tag);
13452 pragma Inline (SCIL_Entity);
13453 pragma Inline (SCIL_Tag_Value);
13454 pragma Inline (SCIL_Target_Prim);
13455 pragma Inline (Scope);
13456 pragma Inline (Select_Alternatives);
13457 pragma Inline (Selector_Name);
13458 pragma Inline (Selector_Names);
13459 pragma Inline (Shift_Count_OK);
13460 pragma Inline (Source_Type);
13461 pragma Inline (Specification);
13462 pragma Inline (Split_PPC);
13463 pragma Inline (Statements);
13464 pragma Inline (Storage_Pool);
13465 pragma Inline (Subpool_Handle_Name);
13466 pragma Inline (Strval);
13467 pragma Inline (Subtype_Indication);
13468 pragma Inline (Subtype_Mark);
13469 pragma Inline (Subtype_Marks);
13470 pragma Inline (Suppress_Assignment_Checks);
13471 pragma Inline (Suppress_Loop_Warnings);
13472 pragma Inline (Synchronized_Present);
13473 pragma Inline (Tagged_Present);
13474 pragma Inline (Target);
13475 pragma Inline (Target_Type);
13476 pragma Inline (Task_Definition);
13477 pragma Inline (Task_Present);
13478 pragma Inline (Then_Actions);
13479 pragma Inline (Then_Statements);
13480 pragma Inline (Triggering_Alternative);
13481 pragma Inline (Triggering_Statement);
13482 pragma Inline (TSS_Elist);
13483 pragma Inline (Type_Definition);
13484 pragma Inline (Uneval_Old_Accept);
13485 pragma Inline (Uneval_Old_Warn);
13486 pragma Inline (Unit);
13487 pragma Inline (Uninitialized_Variable);
13488 pragma Inline (Unknown_Discriminants_Present);
13489 pragma Inline (Unreferenced_In_Spec);
13490 pragma Inline (Variant_Part);
13491 pragma Inline (Variants);
13492 pragma Inline (Visible_Declarations);
13493 pragma Inline (Used_Operations);
13494 pragma Inline (Was_Attribute_Reference);
13495 pragma Inline (Was_Default_Init_Box_Association);
13496 pragma Inline (Was_Expression_Function);
13497 pragma Inline (Was_Originally_Stub);
13498
13499 pragma Inline (Set_Abort_Present);
13500 pragma Inline (Set_Abortable_Part);
13501 pragma Inline (Set_Abstract_Present);
13502 pragma Inline (Set_Accept_Handler_Records);
13503 pragma Inline (Set_Accept_Statement);
13504 pragma Inline (Set_Access_Definition);
13505 pragma Inline (Set_Access_To_Subprogram_Definition);
13506 pragma Inline (Set_Access_Types_To_Process);
13507 pragma Inline (Set_Actions);
13508 pragma Inline (Set_Activation_Chain_Entity);
13509 pragma Inline (Set_Acts_As_Spec);
13510 pragma Inline (Set_Actual_Designated_Subtype);
13511 pragma Inline (Set_Address_Warning_Posted);
13512 pragma Inline (Set_Aggregate_Bounds);
13513 pragma Inline (Set_Aliased_Present);
13514 pragma Inline (Set_Alloc_For_BIP_Return);
13515 pragma Inline (Set_All_Others);
13516 pragma Inline (Set_All_Present);
13517 pragma Inline (Set_Alternatives);
13518 pragma Inline (Set_Ancestor_Part);
13519 pragma Inline (Set_Array_Aggregate);
13520 pragma Inline (Set_Aspect_On_Partial_View);
13521 pragma Inline (Set_Aspect_Rep_Item);
13522 pragma Inline (Set_Assignment_OK);
13523 pragma Inline (Set_Associated_Node);
13524 pragma Inline (Set_At_End_Proc);
13525 pragma Inline (Set_Atomic_Sync_Required);
13526 pragma Inline (Set_Attribute_Name);
13527 pragma Inline (Set_Aux_Decls_Node);
13528 pragma Inline (Set_Backwards_OK);
13529 pragma Inline (Set_Bad_Is_Detected);
13530 pragma Inline (Set_Body_Required);
13531 pragma Inline (Set_Body_To_Inline);
13532 pragma Inline (Set_Box_Present);
13533 pragma Inline (Set_By_Ref);
13534 pragma Inline (Set_Char_Literal_Value);
13535 pragma Inline (Set_Chars);
13536 pragma Inline (Set_Check_Address_Alignment);
13537 pragma Inline (Set_Choice_Parameter);
13538 pragma Inline (Set_Choices);
13539 pragma Inline (Set_Class_Present);
13540 pragma Inline (Set_Classifications);
13541 pragma Inline (Set_Cleanup_Actions);
13542 pragma Inline (Set_Comes_From_Extended_Return_Statement);
13543 pragma Inline (Set_Compile_Time_Known_Aggregate);
13544 pragma Inline (Set_Component_Associations);
13545 pragma Inline (Set_Component_Clauses);
13546 pragma Inline (Set_Component_Definition);
13547 pragma Inline (Set_Component_Items);
13548 pragma Inline (Set_Component_List);
13549 pragma Inline (Set_Component_Name);
13550 pragma Inline (Set_Componentwise_Assignment);
13551 pragma Inline (Set_Condition);
13552 pragma Inline (Set_Condition_Actions);
13553 pragma Inline (Set_Config_Pragmas);
13554 pragma Inline (Set_Constant_Present);
13555 pragma Inline (Set_Constraint);
13556 pragma Inline (Set_Constraints);
13557 pragma Inline (Set_Context_Installed);
13558 pragma Inline (Set_Context_Items);
13559 pragma Inline (Set_Context_Pending);
13560 pragma Inline (Set_Contract_Test_Cases);
13561 pragma Inline (Set_Controlling_Argument);
13562 pragma Inline (Set_Conversion_OK);
13563 pragma Inline (Set_Convert_To_Return_False);
13564 pragma Inline (Set_Corresponding_Aspect);
13565 pragma Inline (Set_Corresponding_Body);
13566 pragma Inline (Set_Corresponding_Formal_Spec);
13567 pragma Inline (Set_Corresponding_Generic_Association);
13568 pragma Inline (Set_Corresponding_Integer_Value);
13569 pragma Inline (Set_Corresponding_Spec);
13570 pragma Inline (Set_Corresponding_Spec_Of_Stub);
13571 pragma Inline (Set_Corresponding_Stub);
13572 pragma Inline (Set_Dcheck_Function);
13573 pragma Inline (Set_Declarations);
13574 pragma Inline (Set_Default_Expression);
13575 pragma Inline (Set_Default_Name);
13576 pragma Inline (Set_Default_Storage_Pool);
13577 pragma Inline (Set_Defining_Identifier);
13578 pragma Inline (Set_Defining_Unit_Name);
13579 pragma Inline (Set_Delay_Alternative);
13580 pragma Inline (Set_Delay_Statement);
13581 pragma Inline (Set_Delta_Expression);
13582 pragma Inline (Set_Digits_Expression);
13583 pragma Inline (Set_Discr_Check_Funcs_Built);
13584 pragma Inline (Set_Discrete_Choices);
13585 pragma Inline (Set_Discrete_Range);
13586 pragma Inline (Set_Discrete_Subtype_Definition);
13587 pragma Inline (Set_Discrete_Subtype_Definitions);
13588 pragma Inline (Set_Discriminant_Specifications);
13589 pragma Inline (Set_Discriminant_Type);
13590 pragma Inline (Set_Do_Accessibility_Check);
13591 pragma Inline (Set_Do_Discriminant_Check);
13592 pragma Inline (Set_Do_Division_Check);
13593 pragma Inline (Set_Do_Length_Check);
13594 pragma Inline (Set_Do_Overflow_Check);
13595 pragma Inline (Set_Do_Range_Check);
13596 pragma Inline (Set_Do_Storage_Check);
13597 pragma Inline (Set_Do_Tag_Check);
13598 pragma Inline (Set_Elaborate_All_Desirable);
13599 pragma Inline (Set_Elaborate_All_Present);
13600 pragma Inline (Set_Elaborate_Desirable);
13601 pragma Inline (Set_Elaborate_Present);
13602 pragma Inline (Set_Else_Actions);
13603 pragma Inline (Set_Else_Statements);
13604 pragma Inline (Set_Elsif_Parts);
13605 pragma Inline (Set_Enclosing_Variant);
13606 pragma Inline (Set_End_Label);
13607 pragma Inline (Set_End_Span);
13608 pragma Inline (Set_Entity);
13609 pragma Inline (Set_Entry_Body_Formal_Part);
13610 pragma Inline (Set_Entry_Call_Alternative);
13611 pragma Inline (Set_Entry_Call_Statement);
13612 pragma Inline (Set_Entry_Direct_Name);
13613 pragma Inline (Set_Entry_Index);
13614 pragma Inline (Set_Entry_Index_Specification);
13615 pragma Inline (Set_Etype);
13616 pragma Inline (Set_Exception_Choices);
13617 pragma Inline (Set_Exception_Handlers);
13618 pragma Inline (Set_Exception_Junk);
13619 pragma Inline (Set_Exception_Label);
13620 pragma Inline (Set_Expansion_Delayed);
13621 pragma Inline (Set_Explicit_Actual_Parameter);
13622 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
13623 pragma Inline (Set_Expression);
13624 pragma Inline (Set_Expression_Copy);
13625 pragma Inline (Set_Expressions);
13626 pragma Inline (Set_First_Bit);
13627 pragma Inline (Set_First_Inlined_Subprogram);
13628 pragma Inline (Set_First_Name);
13629 pragma Inline (Set_First_Named_Actual);
13630 pragma Inline (Set_First_Real_Statement);
13631 pragma Inline (Set_First_Subtype_Link);
13632 pragma Inline (Set_Float_Truncate);
13633 pragma Inline (Set_Formal_Type_Definition);
13634 pragma Inline (Set_Forwards_OK);
13635 pragma Inline (Set_From_Aspect_Specification);
13636 pragma Inline (Set_From_At_End);
13637 pragma Inline (Set_From_At_Mod);
13638 pragma Inline (Set_From_Conditional_Expression);
13639 pragma Inline (Set_From_Default);
13640 pragma Inline (Set_Generalized_Indexing);
13641 pragma Inline (Set_Generic_Associations);
13642 pragma Inline (Set_Generic_Formal_Declarations);
13643 pragma Inline (Set_Generic_Parent);
13644 pragma Inline (Set_Generic_Parent_Type);
13645 pragma Inline (Set_Handled_Statement_Sequence);
13646 pragma Inline (Set_Handler_List_Entry);
13647 pragma Inline (Set_Has_Created_Identifier);
13648 pragma Inline (Set_Has_Dereference_Action);
13649 pragma Inline (Set_Has_Dynamic_Length_Check);
13650 pragma Inline (Set_Has_Init_Expression);
13651 pragma Inline (Set_Has_Local_Raise);
13652 pragma Inline (Set_Has_No_Elaboration_Code);
13653 pragma Inline (Set_Has_Pragma_Suppress_All);
13654 pragma Inline (Set_Has_Private_View);
13655 pragma Inline (Set_Has_Relative_Deadline_Pragma);
13656 pragma Inline (Set_Has_Self_Reference);
13657 pragma Inline (Set_Has_SP_Choice);
13658 pragma Inline (Set_Has_Storage_Size_Pragma);
13659 pragma Inline (Set_Has_Target_Names);
13660 pragma Inline (Set_Has_Wide_Character);
13661 pragma Inline (Set_Has_Wide_Wide_Character);
13662 pragma Inline (Set_Header_Size_Added);
13663 pragma Inline (Set_Hidden_By_Use_Clause);
13664 pragma Inline (Set_High_Bound);
13665 pragma Inline (Set_Identifier);
13666 pragma Inline (Set_Implicit_With);
13667 pragma Inline (Set_Import_Interface_Present);
13668 pragma Inline (Set_In_Present);
13669 pragma Inline (Set_Includes_Infinities);
13670 pragma Inline (Set_Incomplete_View);
13671 pragma Inline (Set_Inherited_Discriminant);
13672 pragma Inline (Set_Instance_Spec);
13673 pragma Inline (Set_Interface_List);
13674 pragma Inline (Set_Interface_Present);
13675 pragma Inline (Set_Intval);
13676 pragma Inline (Set_Is_Abort_Block);
13677 pragma Inline (Set_Is_Accessibility_Actual);
13678 pragma Inline (Set_Is_Analyzed_Pragma);
13679 pragma Inline (Set_Is_Asynchronous_Call_Block);
13680 pragma Inline (Set_Is_Boolean_Aspect);
13681 pragma Inline (Set_Is_Checked);
13682 pragma Inline (Set_Is_Checked_Ghost_Pragma);
13683 pragma Inline (Set_Is_Component_Left_Opnd);
13684 pragma Inline (Set_Is_Component_Right_Opnd);
13685 pragma Inline (Set_Is_Controlling_Actual);
13686 pragma Inline (Set_Is_Declaration_Level_Node);
13687 pragma Inline (Set_Is_Delayed_Aspect);
13688 pragma Inline (Set_Is_Disabled);
13689 pragma Inline (Set_Is_Dispatching_Call);
13690 pragma Inline (Set_Is_Dynamic_Coextension);
13691 pragma Inline (Set_Is_Effective_Use_Clause);
13692 pragma Inline (Set_Is_Elaboration_Checks_OK_Node);
13693 pragma Inline (Set_Is_Elaboration_Code);
13694 pragma Inline (Set_Is_Elaboration_Warnings_OK_Node);
13695 pragma Inline (Set_Is_Elsif);
13696 pragma Inline (Set_Is_Entry_Barrier_Function);
13697 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
13698 pragma Inline (Set_Is_Expanded_Contract);
13699 pragma Inline (Set_Is_Finalization_Wrapper);
13700 pragma Inline (Set_Is_Folded_In_Parser);
13701 pragma Inline (Set_Is_Generic_Contract_Pragma);
13702 pragma Inline (Set_Is_Homogeneous_Aggregate);
13703 pragma Inline (Set_Is_Ignored);
13704 pragma Inline (Set_Is_Ignored_Ghost_Pragma);
13705 pragma Inline (Set_Is_In_Discriminant_Check);
13706 pragma Inline (Set_Is_Inherited_Pragma);
13707 pragma Inline (Set_Is_Initialization_Block);
13708 pragma Inline (Set_Is_Known_Guaranteed_ABE);
13709 pragma Inline (Set_Is_Machine_Number);
13710 pragma Inline (Set_Is_Null_Loop);
13711 pragma Inline (Set_Is_Overloaded);
13712 pragma Inline (Set_Is_Power_Of_2_For_Shift);
13713 pragma Inline (Set_Is_Preelaborable_Call);
13714 pragma Inline (Set_Is_Prefixed_Call);
13715 pragma Inline (Set_Is_Protected_Subprogram_Body);
13716 pragma Inline (Set_Is_Qualified_Universal_Literal);
13717 pragma Inline (Set_Is_Read);
13718 pragma Inline (Set_Is_Source_Call);
13719 pragma Inline (Set_Is_SPARK_Mode_On_Node);
13720 pragma Inline (Set_Is_Static_Coextension);
13721 pragma Inline (Set_Is_Static_Expression);
13722 pragma Inline (Set_Is_Subprogram_Descriptor);
13723 pragma Inline (Set_Is_Task_Allocation_Block);
13724 pragma Inline (Set_Is_Task_Body_Procedure);
13725 pragma Inline (Set_Is_Task_Master);
13726 pragma Inline (Set_Is_Write);
13727 pragma Inline (Set_Iterator_Filter);
13728 pragma Inline (Set_Iteration_Scheme);
13729 pragma Inline (Set_Iterator_Specification);
13730 pragma Inline (Set_Itype);
13731 pragma Inline (Set_Key_Expression);
13732 pragma Inline (Set_Kill_Range_Check);
13733 pragma Inline (Set_Label_Construct);
13734 pragma Inline (Set_Last_Bit);
13735 pragma Inline (Set_Last_Name);
13736 pragma Inline (Set_Left_Opnd);
13737 pragma Inline (Set_Library_Unit);
13738 pragma Inline (Set_Limited_Present);
13739 pragma Inline (Set_Limited_View_Installed);
13740 pragma Inline (Set_Literals);
13741 pragma Inline (Set_Local_Raise_Not_OK);
13742 pragma Inline (Set_Local_Raise_Statements);
13743 pragma Inline (Set_Loop_Actions);
13744 pragma Inline (Set_Loop_Parameter_Specification);
13745 pragma Inline (Set_Low_Bound);
13746 pragma Inline (Set_Mod_Clause);
13747 pragma Inline (Set_More_Ids);
13748 pragma Inline (Set_Must_Be_Byte_Aligned);
13749 pragma Inline (Set_Must_Not_Freeze);
13750 pragma Inline (Set_Must_Not_Override);
13751 pragma Inline (Set_Must_Override);
13752 pragma Inline (Set_Name);
13753 pragma Inline (Set_Names);
13754 pragma Inline (Set_Next_Entity);
13755 pragma Inline (Set_Next_Exit_Statement);
13756 pragma Inline (Set_Next_Implicit_With);
13757 pragma Inline (Set_Next_Named_Actual);
13758 pragma Inline (Set_Next_Pragma);
13759 pragma Inline (Set_Next_Rep_Item);
13760 pragma Inline (Set_Next_Use_Clause);
13761 pragma Inline (Set_No_Ctrl_Actions);
13762 pragma Inline (Set_No_Elaboration_Check);
13763 pragma Inline (Set_No_Entities_Ref_In_Spec);
13764 pragma Inline (Set_No_Initialization);
13765 pragma Inline (Set_No_Minimize_Eliminate);
13766 pragma Inline (Set_No_Side_Effect_Removal);
13767 pragma Inline (Set_No_Truncation);
13768 pragma Inline (Set_Null_Excluding_Subtype);
13769 pragma Inline (Set_Null_Exclusion_Present);
13770 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13771 pragma Inline (Set_Null_Present);
13772 pragma Inline (Set_Null_Record_Present);
13773 pragma Inline (Set_Null_Statement);
13774 pragma Inline (Set_Object_Definition);
13775 pragma Inline (Set_Of_Present);
13776 pragma Inline (Set_Original_Discriminant);
13777 pragma Inline (Set_Original_Entity);
13778 pragma Inline (Set_Others_Discrete_Choices);
13779 pragma Inline (Set_Out_Present);
13780 pragma Inline (Set_Parameter_Associations);
13781 pragma Inline (Set_Parameter_Specifications);
13782 pragma Inline (Set_Parameter_Type);
13783 pragma Inline (Set_Parent_Spec);
13784 pragma Inline (Set_Parent_With);
13785 pragma Inline (Set_Position);
13786 pragma Inline (Set_Pragma_Argument_Associations);
13787 pragma Inline (Set_Pragma_Identifier);
13788 pragma Inline (Set_Pragmas_After);
13789 pragma Inline (Set_Pragmas_Before);
13790 pragma Inline (Set_Pre_Post_Conditions);
13791 pragma Inline (Set_Prefix);
13792 pragma Inline (Set_Premature_Use);
13793 pragma Inline (Set_Present_Expr);
13794 pragma Inline (Set_Prev_Ids);
13795 pragma Inline (Set_Prev_Use_Clause);
13796 pragma Inline (Set_Print_In_Hex);
13797 pragma Inline (Set_Private_Declarations);
13798 pragma Inline (Set_Private_Present);
13799 pragma Inline (Set_Procedure_To_Call);
13800 pragma Inline (Set_Proper_Body);
13801 pragma Inline (Set_Protected_Definition);
13802 pragma Inline (Set_Protected_Present);
13803 pragma Inline (Set_Raises_Constraint_Error);
13804 pragma Inline (Set_Range_Constraint);
13805 pragma Inline (Set_Range_Expression);
13806 pragma Inline (Set_Real_Range_Specification);
13807 pragma Inline (Set_Realval);
13808 pragma Inline (Set_Reason);
13809 pragma Inline (Set_Record_Extension_Part);
13810 pragma Inline (Set_Redundant_Use);
13811 pragma Inline (Set_Renaming_Exception);
13812 pragma Inline (Set_Result_Definition);
13813 pragma Inline (Set_Return_Object_Declarations);
13814 pragma Inline (Set_Reverse_Present);
13815 pragma Inline (Set_Right_Opnd);
13816 pragma Inline (Set_Rounded_Result);
13817 pragma Inline (Set_Save_Invocation_Graph_Of_Body);
13818 pragma Inline (Set_SCIL_Controlling_Tag);
13819 pragma Inline (Set_SCIL_Entity);
13820 pragma Inline (Set_SCIL_Tag_Value);
13821 pragma Inline (Set_SCIL_Target_Prim);
13822 pragma Inline (Set_Scope);
13823 pragma Inline (Set_Select_Alternatives);
13824 pragma Inline (Set_Selector_Name);
13825 pragma Inline (Set_Selector_Names);
13826 pragma Inline (Set_Shift_Count_OK);
13827 pragma Inline (Set_Source_Type);
13828 pragma Inline (Set_Split_PPC);
13829 pragma Inline (Set_Statements);
13830 pragma Inline (Set_Storage_Pool);
13831 pragma Inline (Set_Strval);
13832 pragma Inline (Set_Subpool_Handle_Name);
13833 pragma Inline (Set_Subtype_Indication);
13834 pragma Inline (Set_Subtype_Mark);
13835 pragma Inline (Set_Subtype_Marks);
13836 pragma Inline (Set_Suppress_Assignment_Checks);
13837 pragma Inline (Set_Suppress_Loop_Warnings);
13838 pragma Inline (Set_Synchronized_Present);
13839 pragma Inline (Set_TSS_Elist);
13840 pragma Inline (Set_Tagged_Present);
13841 pragma Inline (Set_Target);
13842 pragma Inline (Set_Target_Type);
13843 pragma Inline (Set_Task_Definition);
13844 pragma Inline (Set_Task_Present);
13845 pragma Inline (Set_Then_Actions);
13846 pragma Inline (Set_Then_Statements);
13847 pragma Inline (Set_Triggering_Alternative);
13848 pragma Inline (Set_Triggering_Statement);
13849 pragma Inline (Set_Type_Definition);
13850 pragma Inline (Set_Uneval_Old_Accept);
13851 pragma Inline (Set_Uneval_Old_Warn);
13852 pragma Inline (Set_Unit);
13853 pragma Inline (Set_Uninitialized_Variable);
13854 pragma Inline (Set_Unknown_Discriminants_Present);
13855 pragma Inline (Set_Unreferenced_In_Spec);
13856 pragma Inline (Set_Used_Operations);
13857 pragma Inline (Set_Variant_Part);
13858 pragma Inline (Set_Variants);
13859 pragma Inline (Set_Visible_Declarations);
13860 pragma Inline (Set_Was_Attribute_Reference);
13861 pragma Inline (Set_Was_Default_Init_Box_Association);
13862 pragma Inline (Set_Was_Expression_Function);
13863 pragma Inline (Set_Was_Originally_Stub);
13864
13865 end Sinfo;