]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/sinfo.ads
2017-10-20 Bob Duff <duff@adacore.com>
[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-2017, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in these places:
63
64 -- In sinfo.ads:
65 -- The documentation associated with the field (if semantic)
66 -- The documentation associated with the node
67 -- The spec of the access function
68 -- The spec of the set procedure
69 -- The entries in Is_Syntactic_Field
70 -- The pragma Inline for the access function
71 -- The pragma Inline for the set procedure
72 -- In sinfo.adb:
73 -- The body of the access function
74 -- The body of the set procedure
75
76 -- The field chosen must be consistent in all places, and, for a node that
77 -- is a subexpression, must not overlap any of the standard expression
78 -- fields.
79
80 -- In addition, if any of the standard expression fields is changed, then
81 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
82 -- must be updated appropriately, since it special cases expression fields.
83
84 -- If a new tree node is added, then the following changes are made:
85
86 -- Add it to the documentation in the appropriate place
87 -- Add its fields to this documentation section
88 -- Define it in the appropriate classification in Node_Kind
89 -- Add an entry in Is_Syntactic_Field
90 -- In the body (sinfo), add entries to the access functions for all
91 -- its fields (except standard expression fields) to include the new
92 -- node in the checks.
93 -- Add an appropriate section to the case statement in sprint.adb
94 -- Add an appropriate section to the case statement in sem.adb
95 -- Add an appropriate section to the case statement in exp_util.adb
96 -- (Insert_Actions procedure)
97 -- For a subexpression, add an appropriate section to the case
98 -- statement in sem_eval.adb
99 -- For a subexpression, add an appropriate section to the case
100 -- statement in sem_res.adb
101
102 -- All back ends must be made aware of the new node kind.
103
104 -- Finally, four utility programs must be run:
105
106 -- (Optional.) Run CSinfo to check that you have made the changes
107 -- consistently. It checks most of the rules given above. This utility
108 -- reads sinfo.ads and sinfo.adb and generates a report to standard
109 -- output. This step is optional because XSinfo runs CSinfo.
110
111 -- Run XSinfo to create sinfo.h, the corresponding C header. This
112 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
113 -- not need to read sinfo.adb, since the contents of the body are
114 -- algorithmically determinable from the spec.
115
116 -- Run XTreeprs to create treeprs.ads, an updated version of the module
117 -- that is used to drive the tree print routine. This utility reads (but
118 -- does not modify) treeprs.adt, the template that provides the basic
119 -- structure of the file, and then fills in the data from the comments
120 -- in sinfo.ads.
121
122 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
123 -- spec of the Nmake package which contains functions for constructing
124 -- nodes.
125
126 -- The above steps are done automatically by the build scripts when you do
127 -- a full bootstrap.
128
129 -- Note: sometime we could write a utility that actually generated the body
130 -- of sinfo from the spec instead of simply checking it, since, as noted
131 -- above, the contents of the body can be determined from the spec.
132
133 --------------------------------
134 -- Implicit Nodes in the Tree --
135 --------------------------------
136
137 -- Generally the structure of the tree very closely follows the grammar as
138 -- defined in the RM. However, certain nodes are omitted to save space and
139 -- simplify semantic processing. Two general classes of such omitted nodes
140 -- are as follows:
141
142 -- If the only possibilities for a non-terminal are one or more other
143 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
144 -- corresponding node is omitted from the tree, and the target construct
145 -- appears directly. For example, a real type definition is either
146 -- floating point definition or a fixed point definition. No explicit node
147 -- appears for real type definition. Instead either the floating point
148 -- definition or fixed point definition appears directly.
149
150 -- If a non-terminal corresponds to a list of some other non-terminal
151 -- (possibly with separating punctuation), then usually it is omitted from
152 -- the tree, and a list of components appears instead. For example,
153 -- sequence of statements does not appear explicitly in the tree. Instead
154 -- a list of statements appears directly.
155
156 -- Some additional cases of omitted nodes occur and are documented
157 -- individually. In particular, many nodes are omitted in the tree
158 -- generated for an expression.
159
160 -------------------------------------------
161 -- Handling of Defining Identifier Lists --
162 -------------------------------------------
163
164 -- In several declarative forms in the syntax, lists of defining
165 -- identifiers appear (object declarations, component declarations, number
166 -- declarations etc.)
167
168 -- The semantics of such statements are equivalent to a series of identical
169 -- declarations of single defining identifiers (except that conformance
170 -- checks require the same grouping of identifiers in the parameter case).
171
172 -- To simplify semantic processing, the parser breaks down such multiple
173 -- declaration cases into sequences of single declarations, duplicating
174 -- type and initialization information as required. The flags More_Ids and
175 -- Prev_Ids are used to record the original form of the source in the case
176 -- where the original source used a list of names, More_Ids being set on
177 -- all but the last name and Prev_Ids being set on all but the first name.
178 -- These flags are used to reconstruct the original source (e.g. in the
179 -- Sprint package), and also are included in the conformance checks, but
180 -- otherwise have no semantic significance.
181
182 -- Note: the reason that we use More_Ids and Prev_Ids rather than
183 -- First_Name and Last_Name flags is so that the flags are off in the
184 -- normal one identifier case, which minimizes tree print output.
185
186 -----------------------
187 -- Use of Node Lists --
188 -----------------------
189
190 -- With a few exceptions, if a construction of the form {non-terminal}
191 -- appears in the tree, lists are used in the corresponding tree node (see
192 -- package Nlists for handling of node lists). In this case a field of the
193 -- parent node points to a list of nodes for the non-terminal. The field
194 -- name for such fields has a plural name which always ends in "s". For
195 -- example, a case statement has a field Alternatives pointing to list of
196 -- case statement alternative nodes.
197
198 -- Only fields pointing to lists have names ending in "s", so generally the
199 -- structure is strongly typed, fields not ending in s point to single
200 -- nodes, and fields ending in s point to lists.
201
202 -- The following example shows how a traversal of a list is written. We
203 -- suppose here that Stmt points to a N_Case_Statement node which has a
204 -- list field called Alternatives:
205
206 -- Alt := First (Alternatives (Stmt));
207 -- while Present (Alt) loop
208 -- ..
209 -- -- processing for case statement alternative Alt
210 -- ..
211 -- Alt := Next (Alt);
212 -- end loop;
213
214 -- The Present function tests for Empty, which in this case signals the end
215 -- of the list. First returns Empty immediately if the list is empty.
216 -- Present is defined in Atree, First and Next are defined in Nlists.
217
218 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
219 -- contexts, which is handled as described in the previous section, and
220 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
221 -- using the First_Name and Last_Name flags, as further detailed in the
222 -- description of the N_With_Clause node.
223
224 -------------
225 -- Pragmas --
226 -------------
227
228 -- Pragmas can appear in many different context, but are not included in
229 -- the grammar. Still they must appear in the tree, so they can be properly
230 -- processed.
231
232 -- Two approaches are used. In some cases, an extra field is defined in an
233 -- appropriate node that contains a list of pragmas appearing in the
234 -- expected context. For example pragmas can appear before an
235 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
236 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
237
238 -- The other approach is to simply allow pragmas to appear in syntactic
239 -- lists where the grammar (of course) does not include the possibility.
240 -- For example, the Variants field of an N_Variant_Part node points to a
241 -- list that can contain both N_Pragma and N_Variant nodes.
242
243 -- To make processing easier in the latter case, the Nlists package
244 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
245 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
246 -- ignoring all pragmas.
247
248 -- In the case of the variants list, we can either write:
249
250 -- Variant := First (Variants (N));
251 -- while Present (Variant) loop
252 -- ...
253 -- Variant := Next (Variant);
254 -- end loop;
255
256 -- or
257
258 -- Variant := First_Non_Pragma (Variants (N));
259 -- while Present (Variant) loop
260 -- ...
261 -- Variant := Next_Non_Pragma (Variant);
262 -- end loop;
263
264 -- In the first form of the loop, Variant can either be an N_Pragma or an
265 -- N_Variant node. In the second form, Variant can only be N_Variant since
266 -- all pragmas are skipped.
267
268 ---------------------
269 -- Optional Fields --
270 ---------------------
271
272 -- Fields which correspond to a section of the syntax enclosed in square
273 -- brackets are generally omitted (and the corresponding field set to Empty
274 -- for a node, or No_List for a list). The documentation of such fields
275 -- notes these cases. One exception to this rule occurs in the case of
276 -- possibly empty statement sequences (such as the sequence of statements
277 -- in an entry call alternative). Such cases appear in the syntax rules as
278 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
279 -- statement sequences always contain an empty list (not No_List) if no
280 -- statements are present.
281
282 -- Note: the utility program that constructs the body and spec of the Nmake
283 -- package relies on the format of the comments to determine if a field
284 -- should have a default value in the corresponding make routine. The rule
285 -- is that if the first line of the description of the field contains the
286 -- string "(set to xxx if", then a default value of xxx is provided for
287 -- this field in the corresponding Make_yyy routine.
288
289 -----------------------------------
290 -- Note on Body/Spec Terminology --
291 -----------------------------------
292
293 -- In informal discussions about Ada, it is customary to refer to package
294 -- and subprogram specs and bodies. However, this is not technically
295 -- correct, what is normally referred to as a spec or specification is in
296 -- fact a package declaration or subprogram declaration. We are careful in
297 -- GNAT to use the correct terminology and in particular, the full word
298 -- specification is never used as an incorrect substitute for declaration.
299 -- The structure and terminology used in the tree also reflects the grammar
300 -- and thus uses declaration and specification in the technically correct
301 -- manner.
302
303 -- However, there are contexts in which the informal terminology is useful.
304 -- We have the word "body" to refer to the Interp_Etype declared by the
305 -- declaration of a unit body, and in some contexts we need similar term to
306 -- refer to the entity declared by the package or subprogram declaration,
307 -- and simply using declaration can be confusing since the body also has a
308 -- declaration.
309
310 -- An example of such a context is the link between the package body and
311 -- its declaration. With_Declaration is confusing, since the package body
312 -- itself is a declaration.
313
314 -- To deal with this problem, we reserve the informal term Spec, i.e. the
315 -- popular abbreviation used in this context, to refer to the entity
316 -- declared by the package or subprogram declaration. So in the above
317 -- example case, the field in the body is called With_Spec.
318
319 -- Another important context for the use of the word Spec is in error
320 -- messages, where a hyper-correct use of declaration would be confusing to
321 -- a typical Ada programmer, and even for an expert programmer can cause
322 -- confusion since the body has a declaration as well.
323
324 -- So, to summarize:
325
326 -- Declaration always refers to the syntactic entity that is called
327 -- a declaration. In particular, subprogram declaration
328 -- and package declaration are used to describe the
329 -- syntactic entity that includes the semicolon.
330
331 -- Specification always refers to the syntactic entity that is called
332 -- a specification. In particular, the terms procedure
333 -- specification, function specification, package
334 -- specification, subprogram specification always refer
335 -- to the syntactic entity that has no semicolon.
336
337 -- Spec is an informal term, used to refer to the entity
338 -- that is declared by a task declaration, protected
339 -- declaration, generic declaration, subprogram
340 -- declaration or package declaration.
341
342 -- This convention is followed throughout the GNAT documentation
343 -- both internal and external, and in all error message text.
344
345 ------------------------
346 -- Internal Use Nodes --
347 ------------------------
348
349 -- These are Node_Kind settings used in the internal implementation which
350 -- are not logically part of the specification.
351
352 -- N_Unused_At_Start
353 -- Completely unused entry at the start of the enumeration type. This
354 -- is inserted so that no legitimate value is zero, which helps to get
355 -- better debugging behavior, since zero is a likely uninitialized value).
356
357 -- N_Unused_At_End
358 -- Completely unused entry at the end of the enumeration type. This is
359 -- handy so that arrays with Node_Kind as the index type have an extra
360 -- entry at the end (see for example the use of the Pchar_Pos_Array in
361 -- Treepr, where the extra entry provides the limit value when dealing with
362 -- the last used entry in the array).
363
364 -----------------------------------------
365 -- Note on the settings of Sloc fields --
366 -----------------------------------------
367
368 -- The Sloc field of nodes that come from the source is set by the parser.
369 -- For internal nodes, and nodes generated during expansion the Sloc is
370 -- usually set in the call to the constructor for the node. In general the
371 -- Sloc value chosen for an internal node is the Sloc of the source node
372 -- whose processing is responsible for the expansion. For example, the Sloc
373 -- of an inherited primitive operation is the Sloc of the corresponding
374 -- derived type declaration.
375
376 -- For the nodes of a generic instantiation, the Sloc value is encoded to
377 -- represent both the original Sloc in the generic unit, and the Sloc of
378 -- the instantiation itself. See Sinput.ads for details.
379
380 -- Subprogram instances create two callable entities: one is the visible
381 -- subprogram instance, and the other is an anonymous subprogram nested
382 -- within a wrapper package that contains the renamings for the actuals.
383 -- Both of these entities have the Sloc of the defining entity in the
384 -- instantiation node. This simplifies some ASIS queries.
385
386 -----------------------
387 -- Field Definitions --
388 -----------------------
389
390 -- In the following node definitions, all fields, both syntactic and
391 -- semantic, are documented. The one exception is in the case of entities
392 -- (defining identifiers, character literals and operator symbols), where
393 -- the usage of the fields depends on the entity kind. Entity fields are
394 -- fully documented in the separate package Einfo.
395
396 -- In the node definitions, three common sets of fields are abbreviated to
397 -- save both space in the documentation, and also space in the string
398 -- (defined in Tree_Print_Strings) used to print trees. The following
399 -- abbreviations are used:
400
401 -- Note: the utility program that creates the Treeprs spec (in the file
402 -- xtreeprs.adb) knows about the special fields here, so it must be
403 -- modified if any change is made to these fields.
404
405 -- "plus fields for binary operator"
406 -- Chars (Name1) Name_Id for the operator
407 -- Left_Opnd (Node2) left operand expression
408 -- Right_Opnd (Node3) right operand expression
409 -- Entity (Node4-Sem) defining entity for operator
410 -- Associated_Node (Node4-Sem) for generic processing
411 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
412 -- Has_Private_View (Flag11-Sem) set in generic units.
413
414 -- "plus fields for unary operator"
415 -- Chars (Name1) Name_Id for the operator
416 -- Right_Opnd (Node3) right operand expression
417 -- Entity (Node4-Sem) defining entity for operator
418 -- Associated_Node (Node4-Sem) for generic processing
419 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
420 -- Has_Private_View (Flag11-Sem) set in generic units.
421
422 -- "plus fields for expression"
423 -- Paren_Count number of parentheses levels
424 -- Etype (Node5-Sem) type of the expression
425 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
426 -- Is_Static_Expression (Flag6-Sem) set for static expression
427 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
428 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
429 -- Do_Range_Check (Flag9-Sem) set if a range check needed
430 -- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
431 -- Has_Dynamic_Range_Check (Flag12-Sem) set if range check inserted
432 -- Assignment_OK (Flag15-Sem) set if modification is OK
433 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
434
435 -- Note: see under (EXPRESSION) for further details on the use of
436 -- the Paren_Count field to record the number of parentheses levels.
437
438 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
439 -- The actual definition of this type is given later (the reason for this
440 -- is that we want the descriptions ordered by logical chapter in the RM,
441 -- but the type definition is reordered to facilitate the definition of
442 -- some subtype ranges. The individual descriptions of the nodes show how
443 -- the various fields are used in each node kind, as well as providing
444 -- logical names for the fields. Functions and procedures are provided for
445 -- accessing and setting these fields using these logical names.
446
447 -----------------------
448 -- Gigi Restrictions --
449 -----------------------
450
451 -- The tree passed to Gigi is more restricted than the general tree form.
452 -- For example, as a result of expansion, most of the tasking nodes can
453 -- never appear. For each node to which either a complete or partial
454 -- restriction applies, a note entitled "Gigi restriction" appears which
455 -- documents the restriction.
456
457 -- Note that most of these restrictions apply only to trees generated when
458 -- code is being generated, since they involved expander actions that
459 -- destroy the tree.
460
461 ---------------
462 -- ASIS Mode --
463 ---------------
464
465 -- When a file is compiled in ASIS mode (-gnatct), expansion is skipped,
466 -- and the analysis must generate a tree in a form that meets all ASIS
467 -- requirements.
468
469 -- ASIS must be able to recover the original tree that corresponds to the
470 -- source. It relies heavily on Original_Node for this purpose, which as
471 -- described in Atree, records the history when a node is rewritten. ASIS
472 -- uses Original_Node to recover the original node before the Rewrite.
473
474 -- At least in ASIS mode (not really important in non-ASIS mode), when
475 -- N1 is rewritten as N2:
476
477 -- The subtree rooted by the original node N1 should be fully decorated,
478 -- i.e. all semantic fields noted in sinfo.ads should be set properly
479 -- and any referenced entities should be complete (with exceptions for
480 -- representation information, noted below).
481
482 -- For all the direct descendants of N1 (original node) their Parent
483 -- links should point not to N1, but to N2 (rewriting node).
484
485 -- The Parent links of rewritten nodes (N1 in this example) are set in
486 -- some cases (to point to the rewritten parent), but in other cases
487 -- they are set to Empty. This needs sorting out ??? It would be much
488 -- cleaner if they could always be set in the original node ???
489
490 -- There are a few cases when ASIS has to use not the original, but the
491 -- rewritten tree structures. This happens when because of some important
492 -- technical reasons it is impossible or very hard to have the original
493 -- structure properly decorated by semantic information, and the rewritten
494 -- structure fully reproduces the original source. Below is the (incomplete
495 -- for the moment???) list of such exceptions:
496 --
497 -- Generic specifications and generic bodies
498 -- Function calls that use prefixed notation (Operand.Operation [(...)])
499
500 -- Representation Information
501
502 -- For the purposes of the data description annex, the representation
503 -- information for source declared entities must be complete in the
504 -- ASIS tree.
505
506 -- This requires that the front end call the back end (gigi/gcc) in
507 -- a special "back annotate only" mode to obtain information on layout
508 -- from the back end.
509
510 -- For the purposes of this special "back annotate only" mode, the
511 -- requirements that would normally need to be met to generate code
512 -- are relaxed as follows:
513
514 -- Anonymous types need not have full representation information (e.g.
515 -- sizes need not be set for types where the front end would normally
516 -- set the sizes), since anonymous types can be ignored in this mode.
517
518 -- In this mode, gigi will see at least fragments of a fully annotated
519 -- unexpanded tree. This means that it will encounter nodes it does
520 -- not normally handle (such as stubs, task bodies etc). It should
521 -- simply ignore these nodes, since they are not relevant to the task
522 -- of back annotating representation information.
523
524 -- Some other ASIS-specific issues are covered in specific comments in
525 -- sections for particular nodes or flags.
526
527 ----------------
528 -- Ghost Mode --
529 ----------------
530
531 -- The SPARK RM 6.9 defines two classes of constructs - Ghost entities and
532 -- Ghost statements. The intent of the feature is to treat Ghost constructs
533 -- as non-existent when Ghost assertion policy Ignore is in effect.
534
535 -- The corresponding nodes which map to Ghost constructs are:
536
537 -- Ghost entities
538 -- Declaration nodes
539 -- N_Package_Body
540 -- N_Subprogram_Body
541
542 -- Ghost statements
543 -- N_Assignment_Statement
544 -- N_Procedure_Call_Statement
545 -- N_Pragma
546
547 -- In addition, the compiler treats instantiations as Ghost entities
548
549 -- To achieve the removal of ignored Ghost constructs, the compiler relies
550 -- on global variable Ghost_Mode and a mechanism called "Ghost regions".
551 -- The values of the global variable are as follows:
552
553 -- 1. Check - All static semantics as defined in SPARK RM 6.9 are in
554 -- effect. The Ghost region has mode Check.
555
556 -- 2. Ignore - Same as Check, ignored Ghost code is not present in ALI
557 -- files, object files, and the final executable. The Ghost region
558 -- has mode Ignore.
559
560 -- 3. None - No Ghost region is in effect
561
562 -- A Ghost region is a compiler operating mode, similar to Check_Syntax,
563 -- however a region is much more finely grained and depends on the policy
564 -- in effect. The region starts prior to the analysis of a Ghost construct
565 -- and ends immediately after its expansion. The region is established as
566 -- follows:
567
568 -- 1. Declarations - Prior to analysis, if the declaration is subject to
569 -- pragma Ghost.
570
571 -- 2. Renaming declarations - Same as 1) or when the renamed entity is
572 -- Ghost.
573
574 -- 3. Completing declarations - Same as 1) or when the declaration is
575 -- partially analyzed and the declaration completes a Ghost entity.
576
577 -- 4. N_Package_Body, N_Subprogram_Body - Same as 1) or when the body is
578 -- partially analyzed and completes a Ghost entity.
579
580 -- 5. N_Assignment_Statement - After the left hand side is analyzed and
581 -- references a Ghost entity.
582
583 -- 6. N_Procedure_Call_Statement - After the name is analyzed and denotes
584 -- a Ghost procedure.
585
586 -- 7. N_Pragma - During analysis, when the related entity is Ghost or the
587 -- pragma encloses a Ghost entity.
588
589 -- 8. Instantiations - Save as 1) or when the instantiation is partially
590 -- analyzed and the generic template is Ghost.
591
592 -- Routines Mark_And_Set_Ghost_xxx and Set_Ghost_Mode install a new Ghost
593 -- region and routine Restore_Ghost_Mode ends a Ghost region. A region may
594 -- be reinstalled similarly to scopes for decoupled expansion such as the
595 -- generation of dispatch tables or the creation of a predicate function.
596
597 -- If the mode of a Ghost region is Ignore, any newly created nodes as well
598 -- as source entities are marked as ignored Ghost. In additon, the marking
599 -- process signals all enclosing scopes that an ignored Ghost node resides
600 -- within. The compilation unit where the node resides is also added to an
601 -- auxiliary table for post processing.
602
603 -- After the analysis and expansion of all compilation units takes place
604 -- as well as the instantiation of all inlined [generic] bodies, the GNAT
605 -- driver initiates a separate pass which removes all ignored Ghost nodes
606 -- from all units stored in the auxiliary table.
607
608 --------------------
609 -- GNATprove Mode --
610 --------------------
611
612 -- When a file is compiled in GNATprove mode (-gnatd.F), a very light
613 -- expansion is performed and the analysis must generate a tree in a
614 -- form that meets additional requirements.
615
616 -- This light expansion does two transformations of the tree that cannot
617 -- be postponed till after semantic analysis:
618
619 -- 1. Replace object renamings by renamed object. This requires the
620 -- introduction of temporaries at the point of the renaming, which
621 -- must be properly analyzed.
622
623 -- 2. Fully qualify entity names. This is needed to generate suitable
624 -- local effects and call-graphs in ALI files, with the completely
625 -- qualified names (in particular the suffix to distinguish homonyms).
626
627 -- The tree after this light expansion should be fully analyzed
628 -- semantically, which sometimes requires the insertion of semantic
629 -- pre-analysis, for example for subprogram contracts and pragma
630 -- check/assert. In particular, all expression must have their proper type,
631 -- and semantic links should be set between tree nodes (partial to full
632 -- view, etc.) Some kinds of nodes should be either absent, or can be
633 -- ignored by the formal verification backend:
634
635 -- N_Object_Renaming_Declaration: can be ignored safely
636 -- N_Expression_Function: absent (rewritten)
637 -- N_Expression_With_Actions: absent (not generated)
638
639 -- SPARK cross-references are generated from the regular cross-references
640 -- (used for browsing and code understanding) and additional references
641 -- collected during semantic analysis, in particular on all dereferences.
642 -- These SPARK cross-references are output in a separate section of ALI
643 -- files, as described in spark_xrefs.adb. They are the basis for the
644 -- computation of data dependences in GNATprove. This implies that all
645 -- cross-references should be generated in this mode, even those that would
646 -- not make sense from a user point-of-view, and that cross-references that
647 -- do not lead to data dependences for subprograms can be safely ignored.
648
649 -- GNATprove relies on the following front end behaviors:
650
651 -- 1. The first declarations in the list of visible declarations of
652 -- a package declaration for a generic instance, up to the first
653 -- declaration which comes from source, should correspond to
654 -- the "mappings nodes" between formal and actual generic parameters.
655
656 -- 2. In addition pragma Debug statements are removed from the tree
657 -- (rewritten to NULL stmt), since they should be ignored in formal
658 -- verification.
659
660 -- 3. An error is also issued for missing subunits, similar to the
661 -- warning issued when generating code, to avoid formal verification
662 -- of a partial unit.
663
664 -- 4. Unconstrained types are not replaced by constrained types whose
665 -- bounds are generated from an expression: Expand_Subtype_From_Expr
666 -- should be a no-op.
667
668 -- 5. Errors (instead of warnings) are issued on compile-time-known
669 -- constraint errors even though such cases do not correspond to
670 -- illegalities in the Ada RM (this is simply another case where
671 -- GNATprove implements a subset of the full language).
672 --
673 -- However, there are a few exceptions to this rule for cases where
674 -- we want to allow the GNATprove analysis to proceed (e.g. range
675 -- checks on empty ranges, which typically appear in deactivated
676 -- code in a particular configuration).
677
678 -- 6. Subtypes should match in the AST, even after a generic is
679 -- instantiated. In particular, GNATprove relies on the fact that,
680 -- on a selected component, the type of the selected component is
681 -- the type of the corresponding component in the prefix of the
682 -- selected component.
683 --
684 -- Note that, in some cases, we know that this rule is broken by the
685 -- frontend. In particular, if the selected component is a packed
686 -- array depending on a discriminant of a unconstrained formal object
687 -- parameter of a generic.
688
689 ----------------
690 -- SPARK Mode --
691 ----------------
692
693 -- The SPARK RM 1.6.5 defines a mode of operation called "SPARK mode" which
694 -- starts a scope where the SPARK language semantics are either On, Off, or
695 -- Auto, where Auto leaves the choice to the tools. A SPARK mode may be
696 -- specified by means of an aspect or a pragma.
697
698 -- The following entities may be subject to a SPARK mode. Entities marked
699 -- with * may possess two differente SPARK modes.
700
701 -- E_Entry
702 -- E_Entry_Family
703 -- E_Function
704 -- E_Generic_Function
705 -- E_Generic_Package *
706 -- E_Generic_Procedure
707 -- E_Operator
708 -- E_Package *
709 -- E_Package_Body *
710 -- E_Procedure
711 -- E_Protected_Body
712 -- E_Protected_Subtype
713 -- E_Protected_Type *
714 -- E_Subprogram_Body
715 -- E_Task_Body
716 -- E_Task_Subtype
717 -- E_Task_Type *
718 -- E_Variable
719
720 -- In order to manage SPARK scopes, the compiler relies on global variables
721 -- SPARK_Mode and SPARK_Mode_Pragma and a mechanism called "SPARK regions."
722 -- Routines Install_SPARK_Mode and Set_SPARK_Mode create a new SPARK region
723 -- and routine Restore_SPARK_Mode ends a SPARK region. A region may be
724 -- reinstalled similarly to scopes.
725
726 -----------------------
727 -- Check Flag Fields --
728 -----------------------
729
730 -- The following flag fields appear in expression nodes:
731
732 -- Do_Division_Check
733 -- Do_Overflow_Check
734 -- Do_Range_Check
735
736 -- These three flags are always set by the front end during semantic
737 -- analysis, on expression nodes that may trigger the corresponding
738 -- check. The front end then inserts or not the check during expansion. In
739 -- particular, these flags should also be correctly set in ASIS mode and
740 -- GNATprove mode. As a special case, the front end does not insert a
741 -- Do_Division_Check flag on float exponentiation expressions, for the case
742 -- where the value is 0.0 and the exponent is negative, although this case
743 -- does lead to a division check failure.
744
745 -- Note: the expander always takes care of the Do_Range check case,
746 -- so this flag will never be set in the expanded tree passed to the
747 -- back end code generator.
748
749 -- Note that this accounts for all nodes that trigger the corresponding
750 -- checks, except for range checks on subtype_indications, which may be
751 -- required to check that a range_constraint is compatible with the given
752 -- subtype (RM 3.2.2(11)).
753
754 -- The following flag fields appear in various nodes:
755
756 -- Do_Accessibility_Check
757 -- Do_Discriminant_Check
758 -- Do_Length_Check
759 -- Do_Storage_Check
760 -- Do_Tag_Check
761
762 -- These flags are used in some specific cases by the front end, either
763 -- during semantic analysis or during expansion, and cannot be expected
764 -- to be set on all nodes that trigger the corresponding check.
765
766 ------------------------
767 -- Common Flag Fields --
768 ------------------------
769
770 -- The following flag fields appear in all nodes:
771
772 -- Analyzed
773 -- This flag is used to indicate that a node (and all its children have
774 -- been analyzed. It is used to avoid reanalysis of a node that has
775 -- already been analyzed, both for efficiency and functional correctness
776 -- reasons.
777
778 -- Comes_From_Source
779 -- This flag is set if the node comes directly from an explicit construct
780 -- in the source. It is normally on for any nodes built by the scanner or
781 -- parser from the source program, with the exception that in a few cases
782 -- the parser adds nodes to normalize the representation (in particular
783 -- a null statement is added to a package body if there is no begin/end
784 -- initialization section.
785 --
786 -- Most nodes inserted by the analyzer or expander are not considered
787 -- as coming from source, so the flag is off for such nodes. In a few
788 -- cases, the expander constructs nodes closely equivalent to nodes
789 -- from the source program (e.g. the allocator built for build-in-place
790 -- case), and the Comes_From_Source flag is deliberately set.
791
792 -- Error_Posted
793 -- This flag is used to avoid multiple error messages being posted on or
794 -- referring to the same node. This flag is set if an error message
795 -- refers to a node or is posted on its source location, and has the
796 -- effect of inhibiting further messages involving this same node.
797
798 -----------------------
799 -- Modify_Tree_For_C --
800 -----------------------
801
802 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
803 -- in ways that help match the semantics better with C, easing the task of
804 -- interfacing to C code generators (other than GCC, where the work is done
805 -- in gigi, and there is no point in changing that), and also making life
806 -- easier for Cprint in generating C source code.
807
808 -- The current modifications implemented are as follows:
809
810 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
811 -- are eliminated from the tree (since these operations do not exist in
812 -- C), and the operations are rewritten in terms of logical shifts and
813 -- other logical operations that do exist in C. See Exp_Ch4 expansion
814 -- routines for these operators for details of the transformations made.
815
816 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
817 -- less than the word size (since other values are not well-defined in
818 -- C). This is done using an explicit test if necessary.
819
820 -- Min and Max attributes are expanded into equivalent if expressions,
821 -- dealing properly with side effect issues.
822
823 -- Mod for signed integer types is expanded into equivalent expressions
824 -- using Rem (which is % in C) and other C-available operators.
825
826 -- Functions returning bounded arrays are transformed into procedures
827 -- with an extra out parameter, and the calls updated accordingly.
828
829 -- Aggregates are only kept unexpanded for object declarations, otherwise
830 -- they are systematically expanded into loops (for arrays) and
831 -- individual assignments (for records).
832
833 -- Unconstrained array types are handled by means of fat pointers.
834
835 -- Postconditions are inlined by the frontend since their body may have
836 -- references to itypes defined in the enclosing subprogram.
837
838 ------------------------------------
839 -- Description of Semantic Fields --
840 ------------------------------------
841
842 -- The meaning of the syntactic fields is generally clear from their names
843 -- without any further description, since the names are chosen to
844 -- correspond very closely to the syntax in the reference manual. This
845 -- section describes the usage of the semantic fields, which are used to
846 -- contain additional information determined during semantic analysis.
847
848 -- Accept_Handler_Records (List5-Sem)
849 -- This field is present only in an N_Accept_Alternative node. It is used
850 -- to temporarily hold the exception handler records from an accept
851 -- statement in a selective accept. These exception handlers will
852 -- eventually be placed in the Handler_Records list of the procedure
853 -- built for this accept (see Expand_N_Selective_Accept procedure in
854 -- Exp_Ch9 for further details).
855
856 -- Access_Types_To_Process (Elist2-Sem)
857 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
858 -- Contains the list of access types which may require specific treatment
859 -- when the nature of the type completion is completely known. An example
860 -- of such treatment is the generation of the associated_final_chain.
861
862 -- Actions (List1-Sem)
863 -- This field contains a sequence of actions that are associated with the
864 -- node holding the field. See the individual node types for details of
865 -- how this field is used, as well as the description of the specific use
866 -- for a particular node type.
867
868 -- Activation_Chain_Entity (Node3-Sem)
869 -- This is used in tree nodes representing task activators (blocks,
870 -- subprogram bodies, package declarations, and task bodies). It is
871 -- initially Empty, and then gets set to point to the entity for the
872 -- declared Activation_Chain variable when the first task is declared.
873 -- When tasks are declared in the corresponding declarative region this
874 -- entity is located by name (its name is always _Chain) and the declared
875 -- tasks are added to the chain. Note that N_Extended_Return_Statement
876 -- does not have this attribute, although it does have an activation
877 -- chain. This chain is used to store the tasks temporarily, and is not
878 -- used for activating them. On successful completion of the return
879 -- statement, the tasks are moved to the caller's chain, and the caller
880 -- activates them.
881
882 -- Acts_As_Spec (Flag4-Sem)
883 -- A flag set in the N_Subprogram_Body node for a subprogram body which
884 -- is acting as its own spec. In the case of a library-level subprogram
885 -- the flag is set as well on the parent compilation unit node.
886
887 -- Actual_Designated_Subtype (Node4-Sem)
888 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
889 -- needs to known the dynamic constrained subtype of the designated
890 -- object, this attribute is set to that type. This is done for
891 -- N_Free_Statements for access-to-classwide types and access to
892 -- unconstrained packed array types, and for N_Explicit_Dereference when
893 -- the designated type is an unconstrained packed array and the
894 -- dereference is the prefix of a 'Size attribute reference.
895
896 -- Address_Warning_Posted (Flag18-Sem)
897 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
898 -- posted a warning for the address clause regarding size or alignment
899 -- issues. Used to inhibit multiple redundant messages.
900
901 -- Aggregate_Bounds (Node3-Sem)
902 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
903 -- known at compile time, this field points to an N_Range node with those
904 -- bounds. Otherwise Empty.
905
906 -- Alloc_For_BIP_Return (Flag1-Sem)
907 -- Present in N_Allocator nodes. True if the allocator is one of those
908 -- generated for a build-in-place return statement.
909
910 -- All_Others (Flag11-Sem)
911 -- Present in an N_Others_Choice node. This flag is set for an others
912 -- exception where all exceptions are to be caught, even those that are
913 -- not normally handled (in particular the tasking abort signal). This
914 -- is used for translation of the at end handler into a normal exception
915 -- handler.
916
917 -- Aspect_Rep_Item (Node2-Sem)
918 -- Present in N_Aspect_Specification nodes. Points to the corresponding
919 -- pragma/attribute definition node used to process the aspect.
920
921 -- Assignment_OK (Flag15-Sem)
922 -- This flag is set in a subexpression node for an object, indicating
923 -- that the associated object can be modified, even if this would not
924 -- normally be permissible (either by direct assignment, or by being
925 -- passed as an out or in-out parameter). This is used by the expander
926 -- for a number of purposes, including initialization of constants and
927 -- limited type objects (such as tasks), setting discriminant fields,
928 -- setting tag values, etc. N_Object_Declaration nodes also have this
929 -- flag defined. Here it is used to indicate that an initialization
930 -- expression is valid, even where it would normally not be allowed
931 -- (e.g. where the type involved is limited). It is also used to stop
932 -- a Force_Evaluation call for an unchecked conversion, but this usage
933 -- is unclear and not documented ???
934
935 -- Associated_Node (Node4-Sem)
936 -- Present in nodes that can denote an entity: identifiers, character
937 -- literals, operator symbols, expanded names, operator nodes, and
938 -- attribute reference nodes (all these nodes have an Entity field).
939 -- This field is also present in N_Aggregate, N_Selected_Component, and
940 -- N_Extension_Aggregate nodes. This field is used in generic processing
941 -- to create links between the generic template and the generic copy.
942 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
943 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
944 -- the normal function of Entity is not required at the point where the
945 -- Associated_Node is set. Note also, that in generic templates, this
946 -- means that the Entity field does not necessarily point to an Entity.
947 -- Since the back end is expected to ignore generic templates, this is
948 -- harmless.
949
950 -- Atomic_Sync_Required (Flag14-Sem)
951 -- This flag is set on a node for which atomic synchronization is
952 -- required for the corresponding reference or modification.
953
954 -- At_End_Proc (Node1)
955 -- This field is present in an N_Handled_Sequence_Of_Statements node.
956 -- It contains an identifier reference for the cleanup procedure to be
957 -- called. See description of this node for further details.
958
959 -- Backwards_OK (Flag6-Sem)
960 -- A flag present in the N_Assignment_Statement node. It is used only
961 -- if the type being assigned is an array type, and is set if analysis
962 -- determines that it is definitely safe to do the copy backwards, i.e.
963 -- starting at the highest addressed element. This is the case if either
964 -- the operands do not overlap, or they may overlap, but if they do,
965 -- then the left operand is at a higher address than the right operand.
966 --
967 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
968 -- means that the front end could not determine that either direction is
969 -- definitely safe, and a runtime check may be required if the backend
970 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
971 -- set, it means that the front end can assure no overlap of operands.
972
973 -- Body_To_Inline (Node3-Sem)
974 -- Present in subprogram declarations. Denotes analyzed but unexpanded
975 -- body of subprogram, to be used when inlining calls. Present when the
976 -- subprogram has an Inline pragma and inlining is enabled. If the
977 -- declaration is completed by a renaming_as_body, and the renamed entity
978 -- is a subprogram, the Body_To_Inline is the name of that entity, which
979 -- is used directly in later calls to the original subprogram.
980
981 -- Body_Required (Flag13-Sem)
982 -- A flag that appears in the N_Compilation_Unit node indicating that
983 -- the corresponding unit requires a body. For the package case, this
984 -- indicates that a completion is required. In Ada 95, if the flag is not
985 -- set for the package case, then a body may not be present. In Ada 83,
986 -- if the flag is not set for the package case, then body is optional.
987 -- For a subprogram declaration, the flag is set except in the case where
988 -- a pragma Import or Interface applies, in which case no body is
989 -- permitted (in Ada 83 or Ada 95).
990
991 -- By_Ref (Flag5-Sem)
992 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
993 -- this flag is set when the returned expression is already allocated on
994 -- the secondary stack and thus the result is passed by reference rather
995 -- than copied another time.
996
997 -- Cleanup_Actions (List5-Sem)
998 -- Present in block statements created for transient blocks, contains
999 -- additional cleanup actions carried over from the transient scope.
1000
1001 -- Check_Address_Alignment (Flag11-Sem)
1002 -- A flag present in N_Attribute_Definition clause for a 'Address
1003 -- attribute definition. This flag is set if a dynamic check should be
1004 -- generated at the freeze point for the entity to which this address
1005 -- clause applies. The reason that we need this flag is that we want to
1006 -- check for range checks being suppressed at the point where the
1007 -- attribute definition clause is given, rather than testing this at the
1008 -- freeze point.
1009
1010 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
1011 -- Present in N_Simple_Return_Statement nodes. True if this node was
1012 -- constructed as part of the N_Extended_Return_Statement expansion.
1013
1014 -- Compile_Time_Known_Aggregate (Flag18-Sem)
1015 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
1016 -- evaluated at compile time without raising constraint error. Such
1017 -- aggregates can be passed as is to the back end without any expansion.
1018 -- See Exp_Aggr for specific conditions under which this flag gets set.
1019
1020 -- Componentwise_Assignment (Flag14-Sem)
1021 -- Present in N_Assignment_Statement nodes. Set for a record assignment
1022 -- where all that needs doing is to expand it into component-by-component
1023 -- assignments. This is used internally for the case of tagged types with
1024 -- rep clauses, where we need to avoid recursion (we don't want to try to
1025 -- generate a call to the primitive operation, because this is the case
1026 -- where we are compiling the primitive operation). Note that when we are
1027 -- expanding component assignments in this case, we never assign the _tag
1028 -- field, but we recursively assign components of the parent type.
1029
1030 -- Condition_Actions (List3-Sem)
1031 -- This field appears in else-if nodes and in the iteration scheme node
1032 -- for while loops. This field is only used during semantic processing to
1033 -- temporarily hold actions inserted into the tree. In the tree passed
1034 -- to gigi, the condition actions field is always set to No_List. For
1035 -- details on how this field is used, see the routine Insert_Actions in
1036 -- package Exp_Util, and also the expansion routines for the relevant
1037 -- nodes.
1038
1039 -- Context_Pending (Flag16-Sem)
1040 -- This field appears in Compilation_Unit nodes, to indicate that the
1041 -- context of the unit is being compiled. Used to detect circularities
1042 -- that are not otherwise detected by the loading mechanism. Such
1043 -- circularities can occur in the presence of limited and non-limited
1044 -- with_clauses that mention the same units.
1045
1046 -- Controlling_Argument (Node1-Sem)
1047 -- This field is set in procedure and function call nodes if the call
1048 -- is a dispatching call (it is Empty for a non-dispatching call). It
1049 -- indicates the source of the call's controlling tag. For procedure
1050 -- calls, the Controlling_Argument is one of the actuals. For function
1051 -- that has a dispatching result, it is an entity in the context of the
1052 -- call that can provide a tag, or else it is the tag of the root type
1053 -- of the class. It can also specify a tag directly rather than being a
1054 -- tagged object. The latter is needed by the implementations of AI-239
1055 -- and AI-260.
1056
1057 -- Conversion_OK (Flag14-Sem)
1058 -- A flag set on type conversion nodes to indicate that the conversion
1059 -- is to be considered as being valid, even though it is the case that
1060 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
1061 -- Fixed_Value and Integer_Value, for internal conversions done for
1062 -- fixed-point operations, and for certain conversions for calls to
1063 -- initialization procedures. If Conversion_OK is set, then Etype must be
1064 -- set (the analyzer assumes that Etype has been set). For the case of
1065 -- fixed-point operands, it also indicates that the conversion is to be
1066 -- direct conversion of the underlying integer result, with no regard to
1067 -- the small operand.
1068
1069 -- Convert_To_Return_False (Flag13-Sem)
1070 -- Present in N_Raise_Expression nodes that appear in the body of the
1071 -- special predicateM function used to test a predicate in the context
1072 -- of a membership test, where raise expression results in returning a
1073 -- value of False rather than raising an exception.
1074
1075 -- Corresponding_Aspect (Node3-Sem)
1076 -- Present in N_Pragma node. Used to point back to the source aspect from
1077 -- the corresponding pragma. This field is Empty for source pragmas.
1078
1079 -- Corresponding_Body (Node5-Sem)
1080 -- This field is set in subprogram declarations, package declarations,
1081 -- entry declarations of protected types, and in generic units. It points
1082 -- to the defining entity for the corresponding body (NOT the node for
1083 -- the body itself).
1084
1085 -- Corresponding_Formal_Spec (Node3-Sem)
1086 -- This field is set in subprogram renaming declarations, where it points
1087 -- to the defining entity for a formal subprogram in the case where the
1088 -- renaming corresponds to a generic formal subprogram association in an
1089 -- instantiation. The field is Empty if the renaming does not correspond
1090 -- to such a formal association.
1091
1092 -- Corresponding_Generic_Association (Node5-Sem)
1093 -- This field is defined for object declarations and object renaming
1094 -- declarations. It is set for the declarations within an instance that
1095 -- map generic formals to their actuals. If set, the field points to
1096 -- a generic_association which is the original parent of the expression
1097 -- or name appearing in the declaration. This simplifies ASIS queries.
1098
1099 -- Corresponding_Integer_Value (Uint4-Sem)
1100 -- This field is set in real literals of fixed-point types (it is not
1101 -- used for floating-point types). It contains the integer value used
1102 -- to represent the fixed-point value. It is also set on the universal
1103 -- real literals used to represent bounds of fixed-point base types
1104 -- and their first named subtypes.
1105
1106 -- Corresponding_Spec (Node5-Sem)
1107 -- This field is set in subprogram, package, task, and protected body
1108 -- nodes, where it points to the defining entity in the corresponding
1109 -- spec. The attribute is also set in N_With_Clause nodes where it points
1110 -- to the defining entity for the with'ed spec, and in a subprogram
1111 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
1112 -- if there is no corresponding spec, as in the case of a subprogram body
1113 -- that serves as its own spec.
1114 --
1115 -- In Ada 2012, Corresponding_Spec is set on expression functions that
1116 -- complete a subprogram declaration.
1117
1118 -- Corresponding_Spec_Of_Stub (Node2-Sem)
1119 -- This field is present in subprogram, package, task and protected body
1120 -- stubs where it points to the corresponding spec of the stub. Due to
1121 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
1122
1123 -- Corresponding_Stub (Node3-Sem)
1124 -- This field is present in an N_Subunit node. It holds the node in
1125 -- the parent unit that is the stub declaration for the subunit. It is
1126 -- set when analysis of the stub forces loading of the proper body. If
1127 -- expansion of the proper body creates new declarative nodes, they are
1128 -- inserted at the point of the corresponding_stub.
1129
1130 -- Dcheck_Function (Node5-Sem)
1131 -- This field is present in an N_Variant node, It references the entity
1132 -- for the discriminant checking function for the variant.
1133
1134 -- Default_Expression (Node5-Sem)
1135 -- This field is Empty if there is no default expression. If there is a
1136 -- simple default expression (one with no side effects), then this field
1137 -- simply contains a copy of the Expression field (both point to the tree
1138 -- for the default expression). Default_Expression is used for
1139 -- conformance checking.
1140
1141 -- Default_Storage_Pool (Node3-Sem)
1142 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
1143 -- copy of Opt.Default_Pool at the end of the compilation unit. See
1144 -- package Opt for details. This is used for inheriting the
1145 -- Default_Storage_Pool in child units.
1146
1147 -- Discr_Check_Funcs_Built (Flag11-Sem)
1148 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
1149 -- discriminant checking functions are constructed. The purpose is to
1150 -- avoid attempting to set these functions more than once.
1151
1152 -- Do_Accessibility_Check (Flag13-Sem)
1153 -- This flag is set on N_Parameter_Specification nodes to indicate
1154 -- that an accessibility check is required for the parameter. It is
1155 -- not yet decided who takes care of this check (TBD ???).
1156
1157 -- Do_Discriminant_Check (Flag3-Sem)
1158 -- This flag is set on N_Selected_Component nodes to indicate that a
1159 -- discriminant check is required using the discriminant check routine
1160 -- associated with the selector. The actual check is generated by the
1161 -- expander when processing selected components. In the case of
1162 -- Unchecked_Union, the flag is also set, but no discriminant check
1163 -- routine is associated with the selector, and the expander does not
1164 -- generate a check. This flag is also present in assignment statements
1165 -- (and set if the assignment requires a discriminant check), and in type
1166 -- conversion nodes (and set if the conversion requires a check).
1167
1168 -- Do_Division_Check (Flag13-Sem)
1169 -- This flag is set on a division operator (/ mod rem) to indicate
1170 -- that a zero divide check is required. The actual check is dealt
1171 -- with by the backend (all the front end does is to set the flag).
1172
1173 -- Do_Length_Check (Flag4-Sem)
1174 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1175 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1176 -- is required. It is not determined who deals with this flag (???).
1177
1178 -- Do_Overflow_Check (Flag17-Sem)
1179 -- This flag is set on an operator where an overflow check is required on
1180 -- the operation. The actual check is dealt with by the backend (all the
1181 -- front end does is to set the flag). The other cases where this flag is
1182 -- used is on a Type_Conversion node and for attribute reference nodes.
1183 -- For a type conversion, it means that the conversion is from one base
1184 -- type to another, and the value may not fit in the target base type.
1185 -- See also the description of Do_Range_Check for this case. The only
1186 -- attribute references which use this flag are Pred and Succ, where it
1187 -- means that the result should be checked for going outside the base
1188 -- range. Note that this flag is not set for modular types. This flag is
1189 -- also set on if and case expression nodes if we are operating in either
1190 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1191 -- properly process overflow checking for dependent expressions).
1192
1193 -- Do_Range_Check (Flag9-Sem)
1194 -- This flag is set on an expression which appears in a context where a
1195 -- range check is required. The target type is clear from the context.
1196 -- The contexts in which this flag can appear are the following:
1197
1198 -- Right side of an assignment. In this case the target type is
1199 -- taken from the left side of the assignment, which is referenced
1200 -- by the Name of the N_Assignment_Statement node.
1201
1202 -- Subscript expressions in an indexed component. In this case the
1203 -- target type is determined from the type of the array, which is
1204 -- referenced by the Prefix of the N_Indexed_Component node.
1205
1206 -- Argument expression for a parameter, appearing either directly in
1207 -- the Parameter_Associations list of a call or as the Expression of an
1208 -- N_Parameter_Association node that appears in this list. In either
1209 -- case, the check is against the type of the formal. Note that the
1210 -- flag is relevant only in IN and IN OUT parameters, and will be
1211 -- ignored for OUT parameters, where no check is required in the call,
1212 -- and if a check is required on the return, it is generated explicitly
1213 -- with a type conversion.
1214
1215 -- Initialization expression for the initial value in an object
1216 -- declaration. In this case the Do_Range_Check flag is set on
1217 -- the initialization expression, and the check is against the
1218 -- range of the type of the object being declared. This includes the
1219 -- cases of expressions providing default discriminant values, and
1220 -- expressions used to initialize record components.
1221
1222 -- The expression of a type conversion. In this case the range check is
1223 -- against the target type of the conversion. See also the use of
1224 -- Do_Overflow_Check on a type conversion. The distinction is that the
1225 -- overflow check protects against a value that is outside the range of
1226 -- the target base type, whereas a range check checks that the
1227 -- resulting value (which is a value of the base type of the target
1228 -- type), satisfies the range constraint of the target type.
1229
1230 -- Note: when a range check is required in contexts other than those
1231 -- listed above (e.g. in a return statement), an additional type
1232 -- conversion node is introduced to represent the required check.
1233
1234 -- A special case arises for the arguments of the Pred/Succ attributes.
1235 -- Here the range check needed is against First + 1 .. Last (Pred) or
1236 -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
1237 -- these checks are what would be performed within the implicit body of
1238 -- the functions that correspond to these attributes. In these cases,
1239 -- the Do_Range check flag is set on the argument to the attribute
1240 -- function, and the back end must special case the appropriate range
1241 -- to check against.
1242
1243 -- Do_Storage_Check (Flag17-Sem)
1244 -- This flag is set in an N_Allocator node to indicate that a storage
1245 -- check is required for the allocation, or in an N_Subprogram_Body node
1246 -- to indicate that a stack check is required in the subprogram prologue.
1247 -- The N_Allocator case is handled by the routine that expands the call
1248 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1249 -- backend, and all the semantics does is set the flag.
1250
1251 -- Do_Tag_Check (Flag13-Sem)
1252 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1253 -- N_Procedure_Call_Statement, N_Type_Conversion,
1254 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1255 -- node to indicate that the tag check can be suppressed. It is not
1256 -- yet decided how this flag is used (TBD ???).
1257
1258 -- Elaborate_Present (Flag4-Sem)
1259 -- This flag is set in the N_With_Clause node to indicate that pragma
1260 -- Elaborate pragma appears for the with'ed units.
1261
1262 -- Elaborate_All_Desirable (Flag9-Sem)
1263 -- This flag is set in the N_With_Clause mode to indicate that the static
1264 -- elaboration processing has determined that an Elaborate_All pragma is
1265 -- desirable for correct elaboration for this unit.
1266
1267 -- Elaborate_All_Present (Flag14-Sem)
1268 -- This flag is set in the N_With_Clause node to indicate that a
1269 -- pragma Elaborate_All pragma appears for the with'ed units.
1270
1271 -- Elaborate_Desirable (Flag11-Sem)
1272 -- This flag is set in the N_With_Clause mode to indicate that the static
1273 -- elaboration processing has determined that an Elaborate pragma is
1274 -- desirable for correct elaboration for this unit.
1275
1276 -- Else_Actions (List3-Sem)
1277 -- This field is present in if expression nodes. During code
1278 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1279 -- actions at an appropriate place in the tree to get elaborated at the
1280 -- right time. For if expressions, we have to be sure that the actions
1281 -- for the Else branch are only elaborated if the condition is False.
1282 -- The Else_Actions field is used as a temporary parking place for
1283 -- these actions. The final tree is always rewritten to eliminate the
1284 -- need for this field, so in the tree passed to Gigi, this field is
1285 -- always set to No_List.
1286
1287 -- Enclosing_Variant (Node2-Sem)
1288 -- This field is present in the N_Variant node and identifies the Node_Id
1289 -- corresponding to the immediately enclosing variant when the variant is
1290 -- nested, and N_Empty otherwise. Set during semantic processing of the
1291 -- variant part of a record type.
1292
1293 -- Entity (Node4-Sem)
1294 -- Appears in all direct names (identifiers, character literals, and
1295 -- operator symbols), as well as expanded names, and attributes that
1296 -- denote entities, such as 'Class. Points to entity for corresponding
1297 -- defining occurrence. Set after name resolution. For identifiers in a
1298 -- WITH list, the corresponding defining occurrence is in a separately
1299 -- compiled file, and Entity must be set by the library Load procedure.
1300 --
1301 -- Note: During name resolution, the value in Entity may be temporarily
1302 -- incorrect (e.g. during overload resolution, Entity is initially set to
1303 -- the first possible correct interpretation, and then later modified if
1304 -- necessary to contain the correct value after resolution).
1305 --
1306 -- Note: This field overlaps Associated_Node, which is used during
1307 -- generic processing (see Sem_Ch12 for details). Note also that in
1308 -- generic templates, this means that the Entity field does not always
1309 -- point to an Entity. Since the back end is expected to ignore generic
1310 -- templates, this is harmless.
1311 --
1312 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1313 -- It is used only for stream attributes definition clauses. In this
1314 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1315 -- conceptually at the point of the clause. Thus the visibility of the
1316 -- attribute definition clause (in the sense of 8.3(23) as amended by
1317 -- AI-195) can be checked by testing the visibility of that subprogram.
1318 --
1319 -- Note: Normally the Entity field of an identifier points to the entity
1320 -- for the corresponding defining identifier, and hence the Chars field
1321 -- of an identifier will match the Chars field of the entity. However,
1322 -- there is no requirement that these match, and there are obscure cases
1323 -- of generated code where they do not match.
1324
1325 -- Note: Ada 2012 aspect specifications require additional links between
1326 -- identifiers and various attributes. These attributes can be of
1327 -- arbitrary types, and the entity field of identifiers that denote
1328 -- aspects must be used to store arbitrary expressions for later semantic
1329 -- checks. See section on aspect specifications for details.
1330
1331 -- Entity_Or_Associated_Node (Node4-Sem)
1332 -- A synonym for both Entity and Associated_Node. Used by convention in
1333 -- the code when referencing this field in cases where it is not known
1334 -- whether the field contains an Entity or an Associated_Node.
1335
1336 -- Etype (Node5-Sem)
1337 -- Appears in all expression nodes, all direct names, and all entities.
1338 -- Points to the entity for the related type. Set after type resolution.
1339 -- Normally this is the actual subtype of the expression. However, in
1340 -- certain contexts such as the right side of an assignment, subscripts,
1341 -- arguments to calls, returned value in a function, initial value etc.
1342 -- it is the desired target type. In the event that this is different
1343 -- from the actual type, the Do_Range_Check flag will be set if a range
1344 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1345 -- points to an essentially arbitrary choice from the possible set of
1346 -- types.
1347
1348 -- Exception_Junk (Flag8-Sem)
1349 -- This flag is set in a various nodes appearing in a statement sequence
1350 -- to indicate that the corresponding node is an artifact of the
1351 -- generated code for exception handling, and should be ignored when
1352 -- analyzing the control flow of the relevant sequence of statements
1353 -- (e.g. to check that it does not end with a bad return statement).
1354
1355 -- Exception_Label (Node5-Sem)
1356 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1357 -- to be used for transforming the corresponding exception into a goto,
1358 -- or contains Empty, if this exception is not to be transformed. Also
1359 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1360 -- that there may be a local raise for the handler, so that expansion
1361 -- to allow a goto is required (and this field contains the label for
1362 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1363
1364 -- Expansion_Delayed (Flag11-Sem)
1365 -- Set on aggregates and extension aggregates that need a top-down rather
1366 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1367 -- up. For nested aggregates the expansion is delayed until the enclosing
1368 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1369 -- delay it we set this flag. This is done to avoid creating a temporary
1370 -- for each level of a nested aggregate, and also to prevent the
1371 -- premature generation of constraint checks. This is also a requirement
1372 -- if we want to generate the proper attachment to the internal????
1373 -- finalization lists (for record with controlled components). Top down
1374 -- expansion of aggregates is also used for in-place array aggregate
1375 -- assignment or initialization. When the full context is known, the
1376 -- target of the assignment or initialization is used to generate the
1377 -- left-hand side of individual assignment to each sub-component.
1378
1379 -- Expression_Copy (Node2-Sem)
1380 -- Present in N_Pragma_Argument_Association nodes. Contains a copy of the
1381 -- original expression. This field is best used to store pragma-dependent
1382 -- modifications performed on the original expression such as replacement
1383 -- of the current type instance or substitutions of primitives.
1384
1385 -- First_Inlined_Subprogram (Node3-Sem)
1386 -- Present in the N_Compilation_Unit node for the main program. Points
1387 -- to a chain of entities for subprograms that are to be inlined. The
1388 -- Next_Inlined_Subprogram field of these entities is used as a link
1389 -- pointer with Empty marking the end of the list. This field is Empty
1390 -- if there are no inlined subprograms or inlining is not active.
1391
1392 -- First_Named_Actual (Node4-Sem)
1393 -- Present in procedure call statement and function call nodes, and also
1394 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1395 -- named parameter where parameters are ordered by declaration order (as
1396 -- opposed to the actual order in the call which may be different due to
1397 -- named associations). Note: this field points to the explicit actual
1398 -- parameter itself, not the N_Parameter_Association node (its parent).
1399
1400 -- First_Real_Statement (Node2-Sem)
1401 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1402 -- Empty. Used only when declarations are moved into the statement part
1403 -- of a construct as a result of wrapping an AT END handler that is
1404 -- required to cover the declarations. In this case, this field is used
1405 -- to remember the location in the statements list of the first real
1406 -- statement, i.e. the statement that used to be first in the statement
1407 -- list before the declarations were prepended.
1408
1409 -- First_Subtype_Link (Node5-Sem)
1410 -- Present in N_Freeze_Entity node for an anonymous base type that is
1411 -- implicitly created by the declaration of a first subtype. It points
1412 -- to the entity for the first subtype.
1413
1414 -- Float_Truncate (Flag11-Sem)
1415 -- A flag present in type conversion nodes. This is used for float to
1416 -- integer conversions where truncation is required rather than rounding.
1417
1418 -- Forwards_OK (Flag5-Sem)
1419 -- A flag present in the N_Assignment_Statement node. It is used only
1420 -- if the type being assigned is an array type, and is set if analysis
1421 -- determines that it is definitely safe to do the copy forwards, i.e.
1422 -- starting at the lowest addressed element. This is the case if either
1423 -- the operands do not overlap, or they may overlap, but if they do,
1424 -- then the left operand is at a lower address than the right operand.
1425 --
1426 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1427 -- means that the front end could not determine that either direction is
1428 -- definitely safe, and a runtime check may be required if the backend
1429 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1430 -- set, it means that the front end can assure no overlap of operands.
1431
1432 -- From_Aspect_Specification (Flag13-Sem)
1433 -- Processing of aspect specifications typically results in insertion in
1434 -- the tree of corresponding pragma or attribute definition clause nodes.
1435 -- These generated nodes have the From_Aspect_Specification flag set to
1436 -- indicate that they came from aspect specifications originally.
1437
1438 -- From_At_End (Flag4-Sem)
1439 -- This flag is set on an N_Raise_Statement node if it corresponds to
1440 -- the reraise statement generated as the last statement of an AT END
1441 -- handler when SJLJ exception handling is active. It is used to stop
1442 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1443 -- because if the restriction is set, the reraise is not generated.
1444
1445 -- From_At_Mod (Flag4-Sem)
1446 -- This flag is set on the attribute definition clause node that is
1447 -- generated by a transformation of an at mod phrase in a record
1448 -- representation clause. This is used to give slightly different (Ada 83
1449 -- compatible) semantics to such a clause, namely it is used to specify a
1450 -- minimum acceptable alignment for the base type and all subtypes. In
1451 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1452 -- must be a multiple of the given value, and the representation clause
1453 -- is considered to be type specific instead of subtype specific.
1454
1455 -- From_Conditional_Expression (Flag1-Sem)
1456 -- This flag is set on if and case statements generated by the expansion
1457 -- of if and case expressions respectively. The flag is used to suppress
1458 -- any finalization of controlled objects found within these statements.
1459
1460 -- From_Default (Flag6-Sem)
1461 -- This flag is set on the subprogram renaming declaration created in an
1462 -- instance for a formal subprogram, when the formal is declared with a
1463 -- box, and there is no explicit actual. If the flag is present, the
1464 -- declaration is treated as an implicit reference to the formal in the
1465 -- ali file.
1466
1467 -- Generalized_Indexing (Node4-Sem)
1468 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1469 -- that are Ada 2012 container indexing operations. The value of the
1470 -- attribute is a function call (possibly dereferenced) that corresponds
1471 -- to the proper expansion of the source indexing operation. Before
1472 -- expansion, the source node is rewritten as the resolved generalized
1473 -- indexing. In ASIS mode, the expansion does not take place, so that
1474 -- the source is preserved and properly annotated with types.
1475
1476 -- Generic_Parent (Node5-Sem)
1477 -- Generic_Parent is defined on declaration nodes that are instances. The
1478 -- value of Generic_Parent is the generic entity from which the instance
1479 -- is obtained.
1480
1481 -- Generic_Parent_Type (Node4-Sem)
1482 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1483 -- actuals of formal private and derived types. Within the instance, the
1484 -- operations on the actual are those inherited from the parent. For a
1485 -- formal private type, the parent type is the generic type itself. The
1486 -- Generic_Parent_Type is also used in an instance to determine whether a
1487 -- private operation overrides an inherited one.
1488
1489 -- Handler_List_Entry (Node2-Sem)
1490 -- This field is present in N_Object_Declaration nodes. It is set only
1491 -- for the Handler_Record entry generated for an exception in zero cost
1492 -- exception handling mode. It references the corresponding item in the
1493 -- handler list, and is used to delete this entry if the corresponding
1494 -- handler is deleted during optimization. For further details on why
1495 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1496
1497 -- Has_Dereference_Action (Flag13-Sem)
1498 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1499 -- indicate that the expansion has aready produced a call to primitive
1500 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1501 -- Such dereference actions are produced for debugging purposes.
1502
1503 -- Has_Dynamic_Length_Check (Flag10-Sem)
1504 -- This flag is present in all expression nodes. It is set to indicate
1505 -- that one of the routines in unit Checks has generated a length check
1506 -- action which has been inserted at the flagged node. This is used to
1507 -- avoid the generation of duplicate checks.
1508
1509 -- Has_Dynamic_Range_Check (Flag12-Sem)
1510 -- This flag is present in N_Subtype_Declaration nodes and on all
1511 -- expression nodes. It is set to indicate that one of the routines in
1512 -- unit Checks has generated a range check action which has been inserted
1513 -- at the flagged node. This is used to avoid the generation of duplicate
1514 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1515 -- it mean in that context???
1516
1517 -- Has_Local_Raise (Flag8-Sem)
1518 -- Present in exception handler nodes. Set if the handler can be entered
1519 -- via a local raise that gets transformed to a goto statement. This will
1520 -- always be set if Local_Raise_Statements is non-empty, but can also be
1521 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1522 -- nodes requiring generation of back end checks.
1523
1524 -- Has_No_Elaboration_Code (Flag17-Sem)
1525 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1526 -- or not elaboration code is present for this unit. It is initially set
1527 -- true for subprogram specs and bodies and for all generic units and
1528 -- false for non-generic package specs and bodies. Gigi may set the flag
1529 -- in the non-generic package case if it determines that no elaboration
1530 -- code is generated. Note that this flag is not related to the
1531 -- Is_Preelaborated status, there can be preelaborated packages that
1532 -- generate elaboration code, and non-preelaborated packages which do
1533 -- not generate elaboration code.
1534
1535 -- Has_Pragma_Suppress_All (Flag14-Sem)
1536 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1537 -- pragma appears anywhere in the unit. This accommodates the rather
1538 -- strange placement rules of other compilers (DEC permits it at the
1539 -- end of a unit, and Rational allows it as a program unit pragma). We
1540 -- allow it anywhere at all, and consider it equivalent to a pragma
1541 -- Suppress (All_Checks) appearing at the start of the configuration
1542 -- pragmas for the unit.
1543
1544 -- Has_Private_View (Flag11-Sem)
1545 -- A flag present in generic nodes that have an entity, to indicate that
1546 -- the node has a private type. Used to exchange private and full
1547 -- declarations if the visibility at instantiation is different from the
1548 -- visibility at generic definition.
1549
1550 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1551 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1552 -- flag the presence of a pragma Relative_Deadline.
1553
1554 -- Has_Self_Reference (Flag13-Sem)
1555 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1556 -- of the expressions contains an access attribute reference to the
1557 -- enclosing type. Such a self-reference can only appear in default-
1558 -- initialized aggregate for a record type.
1559
1560 -- Has_SP_Choice (Flag15-Sem)
1561 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1562 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1563 -- True if the Discrete_Choices list has at least one occurrence of a
1564 -- statically predicated subtype.
1565
1566 -- Has_Storage_Size_Pragma (Flag5-Sem)
1567 -- A flag present in an N_Task_Definition node to flag the presence of a
1568 -- Storage_Size pragma.
1569
1570 -- Has_Target_Names (Flag8-Sem)
1571 -- Present in assignment statements. Indicates that the RHS contains
1572 -- target names (see AI12-0125-3) and must be expanded accordingly.
1573
1574 -- Has_Wide_Character (Flag11-Sem)
1575 -- Present in string literals, set if any wide character (i.e. character
1576 -- code outside the Character range but within Wide_Character range)
1577 -- appears in the string. Used to implement pragma preference rules.
1578
1579 -- Has_Wide_Wide_Character (Flag13-Sem)
1580 -- Present in string literals, set if any wide character (i.e. character
1581 -- code outside the Wide_Character range) appears in the string. Used to
1582 -- implement pragma preference rules.
1583
1584 -- Header_Size_Added (Flag11-Sem)
1585 -- Present in N_Attribute_Reference nodes, set only for attribute
1586 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1587 -- hidden list header used by the runtime finalization support has been
1588 -- added to the size of the prefix. The flag also prevents the infinite
1589 -- expansion of the same attribute in the said context.
1590
1591 -- Hidden_By_Use_Clause (Elist5-Sem)
1592 -- An entity list present in use clauses that appear within
1593 -- instantiations. For the resolution of local entities, entities
1594 -- introduced by these use clauses have priority over global ones, and
1595 -- outer entities must be explicitly hidden/restored on exit.
1596
1597 -- Implicit_With (Flag16-Sem)
1598 -- This flag is set in the N_With_Clause node that is implicitly
1599 -- generated for runtime units that are loaded by the expander or in
1600 -- GNATprove mode, and also for package System, if it is loaded
1601 -- implicitly by a use of the 'Address or 'Tag attribute.
1602 -- ??? There are other implicit with clauses as well.
1603
1604 -- Implicit_With_From_Instantiation (Flag12-Sem)
1605 -- Set in N_With_Clause nodes from generic instantiations.
1606
1607 -- Import_Interface_Present (Flag16-Sem)
1608 -- This flag is set in an Interface or Import pragma if a matching
1609 -- pragma of the other kind is also present. This is used to avoid
1610 -- generating some unwanted error messages.
1611
1612 -- Includes_Infinities (Flag11-Sem)
1613 -- This flag is present in N_Range nodes. It is set for the range of
1614 -- unconstrained float types defined in Standard, which include not only
1615 -- the given range of values, but also legitimately can include infinite
1616 -- values. This flag is false for any float type for which an explicit
1617 -- range is given by the programmer, even if that range is identical to
1618 -- the range for Float.
1619
1620 -- Incomplete_View (Node2-Sem)
1621 -- Present in full type declarations that are completions of incomplete
1622 -- type declarations. Denotes the corresponding incomplete type
1623 -- declaration. Used to simplify the retrieval of primitive operations
1624 -- that may be declared between the partial and the full view of an
1625 -- untagged type.
1626
1627 -- Inherited_Discriminant (Flag13-Sem)
1628 -- This flag is present in N_Component_Association nodes. It indicates
1629 -- that a given component association in an extension aggregate is the
1630 -- value obtained from a constraint on an ancestor. Used to prevent
1631 -- double expansion when the aggregate has expansion delayed.
1632
1633 -- Instance_Spec (Node5-Sem)
1634 -- This field is present in generic instantiation nodes, and also in
1635 -- formal package declaration nodes (formal package declarations are
1636 -- treated in a manner very similar to package instantiations). It points
1637 -- to the node for the spec of the instance, inserted as part of the
1638 -- semantic processing for instantiations in Sem_Ch12.
1639
1640 -- Is_Abort_Block (Flag4-Sem)
1641 -- Present in N_Block_Statement nodes. True if the block protects a list
1642 -- of statements with an Abort_Defer / Abort_Undefer_Direct pair.
1643
1644 -- Is_Accessibility_Actual (Flag13-Sem)
1645 -- Present in N_Parameter_Association nodes. True if the parameter is
1646 -- an extra actual that carries the accessibility level of the actual
1647 -- for an access parameter, in a function that dispatches on result and
1648 -- is called in a dispatching context. Used to prevent a formal/actual
1649 -- mismatch when the call is rewritten as a dispatching call.
1650
1651 -- Is_Analyzed_Pragma (Flag5-Sem)
1652 -- Present in N_Pragma nodes. Set for delayed pragmas that require a two
1653 -- step analysis. The initial step is peformed by routine Analyze_Pragma
1654 -- and verifies the overall legality of the pragma. The second step takes
1655 -- place in the various Analyze_xxx_In_Decl_Part routines which perform
1656 -- full analysis. The flag prevents the reanalysis of a delayed pragma.
1657
1658 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1659 -- A flag set in a Block_Statement node to indicate that it is the
1660 -- expansion of an asynchronous entry call. Such a block needs cleanup
1661 -- handler to assure that the call is cancelled.
1662
1663 -- Is_Boolean_Aspect (Flag16-Sem)
1664 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1665 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1666
1667 -- Is_Checked (Flag11-Sem)
1668 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1669 -- assertion aspect or pragma, or check pragma for an assertion, that
1670 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1671 -- is set (they cannot both be set), then this means that the status of
1672 -- the pragma has been checked at the appropriate point and should not
1673 -- be further modified (in some cases these flags are copied when a
1674 -- pragma is rewritten).
1675
1676 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
1677 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1678 -- related to a checked Ghost entity or encloses a checked Ghost entity.
1679 -- This flag has no relation to Is_Checked.
1680
1681 -- Is_Component_Left_Opnd (Flag13-Sem)
1682 -- Is_Component_Right_Opnd (Flag14-Sem)
1683 -- Present in concatenation nodes, to indicate that the corresponding
1684 -- operand is of the component type of the result. Used in resolving
1685 -- concatenation nodes in instances.
1686
1687 -- Is_Controlling_Actual (Flag16-Sem)
1688 -- This flag is set on an expression that is a controlling argument in
1689 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1690 -- details of its use.
1691
1692 -- Is_Declaration_Level_Node (Flag5-Sem)
1693 -- Present in call marker and instantiation nodes. Set when the constuct
1694 -- appears within the declarations of a block statement, an entry body,
1695 -- a subprogram body, or a task body. The flag aids the ABE Processing
1696 -- phase to catch certain forms of guaranteed ABEs.
1697
1698 -- Is_Delayed_Aspect (Flag14-Sem)
1699 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1700 -- come from aspect specifications, where the evaluation of the aspect
1701 -- must be delayed to the freeze point. This flag is also set True in
1702 -- the corresponding N_Aspect_Specification node.
1703
1704 -- Is_Disabled (Flag15-Sem)
1705 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1706 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1707 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1708 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1709 -- If this flag is set, the aspect or policy is not analyzed for semantic
1710 -- correctness, so any expressions etc will not be marked as analyzed.
1711
1712 -- Is_Dispatching_Call (Flag3-Sem)
1713 -- Present in call marker nodes. Set when the related call which prompted
1714 -- the creation of the marker is dispatching.
1715
1716 -- Is_Dynamic_Coextension (Flag18-Sem)
1717 -- Present in allocator nodes, to indicate that this is an allocator
1718 -- for an access discriminant of a dynamically allocated object. The
1719 -- coextension must be deallocated and finalized at the same time as
1720 -- the enclosing object.
1721
1722 -- Is_Effective_Use_Clause (Flag1-Sem)
1723 -- Present in both N_Use_Type_Clause and N_Use_Package_Clause to indicate
1724 -- a use clause is "used" in the current source.
1725
1726 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
1727 -- Present in nodes which represent an elaboration scenario. Those are
1728 -- assignment statement, attribute reference, call marker, entry call
1729 -- statement, expanded name, function call, identifier, instantiation,
1730 -- procedure call statement, and requeue statement nodes. Set when the
1731 -- node appears within a context which allows for the generation of
1732 -- run-time ABE checks. This flag detemines whether the ABE Processing
1733 -- phase generates conditional ABE checks and guaranteed ABE failures.
1734
1735 -- Is_Entry_Barrier_Function (Flag8-Sem)
1736 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
1737 -- nodes which emulate the barrier function of a protected entry body.
1738 -- The flag is used when checking for incorrect use of Current_Task.
1739
1740 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1741 -- This flag is set in an N_Function_Call node to indicate that the extra
1742 -- actuals to support a build-in-place style of call have been added to
1743 -- the call.
1744
1745 -- Is_Expanded_Contract (Flag1-Sem)
1746 -- Present in N_Contract nodes. Set if the contract has already undergone
1747 -- expansion activities.
1748
1749 -- Is_Finalization_Wrapper (Flag9-Sem)
1750 -- This flag is present in N_Block_Statement nodes. It is set when the
1751 -- block acts as a wrapper of a handled construct which has controlled
1752 -- objects. The wrapper prevents interference between exception handlers
1753 -- and At_End handlers.
1754
1755 -- Is_Generic_Contract_Pragma (Flag2-Sem)
1756 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1757 -- a source construct, applies to a generic unit or its body and denotes
1758 -- one of the following contract-related annotations:
1759 -- Abstract_State
1760 -- Contract_Cases
1761 -- Depends
1762 -- Extensions_Visible
1763 -- Global
1764 -- Initial_Condition
1765 -- Initializes
1766 -- Post
1767 -- Post_Class
1768 -- Postcondition
1769 -- Pre
1770 -- Pre_Class
1771 -- Precondition
1772 -- Refined_Depends
1773 -- Refined_Global
1774 -- Refined_Post
1775 -- Refined_State
1776 -- Test_Case
1777
1778 -- Is_Ignored (Flag9-Sem)
1779 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1780 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1781 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1782 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1783 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1784 -- gives a policy for the aspect or pragma, then there are two cases. For
1785 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1786 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1787 -- ignored because of the absence of a -gnata switch. For any other
1788 -- aspects or pragmas, the flag is off. If this flag is set, the
1789 -- aspect/pragma is fully analyzed and checked for other syntactic
1790 -- and semantic errors, but it does not have any semantic effect.
1791
1792 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
1793 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1794 -- related to an ignored Ghost entity or encloses ignored Ghost entity.
1795 -- This flag has no relation to Is_Ignored.
1796
1797 -- Is_In_Discriminant_Check (Flag11-Sem)
1798 -- This flag is present in a selected component, and is used to indicate
1799 -- that the reference occurs within a discriminant check. The
1800 -- significance is that optimizations based on assuming that the
1801 -- discriminant check has a correct value cannot be performed in this
1802 -- case (or the discriminant check may be optimized away).
1803
1804 -- Is_Inherited_Pragma (Flag4-Sem)
1805 -- This flag is set in an N_Pragma node that appears in a N_Contract node
1806 -- to indicate that the pragma has been inherited from a parent context.
1807
1808 -- Is_Initialization_Block (Flag1-Sem)
1809 -- Defined in block nodes. Set when the block statement was created by
1810 -- the finalization machinery to wrap initialization statements. This
1811 -- flag aids the ABE Processing phase to suppress the diagnostics of
1812 -- finalization actions in initialization contexts.
1813
1814 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
1815 -- Present in call markers and instantiations. Set when the elaboration
1816 -- or evaluation of the scenario results in a guaranteed ABE. The flag
1817 -- is used to suppress the instantiation of generic bodies because gigi
1818 -- cannot handle certain forms of premature instantiation, as well as to
1819 -- prevent the reexamination of the node by the ABE Processing phase.
1820
1821 -- Is_Machine_Number (Flag11-Sem)
1822 -- This flag is set in an N_Real_Literal node to indicate that the value
1823 -- is a machine number. This avoids some unnecessary cases of converting
1824 -- real literals to machine numbers.
1825
1826 -- Is_Null_Loop (Flag16-Sem)
1827 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1828 -- can be determined to be null at compile time. This is used to remove
1829 -- the loop entirely at expansion time.
1830
1831 -- Is_Overloaded (Flag5-Sem)
1832 -- A flag present in all expression nodes. Used temporarily during
1833 -- overloading determination. The setting of this flag is not relevant
1834 -- once overloading analysis is complete.
1835
1836 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1837 -- A flag present only in N_Op_Expon nodes. It is set when the
1838 -- exponentiation is of the form 2 ** N, where the type of N is an
1839 -- unsigned integral subtype whose size does not exceed the size of
1840 -- Standard_Integer (i.e. a type that can be safely converted to
1841 -- Natural), and the exponentiation appears as the right operand of an
1842 -- integer multiplication or an integer division where the dividend is
1843 -- unsigned. It is also required that overflow checking is off for both
1844 -- the exponentiation and the multiply/divide node. If this set of
1845 -- conditions holds, and the flag is set, then the division or
1846 -- multiplication can be (and is) converted to a shift.
1847
1848 -- Is_Prefixed_Call (Flag17-Sem)
1849 -- This flag is set in a selected component within a generic unit, if
1850 -- it resolves to a prefixed call to a primitive operation. The flag
1851 -- is used to prevent accidental overloadings in an instance, when a
1852 -- primitive operation and a private record component may be homographs.
1853
1854 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1855 -- A flag set in a Subprogram_Body block to indicate that it is the
1856 -- implementation of a protected subprogram. Such a body needs cleanup
1857 -- handler to make sure that the associated protected object is unlocked
1858 -- when the subprogram completes.
1859
1860 -- Is_Qualified_Universal_Literal (Flag4-Sem)
1861 -- Present in N_Qualified_Expression nodes. Set when the qualification is
1862 -- converting a universal literal to a specific type. Such qualifiers aid
1863 -- the resolution of accidental overloading of binary or unary operators
1864 -- which may occur in instances.
1865
1866 -- Is_Recorded_Scenario (Flag6-Sem)
1867 -- Present in call marker and instantiation nodes. Set when the scenario
1868 -- was saved by the ABE Recording phase. This flag aids the ABE machinery
1869 -- to keep its internal data up-to-date in case the node is transformed
1870 -- by Atree.Rewrite.
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 nodes which represent an elaboration scenario. Those are
1878 -- assignment statement, attribute reference, call marker, entry call
1879 -- statement, expanded name, function call, identifier, instantiation,
1880 -- procedure call statement, and requeue statement nodes. Set when the
1881 -- node appears within a context subject to SPARK_Mode On. This flag
1882 -- determines when the SPARK model of elaboration be activated by the
1883 -- ABE Processing phase.
1884
1885 -- Is_Static_Coextension (Flag14-Sem)
1886 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1887 -- of an object allocated on the stack rather than the heap.
1888
1889 -- Is_Static_Expression (Flag6-Sem)
1890 -- Indicates that an expression is a static expression according to the
1891 -- rules in (RM 4.9). Note that it is possible for this flag to be set
1892 -- when Raises_Constraint_Error is also set. In practice almost all cases
1893 -- where a static expression is required do not allow an expression which
1894 -- raises Constraint_Error, so almost always, callers should call the
1895 -- Is_Ok_Static_Expression routine instead of testing this flag. See
1896 -- spec of package Sem_Eval for full details on the use of this flag.
1897
1898 -- Is_Subprogram_Descriptor (Flag16-Sem)
1899 -- Present in N_Object_Declaration, and set only for the object
1900 -- declaration generated for a subprogram descriptor in fast exception
1901 -- mode. See Exp_Ch11 for details of use.
1902
1903 -- Is_Task_Allocation_Block (Flag6-Sem)
1904 -- A flag set in a Block_Statement node to indicate that it is the
1905 -- expansion of a task allocator, or the allocator of an object
1906 -- containing tasks. Such a block requires a cleanup handler to call
1907 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1908 -- allocated but not activated when the allocator completes abnormally.
1909
1910 -- Is_Task_Body_Procedure (Flag1-Sem)
1911 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
1912 -- nodes which emulate the body of a task unit.
1913
1914 -- Is_Task_Master (Flag5-Sem)
1915 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1916 -- indicate that the construct is a task master (i.e. has declared tasks
1917 -- or declares an access to a task type).
1918
1919 -- Itype (Node1-Sem)
1920 -- Used in N_Itype_Reference node to reference an itype for which it is
1921 -- important to ensure that it is defined. See description of this node
1922 -- for further details.
1923
1924 -- Kill_Range_Check (Flag11-Sem)
1925 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1926 -- result should not be subjected to range checks. This is used for the
1927 -- implementation of Normalize_Scalars.
1928
1929 -- Label_Construct (Node2-Sem)
1930 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1931 -- N_Block_Statement or N_Loop_Statement node to which the label
1932 -- declaration applies. This attribute is used both in the compiler and
1933 -- in the implementation of ASIS queries. The field is left empty for the
1934 -- special labels generated as part of expanding raise statements with a
1935 -- local exception handler.
1936
1937 -- Library_Unit (Node4-Sem)
1938 -- In a stub node, Library_Unit points to the compilation unit node of
1939 -- the corresponding subunit.
1940 --
1941 -- In a with clause node, Library_Unit points to the spec of the with'ed
1942 -- unit.
1943 --
1944 -- In a compilation unit node, the usage depends on the unit type:
1945 --
1946 -- For a library unit body, Library_Unit points to the compilation unit
1947 -- node of the corresponding spec, unless it's a subprogram body with
1948 -- Acts_As_Spec set, in which case it points to itself.
1949 --
1950 -- For a spec, Library_Unit points to the compilation unit node of the
1951 -- corresponding body, if present. The body will be present if the spec
1952 -- is or contains generics that we needed to instantiate. Similarly, the
1953 -- body will be present if we needed it for inlining purposes. Thus, if
1954 -- we have a spec/body pair, both of which are present, they point to
1955 -- each other via Library_Unit.
1956 --
1957 -- For a subunit, Library_Unit points to the compilation unit node of
1958 -- the parent body.
1959 -- ??? not (always) true, in (at least some, maybe all?) cases it points
1960 -- to the corresponding spec for the parent body.
1961 --
1962 -- Note that this field is not used to hold the parent pointer for child
1963 -- unit (which might in any case need to use it for some other purpose as
1964 -- described above). Instead for a child unit, implicit with's are
1965 -- generated for all parents.
1966
1967 -- Local_Raise_Statements (Elist1)
1968 -- This field is present in exception handler nodes. It is set to
1969 -- No_Elist in the normal case. If there is at least one raise statement
1970 -- which can potentially be handled as a local raise, then this field
1971 -- points to a list of raise nodes, which are calls to a routine to raise
1972 -- an exception. These are raise nodes which can be optimized into gotos
1973 -- if the handler turns out to meet the conditions which permit this
1974 -- transformation. Note that this does NOT include instances of the
1975 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1976 -- handled by the back end (using the N_Push/N_Pop mechanism).
1977
1978 -- Loop_Actions (List2-Sem)
1979 -- A list present in Component_Association nodes in array aggregates.
1980 -- Used to collect actions that must be executed within the loop because
1981 -- they may need to be evaluated anew each time through.
1982
1983 -- Limited_View_Installed (Flag18-Sem)
1984 -- Present in With_Clauses and in package specifications. If set on
1985 -- with_clause, it indicates that this clause has created the current
1986 -- limited view of the designated package. On a package specification, it
1987 -- indicates that the limited view has already been created because the
1988 -- package is mentioned in a limited_with_clause in the closure of the
1989 -- unit being compiled.
1990
1991 -- Local_Raise_Not_OK (Flag7-Sem)
1992 -- Present in N_Exception_Handler nodes. Set if the handler contains
1993 -- a construct (reraise statement, or call to subprogram in package
1994 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1995 -- for a local raise (one that could otherwise be converted to a goto).
1996
1997 -- Must_Be_Byte_Aligned (Flag14-Sem)
1998 -- This flag is present in N_Attribute_Reference nodes. It can be set
1999 -- only for the Address and Unrestricted_Access attributes. If set it
2000 -- means that the object for which the address/access is given must be on
2001 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
2002 -- of the object is to be made before taking the address (this copy is in
2003 -- the current scope on the stack frame). This is used for certain cases
2004 -- of code generated by the expander that passes parameters by address.
2005 --
2006 -- The reason the copy is not made by the front end is that the back end
2007 -- has more information about type layout and may be able to (but is not
2008 -- guaranteed to) prevent making unnecessary copies.
2009
2010 -- Must_Not_Freeze (Flag8-Sem)
2011 -- A flag present in all expression nodes. Normally expressions cause
2012 -- freezing as described in the RM. If this flag is set, then this is
2013 -- inhibited. This is used by the analyzer and expander to label nodes
2014 -- that are created by semantic analysis or expansion and which must not
2015 -- cause freezing even though they normally would. This flag is also
2016 -- present in an N_Subtype_Indication node, since we also use these in
2017 -- calls to Freeze_Expression.
2018
2019 -- Next_Entity (Node2-Sem)
2020 -- Present in defining identifiers, defining character literals and
2021 -- defining operator symbols (i.e. in all entities). The entities of a
2022 -- scope are chained, and this field is used as the forward pointer for
2023 -- this list. See Einfo for further details.
2024
2025 -- Next_Exit_Statement (Node3-Sem)
2026 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
2027 -- chained (in reverse order of appearance) from the First_Exit_Statement
2028 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
2029 -- the next entry on this chain (Empty = end of list).
2030
2031 -- Next_Implicit_With (Node3-Sem)
2032 -- Present in N_With_Clause. Part of a chain of with_clauses generated
2033 -- in rtsfind to indicate implicit dependencies on predefined units. Used
2034 -- to prevent multiple with_clauses for the same unit in a given context.
2035 -- A postorder traversal of the tree whose nodes are units and whose
2036 -- links are with_clauses defines the order in which CodePeer must
2037 -- examine a compiled unit and its full context. This ordering ensures
2038 -- that any subprogram call is examined after the subprogram declaration
2039 -- has been seen.
2040
2041 -- Next_Named_Actual (Node4-Sem)
2042 -- Present in parameter association nodes. Set during semantic analysis
2043 -- to point to the next named parameter, where parameters are ordered by
2044 -- declaration order (as opposed to the actual order in the call, which
2045 -- may be different due to named associations). Not that this field
2046 -- points to the explicit actual parameter itself, not to the
2047 -- N_Parameter_Association node (its parent).
2048
2049 -- Next_Pragma (Node1-Sem)
2050 -- Present in N_Pragma nodes. Used to create a linked list of pragma
2051 -- nodes. Currently used for two purposes:
2052 --
2053 -- Create a list of linked Check_Policy pragmas. The head of this list
2054 -- is stored in Opt.Check_Policy_List (which has further details).
2055 --
2056 -- Used by processing for Pre/Postcondition pragmas to store a list of
2057 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
2058 -- details).
2059 --
2060 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
2061 -- the apply to the same construct. These are visible/private mode for
2062 -- a package spec and declarative/statement mode for package body.
2063
2064 -- Next_Rep_Item (Node5-Sem)
2065 -- Present in pragma nodes, attribute definition nodes, enumeration rep
2066 -- clauses, record rep clauses, aspect specification nodes. Used to link
2067 -- representation items that apply to an entity. See full description of
2068 -- First_Rep_Item field in Einfo for further details.
2069
2070 -- Next_Use_Clause (Node3-Sem)
2071 -- While use clauses are active during semantic processing, they are
2072 -- chained from the scope stack entry, using Next_Use_Clause as a link
2073 -- pointer, with Empty marking the end of the list. The head pointer is
2074 -- in the scope stack entry (First_Use_Clause). At the end of semantic
2075 -- processing (i.e. when Gigi sees the tree, the contents of this field
2076 -- is undefined and should not be read).
2077
2078 -- No_Ctrl_Actions (Flag7-Sem)
2079 -- Present in N_Assignment_Statement to indicate that no Finalize nor
2080 -- Adjust should take place on this assignment even though the RHS is
2081 -- controlled. Also indicates that the primitive _assign should not be
2082 -- used for a tagged assignment. This is used in init procs and aggregate
2083 -- expansions where the generated assignments are initializations, not
2084 -- real assignments.
2085
2086 -- No_Entities_Ref_In_Spec (Flag8-Sem)
2087 -- Present in N_With_Clause nodes. Set if the with clause is on the
2088 -- package or subprogram spec where the main unit is the corresponding
2089 -- body, and no entities of the with'ed unit are referenced by the spec
2090 -- (an entity may still be referenced in the body, so this flag is used
2091 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
2092 -- full details).
2093
2094 -- No_Initialization (Flag13-Sem)
2095 -- Present in N_Object_Declaration and N_Allocator to indicate that the
2096 -- object must not be initialized (by Initialize or call to an init
2097 -- proc). This is needed for controlled aggregates. When the Object
2098 -- declaration has an expression, this flag means that this expression
2099 -- should not be taken into account (needed for in place initialization
2100 -- with aggregates, and for object with an address clause, which are
2101 -- initialized with an assignment at freeze time).
2102
2103 -- No_Minimize_Eliminate (Flag17-Sem)
2104 -- This flag is present in membership operator nodes (N_In/N_Not_In).
2105 -- It is used to indicate that processing for extended overflow checking
2106 -- modes is not required (this is used to prevent infinite recursion).
2107
2108 -- No_Side_Effect_Removal (Flag17-Sem)
2109 -- Present in N_Function_Call nodes. Set when a function call does not
2110 -- require side effect removal. This attribute suppresses the generation
2111 -- of a temporary to capture the result of the function which eventually
2112 -- replaces the function call.
2113
2114 -- No_Truncation (Flag17-Sem)
2115 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
2116 -- only if the RM_Size of the source is greater than the RM_Size of the
2117 -- target for scalar operands. Normally in such a case we truncate some
2118 -- higher order bits of the source, and then sign/zero extend the result
2119 -- to form the output value. But if this flag is set, then we do not do
2120 -- any truncation, so for example, if an 8 bit input is converted to 5
2121 -- bit result which is in fact stored in 8 bits, then the high order
2122 -- three bits of the target result will be copied from the source. This
2123 -- is used for properly setting out of range values for use by pragmas
2124 -- Initialize_Scalars and Normalize_Scalars.
2125
2126 -- Null_Excluding_Subtype (Flag16)
2127 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
2128 -- indication carries a null-exclusion indicator, which is distinct from
2129 -- the null-exclusion indicator that may precede the access keyword.
2130
2131 -- Original_Discriminant (Node2-Sem)
2132 -- Present in identifiers. Used in references to discriminants that
2133 -- appear in generic units. Because the names of the discriminants may be
2134 -- different in an instance, we use this field to recover the position of
2135 -- the discriminant in the original type, and replace it with the
2136 -- discriminant at the same position in the instantiated type.
2137
2138 -- Original_Entity (Node2-Sem)
2139 -- Present in numeric literals. Used to denote the named number that has
2140 -- been constant-folded into the given literal. If literal is from
2141 -- source, or the result of some other constant-folding operation, then
2142 -- Original_Entity is empty. This field is needed to handle properly
2143 -- named numbers in generic units, where the Associated_Node field
2144 -- interferes with the Entity field, making it impossible to preserve the
2145 -- original entity at the point of instantiation (ASIS problem).
2146
2147 -- Others_Discrete_Choices (List1-Sem)
2148 -- When a case statement or variant is analyzed, the semantic checks
2149 -- determine the actual list of choices that correspond to an others
2150 -- choice. This list is materialized for later use by the expander and
2151 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
2152 -- this materialized list of choices, which is in standard format for a
2153 -- list of discrete choices, except that of course it cannot contain an
2154 -- N_Others_Choice entry.
2155
2156 -- Parent_Spec (Node4-Sem)
2157 -- For a library unit that is a child unit spec (package or subprogram
2158 -- declaration, generic declaration or instantiation, or library level
2159 -- rename) this field points to the compilation unit node for the parent
2160 -- package specification. This field is Empty for library bodies (the
2161 -- parent spec in this case can be found from the corresponding spec).
2162
2163 -- Premature_Use (Node5-Sem)
2164 -- Present in N_Incomplete_Type_Declaration node. Used for improved
2165 -- error diagnostics: if there is a premature usage of an incomplete
2166 -- type, a subsequently generated error message indicates the position
2167 -- of its full declaration.
2168
2169 -- Present_Expr (Uint3-Sem)
2170 -- Present in an N_Variant node. This has a meaningful value only after
2171 -- Gigi has back annotated the tree with representation information. At
2172 -- this point, it contains a reference to a gcc expression that depends
2173 -- on the values of one or more discriminants. Give a set of discriminant
2174 -- values, this expression evaluates to False (zero) if variant is not
2175 -- present, and True (non-zero) if it is present. See unit Repinfo for
2176 -- further details on gigi back annotation. This field is used during
2177 -- ASIS processing (data decomposition annex) to determine if a field is
2178 -- present or not.
2179
2180 -- Prev_Use_Clause (Node1-Sem)
2181 -- Present in both N_Use_Package_Clause and N_Use_Type_Clause. Used in
2182 -- detection of ineffective use clauses by allowing a chain of related
2183 -- clauses together to avoid traversing the current scope stack.
2184
2185 -- Print_In_Hex (Flag13-Sem)
2186 -- Set on an N_Integer_Literal node to indicate that the value should be
2187 -- printed in hexadecimal in the sprint listing. Has no effect on
2188 -- legality or semantics of program, only on the displayed output. This
2189 -- is used to clarify output from the packed array cases.
2190
2191 -- Procedure_To_Call (Node2-Sem)
2192 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2193 -- and N_Extended_Return_Statement nodes. References the entity for the
2194 -- declaration of the procedure to be called to accomplish the required
2195 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
2196 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
2197 -- allocating the return value), and for the Deallocate procedure in the
2198 -- case of N_Free_Statement.
2199
2200 -- Raises_Constraint_Error (Flag7-Sem)
2201 -- Set on an expression whose evaluation will definitely fail constraint
2202 -- error check. In the case of static expressions, this flag must be set
2203 -- accurately (and if it is set, the expression is typically illegal
2204 -- unless it appears as a non-elaborated branch of a short-circuit form).
2205 -- For a non-static expression, this flag may be set whenever an
2206 -- expression (e.g. an aggregate) is known to raise constraint error. If
2207 -- set, the expression definitely will raise CE if elaborated at runtime.
2208 -- If not set, the expression may or may not raise CE. In other words, on
2209 -- static expressions, the flag is set accurately, on non-static
2210 -- expressions it is set conservatively.
2211
2212 -- Redundant_Use (Flag13-Sem)
2213 -- Present in nodes that can appear as an operand in a use clause or use
2214 -- type clause (identifiers, expanded names, attribute references). Set
2215 -- to indicate that a use is redundant (and therefore need not be undone
2216 -- on scope exit).
2217
2218 -- Renaming_Exception (Node2-Sem)
2219 -- Present in N_Exception_Declaration node. Used to point back to the
2220 -- exception renaming for an exception declared within a subprogram.
2221 -- What happens is that an exception declared in a subprogram is moved
2222 -- to the library level with a unique name, and the original exception
2223 -- becomes a renaming. This link from the library level exception to the
2224 -- renaming declaration allows registering of the proper exception name.
2225
2226 -- Return_Statement_Entity (Node5-Sem)
2227 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
2228 -- Points to an E_Return_Statement representing the return statement.
2229
2230 -- Return_Object_Declarations (List3)
2231 -- Present in N_Extended_Return_Statement. Points to a list initially
2232 -- containing a single N_Object_Declaration representing the return
2233 -- object. We use a list (instead of just a pointer to the object decl)
2234 -- because Analyze wants to insert extra actions on this list.
2235
2236 -- Rounded_Result (Flag18-Sem)
2237 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
2238 -- Used in the fixed-point cases to indicate that the result must be
2239 -- rounded as a result of the use of the 'Round attribute. Also used for
2240 -- integer N_Op_Divide nodes to indicate that the result should be
2241 -- rounded to the nearest integer (breaking ties away from zero), rather
2242 -- than truncated towards zero as usual. These rounded integer operations
2243 -- are the result of expansion of rounded fixed-point divide, conversion
2244 -- and multiplication operations.
2245
2246 -- SCIL_Entity (Node4-Sem)
2247 -- Present in SCIL nodes. References the specific tagged type associated
2248 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
2249 -- the controlling type of the call; for an N_SCIL_Membership_Test node
2250 -- generated as part of testing membership in T'Class, this is T; for an
2251 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
2252
2253 -- SCIL_Controlling_Tag (Node5-Sem)
2254 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
2255 -- tag of a dispatching call. This is usually an N_Selected_Component
2256 -- node (for a _tag component), but may be an N_Object_Declaration or
2257 -- N_Parameter_Specification node in some cases (e.g., for a call to
2258 -- a classwide streaming operation or a call to an instance of
2259 -- Ada.Tags.Generic_Dispatching_Constructor).
2260
2261 -- SCIL_Tag_Value (Node5-Sem)
2262 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2263 -- of the value that is being tested.
2264
2265 -- SCIL_Target_Prim (Node2-Sem)
2266 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2267 -- operation named (statically) in a dispatching call.
2268
2269 -- Scope (Node3-Sem)
2270 -- Present in defining identifiers, defining character literals and
2271 -- defining operator symbols (i.e. in all entities). The entities of a
2272 -- scope all use this field to reference the corresponding scope entity.
2273 -- See Einfo for further details.
2274
2275 -- Shift_Count_OK (Flag4-Sem)
2276 -- A flag present in shift nodes to indicate that the shift count is
2277 -- known to be in range, i.e. is in the range from zero to word length
2278 -- minus one. If this flag is not set, then the shift count may be
2279 -- outside this range, i.e. larger than the word length, and the code
2280 -- must ensure that such shift counts give the appropriate result.
2281
2282 -- Source_Type (Node1-Sem)
2283 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2284 -- source type entity for the unchecked conversion instantiation
2285 -- which gigi must do size validation for.
2286
2287 -- Split_PPC (Flag17)
2288 -- When a Pre or Post aspect specification is processed, it is broken
2289 -- into AND THEN sections. The left most section has Split_PPC set to
2290 -- False, indicating that it is the original specification (e.g. for
2291 -- posting errors). For other sections, Split_PPC is set to True.
2292 -- This flag is set in both the N_Aspect_Specification node itself,
2293 -- and in the pragma which is generated from this node.
2294
2295 -- Storage_Pool (Node1-Sem)
2296 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2297 -- and N_Extended_Return_Statement nodes. References the entity for the
2298 -- storage pool to be used for the allocate or free call or for the
2299 -- allocation of the returned value from function. Empty indicates that
2300 -- the global default pool is to be used. Note that in the case
2301 -- of a return statement, this field is set only if the function returns
2302 -- value of a type whose size is not known at compile time on the
2303 -- secondary stack.
2304
2305 -- Suppress_Assignment_Checks (Flag18-Sem)
2306 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2307 -- and range checks in cases where the generated code knows that the
2308 -- value being assigned is in range and satisfies any predicate. Also
2309 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2310 -- checks on the initializing value. In assignment statements it also
2311 -- suppresses access checks in the generated code for out- and in-out
2312 -- parameters in entry calls.
2313
2314 -- Suppress_Loop_Warnings (Flag17-Sem)
2315 -- Used in N_Loop_Statement node to indicate that warnings within the
2316 -- body of the loop should be suppressed. This is set when the range
2317 -- of a FOR loop is known to be null, or is probably null (loop would
2318 -- only execute if invalid values are present).
2319
2320 -- Target (Node1-Sem)
2321 -- Present in call marker nodes. References the entity of the entry,
2322 -- operator, or subprogram invoked by the related call or requeue.
2323
2324 -- Target_Type (Node2-Sem)
2325 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2326 -- type entity for the unchecked conversion instantiation which gigi must
2327 -- do size validation for.
2328
2329 -- Then_Actions (List3-Sem)
2330 -- This field is present in if expression nodes. During code expansion
2331 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2332 -- at an appropriate place in the tree to get elaborated at the right
2333 -- time. For if expressions, we have to be sure that the actions for
2334 -- for the Then branch are only elaborated if the condition is True.
2335 -- The Then_Actions field is used as a temporary parking place for
2336 -- these actions. The final tree is always rewritten to eliminate the
2337 -- need for this field, so in the tree passed to Gigi, this field is
2338 -- always set to No_List.
2339
2340 -- Treat_Fixed_As_Integer (Flag14-Sem)
2341 -- This flag appears in operator nodes for divide, multiply, mod and rem
2342 -- on fixed-point operands. It indicates that the operands are to be
2343 -- treated as integer values, ignoring small values. This flag is only
2344 -- set as a result of expansion of fixed-point operations. Typically a
2345 -- fixed-point multiplication in the source generates subsidiary
2346 -- multiplication and division operations that work with the underlying
2347 -- integer values and have this flag set. Note that this flag is not
2348 -- needed on other arithmetic operations (add, neg, subtract etc.) since
2349 -- in these cases it is always the case that fixed is treated as integer.
2350 -- The Etype field MUST be set if this flag is set. The analyzer knows to
2351 -- leave such nodes alone, and whoever makes them must set the correct
2352 -- Etype value.
2353
2354 -- TSS_Elist (Elist3-Sem)
2355 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2356 -- entries for each TSS (type support subprogram) associated with the
2357 -- frozen type. The elements of the list are the entities for the
2358 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2359 -- if there are no type support subprograms for the type or if the freeze
2360 -- node is not for a type.
2361
2362 -- Uneval_Old_Accept (Flag7-Sem)
2363 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
2364 -- (accept) at the point where the pragma is encountered (including the
2365 -- case of a pragma generated from an aspect specification). It is this
2366 -- setting that is relevant, rather than the setting at the point where
2367 -- a contract is finally analyzed after the delay till the freeze point.
2368
2369 -- Uneval_Old_Warn (Flag18-Sem)
2370 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
2371 -- (warn) at the point where the pragma is encountered (including the
2372 -- case of a pragma generated from an aspect specification). It is this
2373 -- setting that is relevant, rather than the setting at the point where
2374 -- a contract is finally analyzed after the delay till the freeze point.
2375
2376 -- Unreferenced_In_Spec (Flag7-Sem)
2377 -- Present in N_With_Clause nodes. Set if the with clause is on the
2378 -- package or subprogram spec where the main unit is the corresponding
2379 -- body, and is not referenced by the spec (it may still be referenced by
2380 -- the body, so this flag is used to generate the proper message (see
2381 -- Sem_Util.Check_Unused_Withs for details)
2382
2383 -- Uninitialized_Variable (Node3-Sem)
2384 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2385 -- Extension_Declarations. Indicates that a variable in a generic unit
2386 -- whose type is a formal private or derived type is read without being
2387 -- initialized. Used to warn if the corresponding actual type is not
2388 -- a fully initialized type.
2389
2390 -- Used_Operations (Elist2-Sem)
2391 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2392 -- are made potentially use-visible by the clause. Simplifies processing
2393 -- on exit from the scope of the use_type_clause, in particular in the
2394 -- case of Use_All_Type, when those operations several scopes.
2395
2396 -- Was_Attribute_Reference (Flag2-Sem)
2397 -- Present in N_Subprogram_Body. Set to True if the original source is an
2398 -- attribute reference which is an actual in a generic instantiation. The
2399 -- instantiation prologue renames these attributes, and expansion later
2400 -- converts them into subprogram bodies.
2401
2402 -- Was_Expression_Function (Flag18-Sem)
2403 -- Present in N_Subprogram_Body. True if the original source had an
2404 -- N_Expression_Function, which was converted to the N_Subprogram_Body
2405 -- by Analyze_Expression_Function. This is needed by ASIS to correctly
2406 -- recreate the expression function (for the instance body) when the
2407 -- completion of a generic function declaration is an expression
2408 -- function.
2409
2410 -- Was_Originally_Stub (Flag13-Sem)
2411 -- This flag is set in the node for a proper body that replaces stub.
2412 -- During the analysis procedure, stubs in some situations get rewritten
2413 -- by the corresponding bodies, and we set this flag to remember that
2414 -- this happened. Note that it is not good enough to rely on the use of
2415 -- Original_Node here because of the case of nested instantiations where
2416 -- the substituted node can be copied.
2417
2418 -- Withed_Body (Node1-Sem)
2419 -- Present in N_With_Clause nodes. Set if the unit in whose context
2420 -- the with_clause appears instantiates a generic contained in the
2421 -- library unit of the with_clause and as a result loads its body.
2422 -- Used for a more precise unit traversal for CodePeer.
2423
2424 --------------------------------------------------
2425 -- Note on Use of End_Label and End_Span Fields --
2426 --------------------------------------------------
2427
2428 -- Several constructs have end lines:
2429
2430 -- Loop Statement end loop [loop_IDENTIFIER];
2431 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2432 -- Task Definition end [task_IDENTIFIER]
2433 -- Protected Definition end [protected_IDENTIFIER]
2434 -- Protected Body end [protected_IDENTIFIER]
2435
2436 -- Block Statement end [block_IDENTIFIER];
2437 -- Subprogram Body end [DESIGNATOR];
2438 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2439 -- Task Body end [task_IDENTIFIER];
2440 -- Accept Statement end [entry_IDENTIFIER]];
2441 -- Entry Body end [entry_IDENTIFIER];
2442
2443 -- If Statement end if;
2444 -- Case Statement end case;
2445
2446 -- Record Definition end record;
2447 -- Enumeration Definition );
2448
2449 -- The End_Label and End_Span fields are used to mark the locations of
2450 -- these lines, and also keep track of the label in the case where a label
2451 -- is present.
2452
2453 -- For the first group above, the End_Label field of the corresponding node
2454 -- is used to point to the label identifier. In the case where there is no
2455 -- label in the source, the parser supplies a dummy identifier (with
2456 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2457 -- marks the location of the token following the END token.
2458
2459 -- For the second group, the use of End_Label is similar, but the End_Label
2460 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2461 -- simply because in some cases there is no room in the parent node.
2462
2463 -- For the third group, there is never any label, and instead of using
2464 -- End_Label, we use the End_Span field which gives the location of the
2465 -- token following END, relative to the starting Sloc of the construct,
2466 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2467 -- following the End_Label.
2468
2469 -- The record definition case is handled specially, we treat it as though
2470 -- it required an optional label which is never present, and so the parser
2471 -- always builds a dummy identifier with Comes From Source set False. The
2472 -- reason we do this, rather than using End_Span in this case, is that we
2473 -- want to generate a cross-ref entry for the end of a record, since it
2474 -- represents a scope for name declaration purposes.
2475
2476 -- The enumeration definition case is handled in an exactly similar manner,
2477 -- building a dummy identifier to get a cross-reference.
2478
2479 -- Note: the reason we store the difference as a Uint, instead of storing
2480 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2481 -- distinguished from other types of values, and we count on all general
2482 -- use fields being self describing. To make things easier for clients,
2483 -- note that we provide function End_Location, and procedure
2484 -- Set_End_Location to allow access to the logical value (which is the
2485 -- Source_Ptr value for the end token).
2486
2487 ---------------------
2488 -- Syntactic Nodes --
2489 ---------------------
2490
2491 ---------------------
2492 -- 2.3 Identifier --
2493 ---------------------
2494
2495 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2496 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2497
2498 -- An IDENTIFIER shall not be a reserved word
2499
2500 -- In the Ada grammar identifiers are the bottom level tokens which have
2501 -- very few semantics. Actual program identifiers are direct names. If
2502 -- we were being 100% honest with the grammar, then we would have a node
2503 -- called N_Direct_Name which would point to an identifier. However,
2504 -- that's too many extra nodes, so we just use the N_Identifier node
2505 -- directly as a direct name, and it contains the expression fields and
2506 -- Entity field that correspond to its use as a direct name. In those
2507 -- few cases where identifiers appear in contexts where they are not
2508 -- direct names (pragmas, pragma argument associations, attribute
2509 -- references and attribute definition clauses), the Chars field of the
2510 -- node contains the Name_Id for the identifier name.
2511
2512 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2513 -- cases. First, an incorrect use of a reserved word as an identifier is
2514 -- diagnosed and then treated as a normal identifier. Second, an
2515 -- attribute designator of the form of a reserved word (access, delta,
2516 -- digits, range) is treated as an identifier.
2517
2518 -- Note: The set of letters that is permitted in an identifier depends
2519 -- on the character set in use. See package Csets for full details.
2520
2521 -- N_Identifier
2522 -- Sloc points to identifier
2523 -- Chars (Name1) contains the Name_Id for the identifier
2524 -- Entity (Node4-Sem)
2525 -- Associated_Node (Node4-Sem)
2526 -- Original_Discriminant (Node2-Sem)
2527 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
2528 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
2529 -- Has_Private_View (Flag11-Sem) (set in generic units)
2530 -- Redundant_Use (Flag13-Sem)
2531 -- Atomic_Sync_Required (Flag14-Sem)
2532 -- plus fields for expression
2533
2534 --------------------------
2535 -- 2.4 Numeric Literal --
2536 --------------------------
2537
2538 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2539
2540 ----------------------------
2541 -- 2.4.1 Decimal Literal --
2542 ----------------------------
2543
2544 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2545
2546 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2547
2548 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2549
2550 -- Decimal literals appear in the tree as either integer literal nodes
2551 -- or real literal nodes, depending on whether a period is present.
2552
2553 -- Note: literal nodes appear as a result of direct use of literals
2554 -- in the source program, and also as the result of evaluating
2555 -- expressions at compile time. In the latter case, it is possible
2556 -- to construct real literals that have no syntactic representation
2557 -- using the standard literal format. Such literals are listed by
2558 -- Sprint using the notation [numerator / denominator].
2559
2560 -- Note: the value of an integer literal node created by the front end
2561 -- is never outside the range of values of the base type. However, it
2562 -- can be the case that the created value is outside the range of the
2563 -- particular subtype. This happens in the case of integer overflows
2564 -- with checks suppressed.
2565
2566 -- N_Integer_Literal
2567 -- Sloc points to literal
2568 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2569 -- has been constant-folded into its literal value.
2570 -- Intval (Uint3) contains integer value of literal
2571 -- Print_In_Hex (Flag13-Sem)
2572 -- plus fields for expression
2573
2574 -- N_Real_Literal
2575 -- Sloc points to literal
2576 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2577 -- has been constant-folded into its literal value.
2578 -- Realval (Ureal3) contains real value of literal
2579 -- Corresponding_Integer_Value (Uint4-Sem)
2580 -- Is_Machine_Number (Flag11-Sem)
2581 -- plus fields for expression
2582
2583 --------------------------
2584 -- 2.4.2 Based Literal --
2585 --------------------------
2586
2587 -- BASED_LITERAL ::=
2588 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2589
2590 -- BASE ::= NUMERAL
2591
2592 -- BASED_NUMERAL ::=
2593 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2594
2595 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2596
2597 -- Based literals appear in the tree as either integer literal nodes
2598 -- or real literal nodes, depending on whether a period is present.
2599
2600 ----------------------------
2601 -- 2.5 Character Literal --
2602 ----------------------------
2603
2604 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2605
2606 -- N_Character_Literal
2607 -- Sloc points to literal
2608 -- Chars (Name1) contains the Name_Id for the identifier
2609 -- Char_Literal_Value (Uint2) contains the literal value
2610 -- Entity (Node4-Sem)
2611 -- Associated_Node (Node4-Sem)
2612 -- Has_Private_View (Flag11-Sem) set in generic units.
2613 -- plus fields for expression
2614
2615 -- Note: the Entity field will be missing (set to Empty) for character
2616 -- literals whose type is Standard.Wide_Character or Standard.Character
2617 -- or a type derived from one of these two. In this case the character
2618 -- literal stands for its own coding. The reason we take this irregular
2619 -- short cut is to avoid the need to build lots of junk defining
2620 -- character literal nodes.
2621
2622 -------------------------
2623 -- 2.6 String Literal --
2624 -------------------------
2625
2626 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2627
2628 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2629 -- single GRAPHIC_CHARACTER other than a quotation mark.
2630 --
2631 -- Is_Folded_In_Parser is True if the parser created this literal by
2632 -- folding a sequence of "&" operators. For example, if the source code
2633 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2634 -- is set. This flag is needed because the parser doesn't know about
2635 -- visibility, so the folded result might be wrong, and semantic
2636 -- analysis needs to check for that.
2637
2638 -- N_String_Literal
2639 -- Sloc points to literal
2640 -- Strval (Str3) contains Id of string value
2641 -- Has_Wide_Character (Flag11-Sem)
2642 -- Has_Wide_Wide_Character (Flag13-Sem)
2643 -- Is_Folded_In_Parser (Flag4)
2644 -- plus fields for expression
2645
2646 ------------------
2647 -- 2.7 Comment --
2648 ------------------
2649
2650 -- A COMMENT starts with two adjacent hyphens and extends up to the
2651 -- end of the line. A COMMENT may appear on any line of a program.
2652
2653 -- Comments are skipped by the scanner and do not appear in the tree.
2654 -- It is possible to reconstruct the position of comments with respect
2655 -- to the elements of the tree by using the source position (Sloc)
2656 -- pointers that appear in every tree node.
2657
2658 -----------------
2659 -- 2.8 Pragma --
2660 -----------------
2661
2662 -- PRAGMA ::= pragma IDENTIFIER
2663 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2664
2665 -- Note that a pragma may appear in the tree anywhere a declaration
2666 -- or a statement may appear, as well as in some other situations
2667 -- which are explicitly documented.
2668
2669 -- N_Pragma
2670 -- Sloc points to PRAGMA
2671 -- Next_Pragma (Node1-Sem)
2672 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2673 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2674 -- Pragma_Identifier (Node4)
2675 -- Next_Rep_Item (Node5-Sem)
2676 -- Is_Generic_Contract_Pragma (Flag2-Sem)
2677 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
2678 -- Is_Inherited_Pragma (Flag4-Sem)
2679 -- Is_Analyzed_Pragma (Flag5-Sem)
2680 -- Class_Present (Flag6) set if from Aspect with 'Class
2681 -- Uneval_Old_Accept (Flag7-Sem)
2682 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
2683 -- Is_Ignored (Flag9-Sem)
2684 -- Is_Checked (Flag11-Sem)
2685 -- From_Aspect_Specification (Flag13-Sem)
2686 -- Is_Delayed_Aspect (Flag14-Sem)
2687 -- Is_Disabled (Flag15-Sem)
2688 -- Import_Interface_Present (Flag16-Sem)
2689 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2690 -- Uneval_Old_Warn (Flag18-Sem)
2691
2692 -- Note: we should have a section on what pragmas are passed on to
2693 -- the back end to be processed. This section should note that pragma
2694 -- Psect_Object is always converted to Common_Object, but there are
2695 -- undoubtedly many other similar notes required ???
2696
2697 -- Note: utility functions Pragma_Name_Unmapped and Pragma_Name may be
2698 -- applied to pragma nodes to obtain the Chars or its mapped version.
2699
2700 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2701 -- aspect name, as does the Pragma_Identifier. In this case if the
2702 -- pragma has a local name argument (such as pragma Inline), it is
2703 -- resolved to point to the specific entity affected by the pragma.
2704
2705 --------------------------------------
2706 -- 2.8 Pragma Argument Association --
2707 --------------------------------------
2708
2709 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2710 -- [pragma_argument_IDENTIFIER =>] NAME
2711 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2712
2713 -- In Ada 2012, there are two more possibilities:
2714
2715 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2716 -- [pragma_argument_ASPECT_MARK =>] NAME
2717 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2718
2719 -- where the interesting allowed cases (which do not fit the syntax of
2720 -- the first alternative above) are
2721
2722 -- ASPECT_MARK => Pre'Class |
2723 -- Post'Class |
2724 -- Type_Invariant'Class |
2725 -- Invariant'Class
2726
2727 -- We allow this special usage in all Ada modes, but it would be a
2728 -- pain to allow these aspects to pervade the pragma syntax, and the
2729 -- representation of pragma nodes internally. So what we do is to
2730 -- replace these ASPECT_MARK forms with identifiers whose name is one
2731 -- of the special internal names _Pre, _Post or _Type_Invariant.
2732
2733 -- We do a similar replacement of these Aspect_Mark forms in the
2734 -- Expression of a pragma argument association for the cases of
2735 -- the first arguments of any Check pragmas and Check_Policy pragmas
2736
2737 -- N_Pragma_Argument_Association
2738 -- Sloc points to first token in association
2739 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2740 -- Expression_Copy (Node2-Sem)
2741 -- Expression (Node3)
2742
2743 ------------------------
2744 -- 2.9 Reserved Word --
2745 ------------------------
2746
2747 -- Reserved words are parsed by the scanner, and returned as the
2748 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2749
2750 ----------------------------
2751 -- 3.1 Basic Declaration --
2752 ----------------------------
2753
2754 -- BASIC_DECLARATION ::=
2755 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2756 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2757 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2758 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2759 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2760 -- | GENERIC_INSTANTIATION
2761
2762 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2763 -- see further description in section on semantic nodes.
2764
2765 -- Also, in the tree that is constructed, a pragma may appear
2766 -- anywhere that a declaration may appear.
2767
2768 ------------------------------
2769 -- 3.1 Defining Identifier --
2770 ------------------------------
2771
2772 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2773
2774 -- A defining identifier is an entity, which has additional fields
2775 -- depending on the setting of the Ekind field. These additional
2776 -- fields are defined (and access subprograms declared) in package
2777 -- Einfo.
2778
2779 -- Note: N_Defining_Identifier is an extended node whose fields are
2780 -- deliberate layed out to match the layout of fields in an ordinary
2781 -- N_Identifier node allowing for easy alteration of an identifier
2782 -- node into a defining identifier node. For details, see procedure
2783 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2784
2785 -- N_Defining_Identifier
2786 -- Sloc points to identifier
2787 -- Chars (Name1) contains the Name_Id for the identifier
2788 -- Next_Entity (Node2-Sem)
2789 -- Scope (Node3-Sem)
2790 -- Etype (Node5-Sem)
2791
2792 -----------------------------
2793 -- 3.2.1 Type Declaration --
2794 -----------------------------
2795
2796 -- TYPE_DECLARATION ::=
2797 -- FULL_TYPE_DECLARATION
2798 -- | INCOMPLETE_TYPE_DECLARATION
2799 -- | PRIVATE_TYPE_DECLARATION
2800 -- | PRIVATE_EXTENSION_DECLARATION
2801
2802 ----------------------------------
2803 -- 3.2.1 Full Type Declaration --
2804 ----------------------------------
2805
2806 -- FULL_TYPE_DECLARATION ::=
2807 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2808 -- is TYPE_DEFINITION
2809 -- [ASPECT_SPECIFICATIONS];
2810 -- | TASK_TYPE_DECLARATION
2811 -- | PROTECTED_TYPE_DECLARATION
2812
2813 -- The full type declaration node is used only for the first case. The
2814 -- second case (concurrent type declaration), is represented directly
2815 -- by a task type declaration or a protected type declaration.
2816
2817 -- N_Full_Type_Declaration
2818 -- Sloc points to TYPE
2819 -- Defining_Identifier (Node1)
2820 -- Incomplete_View (Node2-Sem)
2821 -- Discriminant_Specifications (List4) (set to No_List if none)
2822 -- Type_Definition (Node3)
2823 -- Discr_Check_Funcs_Built (Flag11-Sem)
2824
2825 ----------------------------
2826 -- 3.2.1 Type Definition --
2827 ----------------------------
2828
2829 -- TYPE_DEFINITION ::=
2830 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2831 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2832 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2833 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2834
2835 --------------------------------
2836 -- 3.2.2 Subtype Declaration --
2837 --------------------------------
2838
2839 -- SUBTYPE_DECLARATION ::=
2840 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2841 -- [ASPECT_SPECIFICATIONS];
2842
2843 -- The subtype indication field is set to Empty for subtypes
2844 -- declared in package Standard (Positive, Natural).
2845
2846 -- N_Subtype_Declaration
2847 -- Sloc points to SUBTYPE
2848 -- Defining_Identifier (Node1)
2849 -- Null_Exclusion_Present (Flag11)
2850 -- Subtype_Indication (Node5)
2851 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2852 -- Exception_Junk (Flag8-Sem)
2853 -- Has_Dynamic_Range_Check (Flag12-Sem)
2854
2855 -------------------------------
2856 -- 3.2.2 Subtype Indication --
2857 -------------------------------
2858
2859 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2860
2861 -- Note: if no constraint is present, the subtype indication appears
2862 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2863 -- node is used only if a constraint is present.
2864
2865 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2866 -- with the null-exclusion part (see AI-231), we had to introduce a new
2867 -- attribute in all the parents of subtype_indication nodes to indicate
2868 -- if the null-exclusion is present.
2869
2870 -- Note: the reason that this node has expression fields is that a
2871 -- subtype indication can appear as an operand of a membership test.
2872
2873 -- N_Subtype_Indication
2874 -- Sloc points to first token of subtype mark
2875 -- Subtype_Mark (Node4)
2876 -- Constraint (Node3)
2877 -- Etype (Node5-Sem)
2878 -- Must_Not_Freeze (Flag8-Sem)
2879
2880 -- Note: Depending on context, the Etype is either the entity of the
2881 -- Subtype_Mark field, or it is an itype constructed to reify the
2882 -- subtype indication. In particular, such itypes are created for a
2883 -- subtype indication that appears in an array type declaration. This
2884 -- simplifies constraint checking in indexed components.
2885
2886 -- For subtype indications that appear in scalar type and subtype
2887 -- declarations, the Etype is the entity of the subtype mark.
2888
2889 -------------------------
2890 -- 3.2.2 Subtype Mark --
2891 -------------------------
2892
2893 -- SUBTYPE_MARK ::= subtype_NAME
2894
2895 -----------------------
2896 -- 3.2.2 Constraint --
2897 -----------------------
2898
2899 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2900
2901 ------------------------------
2902 -- 3.2.2 Scalar Constraint --
2903 ------------------------------
2904
2905 -- SCALAR_CONSTRAINT ::=
2906 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2907
2908 ---------------------------------
2909 -- 3.2.2 Composite Constraint --
2910 ---------------------------------
2911
2912 -- COMPOSITE_CONSTRAINT ::=
2913 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2914
2915 -------------------------------
2916 -- 3.3.1 Object Declaration --
2917 -------------------------------
2918
2919 -- OBJECT_DECLARATION ::=
2920 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2921 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2922 -- [ASPECT_SPECIFICATIONS];
2923 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2924 -- ACCESS_DEFINITION [:= EXPRESSION]
2925 -- [ASPECT_SPECIFICATIONS];
2926 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2927 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2928 -- [ASPECT_SPECIFICATIONS];
2929 -- | SINGLE_TASK_DECLARATION
2930 -- | SINGLE_PROTECTED_DECLARATION
2931
2932 -- Note: aliased is not permitted in Ada 83 mode
2933
2934 -- The N_Object_Declaration node is only for the first three cases.
2935 -- Single task declaration is handled by P_Task (9.1)
2936 -- Single protected declaration is handled by P_protected (9.5)
2937
2938 -- Although the syntax allows multiple identifiers in the list, the
2939 -- semantics is as though successive declarations were given with
2940 -- identical type definition and expression components. To simplify
2941 -- semantic processing, the parser represents a multiple declaration
2942 -- case as a sequence of single declarations, using the More_Ids and
2943 -- Prev_Ids flags to preserve the original source form as described
2944 -- in the section on "Handling of Defining Identifier Lists".
2945
2946 -- The flag Has_Init_Expression is set if an initializing expression
2947 -- is present. Normally it is set if and only if Expression contains
2948 -- a non-empty value, but there is an exception to this. When the
2949 -- initializing expression is an aggregate which requires explicit
2950 -- assignments, the Expression field gets set to Empty, but this flag
2951 -- is still set, so we don't forget we had an initializing expression.
2952
2953 -- Note: if a range check is required for the initialization
2954 -- expression then the Do_Range_Check flag is set in the Expression,
2955 -- with the check being done against the type given by the object
2956 -- definition, which is also the Etype of the defining identifier.
2957
2958 -- Note: the contents of the Expression field must be ignored (i.e.
2959 -- treated as though it were Empty) if No_Initialization is set True.
2960
2961 -- Note: the back end places some restrictions on the form of the
2962 -- Expression field. If the object being declared is Atomic, then
2963 -- the Expression may not have the form of an aggregate (since this
2964 -- might cause the back end to generate separate assignments). In this
2965 -- case the front end must generate an extra temporary and initialize
2966 -- this temporary as required (the temporary itself is not atomic).
2967
2968 -- Note: there is no node kind for object definition. Instead, the
2969 -- corresponding field holds a subtype indication, an array type
2970 -- definition, or (Ada 2005, AI-406) an access definition.
2971
2972 -- N_Object_Declaration
2973 -- Sloc points to first identifier
2974 -- Defining_Identifier (Node1)
2975 -- Aliased_Present (Flag4)
2976 -- Constant_Present (Flag17) set if CONSTANT appears
2977 -- Null_Exclusion_Present (Flag11)
2978 -- Object_Definition (Node4) subtype indic./array type def./access def.
2979 -- Expression (Node3) (set to Empty if not present)
2980 -- Handler_List_Entry (Node2-Sem)
2981 -- Corresponding_Generic_Association (Node5-Sem)
2982 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2983 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2984 -- No_Initialization (Flag13-Sem)
2985 -- Assignment_OK (Flag15-Sem)
2986 -- Exception_Junk (Flag8-Sem)
2987 -- Is_Subprogram_Descriptor (Flag16-Sem)
2988 -- Has_Init_Expression (Flag14)
2989 -- Suppress_Assignment_Checks (Flag18-Sem)
2990
2991 -------------------------------------
2992 -- 3.3.1 Defining Identifier List --
2993 -------------------------------------
2994
2995 -- DEFINING_IDENTIFIER_LIST ::=
2996 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2997
2998 -------------------------------
2999 -- 3.3.2 Number Declaration --
3000 -------------------------------
3001
3002 -- NUMBER_DECLARATION ::=
3003 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
3004
3005 -- Although the syntax allows multiple identifiers in the list, the
3006 -- semantics is as though successive declarations were given with
3007 -- identical expressions. To simplify semantic processing, the parser
3008 -- represents a multiple declaration case as a sequence of single
3009 -- declarations, using the More_Ids and Prev_Ids flags to preserve
3010 -- the original source form as described in the section on "Handling
3011 -- of Defining Identifier Lists".
3012
3013 -- N_Number_Declaration
3014 -- Sloc points to first identifier
3015 -- Defining_Identifier (Node1)
3016 -- Expression (Node3)
3017 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3018 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3019
3020 ----------------------------------
3021 -- 3.4 Derived Type Definition --
3022 ----------------------------------
3023
3024 -- DERIVED_TYPE_DEFINITION ::=
3025 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
3026 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
3027
3028 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
3029 -- in Ada 83 mode
3030
3031 -- Note: a record extension part is required if ABSTRACT is present
3032
3033 -- N_Derived_Type_Definition
3034 -- Sloc points to NEW
3035 -- Abstract_Present (Flag4)
3036 -- Null_Exclusion_Present (Flag11) (set to False if not present)
3037 -- Subtype_Indication (Node5)
3038 -- Record_Extension_Part (Node3) (set to Empty if not present)
3039 -- Limited_Present (Flag17)
3040 -- Task_Present (Flag5) set in task interfaces
3041 -- Protected_Present (Flag6) set in protected interfaces
3042 -- Synchronized_Present (Flag7) set in interfaces
3043 -- Interface_List (List2) (set to No_List if none)
3044 -- Interface_Present (Flag16) set in abstract interfaces
3045
3046 -- Note: Task_Present, Protected_Present, Synchronized_Present,
3047 -- Interface_List, and Interface_Present are used for abstract
3048 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3049
3050 ---------------------------
3051 -- 3.5 Range Constraint --
3052 ---------------------------
3053
3054 -- RANGE_CONSTRAINT ::= range RANGE
3055
3056 -- N_Range_Constraint
3057 -- Sloc points to RANGE
3058 -- Range_Expression (Node4)
3059
3060 ----------------
3061 -- 3.5 Range --
3062 ----------------
3063
3064 -- RANGE ::=
3065 -- RANGE_ATTRIBUTE_REFERENCE
3066 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
3067
3068 -- Note: the case of a range given as a range attribute reference
3069 -- appears directly in the tree as an attribute reference.
3070
3071 -- Note: the field name for a reference to a range is Range_Expression
3072 -- rather than Range, because range is a reserved keyword in Ada.
3073
3074 -- Note: the reason that this node has expression fields is that a
3075 -- range can appear as an operand of a membership test. The Etype
3076 -- field is the type of the range (we do NOT construct an implicit
3077 -- subtype to represent the range exactly).
3078
3079 -- N_Range
3080 -- Sloc points to ..
3081 -- Low_Bound (Node1)
3082 -- High_Bound (Node2)
3083 -- Includes_Infinities (Flag11)
3084 -- plus fields for expression
3085
3086 -- Note: if the range appears in a context, such as a subtype
3087 -- declaration, where range checks are required on one or both of
3088 -- the expression fields, then type conversion nodes are inserted
3089 -- to represent the required checks.
3090
3091 ----------------------------------------
3092 -- 3.5.1 Enumeration Type Definition --
3093 ----------------------------------------
3094
3095 -- ENUMERATION_TYPE_DEFINITION ::=
3096 -- (ENUMERATION_LITERAL_SPECIFICATION
3097 -- {, ENUMERATION_LITERAL_SPECIFICATION})
3098
3099 -- Note: the Literals field in the node described below is null for
3100 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
3101 -- which special processing handles these types as special cases.
3102
3103 -- N_Enumeration_Type_Definition
3104 -- Sloc points to left parenthesis
3105 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
3106 -- End_Label (Node4) (set to Empty if internally generated record)
3107
3108 ----------------------------------------------
3109 -- 3.5.1 Enumeration Literal Specification --
3110 ----------------------------------------------
3111
3112 -- ENUMERATION_LITERAL_SPECIFICATION ::=
3113 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
3114
3115 ---------------------------------------
3116 -- 3.5.1 Defining Character Literal --
3117 ---------------------------------------
3118
3119 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
3120
3121 -- A defining character literal is an entity, which has additional
3122 -- fields depending on the setting of the Ekind field. These
3123 -- additional fields are defined (and access subprograms declared)
3124 -- in package Einfo.
3125
3126 -- Note: N_Defining_Character_Literal is an extended node whose fields
3127 -- are deliberate layed out to match the layout of fields in an ordinary
3128 -- N_Character_Literal node allowing for easy alteration of a character
3129 -- literal node into a defining character literal node. For details, see
3130 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
3131
3132 -- N_Defining_Character_Literal
3133 -- Sloc points to literal
3134 -- Chars (Name1) contains the Name_Id for the identifier
3135 -- Next_Entity (Node2-Sem)
3136 -- Scope (Node3-Sem)
3137 -- Etype (Node5-Sem)
3138
3139 ------------------------------------
3140 -- 3.5.4 Integer Type Definition --
3141 ------------------------------------
3142
3143 -- Note: there is an error in this rule in the latest version of the
3144 -- grammar, so we have retained the old rule pending clarification.
3145
3146 -- INTEGER_TYPE_DEFINITION ::=
3147 -- SIGNED_INTEGER_TYPE_DEFINITION
3148 -- | MODULAR_TYPE_DEFINITION
3149
3150 -------------------------------------------
3151 -- 3.5.4 Signed Integer Type Definition --
3152 -------------------------------------------
3153
3154 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
3155 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3156
3157 -- Note: the Low_Bound and High_Bound fields are set to Empty
3158 -- for integer types defined in package Standard.
3159
3160 -- N_Signed_Integer_Type_Definition
3161 -- Sloc points to RANGE
3162 -- Low_Bound (Node1)
3163 -- High_Bound (Node2)
3164
3165 ------------------------------------
3166 -- 3.5.4 Modular Type Definition --
3167 ------------------------------------
3168
3169 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
3170
3171 -- N_Modular_Type_Definition
3172 -- Sloc points to MOD
3173 -- Expression (Node3)
3174
3175 ---------------------------------
3176 -- 3.5.6 Real Type Definition --
3177 ---------------------------------
3178
3179 -- REAL_TYPE_DEFINITION ::=
3180 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
3181
3182 --------------------------------------
3183 -- 3.5.7 Floating Point Definition --
3184 --------------------------------------
3185
3186 -- FLOATING_POINT_DEFINITION ::=
3187 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
3188
3189 -- Note: The Digits_Expression and Real_Range_Specifications fields
3190 -- are set to Empty for floating-point types declared in Standard.
3191
3192 -- N_Floating_Point_Definition
3193 -- Sloc points to DIGITS
3194 -- Digits_Expression (Node2)
3195 -- Real_Range_Specification (Node4) (set to Empty if not present)
3196
3197 -------------------------------------
3198 -- 3.5.7 Real Range Specification --
3199 -------------------------------------
3200
3201 -- REAL_RANGE_SPECIFICATION ::=
3202 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3203
3204 -- N_Real_Range_Specification
3205 -- Sloc points to RANGE
3206 -- Low_Bound (Node1)
3207 -- High_Bound (Node2)
3208
3209 -----------------------------------
3210 -- 3.5.9 Fixed Point Definition --
3211 -----------------------------------
3212
3213 -- FIXED_POINT_DEFINITION ::=
3214 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
3215
3216 --------------------------------------------
3217 -- 3.5.9 Ordinary Fixed Point Definition --
3218 --------------------------------------------
3219
3220 -- ORDINARY_FIXED_POINT_DEFINITION ::=
3221 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
3222
3223 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3224
3225 -- N_Ordinary_Fixed_Point_Definition
3226 -- Sloc points to DELTA
3227 -- Delta_Expression (Node3)
3228 -- Real_Range_Specification (Node4)
3229
3230 -------------------------------------------
3231 -- 3.5.9 Decimal Fixed Point Definition --
3232 -------------------------------------------
3233
3234 -- DECIMAL_FIXED_POINT_DEFINITION ::=
3235 -- delta static_EXPRESSION
3236 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
3237
3238 -- Note: decimal types are not permitted in Ada 83 mode
3239
3240 -- N_Decimal_Fixed_Point_Definition
3241 -- Sloc points to DELTA
3242 -- Delta_Expression (Node3)
3243 -- Digits_Expression (Node2)
3244 -- Real_Range_Specification (Node4) (set to Empty if not present)
3245
3246 ------------------------------
3247 -- 3.5.9 Digits Constraint --
3248 ------------------------------
3249
3250 -- DIGITS_CONSTRAINT ::=
3251 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
3252
3253 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3254 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
3255
3256 -- N_Digits_Constraint
3257 -- Sloc points to DIGITS
3258 -- Digits_Expression (Node2)
3259 -- Range_Constraint (Node4) (set to Empty if not present)
3260
3261 --------------------------------
3262 -- 3.6 Array Type Definition --
3263 --------------------------------
3264
3265 -- ARRAY_TYPE_DEFINITION ::=
3266 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
3267
3268 -----------------------------------------
3269 -- 3.6 Unconstrained Array Definition --
3270 -----------------------------------------
3271
3272 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
3273 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
3274 -- COMPONENT_DEFINITION
3275
3276 -- Note: dimensionality of array is indicated by number of entries in
3277 -- the Subtype_Marks list, which has one entry for each dimension.
3278
3279 -- N_Unconstrained_Array_Definition
3280 -- Sloc points to ARRAY
3281 -- Subtype_Marks (List2)
3282 -- Component_Definition (Node4)
3283
3284 -----------------------------------
3285 -- 3.6 Index Subtype Definition --
3286 -----------------------------------
3287
3288 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3289
3290 -- There is no explicit node in the tree for an index subtype
3291 -- definition since the N_Unconstrained_Array_Definition node
3292 -- incorporates the type marks which appear in this context.
3293
3294 ---------------------------------------
3295 -- 3.6 Constrained Array Definition --
3296 ---------------------------------------
3297
3298 -- CONSTRAINED_ARRAY_DEFINITION ::=
3299 -- array (DISCRETE_SUBTYPE_DEFINITION
3300 -- {, DISCRETE_SUBTYPE_DEFINITION})
3301 -- of COMPONENT_DEFINITION
3302
3303 -- Note: dimensionality of array is indicated by number of entries
3304 -- in the Discrete_Subtype_Definitions list, which has one entry
3305 -- for each dimension.
3306
3307 -- N_Constrained_Array_Definition
3308 -- Sloc points to ARRAY
3309 -- Discrete_Subtype_Definitions (List2)
3310 -- Component_Definition (Node4)
3311
3312 -- Note: although the language allows the full syntax for discrete
3313 -- subtype definitions (i.e. a discrete subtype indication or a range),
3314 -- in the generated tree, we always rewrite these as N_Range nodes.
3315
3316 --------------------------------------
3317 -- 3.6 Discrete Subtype Definition --
3318 --------------------------------------
3319
3320 -- DISCRETE_SUBTYPE_DEFINITION ::=
3321 -- discrete_SUBTYPE_INDICATION | RANGE
3322
3323 -------------------------------
3324 -- 3.6 Component Definition --
3325 -------------------------------
3326
3327 -- COMPONENT_DEFINITION ::=
3328 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3329
3330 -- Note: although the syntax does not permit a component definition to
3331 -- be an anonymous array (and the parser will diagnose such an attempt
3332 -- with an appropriate message), it is possible for anonymous arrays
3333 -- to appear as component definitions. The semantics and back end handle
3334 -- this case properly, and the expander in fact generates such cases.
3335 -- Access_Definition is an optional field that gives support to
3336 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3337 -- Subtype_Indication field or else the Access_Definition field.
3338
3339 -- N_Component_Definition
3340 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
3341 -- Aliased_Present (Flag4)
3342 -- Null_Exclusion_Present (Flag11)
3343 -- Subtype_Indication (Node5) (set to Empty if not present)
3344 -- Access_Definition (Node3) (set to Empty if not present)
3345
3346 -----------------------------
3347 -- 3.6.1 Index Constraint --
3348 -----------------------------
3349
3350 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3351
3352 -- It is not in general possible to distinguish between discriminant
3353 -- constraints and index constraints at parse time, since a simple
3354 -- name could be either the subtype mark of a discrete range, or an
3355 -- expression in a discriminant association with no name. Either
3356 -- entry appears simply as the name, and the semantic parse must
3357 -- distinguish between the two cases. Thus we use a common tree
3358 -- node format for both of these constraint types.
3359
3360 -- See Discriminant_Constraint for format of node
3361
3362 ---------------------------
3363 -- 3.6.1 Discrete Range --
3364 ---------------------------
3365
3366 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3367
3368 ----------------------------
3369 -- 3.7 Discriminant Part --
3370 ----------------------------
3371
3372 -- DISCRIMINANT_PART ::=
3373 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3374
3375 ------------------------------------
3376 -- 3.7 Unknown Discriminant Part --
3377 ------------------------------------
3378
3379 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3380
3381 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3382
3383 -- There is no explicit node in the tree for an unknown discriminant
3384 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3385 -- parent node.
3386
3387 ----------------------------------
3388 -- 3.7 Known Discriminant Part --
3389 ----------------------------------
3390
3391 -- KNOWN_DISCRIMINANT_PART ::=
3392 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3393
3394 -------------------------------------
3395 -- 3.7 Discriminant Specification --
3396 -------------------------------------
3397
3398 -- DISCRIMINANT_SPECIFICATION ::=
3399 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3400 -- [:= DEFAULT_EXPRESSION]
3401 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3402 -- [:= DEFAULT_EXPRESSION]
3403
3404 -- Although the syntax allows multiple identifiers in the list, the
3405 -- semantics is as though successive specifications were given with
3406 -- identical type definition and expression components. To simplify
3407 -- semantic processing, the parser represents a multiple declaration
3408 -- case as a sequence of single specifications, using the More_Ids and
3409 -- Prev_Ids flags to preserve the original source form as described
3410 -- in the section on "Handling of Defining Identifier Lists".
3411
3412 -- N_Discriminant_Specification
3413 -- Sloc points to first identifier
3414 -- Defining_Identifier (Node1)
3415 -- Null_Exclusion_Present (Flag11)
3416 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3417 -- Expression (Node3) (set to Empty if no default expression)
3418 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3419 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3420
3421 -----------------------------
3422 -- 3.7 Default Expression --
3423 -----------------------------
3424
3425 -- DEFAULT_EXPRESSION ::= EXPRESSION
3426
3427 ------------------------------------
3428 -- 3.7.1 Discriminant Constraint --
3429 ------------------------------------
3430
3431 -- DISCRIMINANT_CONSTRAINT ::=
3432 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3433
3434 -- It is not in general possible to distinguish between discriminant
3435 -- constraints and index constraints at parse time, since a simple
3436 -- name could be either the subtype mark of a discrete range, or an
3437 -- expression in a discriminant association with no name. Either
3438 -- entry appears simply as the name, and the semantic parse must
3439 -- distinguish between the two cases. Thus we use a common tree
3440 -- node format for both of these constraint types.
3441
3442 -- N_Index_Or_Discriminant_Constraint
3443 -- Sloc points to left paren
3444 -- Constraints (List1) points to list of discrete ranges or
3445 -- discriminant associations
3446
3447 -------------------------------------
3448 -- 3.7.1 Discriminant Association --
3449 -------------------------------------
3450
3451 -- DISCRIMINANT_ASSOCIATION ::=
3452 -- [discriminant_SELECTOR_NAME
3453 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3454
3455 -- Note: a discriminant association that has no selector name list
3456 -- appears directly as an expression in the tree.
3457
3458 -- N_Discriminant_Association
3459 -- Sloc points to first token of discriminant association
3460 -- Selector_Names (List1) (always non-empty, since if no selector
3461 -- names are present, this node is not used, see comment above)
3462 -- Expression (Node3)
3463
3464 ---------------------------------
3465 -- 3.8 Record Type Definition --
3466 ---------------------------------
3467
3468 -- RECORD_TYPE_DEFINITION ::=
3469 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3470
3471 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3472
3473 -- There is no explicit node in the tree for a record type definition.
3474 -- Instead the flags for Tagged_Present and Limited_Present appear in
3475 -- the N_Record_Definition node for a record definition appearing in
3476 -- the context of a record type definition.
3477
3478 ----------------------------
3479 -- 3.8 Record Definition --
3480 ----------------------------
3481
3482 -- RECORD_DEFINITION ::=
3483 -- record
3484 -- COMPONENT_LIST
3485 -- end record
3486 -- | null record
3487
3488 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
3489 -- flags appear only for a record definition appearing in a record
3490 -- type definition.
3491
3492 -- Note: the NULL RECORD case is not permitted in Ada 83
3493
3494 -- N_Record_Definition
3495 -- Sloc points to RECORD or NULL
3496 -- End_Label (Node4) (set to Empty if internally generated record)
3497 -- Abstract_Present (Flag4)
3498 -- Tagged_Present (Flag15)
3499 -- Limited_Present (Flag17)
3500 -- Component_List (Node1) empty in null record case
3501 -- Null_Present (Flag13) set in null record case
3502 -- Task_Present (Flag5) set in task interfaces
3503 -- Protected_Present (Flag6) set in protected interfaces
3504 -- Synchronized_Present (Flag7) set in interfaces
3505 -- Interface_Present (Flag16) set in abstract interfaces
3506 -- Interface_List (List2) (set to No_List if none)
3507
3508 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3509 -- Interface_List and Interface_Present are used for abstract
3510 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3511
3512 -------------------------
3513 -- 3.8 Component List --
3514 -------------------------
3515
3516 -- COMPONENT_LIST ::=
3517 -- COMPONENT_ITEM {COMPONENT_ITEM}
3518 -- | {COMPONENT_ITEM} VARIANT_PART
3519 -- | null;
3520
3521 -- N_Component_List
3522 -- Sloc points to first token of component list
3523 -- Component_Items (List3)
3524 -- Variant_Part (Node4) (set to Empty if no variant part)
3525 -- Null_Present (Flag13)
3526
3527 -------------------------
3528 -- 3.8 Component Item --
3529 -------------------------
3530
3531 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3532
3533 -- Note: A component item can also be a pragma, and in the tree
3534 -- that is obtained after semantic processing, a component item
3535 -- can be an N_Null node resulting from a non-recognized pragma.
3536
3537 --------------------------------
3538 -- 3.8 Component Declaration --
3539 --------------------------------
3540
3541 -- COMPONENT_DECLARATION ::=
3542 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3543 -- [:= DEFAULT_EXPRESSION]
3544 -- [ASPECT_SPECIFICATIONS];
3545
3546 -- Note: although the syntax does not permit a component definition to
3547 -- be an anonymous array (and the parser will diagnose such an attempt
3548 -- with an appropriate message), it is possible for anonymous arrays
3549 -- to appear as component definitions. The semantics and back end handle
3550 -- this case properly, and the expander in fact generates such cases.
3551
3552 -- Although the syntax allows multiple identifiers in the list, the
3553 -- semantics is as though successive declarations were given with the
3554 -- same component definition and expression components. To simplify
3555 -- semantic processing, the parser represents a multiple declaration
3556 -- case as a sequence of single declarations, using the More_Ids and
3557 -- Prev_Ids flags to preserve the original source form as described
3558 -- in the section on "Handling of Defining Identifier Lists".
3559
3560 -- N_Component_Declaration
3561 -- Sloc points to first identifier
3562 -- Defining_Identifier (Node1)
3563 -- Component_Definition (Node4)
3564 -- Expression (Node3) (set to Empty if no default expression)
3565 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3566 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3567
3568 -------------------------
3569 -- 3.8.1 Variant Part --
3570 -------------------------
3571
3572 -- VARIANT_PART ::=
3573 -- case discriminant_DIRECT_NAME is
3574 -- VARIANT {VARIANT}
3575 -- end case;
3576
3577 -- Note: the variants list can contain pragmas as well as variants.
3578 -- In a properly formed program there is at least one variant.
3579
3580 -- N_Variant_Part
3581 -- Sloc points to CASE
3582 -- Name (Node2)
3583 -- Variants (List1)
3584
3585 --------------------
3586 -- 3.8.1 Variant --
3587 --------------------
3588
3589 -- VARIANT ::=
3590 -- when DISCRETE_CHOICE_LIST =>
3591 -- COMPONENT_LIST
3592
3593 -- N_Variant
3594 -- Sloc points to WHEN
3595 -- Discrete_Choices (List4)
3596 -- Component_List (Node1)
3597 -- Enclosing_Variant (Node2-Sem)
3598 -- Present_Expr (Uint3-Sem)
3599 -- Dcheck_Function (Node5-Sem)
3600 -- Has_SP_Choice (Flag15-Sem)
3601
3602 -- Note: in the list of Discrete_Choices, the tree passed to the back
3603 -- end does not have choice entries corresponding to names of statically
3604 -- predicated subtypes. Such entries are always expanded out to the list
3605 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
3606 -- mode also has this expansion, but done with a proper Rewrite call on
3607 -- the N_Variant node so that ASIS can properly retrieve the original.
3608
3609 ---------------------------------
3610 -- 3.8.1 Discrete Choice List --
3611 ---------------------------------
3612
3613 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3614
3615 ----------------------------
3616 -- 3.8.1 Discrete Choice --
3617 ----------------------------
3618
3619 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3620
3621 -- Note: in Ada 83 mode, the expression must be a simple expression
3622
3623 -- The only choice that appears explicitly is the OTHERS choice, as
3624 -- defined here. Other cases of discrete choice (expression and
3625 -- discrete range) appear directly. This production is also used
3626 -- for the OTHERS possibility of an exception choice.
3627
3628 -- Note: in accordance with the syntax, the parser does not check that
3629 -- OTHERS appears at the end on its own in a choice list context. This
3630 -- is a semantic check.
3631
3632 -- N_Others_Choice
3633 -- Sloc points to OTHERS
3634 -- Others_Discrete_Choices (List1-Sem)
3635 -- All_Others (Flag11-Sem)
3636
3637 ----------------------------------
3638 -- 3.9.1 Record Extension Part --
3639 ----------------------------------
3640
3641 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3642
3643 -- Note: record extension parts are not permitted in Ada 83 mode
3644
3645 --------------------------------------
3646 -- 3.9.4 Interface Type Definition --
3647 --------------------------------------
3648
3649 -- INTERFACE_TYPE_DEFINITION ::=
3650 -- [limited | task | protected | synchronized]
3651 -- interface [interface_list]
3652
3653 -- Note: Interfaces are implemented with N_Record_Definition and
3654 -- N_Derived_Type_Definition nodes because most of the support
3655 -- for the analysis of abstract types has been reused to
3656 -- analyze abstract interfaces.
3657
3658 ----------------------------------
3659 -- 3.10 Access Type Definition --
3660 ----------------------------------
3661
3662 -- ACCESS_TYPE_DEFINITION ::=
3663 -- ACCESS_TO_OBJECT_DEFINITION
3664 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3665
3666 --------------------------
3667 -- 3.10 Null Exclusion --
3668 --------------------------
3669
3670 -- NULL_EXCLUSION ::= not null
3671
3672 ---------------------------------------
3673 -- 3.10 Access To Object Definition --
3674 ---------------------------------------
3675
3676 -- ACCESS_TO_OBJECT_DEFINITION ::=
3677 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3678 -- SUBTYPE_INDICATION
3679
3680 -- N_Access_To_Object_Definition
3681 -- Sloc points to ACCESS
3682 -- All_Present (Flag15)
3683 -- Null_Exclusion_Present (Flag11)
3684 -- Null_Excluding_Subtype (Flag16)
3685 -- Subtype_Indication (Node5)
3686 -- Constant_Present (Flag17)
3687
3688 -----------------------------------
3689 -- 3.10 General Access Modifier --
3690 -----------------------------------
3691
3692 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3693
3694 -- Note: general access modifiers are not permitted in Ada 83 mode
3695
3696 -- There is no explicit node in the tree for general access modifier.
3697 -- Instead the All_Present or Constant_Present flags are set in the
3698 -- parent node.
3699
3700 -------------------------------------------
3701 -- 3.10 Access To Subprogram Definition --
3702 -------------------------------------------
3703
3704 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3705 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3706 -- | [NULL_EXCLUSION] access [protected] function
3707 -- PARAMETER_AND_RESULT_PROFILE
3708
3709 -- Note: access to subprograms are not permitted in Ada 83 mode
3710
3711 -- N_Access_Function_Definition
3712 -- Sloc points to ACCESS
3713 -- Null_Exclusion_Present (Flag11)
3714 -- Null_Exclusion_In_Return_Present (Flag14)
3715 -- Protected_Present (Flag6)
3716 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3717 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3718
3719 -- N_Access_Procedure_Definition
3720 -- Sloc points to ACCESS
3721 -- Null_Exclusion_Present (Flag11)
3722 -- Protected_Present (Flag6)
3723 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3724
3725 -----------------------------
3726 -- 3.10 Access Definition --
3727 -----------------------------
3728
3729 -- ACCESS_DEFINITION ::=
3730 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3731 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3732
3733 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3734
3735 -- N_Access_Definition
3736 -- Sloc points to ACCESS
3737 -- Null_Exclusion_Present (Flag11)
3738 -- All_Present (Flag15)
3739 -- Constant_Present (Flag17)
3740 -- Subtype_Mark (Node4)
3741 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3742
3743 -----------------------------------------
3744 -- 3.10.1 Incomplete Type Declaration --
3745 -----------------------------------------
3746
3747 -- INCOMPLETE_TYPE_DECLARATION ::=
3748 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3749
3750 -- N_Incomplete_Type_Declaration
3751 -- Sloc points to TYPE
3752 -- Defining_Identifier (Node1)
3753 -- Discriminant_Specifications (List4) (set to No_List if no
3754 -- discriminant part, or if the discriminant part is an
3755 -- unknown discriminant part)
3756 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3757 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3758 -- Tagged_Present (Flag15)
3759
3760 ----------------------------
3761 -- 3.11 Declarative Part --
3762 ----------------------------
3763
3764 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3765
3766 -- Note: although the parser enforces the syntactic requirement that
3767 -- a declarative part can contain only declarations, the semantic
3768 -- processing may add statements to the list of actions in a
3769 -- declarative part, so the code generator should be prepared
3770 -- to accept a statement in this position.
3771
3772 ----------------------------
3773 -- 3.11 Declarative Item --
3774 ----------------------------
3775
3776 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3777
3778 ----------------------------------
3779 -- 3.11 Basic Declarative Item --
3780 ----------------------------------
3781
3782 -- BASIC_DECLARATIVE_ITEM ::=
3783 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3784
3785 ----------------
3786 -- 3.11 Body --
3787 ----------------
3788
3789 -- BODY ::= PROPER_BODY | BODY_STUB
3790
3791 -----------------------
3792 -- 3.11 Proper Body --
3793 -----------------------
3794
3795 -- PROPER_BODY ::=
3796 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3797
3798 ---------------
3799 -- 4.1 Name --
3800 ---------------
3801
3802 -- NAME ::=
3803 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3804 -- | INDEXED_COMPONENT | SLICE
3805 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3806 -- | TYPE_CONVERSION | FUNCTION_CALL
3807 -- | CHARACTER_LITERAL
3808
3809 ----------------------
3810 -- 4.1 Direct Name --
3811 ----------------------
3812
3813 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3814
3815 -----------------
3816 -- 4.1 Prefix --
3817 -----------------
3818
3819 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3820
3821 -------------------------------
3822 -- 4.1 Explicit Dereference --
3823 -------------------------------
3824
3825 -- EXPLICIT_DEREFERENCE ::= NAME . all
3826
3827 -- N_Explicit_Dereference
3828 -- Sloc points to ALL
3829 -- Prefix (Node3)
3830 -- Actual_Designated_Subtype (Node4-Sem)
3831 -- Has_Dereference_Action (Flag13-Sem)
3832 -- Atomic_Sync_Required (Flag14-Sem)
3833 -- plus fields for expression
3834
3835 -------------------------------
3836 -- 4.1 Implicit Dereference --
3837 -------------------------------
3838
3839 -- IMPLICIT_DEREFERENCE ::= NAME
3840
3841 ------------------------------
3842 -- 4.1.1 Indexed Component --
3843 ------------------------------
3844
3845 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3846
3847 -- Note: the parser may generate this node in some situations where it
3848 -- should be a function call. The semantic pass must correct this
3849 -- misidentification (which is inevitable at the parser level).
3850
3851 -- N_Indexed_Component
3852 -- Sloc contains a copy of the Sloc value of the Prefix
3853 -- Prefix (Node3)
3854 -- Expressions (List1)
3855 -- Generalized_Indexing (Node4-Sem)
3856 -- Atomic_Sync_Required (Flag14-Sem)
3857 -- plus fields for expression
3858
3859 -- Note: if any of the subscripts requires a range check, then the
3860 -- Do_Range_Check flag is set on the corresponding expression, with
3861 -- the index type being determined from the type of the Prefix, which
3862 -- references the array being indexed.
3863
3864 -- Note: in a fully analyzed and expanded indexed component node, and
3865 -- hence in any such node that gigi sees, if the prefix is an access
3866 -- type, then an explicit dereference operation has been inserted.
3867
3868 ------------------
3869 -- 4.1.2 Slice --
3870 ------------------
3871
3872 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3873
3874 -- Note: an implicit subtype is created to describe the resulting
3875 -- type, so that the bounds of this type are the bounds of the slice.
3876
3877 -- N_Slice
3878 -- Sloc points to first token of prefix
3879 -- Prefix (Node3)
3880 -- Discrete_Range (Node4)
3881 -- plus fields for expression
3882
3883 -------------------------------
3884 -- 4.1.3 Selected Component --
3885 -------------------------------
3886
3887 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3888
3889 -- Note: selected components that are semantically expanded names get
3890 -- changed during semantic processing into the separate N_Expanded_Name
3891 -- node. See description of this node in the section on semantic nodes.
3892
3893 -- N_Selected_Component
3894 -- Sloc points to the period
3895 -- Prefix (Node3)
3896 -- Selector_Name (Node2)
3897 -- Associated_Node (Node4-Sem)
3898 -- Do_Discriminant_Check (Flag3-Sem)
3899 -- Is_In_Discriminant_Check (Flag11-Sem)
3900 -- Atomic_Sync_Required (Flag14-Sem)
3901 -- Is_Prefixed_Call (Flag17-Sem)
3902 -- plus fields for expression
3903
3904 --------------------------
3905 -- 4.1.3 Selector Name --
3906 --------------------------
3907
3908 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3909
3910 --------------------------------
3911 -- 4.1.4 Attribute Reference --
3912 --------------------------------
3913
3914 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3915
3916 -- Note: the syntax is quite ambiguous at this point. Consider:
3917
3918 -- A'Length (X) X is part of the attribute designator
3919 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3920 -- A'Class (X) X is the expression of a type conversion
3921
3922 -- It would be possible for the parser to distinguish these cases
3923 -- by looking at the attribute identifier. However, that would mean
3924 -- more work in introducing new implementation defined attributes,
3925 -- and also it would mean that special processing for attributes
3926 -- would be scattered around, instead of being centralized in the
3927 -- semantic routine that handles an N_Attribute_Reference node.
3928 -- Consequently, the parser in all the above cases stores the
3929 -- expression (X in these examples) as a single element list in
3930 -- in the Expressions field of the N_Attribute_Reference node.
3931
3932 -- Similarly, for attributes like Max which take two arguments,
3933 -- we store the two arguments as a two element list in the
3934 -- Expressions field. Of course it is clear at parse time that
3935 -- this case is really a function call with an attribute as the
3936 -- prefix, but it turns out to be convenient to handle the two
3937 -- argument case in a similar manner to the one argument case,
3938 -- and indeed in general the parser will accept any number of
3939 -- expressions in this position and store them as a list in the
3940 -- attribute reference node. This allows for future addition of
3941 -- attributes that take more than two arguments.
3942
3943 -- Note: named associates are not permitted in function calls where
3944 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3945 -- to skip the normal subprogram argument processing.
3946
3947 -- Note: for the attributes whose designators are technically keywords,
3948 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3949 -- the corresponding name, even though no identifier is involved.
3950
3951 -- Note: the generated code may contain stream attributes applied to
3952 -- limited types for which no stream routines exist officially. In such
3953 -- case, the result is to use the stream attribute for the underlying
3954 -- full type, or in the case of a protected type, the components
3955 -- (including any discriminants) are merely streamed in order.
3956
3957 -- See Exp_Attr for a complete description of which attributes are
3958 -- passed onto Gigi, and which are handled entirely by the front end.
3959
3960 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3961 -- a non-standard enumeration type or a nonzero/zero semantics
3962 -- boolean type, so the value is simply the stored representation.
3963
3964 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3965 -- references a subprogram that is a renaming, then the front end must
3966 -- rewrite the attribute to refer directly to the renamed entity.
3967
3968 -- Note: syntactically the prefix of an attribute reference must be a
3969 -- name, and this (somewhat artificial) requirement is enforced by the
3970 -- parser. However, for many attributes, such as 'Valid, it is quite
3971 -- reasonable to apply the attribute to any value, and hence to any
3972 -- expression. Internally in the tree, the prefix is an expression which
3973 -- does not have to be a name, and this is handled fine by the semantic
3974 -- analysis and expansion, and back ends. This arises for the case of
3975 -- attribute references built by the expander (e.g. 'Valid for the case
3976 -- of an implicit validity check).
3977
3978 -- Note: In generated code, the Address and Unrestricted_Access
3979 -- attributes can be applied to any expression, and the meaning is
3980 -- to create an object containing the value (the object is in the
3981 -- current stack frame), and pass the address of this value. If the
3982 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3983 -- is taken must be on a byte (storage unit) boundary, and if it is
3984 -- not (or may not be), then the generated code must create a copy
3985 -- that is byte aligned, and pass the address of this copy.
3986
3987 -- N_Attribute_Reference
3988 -- Sloc points to apostrophe
3989 -- Prefix (Node3) (general expression, see note above)
3990 -- Attribute_Name (Name2) identifier name from attribute designator
3991 -- Expressions (List1) (set to No_List if no associated expressions)
3992 -- Entity (Node4-Sem) used if the attribute yields a type
3993 -- Associated_Node (Node4-Sem)
3994 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
3995 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
3996 -- Header_Size_Added (Flag11-Sem)
3997 -- Redundant_Use (Flag13-Sem)
3998 -- Must_Be_Byte_Aligned (Flag14-Sem)
3999 -- plus fields for expression
4000
4001 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
4002 -- into equivalent if expressions, properly taking care of side effects.
4003
4004 ---------------------------------
4005 -- 4.1.4 Attribute Designator --
4006 ---------------------------------
4007
4008 -- ATTRIBUTE_DESIGNATOR ::=
4009 -- IDENTIFIER [(static_EXPRESSION)]
4010 -- | access | delta | digits
4011
4012 -- There is no explicit node in the tree for an attribute designator.
4013 -- Instead the Attribute_Name and Expressions fields of the parent
4014 -- node (N_Attribute_Reference node) hold the information.
4015
4016 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
4017 -- designator, then they are treated as identifiers internally
4018 -- rather than the keywords of the same name.
4019
4020 --------------------------------------
4021 -- 4.1.4 Range Attribute Reference --
4022 --------------------------------------
4023
4024 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
4025
4026 -- A range attribute reference is represented in the tree using the
4027 -- normal N_Attribute_Reference node.
4028
4029 ---------------------------------------
4030 -- 4.1.4 Range Attribute Designator --
4031 ---------------------------------------
4032
4033 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
4034
4035 -- A range attribute designator is represented in the tree using the
4036 -- normal N_Attribute_Reference node.
4037
4038 --------------------
4039 -- 4.3 Aggregate --
4040 --------------------
4041
4042 -- AGGREGATE ::=
4043 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
4044
4045 -----------------------------
4046 -- 4.3.1 Record Aggregate --
4047 -----------------------------
4048
4049 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
4050
4051 -- N_Aggregate
4052 -- Sloc points to left parenthesis
4053 -- Expressions (List1) (set to No_List if none or null record case)
4054 -- Component_Associations (List2) (set to No_List if none)
4055 -- Null_Record_Present (Flag17)
4056 -- Aggregate_Bounds (Node3-Sem)
4057 -- Associated_Node (Node4-Sem)
4058 -- Compile_Time_Known_Aggregate (Flag18-Sem)
4059 -- Expansion_Delayed (Flag11-Sem)
4060 -- Has_Self_Reference (Flag13-Sem)
4061 -- plus fields for expression
4062
4063 -- Note: this structure is used for both record and array aggregates
4064 -- since the two cases are not separable by the parser. The parser
4065 -- makes no attempt to enforce consistency here, so it is up to the
4066 -- semantic phase to make sure that the aggregate is consistent (i.e.
4067 -- that it is not a "half-and-half" case that mixes record and array
4068 -- syntax. In particular, for a record aggregate, the expressions
4069 -- field will be set if there are positional associations.
4070
4071 -- Note: N_Aggregate is not used for all aggregates; in particular,
4072 -- there is a separate node kind for extension aggregates.
4073
4074 -- Note: gigi/gcc can handle array aggregates correctly providing that
4075 -- they are entirely positional, and the array subtype involved has a
4076 -- known at compile time length and is not bit packed, or a convention
4077 -- Fortran array with more than one dimension. If these conditions
4078 -- are not met, then the front end must translate the aggregate into
4079 -- an appropriate set of assignments into a temporary.
4080
4081 -- Note: for the record aggregate case, gigi/gcc can handle most cases
4082 -- of record aggregates, including those for packed, and rep-claused
4083 -- records, and also variant records, providing that there are no
4084 -- variable length fields whose size is not known at compile time,
4085 -- and providing that the aggregate is presented in fully named form.
4086
4087 -- The other situation in which array aggregates and record aggregates
4088 -- cannot be passed to the back end is if assignment to one or more
4089 -- components itself needs expansion, e.g. in the case of an assignment
4090 -- of an object of a controlled type. In such cases, the front end
4091 -- must expand the aggregate to a series of assignments, and apply
4092 -- the required expansion to the individual assignment statements.
4093
4094 ----------------------------------------------
4095 -- 4.3.1 Record Component Association List --
4096 ----------------------------------------------
4097
4098 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
4099 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
4100 -- | null record
4101
4102 -- There is no explicit node in the tree for a record component
4103 -- association list. Instead the Null_Record_Present flag is set in
4104 -- the parent node for the NULL RECORD case.
4105
4106 ------------------------------------------------------
4107 -- 4.3.1 Record Component Association (also 4.3.3) --
4108 ------------------------------------------------------
4109
4110 -- RECORD_COMPONENT_ASSOCIATION ::=
4111 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
4112
4113 -- N_Component_Association
4114 -- Sloc points to first selector name
4115 -- Choices (List1)
4116 -- Loop_Actions (List2-Sem)
4117 -- Expression (Node3) (empty if Box_Present)
4118 -- Box_Present (Flag15)
4119 -- Inherited_Discriminant (Flag13)
4120
4121 -- Note: this structure is used for both record component associations
4122 -- and array component associations, since the two cases aren't always
4123 -- separable by the parser. The choices list may represent either a
4124 -- list of selector names in the record aggregate case, or a list of
4125 -- discrete choices in the array aggregate case or an N_Others_Choice
4126 -- node (which appears as a singleton list). Box_Present gives support
4127 -- to Ada 2005 (AI-287).
4128
4129 ----------------------------------
4130 -- 4.3.1 Component Choice List --
4131 ----------------------------------
4132
4133 -- COMPONENT_CHOICE_LIST ::=
4134 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
4135 -- | others
4136
4137 -- The entries of a component choice list appear in the Choices list of
4138 -- the associated N_Component_Association, as either selector names, or
4139 -- as an N_Others_Choice node.
4140
4141 --------------------------------
4142 -- 4.3.2 Extension Aggregate --
4143 --------------------------------
4144
4145 -- EXTENSION_AGGREGATE ::=
4146 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
4147
4148 -- Note: extension aggregates are not permitted in Ada 83 mode
4149
4150 -- N_Extension_Aggregate
4151 -- Sloc points to left parenthesis
4152 -- Ancestor_Part (Node3)
4153 -- Associated_Node (Node4-Sem)
4154 -- Expressions (List1) (set to No_List if none or null record case)
4155 -- Component_Associations (List2) (set to No_List if none)
4156 -- Null_Record_Present (Flag17)
4157 -- Expansion_Delayed (Flag11-Sem)
4158 -- Has_Self_Reference (Flag13-Sem)
4159 -- plus fields for expression
4160
4161 --------------------------
4162 -- 4.3.2 Ancestor Part --
4163 --------------------------
4164
4165 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
4166
4167 ----------------------------
4168 -- 4.3.3 Array Aggregate --
4169 ----------------------------
4170
4171 -- ARRAY_AGGREGATE ::=
4172 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
4173
4174 ---------------------------------------
4175 -- 4.3.3 Positional Array Aggregate --
4176 ---------------------------------------
4177
4178 -- POSITIONAL_ARRAY_AGGREGATE ::=
4179 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
4180 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
4181
4182 -- See Record_Aggregate (4.3.1) for node structure
4183
4184 ----------------------------------
4185 -- 4.3.3 Named Array Aggregate --
4186 ----------------------------------
4187
4188 -- NAMED_ARRAY_AGGREGATE ::=
4189 -- (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
4190
4191 -- See Record_Aggregate (4.3.1) for node structure
4192
4193 ----------------------------------------
4194 -- 4.3.3 Array Component Association --
4195 ----------------------------------------
4196
4197 -- ARRAY_COMPONENT_ASSOCIATION ::=
4198 -- DISCRETE_CHOICE_LIST => EXPRESSION
4199 -- | ITERATED_COMPONENT_ASSOCIATION
4200
4201 -- See Record_Component_Association (4.3.1) for node structure
4202 -- The iterated_component_association is introduced into the
4203 -- Corrigendum of Ada_2012 by AI12-061.
4204
4205 ------------------------------------------
4206 -- 4.3.3 Iterated component Association --
4207 ------------------------------------------
4208
4209 -- ITERATED_COMPONENT_ASSOCIATION ::=
4210 -- for DEFINING_IDENTIFIER in DISCRETE_CHOICE_LIST => EXPRESSION
4211
4212 -- N_Iterated_Component_Association
4213 -- Sloc points to FOR
4214 -- Defining_Identifier (Node1)
4215 -- Loop_Actions (List2-Sem)
4216 -- Expression (Node3)
4217 -- Discrete_Choices (List4)
4218 -- Box_Present (Flag15)
4219
4220 -- Note that Box_Present is always False, but it is intentionally added
4221 -- for completeness.
4222
4223 ----------------------------
4224 -- 4.3.4 Delta Aggregate --
4225 ----------------------------
4226
4227 -- N_Delta_Aggregate
4228 -- Sloc points to left parenthesis
4229 -- Expression (Node3)
4230 -- Component_Associations (List2)
4231
4232 --------------------------------------------------
4233 -- 4.4 Expression/Relation/Term/Factor/Primary --
4234 --------------------------------------------------
4235
4236 -- EXPRESSION ::=
4237 -- RELATION {LOGICAL_OPERATOR RELATION}
4238
4239 -- CHOICE_EXPRESSION ::=
4240 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
4241
4242 -- CHOICE_RELATION ::=
4243 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
4244
4245 -- RELATION ::=
4246 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4247 -- | RAISE_EXPRESSION
4248
4249 -- MEMBERSHIP_CHOICE_LIST ::=
4250 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4251
4252 -- MEMBERSHIP_CHOICE ::=
4253 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4254
4255 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
4256
4257 -- SIMPLE_EXPRESSION ::=
4258 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
4259
4260 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
4261
4262 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
4263
4264 -- No nodes are generated for any of these constructs. Instead, the
4265 -- node for the operator appears directly. When we refer to an
4266 -- expression in this description, we mean any of the possible
4267 -- constituent components of an expression (e.g. identifier is
4268 -- an example of an expression).
4269
4270 -- Note: the above syntax is that Ada 2012 syntax which restricts
4271 -- choice relations to simple expressions to avoid ambiguities in
4272 -- some contexts with set membership notation. It has been decided
4273 -- that in retrospect, the Ada 95 change allowing general expressions
4274 -- in this context was a mistake, so we have reverted to the above
4275 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
4276 -- expressions was there in Ada 83 from the start).
4277
4278 ------------------
4279 -- 4.4 Primary --
4280 ------------------
4281
4282 -- PRIMARY ::=
4283 -- NUMERIC_LITERAL | null
4284 -- | STRING_LITERAL | AGGREGATE
4285 -- | NAME | QUALIFIED_EXPRESSION
4286 -- | ALLOCATOR | (EXPRESSION)
4287
4288 -- Usually there is no explicit node in the tree for primary. Instead
4289 -- the constituent (e.g. AGGREGATE) appears directly. There are two
4290 -- exceptions. First, there is an explicit node for a null primary.
4291
4292 -- N_Null
4293 -- Sloc points to NULL
4294 -- plus fields for expression
4295
4296 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
4297 -- that the parser keep track of which subexpressions are enclosed
4298 -- in parentheses, and how many levels of parentheses are used. This
4299 -- information is required for optimization purposes, and also for
4300 -- some semantic checks (e.g. (((1))) in a procedure spec does not
4301 -- conform with ((((1)))) in the body).
4302
4303 -- The parentheses are recorded by keeping a Paren_Count field in every
4304 -- subexpression node (it is actually present in all nodes, but only
4305 -- used in subexpression nodes). This count records the number of
4306 -- levels of parentheses. If the number of levels in the source exceeds
4307 -- the maximum accommodated by this count, then the count is simply left
4308 -- at the maximum value. This means that there are some pathological
4309 -- cases of failure to detect conformance failures (e.g. an expression
4310 -- with 500 levels of parens will conform with one with 501 levels),
4311 -- but we do not need to lose sleep over this.
4312
4313 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4314 -- type N_Parenthesized_Expression used to accurately record unlimited
4315 -- numbers of levels of parentheses. However, it turned out to be a
4316 -- real nuisance to have to take into account the possible presence of
4317 -- this node during semantic analysis, since basically parentheses have
4318 -- zero relevance to semantic analysis.
4319
4320 -- Note: the level of parentheses always present in things like
4321 -- aggregates does not count, only the parentheses in the primary
4322 -- (EXPRESSION) affect the setting of the Paren_Count field.
4323
4324 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4325 -- treated as though it were Empty) if No_Initialization is set True.
4326
4327 --------------------------------------
4328 -- 4.5 Short-Circuit Control Forms --
4329 --------------------------------------
4330
4331 -- EXPRESSION ::=
4332 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4333
4334 -- Gigi restriction: For both these control forms, the operand and
4335 -- result types are always Standard.Boolean. The expander inserts the
4336 -- required conversion operations where needed to ensure this is the
4337 -- case.
4338
4339 -- N_And_Then
4340 -- Sloc points to AND of AND THEN
4341 -- Left_Opnd (Node2)
4342 -- Right_Opnd (Node3)
4343 -- Actions (List1-Sem)
4344 -- plus fields for expression
4345
4346 -- N_Or_Else
4347 -- Sloc points to OR of OR ELSE
4348 -- Left_Opnd (Node2)
4349 -- Right_Opnd (Node3)
4350 -- Actions (List1-Sem)
4351 -- plus fields for expression
4352
4353 -- Note: The Actions field is used to hold actions associated with
4354 -- the right hand operand. These have to be treated specially since
4355 -- they are not unconditionally executed. See Insert_Actions for a
4356 -- more detailed description of how these actions are handled.
4357
4358 ---------------------------
4359 -- 4.5 Membership Tests --
4360 ---------------------------
4361
4362 -- RELATION ::=
4363 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4364
4365 -- MEMBERSHIP_CHOICE_LIST ::=
4366 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4367
4368 -- MEMBERSHIP_CHOICE ::=
4369 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4370
4371 -- Note: although the grammar above allows only a range or a subtype
4372 -- mark, the parser in fact will accept any simple expression in place
4373 -- of a subtype mark. This means that the semantic analyzer must be able
4374 -- to deal with, and diagnose a simple expression other than a name for
4375 -- the right operand. This simplifies error recovery in the parser.
4376
4377 -- The Alternatives field below is present only if there is more than
4378 -- one Membership_Choice present (which is legitimate only in Ada 2012
4379 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4380 -- the list of choices. In the tree passed to the back end, Alternatives
4381 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4382 -- expands out the complex set membership case using simple membership
4383 -- and equality operations).
4384
4385 -- Should we rename Alternatives here to Membership_Choices ???
4386
4387 -- N_In
4388 -- Sloc points to IN
4389 -- Left_Opnd (Node2)
4390 -- Right_Opnd (Node3)
4391 -- Alternatives (List4) (set to No_List if only one set alternative)
4392 -- No_Minimize_Eliminate (Flag17)
4393 -- plus fields for expression
4394
4395 -- N_Not_In
4396 -- Sloc points to NOT of NOT IN
4397 -- Left_Opnd (Node2)
4398 -- Right_Opnd (Node3)
4399 -- Alternatives (List4) (set to No_List if only one set alternative)
4400 -- No_Minimize_Eliminate (Flag17)
4401 -- plus fields for expression
4402
4403 --------------------
4404 -- 4.5 Operators --
4405 --------------------
4406
4407 -- LOGICAL_OPERATOR ::= and | or | xor
4408
4409 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4410
4411 -- BINARY_ADDING_OPERATOR ::= + | - | &
4412
4413 -- UNARY_ADDING_OPERATOR ::= + | -
4414
4415 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4416
4417 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4418
4419 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4420
4421 -- x #* y
4422 -- x #/ y
4423 -- x #mod y
4424 -- x #rem y
4425
4426 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4427 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4428 -- All handling of smalls for multiplication and division is handled
4429 -- by the front end (mod and rem result only from expansion). Gigi
4430 -- thus never needs to worry about small values (for other operators
4431 -- operating on fixed-point, e.g. addition, the small value does not
4432 -- have any semantic effect anyway, these are always integer operations.
4433
4434 -- Gigi restriction: For all operators taking Boolean operands, the
4435 -- type is always Standard.Boolean. The expander inserts the required
4436 -- conversion operations where needed to ensure this is the case.
4437
4438 -- N_Op_And
4439 -- Sloc points to AND
4440 -- Do_Length_Check (Flag4-Sem)
4441 -- plus fields for binary operator
4442 -- plus fields for expression
4443
4444 -- N_Op_Or
4445 -- Sloc points to OR
4446 -- Do_Length_Check (Flag4-Sem)
4447 -- plus fields for binary operator
4448 -- plus fields for expression
4449
4450 -- N_Op_Xor
4451 -- Sloc points to XOR
4452 -- Do_Length_Check (Flag4-Sem)
4453 -- plus fields for binary operator
4454 -- plus fields for expression
4455
4456 -- N_Op_Eq
4457 -- Sloc points to =
4458 -- plus fields for binary operator
4459 -- plus fields for expression
4460
4461 -- N_Op_Ne
4462 -- Sloc points to /=
4463 -- plus fields for binary operator
4464 -- plus fields for expression
4465
4466 -- N_Op_Lt
4467 -- Sloc points to <
4468 -- plus fields for binary operator
4469 -- plus fields for expression
4470
4471 -- N_Op_Le
4472 -- Sloc points to <=
4473 -- plus fields for binary operator
4474 -- plus fields for expression
4475
4476 -- N_Op_Gt
4477 -- Sloc points to >
4478 -- plus fields for binary operator
4479 -- plus fields for expression
4480
4481 -- N_Op_Ge
4482 -- Sloc points to >=
4483 -- plus fields for binary operator
4484 -- plus fields for expression
4485
4486 -- N_Op_Add
4487 -- Sloc points to + (binary)
4488 -- plus fields for binary operator
4489 -- plus fields for expression
4490
4491 -- N_Op_Subtract
4492 -- Sloc points to - (binary)
4493 -- plus fields for binary operator
4494 -- plus fields for expression
4495
4496 -- N_Op_Concat
4497 -- Sloc points to &
4498 -- Is_Component_Left_Opnd (Flag13-Sem)
4499 -- Is_Component_Right_Opnd (Flag14-Sem)
4500 -- plus fields for binary operator
4501 -- plus fields for expression
4502
4503 -- N_Op_Multiply
4504 -- Sloc points to *
4505 -- Treat_Fixed_As_Integer (Flag14-Sem)
4506 -- Rounded_Result (Flag18-Sem)
4507 -- plus fields for binary operator
4508 -- plus fields for expression
4509
4510 -- N_Op_Divide
4511 -- Sloc points to /
4512 -- Treat_Fixed_As_Integer (Flag14-Sem)
4513 -- Do_Division_Check (Flag13-Sem)
4514 -- Rounded_Result (Flag18-Sem)
4515 -- plus fields for binary operator
4516 -- plus fields for expression
4517
4518 -- N_Op_Mod
4519 -- Sloc points to MOD
4520 -- Treat_Fixed_As_Integer (Flag14-Sem)
4521 -- Do_Division_Check (Flag13-Sem)
4522 -- plus fields for binary operator
4523 -- plus fields for expression
4524
4525 -- N_Op_Rem
4526 -- Sloc points to REM
4527 -- Treat_Fixed_As_Integer (Flag14-Sem)
4528 -- Do_Division_Check (Flag13-Sem)
4529 -- plus fields for binary operator
4530 -- plus fields for expression
4531
4532 -- N_Op_Expon
4533 -- Sloc points to **
4534 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4535 -- plus fields for binary operator
4536 -- plus fields for expression
4537
4538 -- N_Op_Plus
4539 -- Sloc points to + (unary)
4540 -- plus fields for unary operator
4541 -- plus fields for expression
4542
4543 -- N_Op_Minus
4544 -- Sloc points to - (unary)
4545 -- plus fields for unary operator
4546 -- plus fields for expression
4547
4548 -- N_Op_Abs
4549 -- Sloc points to ABS
4550 -- plus fields for unary operator
4551 -- plus fields for expression
4552
4553 -- N_Op_Not
4554 -- Sloc points to NOT
4555 -- plus fields for unary operator
4556 -- plus fields for expression
4557
4558 -- See also shift operators in section B.2
4559
4560 -- Note on fixed-point operations passed to Gigi: For adding operators,
4561 -- the semantics is to treat these simply as integer operations, with
4562 -- the small values being ignored (the bounds are already stored in
4563 -- units of small, so that constraint checking works as usual). For the
4564 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4565 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4566 -- thus treat these nodes in identical manner, ignoring small values.
4567
4568 -- Note on equality/inequality tests for records. In the expanded tree,
4569 -- record comparisons are always expanded to be a series of component
4570 -- comparisons, so the back end will never see an equality or inequality
4571 -- operation with operands of a record type.
4572
4573 -- Note on overflow handling: When the overflow checking mode is set to
4574 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4575 -- be modified to use a larger type for the operands and result. In
4576 -- the case where the computed range exceeds that of Long_Long_Integer,
4577 -- and we are running in ELIMINATED mode, the operator node will be
4578 -- changed to be a call to the appropriate routine in System.Bignums.
4579
4580 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4581 -- for signed integer types (since there is no equivalent operator in
4582 -- C). Instead we rewrite such an operation in terms of REM (which is
4583 -- % in C) and other C-available operators.
4584
4585 ------------------------------------
4586 -- 4.5.7 Conditional Expressions --
4587 ------------------------------------
4588
4589 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4590
4591 --------------------------
4592 -- 4.5.7 If Expression --
4593 ----------------------------
4594
4595 -- IF_EXPRESSION ::=
4596 -- if CONDITION then DEPENDENT_EXPRESSION
4597 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4598 -- [else DEPENDENT_EXPRESSION]
4599
4600 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4601
4602 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4603 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4604 -- the Is_Elsif flag is set on the inner if expression.
4605
4606 -- N_If_Expression
4607 -- Sloc points to IF or ELSIF keyword
4608 -- Expressions (List1)
4609 -- Then_Actions (List2-Sem)
4610 -- Else_Actions (List3-Sem)
4611 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4612 -- Do_Overflow_Check (Flag17-Sem)
4613 -- plus fields for expression
4614
4615 -- Expressions here is a three-element list, whose first element is the
4616 -- condition, the second element is the dependent expression after THEN
4617 -- and the third element is the dependent expression after the ELSE
4618 -- (explicitly set to True if missing).
4619
4620 -- Note: the Then_Actions and Else_Actions fields are always set to
4621 -- No_List in the tree passed to the back end. These are used only
4622 -- for temporary processing purposes in the expander. Even though they
4623 -- are semantic fields, their parent pointers are set because analysis
4624 -- of actions nodes in those lists may generate additional actions that
4625 -- need to know their insertion point (for example for the creation of
4626 -- transient scopes).
4627
4628 -- Note: in the tree passed to the back end, if the result type is
4629 -- an unconstrained array, the if expression can only appears in the
4630 -- initializing expression of an object declaration (this avoids the
4631 -- back end having to create a variable length temporary on the fly).
4632
4633 ----------------------------
4634 -- 4.5.7 Case Expression --
4635 ----------------------------
4636
4637 -- CASE_EXPRESSION ::=
4638 -- case SELECTING_EXPRESSION is
4639 -- CASE_EXPRESSION_ALTERNATIVE
4640 -- {,CASE_EXPRESSION_ALTERNATIVE}
4641
4642 -- Note that the Alternatives cannot include pragmas (this contrasts
4643 -- with the situation of case statements where pragmas are allowed).
4644
4645 -- N_Case_Expression
4646 -- Sloc points to CASE
4647 -- Expression (Node3) (the selecting expression)
4648 -- Alternatives (List4) (the case expression alternatives)
4649 -- Do_Overflow_Check (Flag17-Sem)
4650
4651 ----------------------------------------
4652 -- 4.5.7 Case Expression Alternative --
4653 ----------------------------------------
4654
4655 -- CASE_EXPRESSION_ALTERNATIVE ::=
4656 -- when DISCRETE_CHOICE_LIST =>
4657 -- DEPENDENT_EXPRESSION
4658
4659 -- N_Case_Expression_Alternative
4660 -- Sloc points to WHEN
4661 -- Actions (List1)
4662 -- Discrete_Choices (List4)
4663 -- Expression (Node3)
4664 -- Has_SP_Choice (Flag15-Sem)
4665
4666 -- Note: The Actions field temporarily holds any actions associated with
4667 -- evaluation of the Expression. During expansion of the case expression
4668 -- these actions are wrapped into an N_Expressions_With_Actions node
4669 -- replacing the original expression.
4670
4671 -- Note: this node never appears in the tree passed to the back end,
4672 -- since the expander converts case expressions into case statements.
4673
4674 ---------------------------------
4675 -- 4.5.9 Quantified Expression --
4676 ---------------------------------
4677
4678 -- QUANTIFIED_EXPRESSION ::=
4679 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4680 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4681 --
4682 -- QUANTIFIER ::= all | some
4683
4684 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4685 -- is present at a time, in which case the other one is empty.
4686
4687 -- N_Quantified_Expression
4688 -- Sloc points to FOR
4689 -- Iterator_Specification (Node2)
4690 -- Loop_Parameter_Specification (Node4)
4691 -- Condition (Node1)
4692 -- All_Present (Flag15)
4693
4694 --------------------------
4695 -- 4.6 Type Conversion --
4696 --------------------------
4697
4698 -- TYPE_CONVERSION ::=
4699 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4700
4701 -- In the (NAME) case, the name is stored as the expression
4702
4703 -- Note: the parser never generates a type conversion node, since it
4704 -- looks like an indexed component which is generated by preference.
4705 -- The semantic pass must correct this misidentification.
4706
4707 -- Gigi handles conversions that involve no change in the root type,
4708 -- and also all conversions from integer to floating-point types.
4709 -- Conversions from floating-point to integer are only handled in
4710 -- the case where Float_Truncate flag set. Other conversions from
4711 -- floating-point to integer (involving rounding) and all conversions
4712 -- involving fixed-point types are handled by the expander.
4713
4714 -- Sprint syntax if Float_Truncate set: X^(Y)
4715 -- Sprint syntax if Conversion_OK set X?(Y)
4716 -- Sprint syntax if both flags set X?^(Y)
4717
4718 -- Note: If either the operand or result type is fixed-point, Gigi will
4719 -- only see a type conversion node with Conversion_OK set. The front end
4720 -- takes care of all handling of small's for fixed-point conversions.
4721
4722 -- N_Type_Conversion
4723 -- Sloc points to first token of subtype mark
4724 -- Subtype_Mark (Node4)
4725 -- Expression (Node3)
4726 -- Do_Discriminant_Check (Flag3-Sem)
4727 -- Do_Length_Check (Flag4-Sem)
4728 -- Float_Truncate (Flag11-Sem)
4729 -- Do_Tag_Check (Flag13-Sem)
4730 -- Conversion_OK (Flag14-Sem)
4731 -- Do_Overflow_Check (Flag17-Sem)
4732 -- Rounded_Result (Flag18-Sem)
4733 -- plus fields for expression
4734
4735 -- Note: if a range check is required, then the Do_Range_Check flag
4736 -- is set in the Expression with the check being done against the
4737 -- target type range (after the base type conversion, if any).
4738
4739 -------------------------------
4740 -- 4.7 Qualified Expression --
4741 -------------------------------
4742
4743 -- QUALIFIED_EXPRESSION ::=
4744 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4745
4746 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4747 -- the expression, so the Expression field of this node always points
4748 -- to a parenthesized expression in this case (i.e. Paren_Count will
4749 -- always be non-zero for the referenced expression if it is not an
4750 -- aggregate).
4751
4752 -- N_Qualified_Expression
4753 -- Sloc points to apostrophe
4754 -- Subtype_Mark (Node4)
4755 -- Expression (Node3) expression or aggregate
4756 -- Is_Qualified_Universal_Literal (Flag4-Sem)
4757 -- plus fields for expression
4758
4759 --------------------
4760 -- 4.8 Allocator --
4761 --------------------
4762
4763 -- ALLOCATOR ::=
4764 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4765 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4766 --
4767 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4768
4769 -- Sprint syntax (when storage pool present)
4770 -- new xxx (storage_pool = pool)
4771 -- or
4772 -- new (subpool) xxx (storage_pool = pool)
4773
4774 -- N_Allocator
4775 -- Sloc points to NEW
4776 -- Expression (Node3) subtype indication or qualified expression
4777 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4778 -- Storage_Pool (Node1-Sem)
4779 -- Procedure_To_Call (Node2-Sem)
4780 -- Alloc_For_BIP_Return (Flag1-Sem)
4781 -- Null_Exclusion_Present (Flag11)
4782 -- No_Initialization (Flag13-Sem)
4783 -- Is_Static_Coextension (Flag14-Sem)
4784 -- Do_Storage_Check (Flag17-Sem)
4785 -- Is_Dynamic_Coextension (Flag18-Sem)
4786 -- plus fields for expression
4787
4788 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4789 -- This flag has a special function in conjunction with the restriction
4790 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4791 -- is not set. This means that if a source allocator is replaced with
4792 -- a constructed allocator, the Comes_From_Source flag should be copied
4793 -- to the newly created allocator.
4794
4795 ---------------------------------
4796 -- 5.1 Sequence Of Statements --
4797 ---------------------------------
4798
4799 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4800
4801 -- Note: Although the parser will not accept a declaration as a
4802 -- statement, the semantic analyzer may insert declarations (e.g.
4803 -- declarations of implicit types needed for execution of other
4804 -- statements) into a sequence of statements, so the code generator
4805 -- should be prepared to accept a declaration where a statement is
4806 -- expected. Note also that pragmas can appear as statements.
4807
4808 --------------------
4809 -- 5.1 Statement --
4810 --------------------
4811
4812 -- STATEMENT ::=
4813 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4814
4815 -- There is no explicit node in the tree for a statement. Instead, the
4816 -- individual statement appears directly. Labels are treated as a
4817 -- kind of statement, i.e. they are linked into a statement list at
4818 -- the point they appear, so the labeled statement appears following
4819 -- the label or labels in the statement list.
4820
4821 ---------------------------
4822 -- 5.1 Simple Statement --
4823 ---------------------------
4824
4825 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4826 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4827 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4828 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4829 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4830 -- | ABORT_STATEMENT | RAISE_STATEMENT
4831 -- | CODE_STATEMENT
4832
4833 -----------------------------
4834 -- 5.1 Compound Statement --
4835 -----------------------------
4836
4837 -- COMPOUND_STATEMENT ::=
4838 -- IF_STATEMENT | CASE_STATEMENT
4839 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4840 -- | EXTENDED_RETURN_STATEMENT
4841 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4842
4843 -------------------------
4844 -- 5.1 Null Statement --
4845 -------------------------
4846
4847 -- NULL_STATEMENT ::= null;
4848
4849 -- N_Null_Statement
4850 -- Sloc points to NULL
4851
4852 ----------------
4853 -- 5.1 Label --
4854 ----------------
4855
4856 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4857
4858 -- Note that the occurrence of a label is not a defining identifier,
4859 -- but rather a referencing occurrence. The defining occurrence is
4860 -- in the implicit label declaration which occurs in the innermost
4861 -- enclosing block.
4862
4863 -- N_Label
4864 -- Sloc points to <<
4865 -- Identifier (Node1) direct name of statement identifier
4866 -- Exception_Junk (Flag8-Sem)
4867
4868 -- Note: Before Ada 2012, a label is always followed by a statement,
4869 -- and this is true in the tree even in Ada 2012 mode (the parser
4870 -- inserts a null statement marked with Comes_From_Source False).
4871
4872 -------------------------------
4873 -- 5.1 Statement Identifier --
4874 -------------------------------
4875
4876 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4877
4878 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4879 -- (not an OPERATOR_SYMBOL)
4880
4881 -------------------------------
4882 -- 5.2 Assignment Statement --
4883 -------------------------------
4884
4885 -- ASSIGNMENT_STATEMENT ::=
4886 -- variable_NAME := EXPRESSION;
4887
4888 -- N_Assignment_Statement
4889 -- Sloc points to :=
4890 -- Name (Node2)
4891 -- Expression (Node3)
4892 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
4893 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
4894 -- Do_Discriminant_Check (Flag3-Sem)
4895 -- Do_Length_Check (Flag4-Sem)
4896 -- Forwards_OK (Flag5-Sem)
4897 -- Backwards_OK (Flag6-Sem)
4898 -- No_Ctrl_Actions (Flag7-Sem)
4899 -- Has_Target_Names (Flag8-Sem)
4900 -- Do_Tag_Check (Flag13-Sem)
4901 -- Componentwise_Assignment (Flag14-Sem)
4902 -- Suppress_Assignment_Checks (Flag18-Sem)
4903
4904 -- Note: if a range check is required, then the Do_Range_Check flag
4905 -- is set in the Expression (right hand side), with the check being
4906 -- done against the type of the Name (left hand side).
4907
4908 -- Note: the back end places some restrictions on the form of the
4909 -- Expression field. If the object being assigned to is Atomic, then
4910 -- the Expression may not have the form of an aggregate (since this
4911 -- might cause the back end to generate separate assignments). In this
4912 -- case the front end must generate an extra temporary and initialize
4913 -- this temporary as required (the temporary itself is not atomic).
4914
4915 ------------------
4916 -- Target_Name --
4917 ------------------
4918
4919 -- N_Target_Name
4920 -- Sloc points to @
4921 -- Etype (Node5-Sem)
4922
4923 -- Note (Ada 2020): node is used during analysis as a placeholder for
4924 -- the value of the LHS of the enclosing assignment statement. Node is
4925 -- eventually rewritten together with enclosing assignment, and backends
4926 -- are not aware of it.
4927
4928 -----------------------
4929 -- 5.3 If Statement --
4930 -----------------------
4931
4932 -- IF_STATEMENT ::=
4933 -- if CONDITION then
4934 -- SEQUENCE_OF_STATEMENTS
4935 -- {elsif CONDITION then
4936 -- SEQUENCE_OF_STATEMENTS}
4937 -- [else
4938 -- SEQUENCE_OF_STATEMENTS]
4939 -- end if;
4940
4941 -- Gigi restriction: This expander ensures that the type of the
4942 -- Condition fields is always Standard.Boolean, even if the type
4943 -- in the source is some non-standard boolean type.
4944
4945 -- N_If_Statement
4946 -- Sloc points to IF
4947 -- Condition (Node1)
4948 -- Then_Statements (List2)
4949 -- Elsif_Parts (List3) (set to No_List if none present)
4950 -- Else_Statements (List4) (set to No_List if no else part present)
4951 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4952 -- From_Conditional_Expression (Flag1-Sem)
4953
4954 -- N_Elsif_Part
4955 -- Sloc points to ELSIF
4956 -- Condition (Node1)
4957 -- Then_Statements (List2)
4958 -- Condition_Actions (List3-Sem)
4959
4960 --------------------
4961 -- 5.3 Condition --
4962 --------------------
4963
4964 -- CONDITION ::= boolean_EXPRESSION
4965
4966 -------------------------
4967 -- 5.4 Case Statement --
4968 -------------------------
4969
4970 -- CASE_STATEMENT ::=
4971 -- case EXPRESSION is
4972 -- CASE_STATEMENT_ALTERNATIVE
4973 -- {CASE_STATEMENT_ALTERNATIVE}
4974 -- end case;
4975
4976 -- Note: the Alternatives can contain pragmas. These only occur at
4977 -- the start of the list, since any pragmas occurring after the first
4978 -- alternative are absorbed into the corresponding statement sequence.
4979
4980 -- N_Case_Statement
4981 -- Sloc points to CASE
4982 -- Expression (Node3)
4983 -- Alternatives (List4)
4984 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4985 -- From_Conditional_Expression (Flag1-Sem)
4986
4987 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4988 -- followed by a statement, and this is true in the tree even in Ada
4989 -- 2012 mode (the parser inserts a null statement marked with the flag
4990 -- Comes_From_Source False).
4991
4992 -------------------------------------
4993 -- 5.4 Case Statement Alternative --
4994 -------------------------------------
4995
4996 -- CASE_STATEMENT_ALTERNATIVE ::=
4997 -- when DISCRETE_CHOICE_LIST =>
4998 -- SEQUENCE_OF_STATEMENTS
4999
5000 -- N_Case_Statement_Alternative
5001 -- Sloc points to WHEN
5002 -- Discrete_Choices (List4)
5003 -- Statements (List3)
5004 -- Has_SP_Choice (Flag15-Sem)
5005
5006 -- Note: in the list of Discrete_Choices, the tree passed to the back
5007 -- end does not have choice entries corresponding to names of statically
5008 -- predicated subtypes. Such entries are always expanded out to the list
5009 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
5010 -- mode does not have this expansion, and has the original choices.
5011
5012 -------------------------
5013 -- 5.5 Loop Statement --
5014 -------------------------
5015
5016 -- LOOP_STATEMENT ::=
5017 -- [loop_STATEMENT_IDENTIFIER :]
5018 -- [ITERATION_SCHEME] loop
5019 -- SEQUENCE_OF_STATEMENTS
5020 -- end loop [loop_IDENTIFIER];
5021
5022 -- Note: The occurrence of a loop label is not a defining identifier
5023 -- but rather a referencing occurrence. The defining occurrence is in
5024 -- the implicit label declaration which occurs in the innermost
5025 -- enclosing block.
5026
5027 -- Note: there is always a loop statement identifier present in the
5028 -- tree, even if none was given in the source. In the case where no loop
5029 -- identifier is given in the source, the parser creates a name of the
5030 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
5031 -- that the loop names created in this manner do not conflict with any
5032 -- user defined identifiers), and the flag Has_Created_Identifier is set
5033 -- to True. The only exception to the rule that all loop statement nodes
5034 -- have identifiers occurs for loops constructed by the expander, and
5035 -- the semantic analyzer will create and supply dummy loop identifiers
5036 -- in these cases.
5037
5038 -- N_Loop_Statement
5039 -- Sloc points to LOOP
5040 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
5041 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
5042 -- Statements (List3)
5043 -- End_Label (Node4)
5044 -- Has_Created_Identifier (Flag15)
5045 -- Is_Null_Loop (Flag16)
5046 -- Suppress_Loop_Warnings (Flag17)
5047
5048 -- Note: the parser fills in the Identifier field if there is an
5049 -- explicit loop identifier. Otherwise the parser leaves this field
5050 -- set to Empty, and then the semantic processing for a loop statement
5051 -- creates an identifier, setting the Has_Created_Identifier flag to
5052 -- True. So after semantic analysis, the Identifier is always set,
5053 -- referencing an identifier whose entity has an Ekind of E_Loop.
5054
5055 ---------------------------
5056 -- 5.5 Iteration Scheme --
5057 ---------------------------
5058
5059 -- ITERATION_SCHEME ::=
5060 -- while CONDITION
5061 -- | for LOOP_PARAMETER_SPECIFICATION
5062 -- | for ITERATOR_SPECIFICATION
5063
5064 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
5065 -- is present at a time, in which case the other one is empty. Both are
5066 -- empty in the case of a WHILE loop.
5067
5068 -- Gigi restriction: The expander ensures that the type of the Condition
5069 -- field is always Standard.Boolean, even if the type in the source is
5070 -- some non-standard boolean type.
5071
5072 -- N_Iteration_Scheme
5073 -- Sloc points to WHILE or FOR
5074 -- Condition (Node1) (set to Empty if FOR case)
5075 -- Condition_Actions (List3-Sem)
5076 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
5077 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
5078
5079 ---------------------------------------
5080 -- 5.5 Loop Parameter Specification --
5081 ---------------------------------------
5082
5083 -- LOOP_PARAMETER_SPECIFICATION ::=
5084 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
5085
5086 -- N_Loop_Parameter_Specification
5087 -- Sloc points to first identifier
5088 -- Defining_Identifier (Node1)
5089 -- Reverse_Present (Flag15)
5090 -- Discrete_Subtype_Definition (Node4)
5091
5092 -----------------------------------
5093 -- 5.5.1 Iterator Specification --
5094 -----------------------------------
5095
5096 -- ITERATOR_SPECIFICATION ::=
5097 -- DEFINING_IDENTIFIER in [reverse] NAME
5098 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
5099
5100 -- N_Iterator_Specification
5101 -- Sloc points to defining identifier
5102 -- Defining_Identifier (Node1)
5103 -- Name (Node2)
5104 -- Reverse_Present (Flag15)
5105 -- Of_Present (Flag16)
5106 -- Subtype_Indication (Node5)
5107
5108 -- Note: The Of_Present flag distinguishes the two forms
5109
5110 --------------------------
5111 -- 5.6 Block Statement --
5112 --------------------------
5113
5114 -- BLOCK_STATEMENT ::=
5115 -- [block_STATEMENT_IDENTIFIER:]
5116 -- [declare
5117 -- DECLARATIVE_PART]
5118 -- begin
5119 -- HANDLED_SEQUENCE_OF_STATEMENTS
5120 -- end [block_IDENTIFIER];
5121
5122 -- Note that the occurrence of a block identifier is not a defining
5123 -- identifier, but rather a referencing occurrence. The defining
5124 -- occurrence is an E_Block entity declared by the implicit label
5125 -- declaration which occurs in the innermost enclosing block statement
5126 -- or body; the block identifier denotes that E_Block.
5127
5128 -- For block statements that come from source code, there is always a
5129 -- block statement identifier present in the tree, denoting an E_Block.
5130 -- In the case where no block identifier is given in the source,
5131 -- the parser creates a name of the form B_n, where n is a decimal
5132 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
5133 -- constructed by the expander usually have no identifier, and no
5134 -- corresponding entity.
5135
5136 -- Note: the block statement created for an extended return statement
5137 -- has an entity, and this entity is an E_Return_Statement, rather than
5138 -- the usual E_Block.
5139
5140 -- Note: Exception_Junk is set for the wrapping blocks created during
5141 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
5142
5143 -- Note: from a control flow viewpoint, a block statement defines an
5144 -- extended basic block, i.e. the entry of the block dominates every
5145 -- statement in the sequence. When generating new statements with
5146 -- exception handlers in the expander at the end of a sequence that
5147 -- comes from source code, it can be necessary to wrap them all in a
5148 -- block statement in order to expose the implicit control flow to
5149 -- gigi and thus prevent it from issuing bogus control flow warnings.
5150
5151 -- N_Block_Statement
5152 -- Sloc points to DECLARE or BEGIN
5153 -- Identifier (Node1) block direct name (set to Empty if not present)
5154 -- Declarations (List2) (set to No_List if no DECLARE part)
5155 -- Handled_Statement_Sequence (Node4)
5156 -- Activation_Chain_Entity (Node3-Sem)
5157 -- Cleanup_Actions (List5-Sem)
5158 -- Has_Created_Identifier (Flag15)
5159 -- Is_Asynchronous_Call_Block (Flag7)
5160 -- Is_Task_Allocation_Block (Flag6)
5161 -- Exception_Junk (Flag8-Sem)
5162 -- Is_Abort_Block (Flag4-Sem)
5163 -- Is_Finalization_Wrapper (Flag9-Sem)
5164 -- Is_Initialization_Block (Flag1-Sem)
5165 -- Is_Task_Master (Flag5-Sem)
5166
5167 -------------------------
5168 -- 5.7 Exit Statement --
5169 -------------------------
5170
5171 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
5172
5173 -- Gigi restriction: The expander ensures that the type of the Condition
5174 -- field is always Standard.Boolean, even if the type in the source is
5175 -- some non-standard boolean type.
5176
5177 -- N_Exit_Statement
5178 -- Sloc points to EXIT
5179 -- Name (Node2) (set to Empty if no loop name present)
5180 -- Condition (Node1) (set to Empty if no WHEN part present)
5181 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
5182
5183 -------------------------
5184 -- 5.9 Goto Statement --
5185 -------------------------
5186
5187 -- GOTO_STATEMENT ::= goto label_NAME;
5188
5189 -- N_Goto_Statement
5190 -- Sloc points to GOTO
5191 -- Name (Node2)
5192 -- Exception_Junk (Flag8-Sem)
5193
5194 ---------------------------------
5195 -- 6.1 Subprogram Declaration --
5196 ---------------------------------
5197
5198 -- SUBPROGRAM_DECLARATION ::=
5199 -- SUBPROGRAM_SPECIFICATION
5200 -- [ASPECT_SPECIFICATIONS];
5201
5202 -- N_Subprogram_Declaration
5203 -- Sloc points to FUNCTION or PROCEDURE
5204 -- Specification (Node1)
5205 -- Body_To_Inline (Node3-Sem)
5206 -- Corresponding_Body (Node5-Sem)
5207 -- Parent_Spec (Node4-Sem)
5208 -- Is_Entry_Barrier_Function (Flag8-Sem)
5209 -- Is_Task_Body_Procedure (Flag1-Sem)
5210
5211 ------------------------------------------
5212 -- 6.1 Abstract Subprogram Declaration --
5213 ------------------------------------------
5214
5215 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
5216 -- SUBPROGRAM_SPECIFICATION is abstract
5217 -- [ASPECT_SPECIFICATIONS];
5218
5219 -- N_Abstract_Subprogram_Declaration
5220 -- Sloc points to ABSTRACT
5221 -- Specification (Node1)
5222
5223 -----------------------------------
5224 -- 6.1 Subprogram Specification --
5225 -----------------------------------
5226
5227 -- SUBPROGRAM_SPECIFICATION ::=
5228 -- [[not] overriding]
5229 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
5230 -- | [[not] overriding]
5231 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
5232
5233 -- Note: there are no separate nodes for the profiles, instead the
5234 -- information appears directly in the following nodes.
5235
5236 -- N_Function_Specification
5237 -- Sloc points to FUNCTION
5238 -- Defining_Unit_Name (Node1) (the designator)
5239 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5240 -- Null_Exclusion_Present (Flag11)
5241 -- Result_Definition (Node4) for result subtype
5242 -- Generic_Parent (Node5-Sem)
5243 -- Must_Override (Flag14) set if overriding indicator present
5244 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5245
5246 -- N_Procedure_Specification
5247 -- Sloc points to PROCEDURE
5248 -- Defining_Unit_Name (Node1)
5249 -- Null_Statement (Node2-Sem) NULL statement for body, if Null_Present
5250 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5251 -- Generic_Parent (Node5-Sem)
5252 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
5253 -- Must_Override (Flag14) set if overriding indicator present
5254 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5255
5256 -- Note: overriding indicator is an Ada 2005 feature
5257
5258 ---------------------
5259 -- 6.1 Designator --
5260 ---------------------
5261
5262 -- DESIGNATOR ::=
5263 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
5264
5265 -- Designators that are simply identifiers or operator symbols appear
5266 -- directly in the tree in this form. The following node is used only
5267 -- in the case where the designator has a parent unit name component.
5268
5269 -- N_Designator
5270 -- Sloc points to period
5271 -- Name (Node2) holds the parent unit name
5272 -- Identifier (Node1)
5273
5274 -- Note: Name is always non-Empty, since this node is only used for the
5275 -- case where a parent library unit package name is present.
5276
5277 -- Note that the identifier can also be an operator symbol here
5278
5279 ------------------------------
5280 -- 6.1 Defining Designator --
5281 ------------------------------
5282
5283 -- DEFINING_DESIGNATOR ::=
5284 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
5285
5286 -------------------------------------
5287 -- 6.1 Defining Program Unit Name --
5288 -------------------------------------
5289
5290 -- DEFINING_PROGRAM_UNIT_NAME ::=
5291 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
5292
5293 -- The parent unit name is present only in the case of a child unit name
5294 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
5295 -- at scope level one). If no such name is present, the defining program
5296 -- unit name is represented simply as the defining identifier. In the
5297 -- child unit case, the following node is used to represent the child
5298 -- unit name.
5299
5300 -- N_Defining_Program_Unit_Name
5301 -- Sloc points to period
5302 -- Name (Node2) holds the parent unit name
5303 -- Defining_Identifier (Node1)
5304
5305 -- Note: Name is always non-Empty, since this node is only used for the
5306 -- case where a parent unit name is present.
5307
5308 --------------------------
5309 -- 6.1 Operator Symbol --
5310 --------------------------
5311
5312 -- OPERATOR_SYMBOL ::= STRING_LITERAL
5313
5314 -- Note: the fields of the N_Operator_Symbol node are laid out to match
5315 -- the corresponding fields of an N_Character_Literal node. This allows
5316 -- easy conversion of the operator symbol node into a character literal
5317 -- node in the case where a string constant of the form of an operator
5318 -- symbol is scanned out as such, but turns out semantically to be a
5319 -- string literal that is not an operator. For details see Sinfo.CN.
5320 -- Change_Operator_Symbol_To_String_Literal.
5321
5322 -- N_Operator_Symbol
5323 -- Sloc points to literal
5324 -- Chars (Name1) contains the Name_Id for the operator symbol
5325 -- Strval (Str3) Id of string value. This is used if the operator
5326 -- symbol turns out to be a normal string after all.
5327 -- Entity (Node4-Sem)
5328 -- Associated_Node (Node4-Sem)
5329 -- Etype (Node5-Sem)
5330 -- Has_Private_View (Flag11-Sem) set in generic units
5331
5332 -- Note: the Strval field may be set to No_String for generated
5333 -- operator symbols that are known not to be string literals
5334 -- semantically.
5335
5336 -----------------------------------
5337 -- 6.1 Defining Operator Symbol --
5338 -----------------------------------
5339
5340 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5341
5342 -- A defining operator symbol is an entity, which has additional
5343 -- fields depending on the setting of the Ekind field. These
5344 -- additional fields are defined (and access subprograms declared)
5345 -- in package Einfo.
5346
5347 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
5348 -- are deliberately layed out to match the layout of fields in an
5349 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5350 -- an operator symbol node into a defining operator symbol node.
5351 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5352 -- for further details.
5353
5354 -- N_Defining_Operator_Symbol
5355 -- Sloc points to literal
5356 -- Chars (Name1) contains the Name_Id for the operator symbol
5357 -- Next_Entity (Node2-Sem)
5358 -- Scope (Node3-Sem)
5359 -- Etype (Node5-Sem)
5360
5361 ----------------------------
5362 -- 6.1 Parameter Profile --
5363 ----------------------------
5364
5365 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5366
5367 ---------------------------------------
5368 -- 6.1 Parameter and Result Profile --
5369 ---------------------------------------
5370
5371 -- PARAMETER_AND_RESULT_PROFILE ::=
5372 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5373 -- | [FORMAL_PART] return ACCESS_DEFINITION
5374
5375 -- There is no explicit node in the tree for a parameter and result
5376 -- profile. Instead the information appears directly in the parent.
5377
5378 ----------------------
5379 -- 6.1 Formal Part --
5380 ----------------------
5381
5382 -- FORMAL_PART ::=
5383 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5384
5385 ----------------------------------
5386 -- 6.1 Parameter Specification --
5387 ----------------------------------
5388
5389 -- PARAMETER_SPECIFICATION ::=
5390 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5391 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
5392 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5393 -- [:= DEFAULT_EXPRESSION]
5394
5395 -- Although the syntax allows multiple identifiers in the list, the
5396 -- semantics is as though successive specifications were given with
5397 -- identical type definition and expression components. To simplify
5398 -- semantic processing, the parser represents a multiple declaration
5399 -- case as a sequence of single Specifications, using the More_Ids and
5400 -- Prev_Ids flags to preserve the original source form as described
5401 -- in the section on "Handling of Defining Identifier Lists".
5402
5403 -- ALIASED can only be present in Ada 2012 mode
5404
5405 -- N_Parameter_Specification
5406 -- Sloc points to first identifier
5407 -- Defining_Identifier (Node1)
5408 -- Aliased_Present (Flag4)
5409 -- In_Present (Flag15)
5410 -- Out_Present (Flag17)
5411 -- Null_Exclusion_Present (Flag11)
5412 -- Parameter_Type (Node2) subtype mark or access definition
5413 -- Expression (Node3) (set to Empty if no default expression present)
5414 -- Do_Accessibility_Check (Flag13-Sem)
5415 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5416 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5417 -- Default_Expression (Node5-Sem)
5418
5419 ---------------
5420 -- 6.1 Mode --
5421 ---------------
5422
5423 -- MODE ::= [in] | in out | out
5424
5425 -- There is no explicit node in the tree for the Mode. Instead the
5426 -- In_Present and Out_Present flags are set in the parent node to
5427 -- record the presence of keywords specifying the mode.
5428
5429 --------------------------
5430 -- 6.3 Subprogram Body --
5431 --------------------------
5432
5433 -- SUBPROGRAM_BODY ::=
5434 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5435 -- DECLARATIVE_PART
5436 -- begin
5437 -- HANDLED_SEQUENCE_OF_STATEMENTS
5438 -- end [DESIGNATOR];
5439
5440 -- N_Subprogram_Body
5441 -- Sloc points to FUNCTION or PROCEDURE
5442 -- Specification (Node1)
5443 -- Declarations (List2)
5444 -- Handled_Statement_Sequence (Node4)
5445 -- Activation_Chain_Entity (Node3-Sem)
5446 -- Corresponding_Spec (Node5-Sem)
5447 -- Acts_As_Spec (Flag4-Sem)
5448 -- Bad_Is_Detected (Flag15) used only by parser
5449 -- Do_Storage_Check (Flag17-Sem)
5450 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5451 -- Is_Entry_Barrier_Function (Flag8-Sem)
5452 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5453 -- Is_Task_Body_Procedure (Flag1-Sem)
5454 -- Is_Task_Master (Flag5-Sem)
5455 -- Was_Attribute_Reference (Flag2-Sem)
5456 -- Was_Expression_Function (Flag18-Sem)
5457 -- Was_Originally_Stub (Flag13-Sem)
5458
5459 -----------------------------------
5460 -- 6.4 Procedure Call Statement --
5461 -----------------------------------
5462
5463 -- PROCEDURE_CALL_STATEMENT ::=
5464 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5465
5466 -- Note: the reason that a procedure call has expression fields is that
5467 -- it semantically resembles an expression, e.g. overloading is allowed
5468 -- and a type is concocted for semantic processing purposes. Certain of
5469 -- these fields, such as Parens are not relevant, but it is easier to
5470 -- just supply all of them together.
5471
5472 -- N_Procedure_Call_Statement
5473 -- Sloc points to first token of name or prefix
5474 -- Name (Node2) stores name or prefix
5475 -- Parameter_Associations (List3) (set to No_List if no
5476 -- actual parameter part)
5477 -- First_Named_Actual (Node4-Sem)
5478 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5479 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5480 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
5481 -- Do_Tag_Check (Flag13-Sem)
5482 -- plus fields for expression
5483
5484 -- If any IN parameter requires a range check, then the corresponding
5485 -- argument expression has the Do_Range_Check flag set, and the range
5486 -- check is done against the formal type. Note that this argument
5487 -- expression may appear directly in the Parameter_Associations list,
5488 -- or may be a descendant of an N_Parameter_Association node that
5489 -- appears in this list.
5490
5491 ------------------------
5492 -- 6.4 Function Call --
5493 ------------------------
5494
5495 -- FUNCTION_CALL ::=
5496 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5497
5498 -- Note: the parser may generate an indexed component node or simply
5499 -- a name node instead of a function call node. The semantic pass must
5500 -- correct this misidentification.
5501
5502 -- N_Function_Call
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_Expanded_Build_In_Place_Call (Flag11-Sem)
5512 -- Do_Tag_Check (Flag13-Sem)
5513 -- No_Side_Effect_Removal (Flag17-Sem)
5514 -- plus fields for expression
5515
5516 --------------------------------
5517 -- 6.4 Actual Parameter Part --
5518 --------------------------------
5519
5520 -- ACTUAL_PARAMETER_PART ::=
5521 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5522
5523 --------------------------------
5524 -- 6.4 Parameter Association --
5525 --------------------------------
5526
5527 -- PARAMETER_ASSOCIATION ::=
5528 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5529
5530 -- Note: the N_Parameter_Association node is built only if a formal
5531 -- parameter selector name is present, otherwise the parameter
5532 -- association appears in the tree simply as the node for the
5533 -- explicit actual parameter.
5534
5535 -- N_Parameter_Association
5536 -- Sloc points to formal parameter
5537 -- Selector_Name (Node2) (always non-Empty)
5538 -- Explicit_Actual_Parameter (Node3)
5539 -- Next_Named_Actual (Node4-Sem)
5540 -- Is_Accessibility_Actual (Flag13-Sem)
5541
5542 ---------------------------
5543 -- 6.4 Actual Parameter --
5544 ---------------------------
5545
5546 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
5547
5548 ---------------------------
5549 -- 6.5 Return Statement --
5550 ---------------------------
5551
5552 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5553
5554 -- EXTENDED_RETURN_STATEMENT ::=
5555 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5556 -- [:= EXPRESSION] [do
5557 -- HANDLED_SEQUENCE_OF_STATEMENTS
5558 -- end return];
5559
5560 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5561
5562 -- The term "return statement" is defined in 6.5 to mean either a
5563 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5564 -- the use of this term, since it used to mean someting else in earlier
5565 -- versions of Ada.
5566
5567 -- N_Simple_Return_Statement
5568 -- Sloc points to RETURN
5569 -- Return_Statement_Entity (Node5-Sem)
5570 -- Expression (Node3) (set to Empty if no expression present)
5571 -- Storage_Pool (Node1-Sem)
5572 -- Procedure_To_Call (Node2-Sem)
5573 -- Do_Tag_Check (Flag13-Sem)
5574 -- By_Ref (Flag5-Sem)
5575 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5576
5577 -- Note: Return_Statement_Entity points to an E_Return_Statement
5578
5579 -- If a range check is required, then Do_Range_Check is set on the
5580 -- Expression. The check is against the return subtype of the function.
5581
5582 -- N_Extended_Return_Statement
5583 -- Sloc points to RETURN
5584 -- Return_Statement_Entity (Node5-Sem)
5585 -- Return_Object_Declarations (List3)
5586 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5587 -- Storage_Pool (Node1-Sem)
5588 -- Procedure_To_Call (Node2-Sem)
5589 -- Do_Tag_Check (Flag13-Sem)
5590 -- By_Ref (Flag5-Sem)
5591
5592 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5593
5594 -- Note that Return_Object_Declarations is a list containing the
5595 -- N_Object_Declaration -- see comment on this field above.
5596
5597 -- The declared object will have Is_Return_Object = True.
5598
5599 -- There is no such syntactic category as return_object_declaration
5600 -- in the RM. Return_Object_Declarations represents this portion of
5601 -- the syntax for EXTENDED_RETURN_STATEMENT:
5602 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5603 -- [:= EXPRESSION]
5604
5605 -- There are two entities associated with an extended_return_statement:
5606 -- the Return_Statement_Entity represents the statement itself,
5607 -- and the Defining_Identifier of the Object_Declaration in
5608 -- Return_Object_Declarations represents the object being
5609 -- returned. N_Simple_Return_Statement has only the former.
5610
5611 ------------------------------
5612 -- 6.8 Expression Function --
5613 ------------------------------
5614
5615 -- EXPRESSION_FUNCTION ::=
5616 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5617 -- [ASPECT_SPECIFICATIONS];
5618
5619 -- N_Expression_Function
5620 -- Sloc points to FUNCTION
5621 -- Specification (Node1)
5622 -- Expression (Node3)
5623 -- Corresponding_Spec (Node5-Sem)
5624
5625 ------------------------------
5626 -- 7.1 Package Declaration --
5627 ------------------------------
5628
5629 -- PACKAGE_DECLARATION ::=
5630 -- PACKAGE_SPECIFICATION;
5631
5632 -- Note: the activation chain entity for a package spec is used for
5633 -- all tasks declared in the package spec, or in the package body.
5634
5635 -- N_Package_Declaration
5636 -- Sloc points to PACKAGE
5637 -- Specification (Node1)
5638 -- Corresponding_Body (Node5-Sem)
5639 -- Parent_Spec (Node4-Sem)
5640 -- Activation_Chain_Entity (Node3-Sem)
5641
5642 --------------------------------
5643 -- 7.1 Package Specification --
5644 --------------------------------
5645
5646 -- PACKAGE_SPECIFICATION ::=
5647 -- package DEFINING_PROGRAM_UNIT_NAME
5648 -- [ASPECT_SPECIFICATIONS]
5649 -- is
5650 -- {BASIC_DECLARATIVE_ITEM}
5651 -- [private
5652 -- {BASIC_DECLARATIVE_ITEM}]
5653 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5654
5655 -- N_Package_Specification
5656 -- Sloc points to PACKAGE
5657 -- Defining_Unit_Name (Node1)
5658 -- Visible_Declarations (List2)
5659 -- Private_Declarations (List3) (set to No_List if no private
5660 -- part present)
5661 -- End_Label (Node4)
5662 -- Generic_Parent (Node5-Sem)
5663 -- Limited_View_Installed (Flag18-Sem)
5664
5665 -----------------------
5666 -- 7.1 Package Body --
5667 -----------------------
5668
5669 -- PACKAGE_BODY ::=
5670 -- package body DEFINING_PROGRAM_UNIT_NAME
5671 -- [ASPECT_SPECIFICATIONS]
5672 -- is
5673 -- DECLARATIVE_PART
5674 -- [begin
5675 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5676 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5677
5678 -- N_Package_Body
5679 -- Sloc points to PACKAGE
5680 -- Defining_Unit_Name (Node1)
5681 -- Declarations (List2)
5682 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5683 -- Corresponding_Spec (Node5-Sem)
5684 -- Was_Originally_Stub (Flag13-Sem)
5685
5686 -- Note: if a source level package does not contain a handled sequence
5687 -- of statements, then the parser supplies a dummy one with a null
5688 -- sequence of statements. Comes_From_Source will be False in this
5689 -- constructed sequence. The reason we need this is for the End_Label
5690 -- field in the HSS.
5691
5692 -----------------------------------
5693 -- 7.4 Private Type Declaration --
5694 -----------------------------------
5695
5696 -- PRIVATE_TYPE_DECLARATION ::=
5697 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5698 -- is [[abstract] tagged] [limited] private
5699 -- [ASPECT_SPECIFICATIONS];
5700
5701 -- Note: TAGGED is not permitted in Ada 83 mode
5702
5703 -- N_Private_Type_Declaration
5704 -- Sloc points to TYPE
5705 -- Defining_Identifier (Node1)
5706 -- Discriminant_Specifications (List4) (set to No_List if no
5707 -- discriminant part)
5708 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5709 -- Abstract_Present (Flag4)
5710 -- Tagged_Present (Flag15)
5711 -- Limited_Present (Flag17)
5712
5713 ----------------------------------------
5714 -- 7.4 Private Extension Declaration --
5715 ----------------------------------------
5716
5717 -- PRIVATE_EXTENSION_DECLARATION ::=
5718 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5719 -- [abstract] [limited | synchronized]
5720 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5721 -- with private [ASPECT_SPECIFICATIONS];
5722
5723 -- Note: LIMITED, and private extension declarations are not allowed
5724 -- in Ada 83 mode.
5725
5726 -- N_Private_Extension_Declaration
5727 -- Sloc points to TYPE
5728 -- Defining_Identifier (Node1)
5729 -- Uninitialized_Variable (Node3-Sem)
5730 -- Discriminant_Specifications (List4) (set to No_List if no
5731 -- discriminant part)
5732 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5733 -- Abstract_Present (Flag4)
5734 -- Limited_Present (Flag17)
5735 -- Synchronized_Present (Flag7)
5736 -- Subtype_Indication (Node5)
5737 -- Interface_List (List2) (set to No_List if none)
5738
5739 ---------------------
5740 -- 8.4 Use Clause --
5741 ---------------------
5742
5743 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5744
5745 -----------------------------
5746 -- 8.4 Use Package Clause --
5747 -----------------------------
5748
5749 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5750
5751 -- N_Use_Package_Clause
5752 -- Sloc points to USE
5753 -- Prev_Use_Clause (Node1-Sem)
5754 -- Name (Node2)
5755 -- Next_Use_Clause (Node3-Sem)
5756 -- Associated_Node (Node4-Sem)
5757 -- Hidden_By_Use_Clause (Elist5-Sem)
5758 -- Is_Effective_Use_Clause (Flag1)
5759 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5760 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5761
5762 --------------------------
5763 -- 8.4 Use Type Clause --
5764 --------------------------
5765
5766 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5767
5768 -- Note: use type clause is not permitted in Ada 83 mode
5769
5770 -- Note: the ALL keyword can appear only in Ada 2012 mode
5771
5772 -- N_Use_Type_Clause
5773 -- Sloc points to USE
5774 -- Prev_Use_Clause (Node1-Sem)
5775 -- Used_Operations (Elist2-Sem)
5776 -- Next_Use_Clause (Node3-Sem)
5777 -- Subtype_Mark (Node4)
5778 -- Hidden_By_Use_Clause (Elist5-Sem)
5779 -- Is_Effective_Use_Clause (Flag1)
5780 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5781 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5782 -- All_Present (Flag15)
5783
5784 -------------------------------
5785 -- 8.5 Renaming Declaration --
5786 -------------------------------
5787
5788 -- RENAMING_DECLARATION ::=
5789 -- OBJECT_RENAMING_DECLARATION
5790 -- | EXCEPTION_RENAMING_DECLARATION
5791 -- | PACKAGE_RENAMING_DECLARATION
5792 -- | SUBPROGRAM_RENAMING_DECLARATION
5793 -- | GENERIC_RENAMING_DECLARATION
5794
5795 --------------------------------------
5796 -- 8.5 Object Renaming Declaration --
5797 --------------------------------------
5798
5799 -- OBJECT_RENAMING_DECLARATION ::=
5800 -- DEFINING_IDENTIFIER :
5801 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5802 -- [ASPECT_SPECIFICATIONS];
5803 -- | DEFINING_IDENTIFIER :
5804 -- ACCESS_DEFINITION renames object_NAME
5805 -- [ASPECT_SPECIFICATIONS];
5806
5807 -- Note: Access_Definition is an optional field that gives support to
5808 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5809 -- Subtype_Indication field or else the Access_Definition field.
5810
5811 -- N_Object_Renaming_Declaration
5812 -- Sloc points to first identifier
5813 -- Defining_Identifier (Node1)
5814 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5815 -- Subtype_Mark (Node4) (set to Empty if not present)
5816 -- Access_Definition (Node3) (set to Empty if not present)
5817 -- Name (Node2)
5818 -- Corresponding_Generic_Association (Node5-Sem)
5819
5820 -----------------------------------------
5821 -- 8.5 Exception Renaming Declaration --
5822 -----------------------------------------
5823
5824 -- EXCEPTION_RENAMING_DECLARATION ::=
5825 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5826 -- [ASPECT_SPECIFICATIONS];
5827
5828 -- N_Exception_Renaming_Declaration
5829 -- Sloc points to first identifier
5830 -- Defining_Identifier (Node1)
5831 -- Name (Node2)
5832
5833 ---------------------------------------
5834 -- 8.5 Package Renaming Declaration --
5835 ---------------------------------------
5836
5837 -- PACKAGE_RENAMING_DECLARATION ::=
5838 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5839 -- [ASPECT_SPECIFICATIONS];
5840
5841 -- N_Package_Renaming_Declaration
5842 -- Sloc points to PACKAGE
5843 -- Defining_Unit_Name (Node1)
5844 -- Name (Node2)
5845 -- Parent_Spec (Node4-Sem)
5846
5847 ------------------------------------------
5848 -- 8.5 Subprogram Renaming Declaration --
5849 ------------------------------------------
5850
5851 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5852 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5853 -- [ASPECT_SPECIFICATIONS];
5854
5855 -- N_Subprogram_Renaming_Declaration
5856 -- Sloc points to RENAMES
5857 -- Specification (Node1)
5858 -- Name (Node2)
5859 -- Parent_Spec (Node4-Sem)
5860 -- Corresponding_Spec (Node5-Sem)
5861 -- Corresponding_Formal_Spec (Node3-Sem)
5862 -- From_Default (Flag6-Sem)
5863
5864 -----------------------------------------
5865 -- 8.5.5 Generic Renaming Declaration --
5866 -----------------------------------------
5867
5868 -- GENERIC_RENAMING_DECLARATION ::=
5869 -- generic package DEFINING_PROGRAM_UNIT_NAME
5870 -- renames generic_package_NAME
5871 -- [ASPECT_SPECIFICATIONS];
5872 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5873 -- renames generic_procedure_NAME
5874 -- [ASPECT_SPECIFICATIONS];
5875 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5876 -- renames generic_function_NAME
5877 -- [ASPECT_SPECIFICATIONS];
5878
5879 -- N_Generic_Package_Renaming_Declaration
5880 -- Sloc points to GENERIC
5881 -- Defining_Unit_Name (Node1)
5882 -- Name (Node2)
5883 -- Parent_Spec (Node4-Sem)
5884
5885 -- N_Generic_Procedure_Renaming_Declaration
5886 -- Sloc points to GENERIC
5887 -- Defining_Unit_Name (Node1)
5888 -- Name (Node2)
5889 -- Parent_Spec (Node4-Sem)
5890
5891 -- N_Generic_Function_Renaming_Declaration
5892 -- Sloc points to GENERIC
5893 -- Defining_Unit_Name (Node1)
5894 -- Name (Node2)
5895 -- Parent_Spec (Node4-Sem)
5896
5897 --------------------------------
5898 -- 9.1 Task Type Declaration --
5899 --------------------------------
5900
5901 -- TASK_TYPE_DECLARATION ::=
5902 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5903 -- [ASPECT_SPECIFICATIONS]
5904 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5905
5906 -- N_Task_Type_Declaration
5907 -- Sloc points to TASK
5908 -- Defining_Identifier (Node1)
5909 -- Discriminant_Specifications (List4) (set to No_List if no
5910 -- discriminant part)
5911 -- Interface_List (List2) (set to No_List if none)
5912 -- Task_Definition (Node3) (set to Empty if not present)
5913 -- Corresponding_Body (Node5-Sem)
5914
5915 ----------------------------------
5916 -- 9.1 Single Task Declaration --
5917 ----------------------------------
5918
5919 -- SINGLE_TASK_DECLARATION ::=
5920 -- task DEFINING_IDENTIFIER
5921 -- [ASPECT_SPECIFICATIONS]
5922 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5923
5924 -- N_Single_Task_Declaration
5925 -- Sloc points to TASK
5926 -- Defining_Identifier (Node1)
5927 -- Interface_List (List2) (set to No_List if none)
5928 -- Task_Definition (Node3) (set to Empty if not present)
5929
5930 --------------------------
5931 -- 9.1 Task Definition --
5932 --------------------------
5933
5934 -- TASK_DEFINITION ::=
5935 -- {TASK_ITEM}
5936 -- [private
5937 -- {TASK_ITEM}]
5938 -- end [task_IDENTIFIER]
5939
5940 -- Note: as a result of semantic analysis, the list of task items can
5941 -- include implicit type declarations resulting from entry families.
5942
5943 -- N_Task_Definition
5944 -- Sloc points to first token of task definition
5945 -- Visible_Declarations (List2)
5946 -- Private_Declarations (List3) (set to No_List if no private part)
5947 -- End_Label (Node4)
5948 -- Has_Storage_Size_Pragma (Flag5-Sem)
5949 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5950
5951 --------------------
5952 -- 9.1 Task Item --
5953 --------------------
5954
5955 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5956
5957 --------------------
5958 -- 9.1 Task Body --
5959 --------------------
5960
5961 -- TASK_BODY ::=
5962 -- task body task_DEFINING_IDENTIFIER
5963 -- [ASPECT_SPECIFICATIONS]
5964 -- is
5965 -- DECLARATIVE_PART
5966 -- begin
5967 -- HANDLED_SEQUENCE_OF_STATEMENTS
5968 -- end [task_IDENTIFIER];
5969
5970 -- Gigi restriction: This node never appears
5971
5972 -- N_Task_Body
5973 -- Sloc points to TASK
5974 -- Defining_Identifier (Node1)
5975 -- Declarations (List2)
5976 -- Handled_Statement_Sequence (Node4)
5977 -- Is_Task_Master (Flag5-Sem)
5978 -- Activation_Chain_Entity (Node3-Sem)
5979 -- Corresponding_Spec (Node5-Sem)
5980 -- Was_Originally_Stub (Flag13-Sem)
5981
5982 -------------------------------------
5983 -- 9.4 Protected Type Declaration --
5984 -------------------------------------
5985
5986 -- PROTECTED_TYPE_DECLARATION ::=
5987 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5988 -- [ASPECT_SPECIFICATIONS]
5989 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5990
5991 -- Note: protected type declarations are not permitted in Ada 83 mode
5992
5993 -- N_Protected_Type_Declaration
5994 -- Sloc points to PROTECTED
5995 -- Defining_Identifier (Node1)
5996 -- Discriminant_Specifications (List4) (set to No_List if no
5997 -- discriminant part)
5998 -- Interface_List (List2) (set to No_List if none)
5999 -- Protected_Definition (Node3)
6000 -- Corresponding_Body (Node5-Sem)
6001
6002 ---------------------------------------
6003 -- 9.4 Single Protected Declaration --
6004 ---------------------------------------
6005
6006 -- SINGLE_PROTECTED_DECLARATION ::=
6007 -- protected DEFINING_IDENTIFIER
6008 -- [ASPECT_SPECIFICATIONS]
6009 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
6010
6011 -- Note: single protected declarations are not allowed in Ada 83 mode
6012
6013 -- N_Single_Protected_Declaration
6014 -- Sloc points to PROTECTED
6015 -- Defining_Identifier (Node1)
6016 -- Interface_List (List2) (set to No_List if none)
6017 -- Protected_Definition (Node3)
6018
6019 -------------------------------
6020 -- 9.4 Protected Definition --
6021 -------------------------------
6022
6023 -- PROTECTED_DEFINITION ::=
6024 -- {PROTECTED_OPERATION_DECLARATION}
6025 -- [private
6026 -- {PROTECTED_ELEMENT_DECLARATION}]
6027 -- end [protected_IDENTIFIER]
6028
6029 -- N_Protected_Definition
6030 -- Sloc points to first token of protected definition
6031 -- Visible_Declarations (List2)
6032 -- Private_Declarations (List3) (set to No_List if no private part)
6033 -- End_Label (Node4)
6034
6035 ------------------------------------------
6036 -- 9.4 Protected Operation Declaration --
6037 ------------------------------------------
6038
6039 -- PROTECTED_OPERATION_DECLARATION ::=
6040 -- SUBPROGRAM_DECLARATION
6041 -- | ENTRY_DECLARATION
6042 -- | REPRESENTATION_CLAUSE
6043
6044 ----------------------------------------
6045 -- 9.4 Protected Element Declaration --
6046 ----------------------------------------
6047
6048 -- PROTECTED_ELEMENT_DECLARATION ::=
6049 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
6050
6051 -------------------------
6052 -- 9.4 Protected Body --
6053 -------------------------
6054
6055 -- PROTECTED_BODY ::=
6056 -- protected body DEFINING_IDENTIFIER
6057 -- [ASPECT_SPECIFICATIONS];
6058 -- is
6059 -- {PROTECTED_OPERATION_ITEM}
6060 -- end [protected_IDENTIFIER];
6061
6062 -- Note: protected bodies are not allowed in Ada 83 mode
6063
6064 -- Gigi restriction: This node never appears
6065
6066 -- N_Protected_Body
6067 -- Sloc points to PROTECTED
6068 -- Defining_Identifier (Node1)
6069 -- Declarations (List2) protected operation items (and pragmas)
6070 -- End_Label (Node4)
6071 -- Corresponding_Spec (Node5-Sem)
6072 -- Was_Originally_Stub (Flag13-Sem)
6073
6074 -----------------------------------
6075 -- 9.4 Protected Operation Item --
6076 -----------------------------------
6077
6078 -- PROTECTED_OPERATION_ITEM ::=
6079 -- SUBPROGRAM_DECLARATION
6080 -- | SUBPROGRAM_BODY
6081 -- | ENTRY_BODY
6082 -- | REPRESENTATION_CLAUSE
6083
6084 ------------------------------
6085 -- 9.5.2 Entry Declaration --
6086 ------------------------------
6087
6088 -- ENTRY_DECLARATION ::=
6089 -- [[not] overriding]
6090 -- entry DEFINING_IDENTIFIER
6091 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
6092 -- [ASPECT_SPECIFICATIONS];
6093
6094 -- N_Entry_Declaration
6095 -- Sloc points to ENTRY
6096 -- Defining_Identifier (Node1)
6097 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
6098 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6099 -- Corresponding_Body (Node5-Sem)
6100 -- Must_Override (Flag14) set if overriding indicator present
6101 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6102
6103 -- Note: overriding indicator is an Ada 2005 feature
6104
6105 -----------------------------
6106 -- 9.5.2 Accept statement --
6107 -----------------------------
6108
6109 -- ACCEPT_STATEMENT ::=
6110 -- accept entry_DIRECT_NAME
6111 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
6112 -- HANDLED_SEQUENCE_OF_STATEMENTS
6113 -- end [entry_IDENTIFIER]];
6114
6115 -- Gigi restriction: This node never appears
6116
6117 -- Note: there are no explicit declarations allowed in an accept
6118 -- statement. However, the implicit declarations for any statement
6119 -- identifiers (labels and block/loop identifiers) are declarations
6120 -- that belong logically to the accept statement, and that is why
6121 -- there is a Declarations field in this node.
6122
6123 -- N_Accept_Statement
6124 -- Sloc points to ACCEPT
6125 -- Entry_Direct_Name (Node1)
6126 -- Entry_Index (Node5) (set to Empty if not present)
6127 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6128 -- Handled_Statement_Sequence (Node4)
6129 -- Declarations (List2) (set to No_List if no declarations)
6130
6131 ------------------------
6132 -- 9.5.2 Entry Index --
6133 ------------------------
6134
6135 -- ENTRY_INDEX ::= EXPRESSION
6136
6137 -----------------------
6138 -- 9.5.2 Entry Body --
6139 -----------------------
6140
6141 -- ENTRY_BODY ::=
6142 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
6143 -- DECLARATIVE_PART
6144 -- begin
6145 -- HANDLED_SEQUENCE_OF_STATEMENTS
6146 -- end [entry_IDENTIFIER];
6147
6148 -- ENTRY_BARRIER ::= when CONDITION
6149
6150 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
6151 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
6152 -- too full (it would otherwise have too many fields)
6153
6154 -- Gigi restriction: This node never appears
6155
6156 -- N_Entry_Body
6157 -- Sloc points to ENTRY
6158 -- Defining_Identifier (Node1)
6159 -- Entry_Body_Formal_Part (Node5)
6160 -- Declarations (List2)
6161 -- Handled_Statement_Sequence (Node4)
6162 -- Activation_Chain_Entity (Node3-Sem)
6163
6164 -----------------------------------
6165 -- 9.5.2 Entry Body Formal Part --
6166 -----------------------------------
6167
6168 -- ENTRY_BODY_FORMAL_PART ::=
6169 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
6170
6171 -- Note that an entry body formal part node is present even if it is
6172 -- empty. This reflects the grammar, in which it is the components of
6173 -- the entry body formal part that are optional, not the entry body
6174 -- formal part itself. Also this means that the barrier condition
6175 -- always has somewhere to be stored.
6176
6177 -- Gigi restriction: This node never appears
6178
6179 -- N_Entry_Body_Formal_Part
6180 -- Sloc points to first token
6181 -- Entry_Index_Specification (Node4) (set to Empty if not present)
6182 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6183 -- Condition (Node1) from entry barrier of entry body
6184
6185 --------------------------
6186 -- 9.5.2 Entry Barrier --
6187 --------------------------
6188
6189 -- ENTRY_BARRIER ::= when CONDITION
6190
6191 --------------------------------------
6192 -- 9.5.2 Entry Index Specification --
6193 --------------------------------------
6194
6195 -- ENTRY_INDEX_SPECIFICATION ::=
6196 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
6197
6198 -- Gigi restriction: This node never appears
6199
6200 -- N_Entry_Index_Specification
6201 -- Sloc points to FOR
6202 -- Defining_Identifier (Node1)
6203 -- Discrete_Subtype_Definition (Node4)
6204
6205 ---------------------------------
6206 -- 9.5.3 Entry Call Statement --
6207 ---------------------------------
6208
6209 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
6210
6211 -- The parser may generate a procedure call for this construct. The
6212 -- semantic pass must correct this misidentification where needed.
6213
6214 -- Gigi restriction: This node never appears
6215
6216 -- N_Entry_Call_Statement
6217 -- Sloc points to first token of name
6218 -- Name (Node2)
6219 -- Parameter_Associations (List3) (set to No_List if no
6220 -- actual parameter part)
6221 -- First_Named_Actual (Node4-Sem)
6222 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6223 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
6224
6225 ------------------------------
6226 -- 9.5.4 Requeue Statement --
6227 ------------------------------
6228
6229 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
6230
6231 -- Note: requeue statements are not permitted in Ada 83 mode
6232
6233 -- Gigi restriction: This node never appears
6234
6235 -- N_Requeue_Statement
6236 -- Sloc points to REQUEUE
6237 -- Name (Node2)
6238 -- Abort_Present (Flag15)
6239 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6240 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
6241
6242 --------------------------
6243 -- 9.6 Delay Statement --
6244 --------------------------
6245
6246 -- DELAY_STATEMENT ::=
6247 -- DELAY_UNTIL_STATEMENT
6248 -- | DELAY_RELATIVE_STATEMENT
6249
6250 --------------------------------
6251 -- 9.6 Delay Until Statement --
6252 --------------------------------
6253
6254 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
6255
6256 -- Note: delay until statements are not permitted in Ada 83 mode
6257
6258 -- Gigi restriction: This node never appears
6259
6260 -- N_Delay_Until_Statement
6261 -- Sloc points to DELAY
6262 -- Expression (Node3)
6263
6264 -----------------------------------
6265 -- 9.6 Delay Relative Statement --
6266 -----------------------------------
6267
6268 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
6269
6270 -- Gigi restriction: This node never appears
6271
6272 -- N_Delay_Relative_Statement
6273 -- Sloc points to DELAY
6274 -- Expression (Node3)
6275
6276 ---------------------------
6277 -- 9.7 Select Statement --
6278 ---------------------------
6279
6280 -- SELECT_STATEMENT ::=
6281 -- SELECTIVE_ACCEPT
6282 -- | TIMED_ENTRY_CALL
6283 -- | CONDITIONAL_ENTRY_CALL
6284 -- | ASYNCHRONOUS_SELECT
6285
6286 -----------------------------
6287 -- 9.7.1 Selective Accept --
6288 -----------------------------
6289
6290 -- SELECTIVE_ACCEPT ::=
6291 -- select
6292 -- [GUARD]
6293 -- SELECT_ALTERNATIVE
6294 -- {or
6295 -- [GUARD]
6296 -- SELECT_ALTERNATIVE}
6297 -- [else
6298 -- SEQUENCE_OF_STATEMENTS]
6299 -- end select;
6300
6301 -- Gigi restriction: This node never appears
6302
6303 -- Note: the guard expression, if present, appears in the node for
6304 -- the select alternative.
6305
6306 -- N_Selective_Accept
6307 -- Sloc points to SELECT
6308 -- Select_Alternatives (List1)
6309 -- Else_Statements (List4) (set to No_List if no else part)
6310
6311 ------------------
6312 -- 9.7.1 Guard --
6313 ------------------
6314
6315 -- GUARD ::= when CONDITION =>
6316
6317 -- As noted above, the CONDITION that is part of a GUARD is included
6318 -- in the node for the select alternative for convenience.
6319
6320 -------------------------------
6321 -- 9.7.1 Select Alternative --
6322 -------------------------------
6323
6324 -- SELECT_ALTERNATIVE ::=
6325 -- ACCEPT_ALTERNATIVE
6326 -- | DELAY_ALTERNATIVE
6327 -- | TERMINATE_ALTERNATIVE
6328
6329 -------------------------------
6330 -- 9.7.1 Accept Alternative --
6331 -------------------------------
6332
6333 -- ACCEPT_ALTERNATIVE ::=
6334 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
6335
6336 -- Gigi restriction: This node never appears
6337
6338 -- N_Accept_Alternative
6339 -- Sloc points to ACCEPT
6340 -- Accept_Statement (Node2)
6341 -- Condition (Node1) from the guard (set to Empty if no guard present)
6342 -- Statements (List3) (set to Empty_List if no statements)
6343 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6344 -- Accept_Handler_Records (List5-Sem)
6345
6346 ------------------------------
6347 -- 9.7.1 Delay Alternative --
6348 ------------------------------
6349
6350 -- DELAY_ALTERNATIVE ::=
6351 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6352
6353 -- Gigi restriction: This node never appears
6354
6355 -- N_Delay_Alternative
6356 -- Sloc points to DELAY
6357 -- Delay_Statement (Node2)
6358 -- Condition (Node1) from the guard (set to Empty if no guard present)
6359 -- Statements (List3) (set to Empty_List if no statements)
6360 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6361
6362 ----------------------------------
6363 -- 9.7.1 Terminate Alternative --
6364 ----------------------------------
6365
6366 -- TERMINATE_ALTERNATIVE ::= terminate;
6367
6368 -- Gigi restriction: This node never appears
6369
6370 -- N_Terminate_Alternative
6371 -- Sloc points to TERMINATE
6372 -- Condition (Node1) from the guard (set to Empty if no guard present)
6373 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6374 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6375
6376 -----------------------------
6377 -- 9.7.2 Timed Entry Call --
6378 -----------------------------
6379
6380 -- TIMED_ENTRY_CALL ::=
6381 -- select
6382 -- ENTRY_CALL_ALTERNATIVE
6383 -- or
6384 -- DELAY_ALTERNATIVE
6385 -- end select;
6386
6387 -- Gigi restriction: This node never appears
6388
6389 -- N_Timed_Entry_Call
6390 -- Sloc points to SELECT
6391 -- Entry_Call_Alternative (Node1)
6392 -- Delay_Alternative (Node4)
6393
6394 -----------------------------------
6395 -- 9.7.2 Entry Call Alternative --
6396 -----------------------------------
6397
6398 -- ENTRY_CALL_ALTERNATIVE ::=
6399 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6400
6401 -- PROCEDURE_OR_ENTRY_CALL ::=
6402 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6403
6404 -- Gigi restriction: This node never appears
6405
6406 -- N_Entry_Call_Alternative
6407 -- Sloc points to first token of entry call statement
6408 -- Entry_Call_Statement (Node1)
6409 -- Statements (List3) (set to Empty_List if no statements)
6410 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6411
6412 -----------------------------------
6413 -- 9.7.3 Conditional Entry Call --
6414 -----------------------------------
6415
6416 -- CONDITIONAL_ENTRY_CALL ::=
6417 -- select
6418 -- ENTRY_CALL_ALTERNATIVE
6419 -- else
6420 -- SEQUENCE_OF_STATEMENTS
6421 -- end select;
6422
6423 -- Gigi restriction: This node never appears
6424
6425 -- N_Conditional_Entry_Call
6426 -- Sloc points to SELECT
6427 -- Entry_Call_Alternative (Node1)
6428 -- Else_Statements (List4)
6429
6430 --------------------------------
6431 -- 9.7.4 Asynchronous Select --
6432 --------------------------------
6433
6434 -- ASYNCHRONOUS_SELECT ::=
6435 -- select
6436 -- TRIGGERING_ALTERNATIVE
6437 -- then abort
6438 -- ABORTABLE_PART
6439 -- end select;
6440
6441 -- Note: asynchronous select is not permitted in Ada 83 mode
6442
6443 -- Gigi restriction: This node never appears
6444
6445 -- N_Asynchronous_Select
6446 -- Sloc points to SELECT
6447 -- Triggering_Alternative (Node1)
6448 -- Abortable_Part (Node2)
6449
6450 -----------------------------------
6451 -- 9.7.4 Triggering Alternative --
6452 -----------------------------------
6453
6454 -- TRIGGERING_ALTERNATIVE ::=
6455 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6456
6457 -- Gigi restriction: This node never appears
6458
6459 -- N_Triggering_Alternative
6460 -- Sloc points to first token of triggering statement
6461 -- Triggering_Statement (Node1)
6462 -- Statements (List3) (set to Empty_List if no statements)
6463 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6464
6465 ---------------------------------
6466 -- 9.7.4 Triggering Statement --
6467 ---------------------------------
6468
6469 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6470
6471 ---------------------------
6472 -- 9.7.4 Abortable Part --
6473 ---------------------------
6474
6475 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6476
6477 -- Gigi restriction: This node never appears
6478
6479 -- N_Abortable_Part
6480 -- Sloc points to ABORT
6481 -- Statements (List3)
6482
6483 --------------------------
6484 -- 9.8 Abort Statement --
6485 --------------------------
6486
6487 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6488
6489 -- Gigi restriction: This node never appears
6490
6491 -- N_Abort_Statement
6492 -- Sloc points to ABORT
6493 -- Names (List2)
6494
6495 -------------------------
6496 -- 10.1.1 Compilation --
6497 -------------------------
6498
6499 -- COMPILATION ::= {COMPILATION_UNIT}
6500
6501 -- There is no explicit node in the tree for a compilation, since in
6502 -- general the compiler is processing only a single compilation unit
6503 -- at a time. It is possible to parse multiple units in syntax check
6504 -- only mode, but the trees are discarded in that case.
6505
6506 ------------------------------
6507 -- 10.1.1 Compilation Unit --
6508 ------------------------------
6509
6510 -- COMPILATION_UNIT ::=
6511 -- CONTEXT_CLAUSE LIBRARY_ITEM
6512 -- | CONTEXT_CLAUSE SUBUNIT
6513
6514 -- The N_Compilation_Unit node itself represents the above syntax.
6515 -- However, there are two additional items not reflected in the above
6516 -- syntax. First we have the global declarations that are added by the
6517 -- code generator. These are outer level declarations (so they cannot
6518 -- be represented as being inside the units). An example is the wrapper
6519 -- subprograms that are created to do ABE checking. As always a list of
6520 -- declarations can contain actions as well (i.e. statements), and such
6521 -- statements are executed as part of the elaboration of the unit. Note
6522 -- that all such declarations are elaborated before the library unit.
6523
6524 -- Similarly, certain actions need to be elaborated at the completion
6525 -- of elaboration of the library unit (notably the statement that sets
6526 -- the Boolean flag indicating that elaboration is complete).
6527
6528 -- The third item not reflected in the syntax is pragmas that appear
6529 -- after the compilation unit. As always pragmas are a problem since
6530 -- they are not part of the formal syntax, but can be stuck into the
6531 -- source following a set of ad hoc rules, and we have to find an ad
6532 -- hoc way of sticking them into the tree. For pragmas that appear
6533 -- before the library unit, we just consider them to be part of the
6534 -- context clause, and pragmas can appear in the Context_Items list
6535 -- of the compilation unit. However, pragmas can also appear after
6536 -- the library item.
6537
6538 -- To deal with all these problems, we create an auxiliary node for
6539 -- a compilation unit, referenced from the N_Compilation_Unit node,
6540 -- that contains these items.
6541
6542 -- N_Compilation_Unit
6543 -- Sloc points to first token of defining unit name
6544 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6545 -- Context_Items (List1) context items and pragmas preceding unit
6546 -- Private_Present (Flag15) set if library unit has private keyword
6547 -- Unit (Node2) library item or subunit
6548 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6549 -- Has_No_Elaboration_Code (Flag17-Sem)
6550 -- Body_Required (Flag13-Sem) set for spec if body is required
6551 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6552 -- Context_Pending (Flag16-Sem)
6553 -- First_Inlined_Subprogram (Node3-Sem)
6554 -- Has_Pragma_Suppress_All (Flag14-Sem)
6555
6556 -- N_Compilation_Unit_Aux
6557 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6558 -- Declarations (List2) (set to No_List if no global declarations)
6559 -- Actions (List1) (set to No_List if no actions)
6560 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6561 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6562 -- Default_Storage_Pool (Node3-Sem)
6563
6564 --------------------------
6565 -- 10.1.1 Library Item --
6566 --------------------------
6567
6568 -- LIBRARY_ITEM ::=
6569 -- [private] LIBRARY_UNIT_DECLARATION
6570 -- | LIBRARY_UNIT_BODY
6571 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6572
6573 -- Note: PRIVATE is not allowed in Ada 83 mode
6574
6575 -- There is no explicit node in the tree for library item, instead
6576 -- the declaration or body, and the flag for private if present,
6577 -- appear in the N_Compilation_Unit node.
6578
6579 --------------------------------------
6580 -- 10.1.1 Library Unit Declaration --
6581 --------------------------------------
6582
6583 -- LIBRARY_UNIT_DECLARATION ::=
6584 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6585 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6586
6587 -----------------------------------------------
6588 -- 10.1.1 Library Unit Renaming Declaration --
6589 -----------------------------------------------
6590
6591 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6592 -- PACKAGE_RENAMING_DECLARATION
6593 -- | GENERIC_RENAMING_DECLARATION
6594 -- | SUBPROGRAM_RENAMING_DECLARATION
6595
6596 -------------------------------
6597 -- 10.1.1 Library unit body --
6598 -------------------------------
6599
6600 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6601
6602 ------------------------------
6603 -- 10.1.1 Parent Unit Name --
6604 ------------------------------
6605
6606 -- PARENT_UNIT_NAME ::= NAME
6607
6608 ----------------------------
6609 -- 10.1.2 Context clause --
6610 ----------------------------
6611
6612 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6613
6614 -- The context clause can include pragmas, and any pragmas that appear
6615 -- before the context clause proper (i.e. all configuration pragmas,
6616 -- also appear at the front of this list).
6617
6618 --------------------------
6619 -- 10.1.2 Context_Item --
6620 --------------------------
6621
6622 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6623
6624 -------------------------
6625 -- 10.1.2 With clause --
6626 -------------------------
6627
6628 -- WITH_CLAUSE ::=
6629 -- with library_unit_NAME {,library_unit_NAME};
6630
6631 -- A separate With clause is built for each name, so that we have
6632 -- a Corresponding_Spec field for each with'ed spec. The flags
6633 -- First_Name and Last_Name are used to reconstruct the exact
6634 -- source form. When a list of names appears in one with clause,
6635 -- the first name in the list has First_Name set, and the last
6636 -- has Last_Name set. If the with clause has only one name, then
6637 -- both of the flags First_Name and Last_Name are set in this name.
6638
6639 -- Note: in the case of implicit with's that are installed by the
6640 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6641 -- set to Standard_Location, but it is incorrect to test the Sloc
6642 -- to find out if a with clause is implicit, test the flag instead.
6643
6644 -- N_With_Clause
6645 -- Sloc points to first token of library unit name
6646 -- Withed_Body (Node1-Sem)
6647 -- Name (Node2)
6648 -- Next_Implicit_With (Node3-Sem)
6649 -- Library_Unit (Node4-Sem)
6650 -- Corresponding_Spec (Node5-Sem)
6651 -- First_Name (Flag5) (set to True if first name or only one name)
6652 -- Last_Name (Flag6) (set to True if last name or only one name)
6653 -- Context_Installed (Flag13-Sem)
6654 -- Elaborate_Present (Flag4-Sem)
6655 -- Elaborate_All_Present (Flag14-Sem)
6656 -- Elaborate_All_Desirable (Flag9-Sem)
6657 -- Elaborate_Desirable (Flag11-Sem)
6658 -- Private_Present (Flag15) set if with_clause has private keyword
6659 -- Implicit_With (Flag16-Sem)
6660 -- Implicit_With_From_Instantiation (Flag12-Sem)
6661 -- Limited_Present (Flag17) set if LIMITED is present
6662 -- Limited_View_Installed (Flag18-Sem)
6663 -- Unreferenced_In_Spec (Flag7-Sem)
6664 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6665
6666 -- Note: Limited_Present and Limited_View_Installed are used to support
6667 -- the implementation of Ada 2005 (AI-50217).
6668
6669 -- Similarly, Private_Present is used to support the implementation of
6670 -- Ada 2005 (AI-50262).
6671
6672 -- Note: if the WITH clause refers to a standard library unit, then a
6673 -- limited with clause is changed into a normal with clause, because we
6674 -- are not prepared to deal with limited with in the context of Rtsfind.
6675 -- So in this case, the Limited_Present flag will be False in the final
6676 -- tree. However, we do NOT do this transformation in ASIS mode, so for
6677 -- ASIS the flag will remain set in this situation.
6678
6679 ----------------------
6680 -- With_Type clause --
6681 ----------------------
6682
6683 -- This is a GNAT extension, used to implement mutually recursive
6684 -- types declared in different packages.
6685
6686 -- Note: this is now obsolete. The functionality of this construct
6687 -- is now implemented by the Ada 2005 limited_with_clause.
6688
6689 ---------------------
6690 -- 10.2 Body stub --
6691 ---------------------
6692
6693 -- BODY_STUB ::=
6694 -- SUBPROGRAM_BODY_STUB
6695 -- | PACKAGE_BODY_STUB
6696 -- | TASK_BODY_STUB
6697 -- | PROTECTED_BODY_STUB
6698
6699 ----------------------------------
6700 -- 10.1.3 Subprogram Body Stub --
6701 ----------------------------------
6702
6703 -- SUBPROGRAM_BODY_STUB ::=
6704 -- SUBPROGRAM_SPECIFICATION is separate
6705 -- [ASPECT_SPECIFICATION];
6706
6707 -- N_Subprogram_Body_Stub
6708 -- Sloc points to FUNCTION or PROCEDURE
6709 -- Specification (Node1)
6710 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6711 -- Library_Unit (Node4-Sem) points to the subunit
6712 -- Corresponding_Body (Node5-Sem)
6713
6714 -------------------------------
6715 -- 10.1.3 Package Body Stub --
6716 -------------------------------
6717
6718 -- PACKAGE_BODY_STUB ::=
6719 -- package body DEFINING_IDENTIFIER is separate
6720 -- [ASPECT_SPECIFICATION];
6721
6722 -- N_Package_Body_Stub
6723 -- Sloc points to PACKAGE
6724 -- Defining_Identifier (Node1)
6725 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6726 -- Library_Unit (Node4-Sem) points to the subunit
6727 -- Corresponding_Body (Node5-Sem)
6728
6729 ----------------------------
6730 -- 10.1.3 Task Body Stub --
6731 ----------------------------
6732
6733 -- TASK_BODY_STUB ::=
6734 -- task body DEFINING_IDENTIFIER is separate
6735 -- [ASPECT_SPECIFICATION];
6736
6737 -- N_Task_Body_Stub
6738 -- Sloc points to TASK
6739 -- Defining_Identifier (Node1)
6740 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6741 -- Library_Unit (Node4-Sem) points to the subunit
6742 -- Corresponding_Body (Node5-Sem)
6743
6744 ---------------------------------
6745 -- 10.1.3 Protected Body Stub --
6746 ---------------------------------
6747
6748 -- PROTECTED_BODY_STUB ::=
6749 -- protected body DEFINING_IDENTIFIER is separate
6750 -- [ASPECT_SPECIFICATION];
6751
6752 -- Note: protected body stubs are not allowed in Ada 83 mode
6753
6754 -- N_Protected_Body_Stub
6755 -- Sloc points to PROTECTED
6756 -- Defining_Identifier (Node1)
6757 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6758 -- Library_Unit (Node4-Sem) points to the subunit
6759 -- Corresponding_Body (Node5-Sem)
6760
6761 ---------------------
6762 -- 10.1.3 Subunit --
6763 ---------------------
6764
6765 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6766
6767 -- N_Subunit
6768 -- Sloc points to SEPARATE
6769 -- Name (Node2) is the name of the parent unit
6770 -- Proper_Body (Node1) is the subunit body
6771 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6772
6773 ---------------------------------
6774 -- 11.1 Exception Declaration --
6775 ---------------------------------
6776
6777 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6778 -- [ASPECT_SPECIFICATIONS];
6779
6780 -- For consistency with object declarations etc., the parser converts
6781 -- the case of multiple identifiers being declared to a series of
6782 -- declarations in which the expression is copied, using the More_Ids
6783 -- and Prev_Ids flags to remember the source form as described in the
6784 -- section on "Handling of Defining Identifier Lists".
6785
6786 -- N_Exception_Declaration
6787 -- Sloc points to EXCEPTION
6788 -- Defining_Identifier (Node1)
6789 -- Expression (Node3-Sem)
6790 -- Renaming_Exception (Node2-Sem)
6791 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6792 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6793
6794 ------------------------------------------
6795 -- 11.2 Handled Sequence Of Statements --
6796 ------------------------------------------
6797
6798 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6799 -- SEQUENCE_OF_STATEMENTS
6800 -- [exception
6801 -- EXCEPTION_HANDLER
6802 -- {EXCEPTION_HANDLER}]
6803 -- [at end
6804 -- cleanup_procedure_call (param, param, param, ...);]
6805
6806 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6807 -- used only internally currently, but is considered to be syntactic.
6808 -- At the moment, the only cleanup action allowed is a single call to
6809 -- a parameterless procedure, and the Identifier field of the node is
6810 -- the procedure to be called. The cleanup action occurs whenever the
6811 -- sequence of statements is left for any reason. The possible reasons
6812 -- are:
6813 -- 1. reaching the end of the sequence
6814 -- 2. exit, return, or goto
6815 -- 3. exception or abort
6816 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6817 -- entirely in the back end. In this case, a handled sequence of
6818 -- statements with an "at end" cannot also have exception handlers.
6819 -- For other back ends, such as gcc with front-end SJLJ, the
6820 -- implementation is split between the front end and back end; the front
6821 -- end implements 3, and the back end implements 1 and 2. In this case,
6822 -- if there is an "at end", the front end inserts the appropriate
6823 -- exception handler, and this handler takes precedence over "at end"
6824 -- in case of exception.
6825
6826 -- The inserted exception handler is of the form:
6827
6828 -- when all others =>
6829 -- cleanup;
6830 -- raise;
6831
6832 -- where cleanup is the procedure to be called. The reason we do this is
6833 -- so that the front end can handle the necessary entries in the
6834 -- exception tables, and other exception handler actions required as
6835 -- part of the normal handling for exception handlers.
6836
6837 -- The AT END cleanup handler protects only the sequence of statements
6838 -- (not the associated declarations of the parent), just like exception
6839 -- handlers. The big difference is that the cleanup procedure is called
6840 -- on either a normal or an abnormal exit from the statement sequence.
6841
6842 -- Note: the list of Exception_Handlers can contain pragmas as well
6843 -- as actual handlers. In practice these pragmas can only occur at
6844 -- the start of the list, since any pragmas occurring later on will
6845 -- be included in the statement list of the corresponding handler.
6846
6847 -- Note: although in the Ada syntax, the sequence of statements in
6848 -- a handled sequence of statements can only contain statements, we
6849 -- allow free mixing of declarations and statements in the resulting
6850 -- expanded tree. This is for example used to deal with the case of
6851 -- a cleanup procedure that must handle declarations as well as the
6852 -- statements of a block.
6853
6854 -- Note: the cleanup_procedure_call does not go through the common
6855 -- processing for calls, which in particular means that it will not be
6856 -- automatically inlined in all cases, even though the procedure to be
6857 -- called is marked inline. More specifically, if the procedure comes
6858 -- from another unit than the main source unit, for example a run-time
6859 -- unit, then it needs to be manually added to the list of bodies to be
6860 -- inlined by invoking Add_Inlined_Body on it.
6861
6862 -- N_Handled_Sequence_Of_Statements
6863 -- Sloc points to first token of first statement
6864 -- Statements (List3)
6865 -- End_Label (Node4) (set to Empty if expander generated)
6866 -- Exception_Handlers (List5) (set to No_List if none present)
6867 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6868 -- First_Real_Statement (Node2-Sem)
6869
6870 -- Note: the parent always contains a Declarations field which contains
6871 -- declarations associated with the handled sequence of statements. This
6872 -- is true even in the case of an accept statement (see description of
6873 -- the N_Accept_Statement node).
6874
6875 -- End_Label refers to the containing construct
6876
6877 -----------------------------
6878 -- 11.2 Exception Handler --
6879 -----------------------------
6880
6881 -- EXCEPTION_HANDLER ::=
6882 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6883 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6884 -- SEQUENCE_OF_STATEMENTS
6885
6886 -- Note: choice parameter specification is not allowed in Ada 83 mode
6887
6888 -- N_Exception_Handler
6889 -- Sloc points to WHEN
6890 -- Choice_Parameter (Node2) (set to Empty if not present)
6891 -- Exception_Choices (List4)
6892 -- Statements (List3)
6893 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6894 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6895 -- Local_Raise_Not_OK (Flag7-Sem)
6896 -- Has_Local_Raise (Flag8-Sem)
6897
6898 ------------------------------------------
6899 -- 11.2 Choice parameter specification --
6900 ------------------------------------------
6901
6902 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6903
6904 ----------------------------
6905 -- 11.2 Exception Choice --
6906 ----------------------------
6907
6908 -- EXCEPTION_CHOICE ::= exception_NAME | others
6909
6910 -- Except in the case of OTHERS, no explicit node appears in the tree
6911 -- for exception choice. Instead the exception name appears directly.
6912 -- An OTHERS choice is represented by a N_Others_Choice node (see
6913 -- section 3.8.1.
6914
6915 -- Note: for the exception choice created for an at end handler, the
6916 -- exception choice is an N_Others_Choice node with All_Others set.
6917
6918 ---------------------------
6919 -- 11.3 Raise Statement --
6920 ---------------------------
6921
6922 -- RAISE_STATEMENT ::= raise [exception_NAME];
6923
6924 -- In Ada 2005, we have
6925
6926 -- RAISE_STATEMENT ::=
6927 -- raise; | raise exception_NAME [with string_EXPRESSION];
6928
6929 -- N_Raise_Statement
6930 -- Sloc points to RAISE
6931 -- Name (Node2) (set to Empty if no exception name present)
6932 -- Expression (Node3) (set to Empty if no expression present)
6933 -- From_At_End (Flag4-Sem)
6934
6935 ----------------------------
6936 -- 11.3 Raise Expression --
6937 ----------------------------
6938
6939 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6940
6941 -- N_Raise_Expression
6942 -- Sloc points to RAISE
6943 -- Name (Node2) (always present)
6944 -- Expression (Node3) (set to Empty if no expression present)
6945 -- Convert_To_Return_False (Flag13-Sem)
6946 -- plus fields for expression
6947
6948 -------------------------------
6949 -- 12.1 Generic Declaration --
6950 -------------------------------
6951
6952 -- GENERIC_DECLARATION ::=
6953 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6954
6955 ------------------------------------------
6956 -- 12.1 Generic Subprogram Declaration --
6957 ------------------------------------------
6958
6959 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6960 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6961 -- [ASPECT_SPECIFICATIONS];
6962
6963 -- Note: Generic_Formal_Declarations can include pragmas
6964
6965 -- N_Generic_Subprogram_Declaration
6966 -- Sloc points to GENERIC
6967 -- Specification (Node1) subprogram specification
6968 -- Corresponding_Body (Node5-Sem)
6969 -- Generic_Formal_Declarations (List2) from generic formal part
6970 -- Parent_Spec (Node4-Sem)
6971
6972 ---------------------------------------
6973 -- 12.1 Generic Package Declaration --
6974 ---------------------------------------
6975
6976 -- GENERIC_PACKAGE_DECLARATION ::=
6977 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6978 -- [ASPECT_SPECIFICATIONS];
6979
6980 -- Note: when we do generics right, the Activation_Chain_Entity entry
6981 -- for this node can be removed (since the expander won't see generic
6982 -- units any more)???.
6983
6984 -- Note: Generic_Formal_Declarations can include pragmas
6985
6986 -- N_Generic_Package_Declaration
6987 -- Sloc points to GENERIC
6988 -- Specification (Node1) package specification
6989 -- Corresponding_Body (Node5-Sem)
6990 -- Generic_Formal_Declarations (List2) from generic formal part
6991 -- Parent_Spec (Node4-Sem)
6992 -- Activation_Chain_Entity (Node3-Sem)
6993
6994 -------------------------------
6995 -- 12.1 Generic Formal Part --
6996 -------------------------------
6997
6998 -- GENERIC_FORMAL_PART ::=
6999 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
7000
7001 ------------------------------------------------
7002 -- 12.1 Generic Formal Parameter Declaration --
7003 ------------------------------------------------
7004
7005 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
7006 -- FORMAL_OBJECT_DECLARATION
7007 -- | FORMAL_TYPE_DECLARATION
7008 -- | FORMAL_SUBPROGRAM_DECLARATION
7009 -- | FORMAL_PACKAGE_DECLARATION
7010
7011 ---------------------------------
7012 -- 12.3 Generic Instantiation --
7013 ---------------------------------
7014
7015 -- GENERIC_INSTANTIATION ::=
7016 -- package DEFINING_PROGRAM_UNIT_NAME is
7017 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
7018 -- [ASPECT_SPECIFICATIONS];
7019 -- | [[not] overriding]
7020 -- procedure DEFINING_PROGRAM_UNIT_NAME is
7021 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
7022 -- [ASPECT_SPECIFICATIONS];
7023 -- | [[not] overriding]
7024 -- function DEFINING_DESIGNATOR is
7025 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
7026 -- [ASPECT_SPECIFICATIONS];
7027
7028 -- N_Package_Instantiation
7029 -- Sloc points to PACKAGE
7030 -- Defining_Unit_Name (Node1)
7031 -- Name (Node2)
7032 -- Generic_Associations (List3) (set to No_List if no
7033 -- generic actual part)
7034 -- Parent_Spec (Node4-Sem)
7035 -- Instance_Spec (Node5-Sem)
7036 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7037 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7038 -- Is_Declaration_Level_Node (Flag5-Sem)
7039 -- Is_Recorded_Scenario (Flag6-Sem)
7040 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7041
7042 -- N_Procedure_Instantiation
7043 -- Sloc points to PROCEDURE
7044 -- Defining_Unit_Name (Node1)
7045 -- Name (Node2)
7046 -- Parent_Spec (Node4-Sem)
7047 -- Generic_Associations (List3) (set to No_List if no
7048 -- generic actual part)
7049 -- Instance_Spec (Node5-Sem)
7050 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7051 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7052 -- Is_Declaration_Level_Node (Flag5-Sem)
7053 -- Is_Recorded_Scenario (Flag6-Sem)
7054 -- Must_Override (Flag14) set if overriding indicator present
7055 -- Must_Not_Override (Flag15) set if not_overriding indicator present
7056 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7057
7058 -- N_Function_Instantiation
7059 -- Sloc points to FUNCTION
7060 -- Defining_Unit_Name (Node1)
7061 -- Name (Node2)
7062 -- Generic_Associations (List3) (set to No_List if no
7063 -- generic actual part)
7064 -- Parent_Spec (Node4-Sem)
7065 -- Instance_Spec (Node5-Sem)
7066 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7067 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7068 -- Is_Declaration_Level_Node (Flag5-Sem)
7069 -- Is_Recorded_Scenario (Flag6-Sem)
7070 -- Must_Override (Flag14) set if overriding indicator present
7071 -- Must_Not_Override (Flag15) set if not_overriding indicator present
7072 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7073
7074 -- Note: overriding indicator is an Ada 2005 feature
7075
7076 -------------------------------
7077 -- 12.3 Generic Actual Part --
7078 -------------------------------
7079
7080 -- GENERIC_ACTUAL_PART ::=
7081 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
7082
7083 -------------------------------
7084 -- 12.3 Generic Association --
7085 -------------------------------
7086
7087 -- GENERIC_ASSOCIATION ::=
7088 -- [generic_formal_parameter_SELECTOR_NAME =>]
7089
7090 -- Note: unlike the procedure call case, a generic association node
7091 -- is generated for every association, even if no formal parameter
7092 -- selector name is present. In this case the parser will leave the
7093 -- Selector_Name field set to Empty, to be filled in later by the
7094 -- semantic pass.
7095
7096 -- In Ada 2005, a formal may be associated with a box, if the
7097 -- association is part of the list of actuals for a formal package.
7098 -- If the association is given by OTHERS => <>, the association is
7099 -- an N_Others_Choice.
7100
7101 -- N_Generic_Association
7102 -- Sloc points to first token of generic association
7103 -- Selector_Name (Node2) (set to Empty if no formal
7104 -- parameter selector name)
7105 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
7106 -- Box_Present (Flag15) (for formal_package associations with a box)
7107
7108 ---------------------------------------------
7109 -- 12.3 Explicit Generic Actual Parameter --
7110 ---------------------------------------------
7111
7112 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
7113 -- EXPRESSION | variable_NAME | subprogram_NAME
7114 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
7115
7116 -------------------------------------
7117 -- 12.4 Formal Object Declaration --
7118 -------------------------------------
7119
7120 -- FORMAL_OBJECT_DECLARATION ::=
7121 -- DEFINING_IDENTIFIER_LIST :
7122 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
7123 -- [ASPECT_SPECIFICATIONS];
7124 -- | DEFINING_IDENTIFIER_LIST :
7125 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
7126 -- [ASPECT_SPECIFICATIONS];
7127
7128 -- Although the syntax allows multiple identifiers in the list, the
7129 -- semantics is as though successive declarations were given with
7130 -- identical type definition and expression components. To simplify
7131 -- semantic processing, the parser represents a multiple declaration
7132 -- case as a sequence of single declarations, using the More_Ids and
7133 -- Prev_Ids flags to preserve the original source form as described
7134 -- in the section on "Handling of Defining Identifier Lists".
7135
7136 -- N_Formal_Object_Declaration
7137 -- Sloc points to first identifier
7138 -- Defining_Identifier (Node1)
7139 -- In_Present (Flag15)
7140 -- Out_Present (Flag17)
7141 -- Null_Exclusion_Present (Flag11) (set to False if not present)
7142 -- Subtype_Mark (Node4) (set to Empty if not present)
7143 -- Access_Definition (Node3) (set to Empty if not present)
7144 -- Default_Expression (Node5) (set to Empty if no default expression)
7145 -- More_Ids (Flag5) (set to False if no more identifiers in list)
7146 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
7147
7148 -----------------------------------
7149 -- 12.5 Formal Type Declaration --
7150 -----------------------------------
7151
7152 -- FORMAL_TYPE_DECLARATION ::=
7153 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
7154 -- is FORMAL_TYPE_DEFINITION
7155 -- [ASPECT_SPECIFICATIONS];
7156 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
7157
7158 -- N_Formal_Type_Declaration
7159 -- Sloc points to TYPE
7160 -- Defining_Identifier (Node1)
7161 -- Formal_Type_Definition (Node3)
7162 -- Discriminant_Specifications (List4) (set to No_List if no
7163 -- discriminant part)
7164 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
7165
7166 ----------------------------------
7167 -- 12.5 Formal type definition --
7168 ----------------------------------
7169
7170 -- FORMAL_TYPE_DEFINITION ::=
7171 -- FORMAL_PRIVATE_TYPE_DEFINITION
7172 -- | FORMAL_DERIVED_TYPE_DEFINITION
7173 -- | FORMAL_DISCRETE_TYPE_DEFINITION
7174 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
7175 -- | FORMAL_MODULAR_TYPE_DEFINITION
7176 -- | FORMAL_FLOATING_POINT_DEFINITION
7177 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
7178 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
7179 -- | FORMAL_ARRAY_TYPE_DEFINITION
7180 -- | FORMAL_ACCESS_TYPE_DEFINITION
7181 -- | FORMAL_INTERFACE_TYPE_DEFINITION
7182 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
7183
7184 -- The Ada 2012 syntax introduces two new non-terminals:
7185 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
7186 -- the latter category. Here we introduce an incomplete type definition
7187 -- in order to preserve as much as possible the existing structure.
7188
7189 ---------------------------------------------
7190 -- 12.5.1 Formal Private Type Definition --
7191 ---------------------------------------------
7192
7193 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
7194 -- [[abstract] tagged] [limited] private
7195
7196 -- Note: TAGGED is not allowed in Ada 83 mode
7197
7198 -- N_Formal_Private_Type_Definition
7199 -- Sloc points to PRIVATE
7200 -- Uninitialized_Variable (Node3-Sem)
7201 -- Abstract_Present (Flag4)
7202 -- Tagged_Present (Flag15)
7203 -- Limited_Present (Flag17)
7204
7205 --------------------------------------------
7206 -- 12.5.1 Formal Derived Type Definition --
7207 --------------------------------------------
7208
7209 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
7210 -- [abstract] [limited | synchronized]
7211 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
7212 -- Note: this construct is not allowed in Ada 83 mode
7213
7214 -- N_Formal_Derived_Type_Definition
7215 -- Sloc points to NEW
7216 -- Subtype_Mark (Node4)
7217 -- Private_Present (Flag15)
7218 -- Abstract_Present (Flag4)
7219 -- Limited_Present (Flag17)
7220 -- Synchronized_Present (Flag7)
7221 -- Interface_List (List2) (set to No_List if none)
7222
7223 -----------------------------------------------
7224 -- 12.5.1 Formal Incomplete Type Definition --
7225 -----------------------------------------------
7226
7227 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
7228
7229 -- N_Formal_Incomplete_Type_Definition
7230 -- Sloc points to identifier of parent
7231 -- Tagged_Present (Flag15)
7232
7233 ---------------------------------------------
7234 -- 12.5.2 Formal Discrete Type Definition --
7235 ---------------------------------------------
7236
7237 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
7238
7239 -- N_Formal_Discrete_Type_Definition
7240 -- Sloc points to (
7241
7242 ---------------------------------------------------
7243 -- 12.5.2 Formal Signed Integer Type Definition --
7244 ---------------------------------------------------
7245
7246 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
7247
7248 -- N_Formal_Signed_Integer_Type_Definition
7249 -- Sloc points to RANGE
7250
7251 --------------------------------------------
7252 -- 12.5.2 Formal Modular Type Definition --
7253 --------------------------------------------
7254
7255 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
7256
7257 -- N_Formal_Modular_Type_Definition
7258 -- Sloc points to MOD
7259
7260 ----------------------------------------------
7261 -- 12.5.2 Formal Floating Point Definition --
7262 ----------------------------------------------
7263
7264 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
7265
7266 -- N_Formal_Floating_Point_Definition
7267 -- Sloc points to DIGITS
7268
7269 ----------------------------------------------------
7270 -- 12.5.2 Formal Ordinary Fixed Point Definition --
7271 ----------------------------------------------------
7272
7273 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
7274
7275 -- N_Formal_Ordinary_Fixed_Point_Definition
7276 -- Sloc points to DELTA
7277
7278 ---------------------------------------------------
7279 -- 12.5.2 Formal Decimal Fixed Point Definition --
7280 ---------------------------------------------------
7281
7282 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
7283
7284 -- Note: formal decimal fixed point definition not allowed in Ada 83
7285
7286 -- N_Formal_Decimal_Fixed_Point_Definition
7287 -- Sloc points to DELTA
7288
7289 ------------------------------------------
7290 -- 12.5.3 Formal Array Type Definition --
7291 ------------------------------------------
7292
7293 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
7294
7295 -------------------------------------------
7296 -- 12.5.4 Formal Access Type Definition --
7297 -------------------------------------------
7298
7299 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
7300
7301 ----------------------------------------------
7302 -- 12.5.5 Formal Interface Type Definition --
7303 ----------------------------------------------
7304
7305 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
7306
7307 -----------------------------------------
7308 -- 12.6 Formal Subprogram Declaration --
7309 -----------------------------------------
7310
7311 -- FORMAL_SUBPROGRAM_DECLARATION ::=
7312 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
7313 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
7314
7315 --------------------------------------------------
7316 -- 12.6 Formal Concrete Subprogram Declaration --
7317 --------------------------------------------------
7318
7319 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
7320 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
7321 -- [ASPECT_SPECIFICATIONS];
7322
7323 -- N_Formal_Concrete_Subprogram_Declaration
7324 -- Sloc points to WITH
7325 -- Specification (Node1)
7326 -- Default_Name (Node2) (set to Empty if no subprogram default)
7327 -- Box_Present (Flag15)
7328
7329 -- Note: if no subprogram default is present, then Name is set
7330 -- to Empty, and Box_Present is False.
7331
7332 --------------------------------------------------
7333 -- 12.6 Formal Abstract Subprogram Declaration --
7334 --------------------------------------------------
7335
7336 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
7337 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
7338 -- [ASPECT_SPECIFICATIONS];
7339
7340 -- N_Formal_Abstract_Subprogram_Declaration
7341 -- Sloc points to WITH
7342 -- Specification (Node1)
7343 -- Default_Name (Node2) (set to Empty if no subprogram default)
7344 -- Box_Present (Flag15)
7345
7346 -- Note: if no subprogram default is present, then Name is set
7347 -- to Empty, and Box_Present is False.
7348
7349 ------------------------------
7350 -- 12.6 Subprogram Default --
7351 ------------------------------
7352
7353 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
7354
7355 -- There is no separate node in the tree for a subprogram default.
7356 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
7357 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
7358 -- default name or box indication, as needed.
7359
7360 ------------------------
7361 -- 12.6 Default Name --
7362 ------------------------
7363
7364 -- DEFAULT_NAME ::= NAME
7365
7366 --------------------------------------
7367 -- 12.7 Formal Package Declaration --
7368 --------------------------------------
7369
7370 -- FORMAL_PACKAGE_DECLARATION ::=
7371 -- with package DEFINING_IDENTIFIER
7372 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
7373 -- [ASPECT_SPECIFICATIONS];
7374
7375 -- Note: formal package declarations not allowed in Ada 83 mode
7376
7377 -- N_Formal_Package_Declaration
7378 -- Sloc points to WITH
7379 -- Defining_Identifier (Node1)
7380 -- Name (Node2)
7381 -- Generic_Associations (List3) (set to No_List if (<>) case or
7382 -- empty generic actual part)
7383 -- Box_Present (Flag15)
7384 -- Instance_Spec (Node5-Sem)
7385
7386 --------------------------------------
7387 -- 12.7 Formal Package Actual Part --
7388 --------------------------------------
7389
7390 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7391 -- ([OTHERS] => <>)
7392 -- | [GENERIC_ACTUAL_PART]
7393 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7394
7395 -- FORMAL_PACKAGE_ASSOCIATION ::=
7396 -- GENERIC_ASSOCIATION
7397 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7398
7399 -- There is no explicit node in the tree for a formal package actual
7400 -- part. Instead the information appears in the parent node (i.e. the
7401 -- formal package declaration node itself).
7402
7403 -- There is no explicit node for a formal package association. All of
7404 -- them are represented either by a generic association, possibly with
7405 -- Box_Present, or by an N_Others_Choice.
7406
7407 ---------------------------------
7408 -- 13.1 Representation clause --
7409 ---------------------------------
7410
7411 -- REPRESENTATION_CLAUSE ::=
7412 -- ATTRIBUTE_DEFINITION_CLAUSE
7413 -- | ENUMERATION_REPRESENTATION_CLAUSE
7414 -- | RECORD_REPRESENTATION_CLAUSE
7415 -- | AT_CLAUSE
7416
7417 ----------------------
7418 -- 13.1 Local Name --
7419 ----------------------
7420
7421 -- LOCAL_NAME :=
7422 -- DIRECT_NAME
7423 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7424 -- | library_unit_NAME
7425
7426 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7427 -- as an attribute reference, which has essentially the same form.
7428
7429 ---------------------------------------
7430 -- 13.3 Attribute definition clause --
7431 ---------------------------------------
7432
7433 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7434 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7435 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7436
7437 -- In Ada 83, the expression must be a simple expression and the
7438 -- local name must be a direct name.
7439
7440 -- Note: the only attribute definition clause that is processed by
7441 -- gigi is an address clause. For all other cases, the information
7442 -- is extracted by the front end and either results in setting entity
7443 -- information, e.g. Esize for the Size clause, or in appropriate
7444 -- expansion actions (e.g. in the case of Storage_Size).
7445
7446 -- For an address clause, Gigi constructs the appropriate addressing
7447 -- code. It also ensures that no aliasing optimizations are made
7448 -- for the object for which the address clause appears.
7449
7450 -- Note: for an address clause used to achieve an overlay:
7451
7452 -- A : Integer;
7453 -- B : Integer;
7454 -- for B'Address use A'Address;
7455
7456 -- the above rule means that Gigi will ensure that no optimizations
7457 -- will be made for B that would violate the implementation advice
7458 -- of RM 13.3(19). However, this advice applies only to B and not
7459 -- to A, which seems unfortunate. The GNAT front end will mark the
7460 -- object A as volatile to also prevent unwanted optimization
7461 -- assumptions based on no aliasing being made for B.
7462
7463 -- N_Attribute_Definition_Clause
7464 -- Sloc points to FOR
7465 -- Name (Node2) the local name
7466 -- Chars (Name1) the identifier name from the attribute designator
7467 -- Expression (Node3) the expression or name
7468 -- Entity (Node4-Sem)
7469 -- Next_Rep_Item (Node5-Sem)
7470 -- From_At_Mod (Flag4-Sem)
7471 -- Check_Address_Alignment (Flag11-Sem)
7472 -- From_Aspect_Specification (Flag13-Sem)
7473 -- Is_Delayed_Aspect (Flag14-Sem)
7474 -- Address_Warning_Posted (Flag18-Sem)
7475
7476 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7477 -- aspect name, and Entity is resolved already to reference the entity
7478 -- to which the aspect applies.
7479
7480 -----------------------------------
7481 -- 13.3.1 Aspect Specifications --
7482 -----------------------------------
7483
7484 -- We modify the RM grammar here, the RM grammar is:
7485
7486 -- ASPECT_SPECIFICATION ::=
7487 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7488 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7489
7490 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7491
7492 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7493
7494 -- That's inconvenient, since there is no non-terminal name for a single
7495 -- entry in the list of aspects. So we use this grammar instead:
7496
7497 -- ASPECT_SPECIFICATIONS ::=
7498 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7499
7500 -- ASPECT_SPECIFICATION =>
7501 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7502
7503 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7504
7505 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7506
7507 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7508 -- aggregate with the elements of the aggregate corresponding to the
7509 -- successive arguments of the corresponding pragma.
7510
7511 -- See separate package Aspects for details on the incorporation of
7512 -- these nodes into the tree, and how aspect specifications for a given
7513 -- declaration node are associated with that node.
7514
7515 -- N_Aspect_Specification
7516 -- Sloc points to aspect identifier
7517 -- Identifier (Node1) aspect identifier
7518 -- Aspect_Rep_Item (Node2-Sem)
7519 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7520 -- Entity (Node4-Sem) entity to which the aspect applies
7521 -- Next_Rep_Item (Node5-Sem)
7522 -- Class_Present (Flag6) Set if 'Class present
7523 -- Is_Ignored (Flag9-Sem)
7524 -- Is_Checked (Flag11-Sem)
7525 -- Is_Delayed_Aspect (Flag14-Sem)
7526 -- Is_Disabled (Flag15-Sem)
7527 -- Is_Boolean_Aspect (Flag16-Sem)
7528 -- Split_PPC (Flag17) Set if split pre/post attribute
7529
7530 -- Note: Aspect_Specification is an Ada 2012 feature
7531
7532 -- Note: The Identifier serves to identify the aspect involved (it
7533 -- is the aspect whose name corresponds to the Chars field). This
7534 -- means that the other fields of this identifier are unused, and
7535 -- in particular we use the Entity field of this identifier to save
7536 -- a copy of the expression for visibility analysis, see spec of
7537 -- Sem_Ch13 for full details of this usage.
7538
7539 -- In the case of aspects of the form xxx'Class, the aspect identifier
7540 -- is for xxx, and Class_Present is set to True.
7541
7542 -- Note: When a Pre or Post aspect specification is processed, it is
7543 -- broken into AND THEN sections. The left most section has Split_PPC
7544 -- set to False, indicating that it is the original specification (e.g.
7545 -- for posting errors). For the other sections, Split_PPC is set True.
7546
7547 ---------------------------------------------
7548 -- 13.4 Enumeration representation clause --
7549 ---------------------------------------------
7550
7551 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7552 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7553
7554 -- In Ada 83, the name must be a direct name
7555
7556 -- N_Enumeration_Representation_Clause
7557 -- Sloc points to FOR
7558 -- Identifier (Node1) direct name
7559 -- Array_Aggregate (Node3)
7560 -- Next_Rep_Item (Node5-Sem)
7561
7562 ---------------------------------
7563 -- 13.4 Enumeration aggregate --
7564 ---------------------------------
7565
7566 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7567
7568 ------------------------------------------
7569 -- 13.5.1 Record representation clause --
7570 ------------------------------------------
7571
7572 -- RECORD_REPRESENTATION_CLAUSE ::=
7573 -- for first_subtype_LOCAL_NAME use
7574 -- record [MOD_CLAUSE]
7575 -- {COMPONENT_CLAUSE}
7576 -- end record;
7577
7578 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7579 -- replaced by a corresponding Alignment attribute definition clause).
7580
7581 -- Note: Component_Clauses can include pragmas
7582
7583 -- N_Record_Representation_Clause
7584 -- Sloc points to FOR
7585 -- Identifier (Node1) direct name
7586 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7587 -- Component_Clauses (List3)
7588 -- Next_Rep_Item (Node5-Sem)
7589
7590 ------------------------------
7591 -- 13.5.1 Component clause --
7592 ------------------------------
7593
7594 -- COMPONENT_CLAUSE ::=
7595 -- component_LOCAL_NAME at POSITION
7596 -- range FIRST_BIT .. LAST_BIT;
7597
7598 -- N_Component_Clause
7599 -- Sloc points to AT
7600 -- Component_Name (Node1) points to Name or Attribute_Reference
7601 -- Position (Node2)
7602 -- First_Bit (Node3)
7603 -- Last_Bit (Node4)
7604
7605 ----------------------
7606 -- 13.5.1 Position --
7607 ----------------------
7608
7609 -- POSITION ::= static_EXPRESSION
7610
7611 -----------------------
7612 -- 13.5.1 First_Bit --
7613 -----------------------
7614
7615 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7616
7617 ----------------------
7618 -- 13.5.1 Last_Bit --
7619 ----------------------
7620
7621 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7622
7623 --------------------------
7624 -- 13.8 Code statement --
7625 --------------------------
7626
7627 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7628
7629 -- Note: in GNAT, the qualified expression has the form
7630
7631 -- Asm_Insn'(Asm (...));
7632
7633 -- See package System.Machine_Code in file s-maccod.ads for details on
7634 -- the allowed parameters to Asm. There are two ways this node can
7635 -- arise, as a code statement, in which case the expression is the
7636 -- qualified expression, or as a result of the expansion of an intrinsic
7637 -- call to the Asm or Asm_Input procedure.
7638
7639 -- N_Code_Statement
7640 -- Sloc points to first token of the expression
7641 -- Expression (Node3)
7642
7643 -- Note: package Exp_Code contains an abstract functional interface
7644 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7645
7646 ------------------------
7647 -- 13.12 Restriction --
7648 ------------------------
7649
7650 -- RESTRICTION ::=
7651 -- restriction_IDENTIFIER
7652 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7653
7654 -- There is no explicit node for restrictions. Instead the restriction
7655 -- appears in normal pragma syntax as a pragma argument association,
7656 -- which has the same syntactic form.
7657
7658 --------------------------
7659 -- B.2 Shift Operators --
7660 --------------------------
7661
7662 -- Calls to the intrinsic shift functions are converted to one of
7663 -- the following shift nodes, which have the form of normal binary
7664 -- operator names. Note that for a given shift operation, one node
7665 -- covers all possible types, as for normal operators.
7666
7667 -- Note: it is perfectly permissible for the expander to generate
7668 -- shift operation nodes directly, in which case they will be analyzed
7669 -- and parsed in the usual manner.
7670
7671 -- Sprint syntax: shift-function-name!(expr, count)
7672
7673 -- Note: the Left_Opnd field holds the first argument (the value to
7674 -- be shifted). The Right_Opnd field holds the second argument (the
7675 -- shift count). The Chars field is the name of the intrinsic function.
7676
7677 -- N_Op_Rotate_Left
7678 -- Sloc points to the function name
7679 -- plus fields for binary operator
7680 -- plus fields for expression
7681 -- Shift_Count_OK (Flag4-Sem)
7682
7683 -- N_Op_Rotate_Right
7684 -- Sloc points to the function name
7685 -- plus fields for binary operator
7686 -- plus fields for expression
7687 -- Shift_Count_OK (Flag4-Sem)
7688
7689 -- N_Op_Shift_Left
7690 -- Sloc points to the function name
7691 -- plus fields for binary operator
7692 -- plus fields for expression
7693 -- Shift_Count_OK (Flag4-Sem)
7694
7695 -- N_Op_Shift_Right_Arithmetic
7696 -- Sloc points to the function name
7697 -- plus fields for binary operator
7698 -- plus fields for expression
7699 -- Shift_Count_OK (Flag4-Sem)
7700
7701 -- N_Op_Shift_Right
7702 -- Sloc points to the function name
7703 -- plus fields for binary operator
7704 -- plus fields for expression
7705 -- Shift_Count_OK (Flag4-Sem)
7706
7707 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7708 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7709
7710 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7711 -- always less than the word size if Modify_Tree_For_C mode is set.
7712
7713 --------------------------
7714 -- Obsolescent Features --
7715 --------------------------
7716
7717 -- The syntax descriptions and tree nodes for obsolescent features are
7718 -- grouped together, corresponding to their location in appendix I in
7719 -- the RM. However, parsing and semantic analysis for these constructs
7720 -- is located in an appropriate chapter (see individual notes).
7721
7722 ---------------------------
7723 -- J.3 Delta Constraint --
7724 ---------------------------
7725
7726 -- Note: the parse routine for this construct is located in section
7727 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7728 -- where delta constraint logically belongs.
7729
7730 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7731
7732 -- N_Delta_Constraint
7733 -- Sloc points to DELTA
7734 -- Delta_Expression (Node3)
7735 -- Range_Constraint (Node4) (set to Empty if not present)
7736
7737 --------------------
7738 -- J.7 At Clause --
7739 --------------------
7740
7741 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7742
7743 -- Note: the parse routine for this construct is located in Par-Ch13,
7744 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7745 -- belongs if it were not obsolescent.
7746
7747 -- Note: in Ada 83 the expression must be a simple expression
7748
7749 -- Gigi restriction: This node never appears, it is rewritten as an
7750 -- address attribute definition clause.
7751
7752 -- N_At_Clause
7753 -- Sloc points to FOR
7754 -- Identifier (Node1)
7755 -- Expression (Node3)
7756
7757 ---------------------
7758 -- J.8 Mod clause --
7759 ---------------------
7760
7761 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7762
7763 -- Note: the parse routine for this construct is located in Par-Ch13,
7764 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7765 -- belongs if it were not obsolescent.
7766
7767 -- Note: in Ada 83, the expression must be a simple expression
7768
7769 -- Gigi restriction: this node never appears. It is replaced
7770 -- by a corresponding Alignment attribute definition clause.
7771
7772 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7773 -- its name has "clause" in it. This is rather strange, but is quite
7774 -- definitely specified. The pragmas before are collected in the
7775 -- Pragmas_Before field of the mod clause node itself, and pragmas
7776 -- after are simply swallowed up in the list of component clauses.
7777
7778 -- N_Mod_Clause
7779 -- Sloc points to AT
7780 -- Expression (Node3)
7781 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7782
7783 --------------------
7784 -- Semantic Nodes --
7785 --------------------
7786
7787 -- These semantic nodes are used to hold additional semantic information.
7788 -- They are inserted into the tree as a result of semantic processing.
7789 -- Although there are no legitimate source syntax constructions that
7790 -- correspond directly to these nodes, we need a source syntax for the
7791 -- reconstructed tree printed by Sprint, and the node descriptions here
7792 -- show this syntax.
7793
7794 -----------------
7795 -- Call_Marker --
7796 -----------------
7797
7798 -- This node is created during the analysis/resolution of entry calls,
7799 -- requeues, and subprogram calls. It performs several functions:
7800
7801 -- * Call markers provide a uniform model for handling calls by the
7802 -- ABE mechanism, regardless of whether expansion took place.
7803
7804 -- * The call marker captures the target of the related call along
7805 -- with other attributes which are either unavailabe or expensive
7806 -- to recompute once analysis, resolution, and expansion are over.
7807
7808 -- * The call marker aids the ABE Processing phase by signaling the
7809 -- presence of a call in case the original call was transformed by
7810 -- expansion.
7811
7812 -- * The call marker acts as a reference point for the insertion of
7813 -- run-time conditional ABE checks or guaranteed ABE failures.
7814
7815 -- Sprint syntax: #target#
7816
7817 -- The Sprint syntax shown above is not enabled by default
7818
7819 -- N_Call_Marker
7820 -- Sloc points to Sloc of original call
7821 -- Target (Node1-Sem)
7822 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7823 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7824 -- Is_Dispatching_Call (Flag3-Sem)
7825 -- Is_Source_Call (Flag4-Sem)
7826 -- Is_Declaration_Level_Node (Flag5-Sem)
7827 -- Is_Recorded_Scenario (Flag6-Sem)
7828 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7829
7830 ------------------------
7831 -- Compound Statement --
7832 ------------------------
7833
7834 -- This node is created by the analyzer/expander to handle some
7835 -- expansion cases where a sequence of actions needs to be captured
7836 -- within a single node (which acts as a container and allows the
7837 -- entire list of actions to be moved around as a whole) appearing
7838 -- in a sequence of statements.
7839
7840 -- This is the statement counterpart to the expression node
7841 -- N_Expression_With_Actions.
7842
7843 -- The required semantics is that the set of actions is executed in
7844 -- the order in which it appears, as though they appeared by themselves
7845 -- in the enclosing list of declarations or statements. Unlike what
7846 -- happens when using an N_Block_Statement, no new scope is introduced.
7847
7848 -- Note: for the time being, this is used only as a transient
7849 -- representation during expansion, and all compound statement nodes
7850 -- must be exploded back to their constituent statements before handing
7851 -- the tree to the back end.
7852
7853 -- Sprint syntax: do
7854 -- action;
7855 -- action;
7856 -- ...
7857 -- action;
7858 -- end;
7859
7860 -- N_Compound_Statement
7861 -- Actions (List1)
7862
7863 --------------
7864 -- Contract --
7865 --------------
7866
7867 -- This node is used to hold the various parts of an entry, subprogram
7868 -- [body] or package [body] contract, in particular:
7869 -- Abstract states declared by a package declaration
7870 -- Contract cases that apply to a subprogram
7871 -- Dependency relations of inputs and output of a subprogram
7872 -- Global annotations classifying data as input or output
7873 -- Initialization sequences for a package declaration
7874 -- Pre- and postconditions that apply to a subprogram
7875
7876 -- The node appears in an entry and [generic] subprogram [body] entity.
7877
7878 -- Sprint syntax: <none> as the node should not appear in the tree, but
7879 -- only attached to an entry or [generic] subprogram
7880 -- entity.
7881
7882 -- N_Contract
7883 -- Sloc points to the subprogram's name
7884 -- Pre_Post_Conditions (Node1-Sem) (set to Empty if none)
7885 -- Contract_Test_Cases (Node2-Sem) (set to Empty if none)
7886 -- Classifications (Node3-Sem) (set to Empty if none)
7887 -- Is_Expanded_Contract (Flag1-Sem)
7888
7889 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7890 -- to pre- and postconditions associated with an entry or a subprogram
7891 -- [body or stub]. The pragmas can either come from source or be the
7892 -- byproduct of aspect expansion. Currently the following pragmas appear
7893 -- in this list:
7894 -- Post
7895 -- Postcondition
7896 -- Pre
7897 -- Precondition
7898 -- Refined_Post
7899 -- The ordering in the list is in LIFO fashion.
7900
7901 -- Note that there might be multiple preconditions or postconditions
7902 -- in this list, either because they come from separate pragmas in the
7903 -- source, or because a Pre (resp. Post) aspect specification has been
7904 -- broken into AND THEN sections. See Split_PPC for details.
7905
7906 -- In GNATprove mode, the inherited classwide pre- and postconditions
7907 -- (suitably specialized for the specific type of the overriding
7908 -- operation) are also in this list.
7909
7910 -- Contract_Test_Cases contains a collection of pragmas that correspond
7911 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
7912 -- list is in LIFO fashion.
7913
7914 -- Classifications contains pragmas that either declare, categorize or
7915 -- establish dependencies between subprogram or package inputs and
7916 -- outputs. Currently the following pragmas appear in this list:
7917 -- Abstract_States
7918 -- Async_Readers
7919 -- Async_Writers
7920 -- Constant_After_Elaboration
7921 -- Depends
7922 -- Effective_Reads
7923 -- Effective_Writes
7924 -- Extensions_Visible
7925 -- Global
7926 -- Initial_Condition
7927 -- Initializes
7928 -- Part_Of
7929 -- Refined_Depends
7930 -- Refined_Global
7931 -- Refined_States
7932 -- Volatile_Function
7933 -- The ordering is in LIFO fashion.
7934
7935 -------------------
7936 -- Expanded Name --
7937 -------------------
7938
7939 -- The N_Expanded_Name node is used to represent a selected component
7940 -- name that has been resolved to an expanded name. The semantic phase
7941 -- replaces N_Selected_Component nodes that represent names by the use
7942 -- of this node, leaving the N_Selected_Component node used only when
7943 -- the prefix is a record or protected type.
7944
7945 -- The fields of the N_Expanded_Name node are layed out identically
7946 -- to those of the N_Selected_Component node, allowing conversion of
7947 -- an expanded name node to a selected component node to be done
7948 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7949
7950 -- There is no special sprint syntax for an expanded name
7951
7952 -- N_Expanded_Name
7953 -- Sloc points to the period
7954 -- Chars (Name1) copy of Chars field of selector name
7955 -- Prefix (Node3)
7956 -- Selector_Name (Node2)
7957 -- Entity (Node4-Sem)
7958 -- Associated_Node (Node4-Sem)
7959 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7960 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7961 -- Has_Private_View (Flag11-Sem) set in generic units
7962 -- Redundant_Use (Flag13-Sem)
7963 -- Atomic_Sync_Required (Flag14-Sem)
7964 -- plus fields for expression
7965
7966 -----------------------------
7967 -- Expression With Actions --
7968 -----------------------------
7969
7970 -- This node is created by the analyzer/expander to handle some
7971 -- expansion cases, notably short-circuit forms where there are
7972 -- actions associated with the right-hand side operand.
7973
7974 -- The N_Expression_With_Actions node represents an expression with
7975 -- an associated set of actions (which are executable statements and
7976 -- declarations, as might occur in a handled statement sequence).
7977
7978 -- The required semantics is that the set of actions is executed in
7979 -- the order in which it appears just before the expression is
7980 -- evaluated (and these actions must only be executed if the value
7981 -- of the expression is evaluated). The node is considered to be
7982 -- a subexpression, whose value is the value of the Expression after
7983 -- executing all the actions.
7984
7985 -- If the actions contain declarations, then these declarations may
7986 -- be referenced within the expression. However note that there is
7987 -- no proper scope associated with the expression-with-action, so the
7988 -- back-end will elaborate them in the context of the enclosing scope.
7989
7990 -- Sprint syntax: do
7991 -- action;
7992 -- action;
7993 -- ...
7994 -- action;
7995 -- in expression end
7996
7997 -- N_Expression_With_Actions
7998 -- Actions (List1)
7999 -- Expression (Node3)
8000 -- plus fields for expression
8001
8002 -- Note: In the final generated tree presented to the code generator,
8003 -- the actions list is always non-null, since there is no point in this
8004 -- node if the actions are Empty. During semantic analysis there are
8005 -- cases where it is convenient to temporarily generate an empty actions
8006 -- list. This arises in cases where we create such an empty actions
8007 -- list, and it may or may not end up being a place where additional
8008 -- actions are inserted. The expander removes such empty cases after
8009 -- the expression of the node is fully analyzed and expanded, at which
8010 -- point it is safe to remove it, since no more actions can be inserted.
8011
8012 -- Note: In Modify_Tree_For_C, we never generate any declarations in
8013 -- the action list, which can contain only non-declarative statements.
8014
8015 --------------------
8016 -- Free Statement --
8017 --------------------
8018
8019 -- The N_Free_Statement node is generated as a result of a call to an
8020 -- instantiation of Unchecked_Deallocation. The instantiation of this
8021 -- generic is handled specially and generates this node directly.
8022
8023 -- Sprint syntax: free expression
8024
8025 -- N_Free_Statement
8026 -- Sloc is copied from the unchecked deallocation call
8027 -- Expression (Node3) argument to unchecked deallocation call
8028 -- Storage_Pool (Node1-Sem)
8029 -- Procedure_To_Call (Node2-Sem)
8030 -- Actual_Designated_Subtype (Node4-Sem)
8031
8032 -- Note: in the case where a debug source file is generated, the Sloc
8033 -- for this node points to the FREE keyword in the Sprint file output.
8034
8035 -------------------
8036 -- Freeze Entity --
8037 -------------------
8038
8039 -- This node marks the point in a declarative part at which an entity
8040 -- declared therein becomes frozen. The expander places initialization
8041 -- procedures for types at those points. Gigi uses the freezing point
8042 -- to elaborate entities that may depend on previous private types.
8043
8044 -- See the section in Einfo "Delayed Freezing and Elaboration" for
8045 -- a full description of the use of this node.
8046
8047 -- The Entity field points back to the entity for the type (whose
8048 -- Freeze_Node field points back to this freeze node).
8049
8050 -- The Actions field contains a list of declarations and statements
8051 -- generated by the expander which are associated with the freeze
8052 -- node, and are elaborated as though the freeze node were replaced
8053 -- by this sequence of actions.
8054
8055 -- Note: the Sloc field in the freeze node references a construct
8056 -- associated with the freezing point. This is used for posting
8057 -- messages in some error/warning situations, e.g. the case where
8058 -- a primitive operation of a tagged type is declared too late.
8059
8060 -- Sprint syntax: freeze entity-name [
8061 -- freeze actions
8062 -- ]
8063
8064 -- N_Freeze_Entity
8065 -- Sloc points near freeze point (see above special note)
8066 -- Entity (Node4-Sem)
8067 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
8068 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
8069 -- Actions (List1) (set to No_List if no freeze actions)
8070 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
8071
8072 -- The Actions field holds actions associated with the freeze. These
8073 -- actions are elaborated at the point where the type is frozen.
8074
8075 -- Note: in the case where a debug source file is generated, the Sloc
8076 -- for this node points to the FREEZE keyword in the Sprint file output.
8077
8078 ---------------------------
8079 -- Freeze Generic Entity --
8080 ---------------------------
8081
8082 -- The freeze point of an entity indicates the point at which the
8083 -- information needed to generate code for the entity is complete.
8084 -- The freeze node for an entity triggers expander activities, such as
8085 -- build initialization procedures, and backend activities, such as
8086 -- completing the elaboration of packages.
8087
8088 -- For entities declared within a generic unit, for which no code is
8089 -- generated, the freeze point is not equally meaningful. However, in
8090 -- Ada 2012 several semantic checks on declarations must be delayed to
8091 -- the freeze point, and we need to include such a mark in the tree to
8092 -- trigger these checks. The Freeze_Generic_Entity node plays no other
8093 -- role, and is ignored by the expander and the back-end.
8094
8095 -- Sprint syntax: freeze_generic entity-name
8096
8097 -- N_Freeze_Generic_Entity
8098 -- Sloc points near freeze point
8099 -- Entity (Node4-Sem)
8100
8101 --------------------------------
8102 -- Implicit Label Declaration --
8103 --------------------------------
8104
8105 -- An implicit label declaration is created for every occurrence of a
8106 -- label on a statement or a label on a block or loop. It is chained
8107 -- in the declarations of the innermost enclosing block as specified
8108 -- in RM section 5.1 (3).
8109
8110 -- The Defining_Identifier is the actual identifier for the statement
8111 -- identifier. Note that the occurrence of the label is a reference, NOT
8112 -- the defining occurrence. The defining occurrence occurs at the head
8113 -- of the innermost enclosing block, and is represented by this node.
8114
8115 -- Note: from the grammar, this might better be called an implicit
8116 -- statement identifier declaration, but the term we choose seems
8117 -- friendlier, since at least informally statement identifiers are
8118 -- called labels in both cases (i.e. when used in labels, and when
8119 -- used as the identifiers of blocks and loops).
8120
8121 -- Note: although this is logically a semantic node, since it does not
8122 -- correspond directly to a source syntax construction, these nodes are
8123 -- actually created by the parser in a post pass done just after parsing
8124 -- is complete, before semantic analysis is started (see Par.Labl).
8125
8126 -- Sprint syntax: labelname : label;
8127
8128 -- N_Implicit_Label_Declaration
8129 -- Sloc points to the << token for a statement identifier, or to the
8130 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
8131 -- Defining_Identifier (Node1)
8132 -- Label_Construct (Node2-Sem)
8133
8134 -- Note: in the case where a debug source file is generated, the Sloc
8135 -- for this node points to the label name in the generated declaration.
8136
8137 ---------------------
8138 -- Itype Reference --
8139 ---------------------
8140
8141 -- This node is used to create a reference to an Itype. The only purpose
8142 -- is to make sure the Itype is defined if this is the first reference.
8143
8144 -- A typical use of this node is when an Itype is to be referenced in
8145 -- two branches of an IF statement. In this case it is important that
8146 -- the first use of the Itype not be inside the conditional, since then
8147 -- it might not be defined if the other branch of the IF is taken, in
8148 -- the case where the definition generates elaboration code.
8149
8150 -- The Itype field points to the referenced Itype
8151
8152 -- Sprint syntax: reference itype-name
8153
8154 -- N_Itype_Reference
8155 -- Sloc points to the node generating the reference
8156 -- Itype (Node1-Sem)
8157
8158 -- Note: in the case where a debug source file is generated, the Sloc
8159 -- for this node points to the REFERENCE keyword in the file output.
8160
8161 ---------------------
8162 -- Raise xxx Error --
8163 ---------------------
8164
8165 -- One of these nodes is created during semantic analysis to replace
8166 -- a node for an expression that is determined to definitely raise
8167 -- the corresponding exception.
8168
8169 -- The N_Raise_xxx_Error node may also stand alone in place
8170 -- of a declaration or statement, in which case it simply causes
8171 -- the exception to be raised (i.e. it is equivalent to a raise
8172 -- statement that raises the corresponding exception). This use
8173 -- is distinguished by the fact that the Etype in this case is
8174 -- Standard_Void_Type; in the subexpression case, the Etype is the
8175 -- same as the type of the subexpression which it replaces.
8176
8177 -- If Condition is empty, then the raise is unconditional. If the
8178 -- Condition field is non-empty, it is a boolean expression which is
8179 -- first evaluated, and the exception is raised only if the value of the
8180 -- expression is True. In the unconditional case, the creation of this
8181 -- node is usually accompanied by a warning message (unless it appears
8182 -- within the right operand of a short-circuit form whose left argument
8183 -- is static and decisively eliminates elaboration of the raise
8184 -- operation). The condition field can ONLY be present when the node is
8185 -- used as a statement form; it must NOT be present in the case where
8186 -- the node appears within an expression.
8187
8188 -- The exception is generated with a message that contains the
8189 -- file name and line number, and then appended text. The Reason
8190 -- code shows the text to be added. The Reason code is an element
8191 -- of the type Types.RT_Exception_Code, and indicates both the
8192 -- message to be added, and the exception to be raised (which must
8193 -- match the node type). The value is stored by storing a Uint which
8194 -- is the Pos value of the enumeration element in this type.
8195
8196 -- Gigi restriction: This expander ensures that the type of the
8197 -- Condition field is always Standard.Boolean, even if the type
8198 -- in the source is some non-standard boolean type.
8199
8200 -- Sprint syntax: [xxx_error "msg"]
8201 -- or: [xxx_error when condition "msg"]
8202
8203 -- N_Raise_Constraint_Error
8204 -- Sloc references related construct
8205 -- Condition (Node1) (set to Empty if no condition)
8206 -- Reason (Uint3)
8207 -- plus fields for expression
8208
8209 -- N_Raise_Program_Error
8210 -- Sloc references related construct
8211 -- Condition (Node1) (set to Empty if no condition)
8212 -- Reason (Uint3)
8213 -- plus fields for expression
8214
8215 -- N_Raise_Storage_Error
8216 -- Sloc references related construct
8217 -- Condition (Node1) (set to Empty if no condition)
8218 -- Reason (Uint3)
8219 -- plus fields for expression
8220
8221 -- Note: Sloc is copied from the expression generating the exception.
8222 -- In the case where a debug source file is generated, the Sloc for
8223 -- this node points to the left bracket in the Sprint file output.
8224
8225 -- Note: the back end may be required to translate these nodes into
8226 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
8227
8228 ---------------------------------------------
8229 -- Optimization of Exception Raise to Goto --
8230 ---------------------------------------------
8231
8232 -- In some cases, the front end will determine that any exception raised
8233 -- by the back end for a certain exception should be transformed into a
8234 -- goto statement.
8235
8236 -- There are three kinds of exceptions raised by the back end (note that
8237 -- for this purpose we consider gigi to be part of the back end in the
8238 -- gcc case):
8239
8240 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
8241 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
8242 -- 3. Other cases not specifically marked by the front end
8243
8244 -- Normally all such exceptions are translated into calls to the proper
8245 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
8246 -- and the exception message.
8247
8248 -- The front end may determine that for a particular sequence of code,
8249 -- exceptions in any of these three categories for a particular builtin
8250 -- exception should result in a goto, rather than a call to Rcheck_xx.
8251 -- The exact sequence to be generated is:
8252
8253 -- Local_Raise (exception'Identity);
8254 -- goto Label
8255
8256 -- The front end marks such a sequence of code by bracketing it with
8257 -- push and pop nodes:
8258
8259 -- N_Push_xxx_Label (referencing the label)
8260 -- ...
8261 -- (code where transformation is expected for exception xxx)
8262 -- ...
8263 -- N_Pop_xxx_Label
8264
8265 -- The use of push/pop reflects the fact that such regions can properly
8266 -- nest, and one special case is a subregion in which no transformation
8267 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
8268 -- Exception_Label field is Empty.
8269
8270 -- N_Push_Constraint_Error_Label
8271 -- Sloc references first statement in region covered
8272 -- Exception_Label (Node5-Sem)
8273
8274 -- N_Push_Program_Error_Label
8275 -- Sloc references first statement in region covered
8276 -- Exception_Label (Node5-Sem)
8277
8278 -- N_Push_Storage_Error_Label
8279 -- Sloc references first statement in region covered
8280 -- Exception_Label (Node5-Sem)
8281
8282 -- N_Pop_Constraint_Error_Label
8283 -- Sloc references last statement in region covered
8284
8285 -- N_Pop_Program_Error_Label
8286 -- Sloc references last statement in region covered
8287
8288 -- N_Pop_Storage_Error_Label
8289 -- Sloc references last statement in region covered
8290
8291 ---------------
8292 -- Reference --
8293 ---------------
8294
8295 -- For a number of purposes, we need to construct references to objects.
8296 -- These references are subsequently treated as normal access values.
8297 -- An example is the construction of the parameter block passed to a
8298 -- task entry. The N_Reference node is provided for this purpose. It is
8299 -- similar in effect to the use of the Unrestricted_Access attribute,
8300 -- and like Unrestricted_Access can be applied to objects which would
8301 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
8302 -- objects which are not aliased, and slices). In addition it can be
8303 -- applied to composite type values as well as objects, including string
8304 -- values and aggregates.
8305
8306 -- Note: we use the Prefix field for this expression so that the
8307 -- resulting node can be treated using common code with the attribute
8308 -- nodes for the 'Access and related attributes. Logically it would make
8309 -- more sense to call it an Expression field, but then we would have to
8310 -- special case the treatment of the N_Reference node.
8311
8312 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
8313 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
8314 -- a temporary initialized to a N_Reference node in order to eliminate
8315 -- superfluous access checks.
8316
8317 -- Sprint syntax: prefix'reference
8318
8319 -- N_Reference
8320 -- Sloc is copied from the expression
8321 -- Prefix (Node3)
8322 -- plus fields for expression
8323
8324 -- Note: in the case where a debug source file is generated, the Sloc
8325 -- for this node points to the quote in the Sprint file output.
8326
8327 ----------------
8328 -- SCIL Nodes --
8329 ----------------
8330
8331 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
8332 -- is active. They are only generated if SCIL generation is enabled.
8333 -- A standard tree-walk will not encounter these nodes even if they
8334 -- are present; these nodes are only accessible via the function
8335 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
8336 -- semantics.
8337
8338 -- Sprint syntax: [ <node kind> ]
8339 -- No semantic field values are displayed.
8340
8341 -- N_SCIL_Dispatch_Table_Tag_Init
8342 -- Sloc references a node for a tag initialization
8343 -- SCIL_Entity (Node4-Sem)
8344 --
8345 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
8346 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
8347 -- the declaration of the dispatch table for a tagged type.
8348
8349 -- N_SCIL_Dispatching_Call
8350 -- Sloc references the node of a dispatching call
8351 -- SCIL_Target_Prim (Node2-Sem)
8352 -- SCIL_Entity (Node4-Sem)
8353 -- SCIL_Controlling_Tag (Node5-Sem)
8354 --
8355 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
8356 -- with the N_Procedure_Call_Statement or N_Function_Call node (or a
8357 -- rewriting thereof) corresponding to a dispatching call.
8358
8359 -- N_SCIL_Membership_Test
8360 -- Sloc references the node of a membership test
8361 -- SCIL_Tag_Value (Node5-Sem)
8362 -- SCIL_Entity (Node4-Sem)
8363 --
8364 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
8365 -- with the N_In node (or a rewriting thereof) corresponding to a
8366 -- classwide membership test.
8367
8368 --------------------------
8369 -- Unchecked Expression --
8370 --------------------------
8371
8372 -- An unchecked expression is one that must be analyzed and resolved
8373 -- with all checks off, regardless of the current setting of scope
8374 -- suppress flags.
8375
8376 -- Sprint syntax: `(expression)
8377
8378 -- Note: this node is always removed from the tree (and replaced by
8379 -- its constituent expression) on completion of analysis, so it only
8380 -- appears in intermediate trees, and will never be seen by Gigi.
8381
8382 -- N_Unchecked_Expression
8383 -- Sloc is a copy of the Sloc of the expression
8384 -- Expression (Node3)
8385 -- plus fields for expression
8386
8387 -- Note: in the case where a debug source file is generated, the Sloc
8388 -- for this node points to the back quote in the Sprint file output.
8389
8390 -------------------------------
8391 -- Unchecked Type Conversion --
8392 -------------------------------
8393
8394 -- An unchecked type conversion node represents the semantic action
8395 -- corresponding to a call to an instantiation of Unchecked_Conversion.
8396 -- It is generated as a result of actual use of Unchecked_Conversion
8397 -- and also the expander generates unchecked type conversion nodes
8398 -- directly for expansion of complex semantic actions.
8399
8400 -- Note: an unchecked type conversion is a variable as far as the
8401 -- semantics are concerned, which is convenient for the expander.
8402 -- This does not change what Ada source programs are legal, since
8403 -- clearly a function call to an instantiation of Unchecked_Conversion
8404 -- is not a variable in any case.
8405
8406 -- Sprint syntax: subtype-mark!(expression)
8407
8408 -- N_Unchecked_Type_Conversion
8409 -- Sloc points to related node in source
8410 -- Subtype_Mark (Node4)
8411 -- Expression (Node3)
8412 -- Kill_Range_Check (Flag11-Sem)
8413 -- No_Truncation (Flag17-Sem)
8414 -- plus fields for expression
8415
8416 -- Note: in the case where a debug source file is generated, the Sloc
8417 -- for this node points to the exclamation in the Sprint file output.
8418
8419 -----------------------------------
8420 -- Validate_Unchecked_Conversion --
8421 -----------------------------------
8422
8423 -- The front end does most of the validation of unchecked conversion,
8424 -- including checking sizes (this is done after the back end is called
8425 -- to take advantage of back-annotation of calculated sizes).
8426
8427 -- The front end also deals with specific cases that are not allowed
8428 -- e.g. involving unconstrained array types.
8429
8430 -- For the case of the standard gigi backend, this means that all
8431 -- checks are done in the front end.
8432
8433 -- However, in the case of specialized back-ends, in particular the JVM
8434 -- backend in the past, additional requirements and restrictions may
8435 -- apply to unchecked conversion, and these are most conveniently
8436 -- performed in the specialized back-end.
8437
8438 -- To accommodate this requirement, for such back ends, the following
8439 -- special node is generated recording an unchecked conversion that
8440 -- needs to be validated. The back end should post an appropriate
8441 -- error message if the unchecked conversion is invalid or warrants
8442 -- a special warning message.
8443
8444 -- Source_Type and Target_Type point to the entities for the two
8445 -- types involved in the unchecked conversion instantiation that
8446 -- is to be validated.
8447
8448 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8449
8450 -- N_Validate_Unchecked_Conversion
8451 -- Sloc points to instantiation (location for warning message)
8452 -- Source_Type (Node1-Sem)
8453 -- Target_Type (Node2-Sem)
8454
8455 -- Note: in the case where a debug source file is generated, the Sloc
8456 -- for this node points to the VALIDATE keyword in the file output.
8457
8458 -----------
8459 -- Empty --
8460 -----------
8461
8462 -- Used as the contents of the Nkind field of the dummy Empty node and in
8463 -- some other situations to indicate an uninitialized value.
8464
8465 -- N_Empty
8466 -- Chars (Name1) is set to No_Name
8467
8468 -----------
8469 -- Error --
8470 -----------
8471
8472 -- Used as the contents of the Nkind field of the dummy Error node.
8473 -- Has an Etype field, which gets set to Any_Type later on, to help
8474 -- error recovery (Error_Posted is also set in the Error node).
8475
8476 -- N_Error
8477 -- Chars (Name1) is set to Error_Name
8478 -- Etype (Node5-Sem)
8479
8480 --------------------------
8481 -- Node Type Definition --
8482 --------------------------
8483
8484 -- The following is the definition of the Node_Kind type. As previously
8485 -- discussed, this is separated off to allow rearrangement of the order to
8486 -- facilitate definition of subtype ranges. The comments show the subtype
8487 -- classes which apply to each set of node kinds. The first entry in the
8488 -- comment characterizes the following list of nodes.
8489
8490 type Node_Kind is (
8491 N_Unused_At_Start,
8492
8493 -- N_Representation_Clause
8494
8495 N_At_Clause,
8496 N_Component_Clause,
8497 N_Enumeration_Representation_Clause,
8498 N_Mod_Clause,
8499 N_Record_Representation_Clause,
8500
8501 -- N_Representation_Clause, N_Has_Chars
8502
8503 N_Attribute_Definition_Clause,
8504
8505 -- N_Has_Chars
8506
8507 N_Empty,
8508 N_Pragma_Argument_Association,
8509
8510 -- N_Has_Etype, N_Has_Chars
8511
8512 -- Note: of course N_Error does not really have Etype or Chars fields,
8513 -- and any attempt to access these fields in N_Error will cause an
8514 -- error, but historically this always has been positioned so that an
8515 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8516 -- Most likely this makes coding easier somewhere but still seems
8517 -- undesirable. To be investigated some time ???
8518
8519 N_Error,
8520
8521 -- N_Entity, N_Has_Etype, N_Has_Chars
8522
8523 N_Defining_Character_Literal,
8524 N_Defining_Identifier,
8525 N_Defining_Operator_Symbol,
8526
8527 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8528
8529 N_Expanded_Name,
8530
8531 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8532 -- N_Has_Chars, N_Has_Entity
8533
8534 N_Identifier,
8535 N_Operator_Symbol,
8536
8537 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8538 -- N_Has_Chars, N_Has_Entity
8539
8540 N_Character_Literal,
8541
8542 -- N_Binary_Op, N_Op, N_Subexpr,
8543 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8544
8545 N_Op_Add,
8546 N_Op_Concat,
8547 N_Op_Expon,
8548 N_Op_Subtract,
8549
8550 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
8551 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8552
8553 N_Op_Divide,
8554 N_Op_Mod,
8555 N_Op_Multiply,
8556 N_Op_Rem,
8557
8558 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8559 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8560
8561 N_Op_And,
8562
8563 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8564 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8565
8566 N_Op_Eq,
8567 N_Op_Ge,
8568 N_Op_Gt,
8569 N_Op_Le,
8570 N_Op_Lt,
8571 N_Op_Ne,
8572
8573 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8574 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8575
8576 N_Op_Or,
8577 N_Op_Xor,
8578
8579 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8580 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8581
8582 N_Op_Rotate_Left,
8583 N_Op_Rotate_Right,
8584 N_Op_Shift_Left,
8585 N_Op_Shift_Right,
8586 N_Op_Shift_Right_Arithmetic,
8587
8588 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8589 -- N_Has_Chars, N_Has_Entity
8590
8591 N_Op_Abs,
8592 N_Op_Minus,
8593 N_Op_Not,
8594 N_Op_Plus,
8595
8596 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8597
8598 N_Attribute_Reference,
8599
8600 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8601
8602 N_In,
8603 N_Not_In,
8604
8605 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8606
8607 N_And_Then,
8608 N_Or_Else,
8609
8610 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8611
8612 N_Function_Call,
8613 N_Procedure_Call_Statement,
8614
8615 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8616
8617 N_Raise_Constraint_Error,
8618 N_Raise_Program_Error,
8619 N_Raise_Storage_Error,
8620
8621 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8622
8623 N_Integer_Literal,
8624 N_Real_Literal,
8625 N_String_Literal,
8626
8627 -- N_Subexpr, N_Has_Etype
8628
8629 N_Explicit_Dereference,
8630 N_Expression_With_Actions,
8631 N_If_Expression,
8632 N_Indexed_Component,
8633 N_Null,
8634 N_Qualified_Expression,
8635 N_Quantified_Expression,
8636 N_Aggregate,
8637 N_Allocator,
8638 N_Case_Expression,
8639 N_Delta_Aggregate,
8640 N_Extension_Aggregate,
8641 N_Raise_Expression,
8642 N_Range,
8643 N_Reference,
8644 N_Selected_Component,
8645 N_Slice,
8646 N_Target_Name,
8647 N_Type_Conversion,
8648 N_Unchecked_Expression,
8649 N_Unchecked_Type_Conversion,
8650
8651 -- N_Has_Etype
8652
8653 N_Subtype_Indication,
8654
8655 -- N_Declaration
8656
8657 N_Component_Declaration,
8658 N_Entry_Declaration,
8659 N_Expression_Function,
8660 N_Formal_Object_Declaration,
8661 N_Formal_Type_Declaration,
8662 N_Full_Type_Declaration,
8663 N_Incomplete_Type_Declaration,
8664 N_Iterator_Specification,
8665 N_Loop_Parameter_Specification,
8666 N_Object_Declaration,
8667 N_Protected_Type_Declaration,
8668 N_Private_Extension_Declaration,
8669 N_Private_Type_Declaration,
8670 N_Subtype_Declaration,
8671
8672 -- N_Subprogram_Specification, N_Declaration
8673
8674 N_Function_Specification,
8675 N_Procedure_Specification,
8676
8677 -- N_Access_To_Subprogram_Definition
8678
8679 N_Access_Function_Definition,
8680 N_Access_Procedure_Definition,
8681
8682 -- N_Later_Decl_Item
8683
8684 N_Task_Type_Declaration,
8685
8686 -- N_Body_Stub, N_Later_Decl_Item
8687
8688 N_Package_Body_Stub,
8689 N_Protected_Body_Stub,
8690 N_Subprogram_Body_Stub,
8691 N_Task_Body_Stub,
8692
8693 -- N_Generic_Instantiation, N_Later_Decl_Item
8694 -- N_Subprogram_Instantiation
8695
8696 N_Function_Instantiation,
8697 N_Procedure_Instantiation,
8698
8699 -- N_Generic_Instantiation, N_Later_Decl_Item
8700
8701 N_Package_Instantiation,
8702
8703 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8704
8705 N_Package_Body,
8706 N_Subprogram_Body,
8707
8708 -- N_Later_Decl_Item, N_Proper_Body
8709
8710 N_Protected_Body,
8711 N_Task_Body,
8712
8713 -- N_Later_Decl_Item
8714
8715 N_Implicit_Label_Declaration,
8716 N_Package_Declaration,
8717 N_Single_Task_Declaration,
8718 N_Subprogram_Declaration,
8719 N_Use_Package_Clause,
8720
8721 -- N_Generic_Declaration, N_Later_Decl_Item
8722
8723 N_Generic_Package_Declaration,
8724 N_Generic_Subprogram_Declaration,
8725
8726 -- N_Array_Type_Definition
8727
8728 N_Constrained_Array_Definition,
8729 N_Unconstrained_Array_Definition,
8730
8731 -- N_Renaming_Declaration
8732
8733 N_Exception_Renaming_Declaration,
8734 N_Object_Renaming_Declaration,
8735 N_Package_Renaming_Declaration,
8736 N_Subprogram_Renaming_Declaration,
8737
8738 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8739
8740 N_Generic_Function_Renaming_Declaration,
8741 N_Generic_Package_Renaming_Declaration,
8742 N_Generic_Procedure_Renaming_Declaration,
8743
8744 -- N_Statement_Other_Than_Procedure_Call
8745
8746 N_Abort_Statement,
8747 N_Accept_Statement,
8748 N_Assignment_Statement,
8749 N_Asynchronous_Select,
8750 N_Block_Statement,
8751 N_Case_Statement,
8752 N_Code_Statement,
8753 N_Compound_Statement,
8754 N_Conditional_Entry_Call,
8755
8756 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8757
8758 N_Delay_Relative_Statement,
8759 N_Delay_Until_Statement,
8760
8761 -- N_Statement_Other_Than_Procedure_Call
8762
8763 N_Entry_Call_Statement,
8764 N_Free_Statement,
8765 N_Goto_Statement,
8766 N_Loop_Statement,
8767 N_Null_Statement,
8768 N_Raise_Statement,
8769 N_Requeue_Statement,
8770 N_Simple_Return_Statement,
8771 N_Extended_Return_Statement,
8772 N_Selective_Accept,
8773 N_Timed_Entry_Call,
8774
8775 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8776
8777 N_Exit_Statement,
8778 N_If_Statement,
8779
8780 -- N_Has_Condition
8781
8782 N_Accept_Alternative,
8783 N_Delay_Alternative,
8784 N_Elsif_Part,
8785 N_Entry_Body_Formal_Part,
8786 N_Iteration_Scheme,
8787 N_Terminate_Alternative,
8788
8789 -- N_Formal_Subprogram_Declaration
8790
8791 N_Formal_Abstract_Subprogram_Declaration,
8792 N_Formal_Concrete_Subprogram_Declaration,
8793
8794 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8795
8796 N_Push_Constraint_Error_Label,
8797 N_Push_Program_Error_Label,
8798 N_Push_Storage_Error_Label,
8799
8800 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8801
8802 N_Pop_Constraint_Error_Label,
8803 N_Pop_Program_Error_Label,
8804 N_Pop_Storage_Error_Label,
8805
8806 -- SCIL nodes
8807
8808 N_SCIL_Dispatch_Table_Tag_Init,
8809 N_SCIL_Dispatching_Call,
8810 N_SCIL_Membership_Test,
8811
8812 -- Other nodes (not part of any subtype class)
8813
8814 N_Abortable_Part,
8815 N_Abstract_Subprogram_Declaration,
8816 N_Access_Definition,
8817 N_Access_To_Object_Definition,
8818 N_Aspect_Specification,
8819 N_Call_Marker,
8820 N_Case_Expression_Alternative,
8821 N_Case_Statement_Alternative,
8822 N_Compilation_Unit,
8823 N_Compilation_Unit_Aux,
8824 N_Component_Association,
8825 N_Component_Definition,
8826 N_Component_List,
8827 N_Contract,
8828 N_Derived_Type_Definition,
8829 N_Decimal_Fixed_Point_Definition,
8830 N_Defining_Program_Unit_Name,
8831 N_Delta_Constraint,
8832 N_Designator,
8833 N_Digits_Constraint,
8834 N_Discriminant_Association,
8835 N_Discriminant_Specification,
8836 N_Enumeration_Type_Definition,
8837 N_Entry_Body,
8838 N_Entry_Call_Alternative,
8839 N_Entry_Index_Specification,
8840 N_Exception_Declaration,
8841 N_Exception_Handler,
8842 N_Floating_Point_Definition,
8843 N_Formal_Decimal_Fixed_Point_Definition,
8844 N_Formal_Derived_Type_Definition,
8845 N_Formal_Discrete_Type_Definition,
8846 N_Formal_Floating_Point_Definition,
8847 N_Formal_Modular_Type_Definition,
8848 N_Formal_Ordinary_Fixed_Point_Definition,
8849 N_Formal_Package_Declaration,
8850 N_Formal_Private_Type_Definition,
8851 N_Formal_Incomplete_Type_Definition,
8852 N_Formal_Signed_Integer_Type_Definition,
8853 N_Freeze_Entity,
8854 N_Freeze_Generic_Entity,
8855 N_Generic_Association,
8856 N_Handled_Sequence_Of_Statements,
8857 N_Index_Or_Discriminant_Constraint,
8858 N_Iterated_Component_Association,
8859 N_Itype_Reference,
8860 N_Label,
8861 N_Modular_Type_Definition,
8862 N_Number_Declaration,
8863 N_Ordinary_Fixed_Point_Definition,
8864 N_Others_Choice,
8865 N_Package_Specification,
8866 N_Parameter_Association,
8867 N_Parameter_Specification,
8868 N_Pragma,
8869 N_Protected_Definition,
8870 N_Range_Constraint,
8871 N_Real_Range_Specification,
8872 N_Record_Definition,
8873 N_Signed_Integer_Type_Definition,
8874 N_Single_Protected_Declaration,
8875 N_Subunit,
8876 N_Task_Definition,
8877 N_Triggering_Alternative,
8878 N_Use_Type_Clause,
8879 N_Validate_Unchecked_Conversion,
8880 N_Variant,
8881 N_Variant_Part,
8882 N_With_Clause,
8883 N_Unused_At_End);
8884
8885 for Node_Kind'Size use 8;
8886 -- The data structures in Atree assume this
8887
8888 ----------------------------
8889 -- Node Class Definitions --
8890 ----------------------------
8891
8892 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8893 N_Access_Function_Definition ..
8894 N_Access_Procedure_Definition;
8895
8896 subtype N_Array_Type_Definition is Node_Kind range
8897 N_Constrained_Array_Definition ..
8898 N_Unconstrained_Array_Definition;
8899
8900 subtype N_Binary_Op is Node_Kind range
8901 N_Op_Add ..
8902 N_Op_Shift_Right_Arithmetic;
8903
8904 subtype N_Body_Stub is Node_Kind range
8905 N_Package_Body_Stub ..
8906 N_Task_Body_Stub;
8907
8908 subtype N_Declaration is Node_Kind range
8909 N_Component_Declaration ..
8910 N_Procedure_Specification;
8911 -- Note: this includes all constructs normally thought of as declarations
8912 -- except those which are separately grouped as later declarations.
8913
8914 subtype N_Delay_Statement is Node_Kind range
8915 N_Delay_Relative_Statement ..
8916 N_Delay_Until_Statement;
8917
8918 subtype N_Direct_Name is Node_Kind range
8919 N_Identifier ..
8920 N_Character_Literal;
8921
8922 subtype N_Entity is Node_Kind range
8923 N_Defining_Character_Literal ..
8924 N_Defining_Operator_Symbol;
8925
8926 subtype N_Formal_Subprogram_Declaration is Node_Kind range
8927 N_Formal_Abstract_Subprogram_Declaration ..
8928 N_Formal_Concrete_Subprogram_Declaration;
8929
8930 subtype N_Generic_Declaration is Node_Kind range
8931 N_Generic_Package_Declaration ..
8932 N_Generic_Subprogram_Declaration;
8933
8934 subtype N_Generic_Instantiation is Node_Kind range
8935 N_Function_Instantiation ..
8936 N_Package_Instantiation;
8937
8938 subtype N_Generic_Renaming_Declaration is Node_Kind range
8939 N_Generic_Function_Renaming_Declaration ..
8940 N_Generic_Procedure_Renaming_Declaration;
8941
8942 subtype N_Has_Chars is Node_Kind range
8943 N_Attribute_Definition_Clause ..
8944 N_Op_Plus;
8945
8946 subtype N_Has_Entity is Node_Kind range
8947 N_Expanded_Name ..
8948 N_Attribute_Reference;
8949 -- Nodes that have Entity fields
8950 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
8951 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
8952
8953 subtype N_Has_Etype is Node_Kind range
8954 N_Error ..
8955 N_Subtype_Indication;
8956
8957 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
8958 N_Op_Divide ..
8959 N_Op_Rem;
8960
8961 subtype N_Multiplying_Operator is Node_Kind range
8962 N_Op_Divide ..
8963 N_Op_Rem;
8964
8965 subtype N_Later_Decl_Item is Node_Kind range
8966 N_Task_Type_Declaration ..
8967 N_Generic_Subprogram_Declaration;
8968 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
8969 -- only those items which can appear as later declarative items. This also
8970 -- includes N_Implicit_Label_Declaration which is not specifically in the
8971 -- grammar but may appear as a valid later declarative items. It does NOT
8972 -- include N_Pragma which can also appear among later declarative items.
8973 -- It does however include N_Protected_Body, which is a bit peculiar, but
8974 -- harmless since this cannot appear in Ada 83 mode anyway.
8975
8976 subtype N_Membership_Test is Node_Kind range
8977 N_In ..
8978 N_Not_In;
8979
8980 subtype N_Numeric_Or_String_Literal is Node_Kind range
8981 N_Integer_Literal ..
8982 N_String_Literal;
8983
8984 subtype N_Op is Node_Kind range
8985 N_Op_Add ..
8986 N_Op_Plus;
8987
8988 subtype N_Op_Boolean is Node_Kind range
8989 N_Op_And ..
8990 N_Op_Xor;
8991 -- Binary operators which take operands of a boolean type, and yield
8992 -- a result of a boolean type.
8993
8994 subtype N_Op_Compare is Node_Kind range
8995 N_Op_Eq ..
8996 N_Op_Ne;
8997
8998 subtype N_Op_Shift is Node_Kind range
8999 N_Op_Rotate_Left ..
9000 N_Op_Shift_Right_Arithmetic;
9001
9002 subtype N_Proper_Body is Node_Kind range
9003 N_Package_Body ..
9004 N_Task_Body;
9005
9006 subtype N_Push_xxx_Label is Node_Kind range
9007 N_Push_Constraint_Error_Label ..
9008 N_Push_Storage_Error_Label;
9009
9010 subtype N_Pop_xxx_Label is Node_Kind range
9011 N_Pop_Constraint_Error_Label ..
9012 N_Pop_Storage_Error_Label;
9013
9014 subtype N_Push_Pop_xxx_Label is Node_Kind range
9015 N_Push_Constraint_Error_Label ..
9016 N_Pop_Storage_Error_Label;
9017
9018 subtype N_Raise_xxx_Error is Node_Kind range
9019 N_Raise_Constraint_Error ..
9020 N_Raise_Storage_Error;
9021
9022 subtype N_Renaming_Declaration is Node_Kind range
9023 N_Exception_Renaming_Declaration ..
9024 N_Generic_Procedure_Renaming_Declaration;
9025
9026 subtype N_Representation_Clause is Node_Kind range
9027 N_At_Clause ..
9028 N_Attribute_Definition_Clause;
9029
9030 subtype N_Short_Circuit is Node_Kind range
9031 N_And_Then ..
9032 N_Or_Else;
9033
9034 subtype N_SCIL_Node is Node_Kind range
9035 N_SCIL_Dispatch_Table_Tag_Init ..
9036 N_SCIL_Membership_Test;
9037
9038 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
9039 N_Abort_Statement ..
9040 N_If_Statement;
9041 -- Note that this includes all statement types except for the cases of the
9042 -- N_Procedure_Call_Statement which is considered to be a subexpression
9043 -- (since overloading is possible, so it needs to go through the normal
9044 -- overloading resolution for expressions).
9045
9046 subtype N_Subprogram_Call is Node_Kind range
9047 N_Function_Call ..
9048 N_Procedure_Call_Statement;
9049
9050 subtype N_Subprogram_Instantiation is Node_Kind range
9051 N_Function_Instantiation ..
9052 N_Procedure_Instantiation;
9053
9054 subtype N_Has_Condition is Node_Kind range
9055 N_Exit_Statement ..
9056 N_Terminate_Alternative;
9057 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
9058
9059 subtype N_Subexpr is Node_Kind range
9060 N_Expanded_Name ..
9061 N_Unchecked_Type_Conversion;
9062 -- Nodes with expression fields
9063
9064 subtype N_Subprogram_Specification is Node_Kind range
9065 N_Function_Specification ..
9066 N_Procedure_Specification;
9067
9068 subtype N_Unary_Op is Node_Kind range
9069 N_Op_Abs ..
9070 N_Op_Plus;
9071
9072 subtype N_Unit_Body is Node_Kind range
9073 N_Package_Body ..
9074 N_Subprogram_Body;
9075
9076 ---------------------------
9077 -- Node Access Functions --
9078 ---------------------------
9079
9080 -- The following functions return the contents of the indicated field of
9081 -- the node referenced by the argument, which is a Node_Id. They provide
9082 -- logical access to fields in the node which could be accessed using the
9083 -- Atree.Unchecked_Access package, but the idea is always to use these
9084 -- higher level routines which preserve strong typing. In debug mode,
9085 -- these routines check that they are being applied to an appropriate
9086 -- node, as well as checking that the node is in range.
9087
9088 function Abort_Present
9089 (N : Node_Id) return Boolean; -- Flag15
9090
9091 function Abortable_Part
9092 (N : Node_Id) return Node_Id; -- Node2
9093
9094 function Abstract_Present
9095 (N : Node_Id) return Boolean; -- Flag4
9096
9097 function Accept_Handler_Records
9098 (N : Node_Id) return List_Id; -- List5
9099
9100 function Accept_Statement
9101 (N : Node_Id) return Node_Id; -- Node2
9102
9103 function Access_Definition
9104 (N : Node_Id) return Node_Id; -- Node3
9105
9106 function Access_To_Subprogram_Definition
9107 (N : Node_Id) return Node_Id; -- Node3
9108
9109 function Access_Types_To_Process
9110 (N : Node_Id) return Elist_Id; -- Elist2
9111
9112 function Actions
9113 (N : Node_Id) return List_Id; -- List1
9114
9115 function Activation_Chain_Entity
9116 (N : Node_Id) return Node_Id; -- Node3
9117
9118 function Acts_As_Spec
9119 (N : Node_Id) return Boolean; -- Flag4
9120
9121 function Actual_Designated_Subtype
9122 (N : Node_Id) return Node_Id; -- Node4
9123
9124 function Address_Warning_Posted
9125 (N : Node_Id) return Boolean; -- Flag18
9126
9127 function Aggregate_Bounds
9128 (N : Node_Id) return Node_Id; -- Node3
9129
9130 function Aliased_Present
9131 (N : Node_Id) return Boolean; -- Flag4
9132
9133 function Alloc_For_BIP_Return
9134 (N : Node_Id) return Boolean; -- Flag1
9135
9136 function All_Others
9137 (N : Node_Id) return Boolean; -- Flag11
9138
9139 function All_Present
9140 (N : Node_Id) return Boolean; -- Flag15
9141
9142 function Alternatives
9143 (N : Node_Id) return List_Id; -- List4
9144
9145 function Ancestor_Part
9146 (N : Node_Id) return Node_Id; -- Node3
9147
9148 function Atomic_Sync_Required
9149 (N : Node_Id) return Boolean; -- Flag14
9150
9151 function Array_Aggregate
9152 (N : Node_Id) return Node_Id; -- Node3
9153
9154 function Aspect_Rep_Item
9155 (N : Node_Id) return Node_Id; -- Node2
9156
9157 function Assignment_OK
9158 (N : Node_Id) return Boolean; -- Flag15
9159
9160 function Associated_Node
9161 (N : Node_Id) return Node_Id; -- Node4
9162
9163 function At_End_Proc
9164 (N : Node_Id) return Node_Id; -- Node1
9165
9166 function Attribute_Name
9167 (N : Node_Id) return Name_Id; -- Name2
9168
9169 function Aux_Decls_Node
9170 (N : Node_Id) return Node_Id; -- Node5
9171
9172 function Backwards_OK
9173 (N : Node_Id) return Boolean; -- Flag6
9174
9175 function Bad_Is_Detected
9176 (N : Node_Id) return Boolean; -- Flag15
9177
9178 function By_Ref
9179 (N : Node_Id) return Boolean; -- Flag5
9180
9181 function Body_Required
9182 (N : Node_Id) return Boolean; -- Flag13
9183
9184 function Body_To_Inline
9185 (N : Node_Id) return Node_Id; -- Node3
9186
9187 function Box_Present
9188 (N : Node_Id) return Boolean; -- Flag15
9189
9190 function Char_Literal_Value
9191 (N : Node_Id) return Uint; -- Uint2
9192
9193 function Chars
9194 (N : Node_Id) return Name_Id; -- Name1
9195
9196 function Check_Address_Alignment
9197 (N : Node_Id) return Boolean; -- Flag11
9198
9199 function Choice_Parameter
9200 (N : Node_Id) return Node_Id; -- Node2
9201
9202 function Choices
9203 (N : Node_Id) return List_Id; -- List1
9204
9205 function Class_Present
9206 (N : Node_Id) return Boolean; -- Flag6
9207
9208 function Classifications
9209 (N : Node_Id) return Node_Id; -- Node3
9210
9211 function Cleanup_Actions
9212 (N : Node_Id) return List_Id; -- List5
9213
9214 function Comes_From_Extended_Return_Statement
9215 (N : Node_Id) return Boolean; -- Flag18
9216
9217 function Compile_Time_Known_Aggregate
9218 (N : Node_Id) return Boolean; -- Flag18
9219
9220 function Component_Associations
9221 (N : Node_Id) return List_Id; -- List2
9222
9223 function Component_Clauses
9224 (N : Node_Id) return List_Id; -- List3
9225
9226 function Component_Definition
9227 (N : Node_Id) return Node_Id; -- Node4
9228
9229 function Component_Items
9230 (N : Node_Id) return List_Id; -- List3
9231
9232 function Component_List
9233 (N : Node_Id) return Node_Id; -- Node1
9234
9235 function Component_Name
9236 (N : Node_Id) return Node_Id; -- Node1
9237
9238 function Componentwise_Assignment
9239 (N : Node_Id) return Boolean; -- Flag14
9240
9241 function Condition
9242 (N : Node_Id) return Node_Id; -- Node1
9243
9244 function Condition_Actions
9245 (N : Node_Id) return List_Id; -- List3
9246
9247 function Config_Pragmas
9248 (N : Node_Id) return List_Id; -- List4
9249
9250 function Constant_Present
9251 (N : Node_Id) return Boolean; -- Flag17
9252
9253 function Constraint
9254 (N : Node_Id) return Node_Id; -- Node3
9255
9256 function Constraints
9257 (N : Node_Id) return List_Id; -- List1
9258
9259 function Context_Installed
9260 (N : Node_Id) return Boolean; -- Flag13
9261
9262 function Context_Pending
9263 (N : Node_Id) return Boolean; -- Flag16
9264
9265 function Context_Items
9266 (N : Node_Id) return List_Id; -- List1
9267
9268 function Contract_Test_Cases
9269 (N : Node_Id) return Node_Id; -- Node2
9270
9271 function Controlling_Argument
9272 (N : Node_Id) return Node_Id; -- Node1
9273
9274 function Conversion_OK
9275 (N : Node_Id) return Boolean; -- Flag14
9276
9277 function Convert_To_Return_False
9278 (N : Node_Id) return Boolean; -- Flag13
9279
9280 function Corresponding_Aspect
9281 (N : Node_Id) return Node_Id; -- Node3
9282
9283 function Corresponding_Body
9284 (N : Node_Id) return Node_Id; -- Node5
9285
9286 function Corresponding_Formal_Spec
9287 (N : Node_Id) return Node_Id; -- Node3
9288
9289 function Corresponding_Generic_Association
9290 (N : Node_Id) return Node_Id; -- Node5
9291
9292 function Corresponding_Integer_Value
9293 (N : Node_Id) return Uint; -- Uint4
9294
9295 function Corresponding_Spec
9296 (N : Node_Id) return Entity_Id; -- Node5
9297
9298 function Corresponding_Spec_Of_Stub
9299 (N : Node_Id) return Node_Id; -- Node2
9300
9301 function Corresponding_Stub
9302 (N : Node_Id) return Node_Id; -- Node3
9303
9304 function Dcheck_Function
9305 (N : Node_Id) return Entity_Id; -- Node5
9306
9307 function Declarations
9308 (N : Node_Id) return List_Id; -- List2
9309
9310 function Default_Expression
9311 (N : Node_Id) return Node_Id; -- Node5
9312
9313 function Default_Storage_Pool
9314 (N : Node_Id) return Node_Id; -- Node3
9315
9316 function Default_Name
9317 (N : Node_Id) return Node_Id; -- Node2
9318
9319 function Defining_Identifier
9320 (N : Node_Id) return Entity_Id; -- Node1
9321
9322 function Defining_Unit_Name
9323 (N : Node_Id) return Node_Id; -- Node1
9324
9325 function Delay_Alternative
9326 (N : Node_Id) return Node_Id; -- Node4
9327
9328 function Delay_Statement
9329 (N : Node_Id) return Node_Id; -- Node2
9330
9331 function Delta_Expression
9332 (N : Node_Id) return Node_Id; -- Node3
9333
9334 function Digits_Expression
9335 (N : Node_Id) return Node_Id; -- Node2
9336
9337 function Discr_Check_Funcs_Built
9338 (N : Node_Id) return Boolean; -- Flag11
9339
9340 function Discrete_Choices
9341 (N : Node_Id) return List_Id; -- List4
9342
9343 function Discrete_Range
9344 (N : Node_Id) return Node_Id; -- Node4
9345
9346 function Discrete_Subtype_Definition
9347 (N : Node_Id) return Node_Id; -- Node4
9348
9349 function Discrete_Subtype_Definitions
9350 (N : Node_Id) return List_Id; -- List2
9351
9352 function Discriminant_Specifications
9353 (N : Node_Id) return List_Id; -- List4
9354
9355 function Discriminant_Type
9356 (N : Node_Id) return Node_Id; -- Node5
9357
9358 function Do_Accessibility_Check
9359 (N : Node_Id) return Boolean; -- Flag13
9360
9361 function Do_Discriminant_Check
9362 (N : Node_Id) return Boolean; -- Flag3
9363
9364 function Do_Division_Check
9365 (N : Node_Id) return Boolean; -- Flag13
9366
9367 function Do_Length_Check
9368 (N : Node_Id) return Boolean; -- Flag4
9369
9370 function Do_Overflow_Check
9371 (N : Node_Id) return Boolean; -- Flag17
9372
9373 function Do_Range_Check
9374 (N : Node_Id) return Boolean; -- Flag9
9375
9376 function Do_Storage_Check
9377 (N : Node_Id) return Boolean; -- Flag17
9378
9379 function Do_Tag_Check
9380 (N : Node_Id) return Boolean; -- Flag13
9381
9382 function Elaborate_All_Desirable
9383 (N : Node_Id) return Boolean; -- Flag9
9384
9385 function Elaborate_All_Present
9386 (N : Node_Id) return Boolean; -- Flag14
9387
9388 function Elaborate_Desirable
9389 (N : Node_Id) return Boolean; -- Flag11
9390
9391 function Elaborate_Present
9392 (N : Node_Id) return Boolean; -- Flag4
9393
9394 function Else_Actions
9395 (N : Node_Id) return List_Id; -- List3
9396
9397 function Else_Statements
9398 (N : Node_Id) return List_Id; -- List4
9399
9400 function Elsif_Parts
9401 (N : Node_Id) return List_Id; -- List3
9402
9403 function Enclosing_Variant
9404 (N : Node_Id) return Node_Id; -- Node2
9405
9406 function End_Label
9407 (N : Node_Id) return Node_Id; -- Node4
9408
9409 function End_Span
9410 (N : Node_Id) return Uint; -- Uint5
9411
9412 function Entity
9413 (N : Node_Id) return Node_Id; -- Node4
9414
9415 function Entity_Or_Associated_Node
9416 (N : Node_Id) return Node_Id; -- Node4
9417
9418 function Entry_Body_Formal_Part
9419 (N : Node_Id) return Node_Id; -- Node5
9420
9421 function Entry_Call_Alternative
9422 (N : Node_Id) return Node_Id; -- Node1
9423
9424 function Entry_Call_Statement
9425 (N : Node_Id) return Node_Id; -- Node1
9426
9427 function Entry_Direct_Name
9428 (N : Node_Id) return Node_Id; -- Node1
9429
9430 function Entry_Index
9431 (N : Node_Id) return Node_Id; -- Node5
9432
9433 function Entry_Index_Specification
9434 (N : Node_Id) return Node_Id; -- Node4
9435
9436 function Etype
9437 (N : Node_Id) return Node_Id; -- Node5
9438
9439 function Exception_Choices
9440 (N : Node_Id) return List_Id; -- List4
9441
9442 function Exception_Handlers
9443 (N : Node_Id) return List_Id; -- List5
9444
9445 function Exception_Junk
9446 (N : Node_Id) return Boolean; -- Flag8
9447
9448 function Exception_Label
9449 (N : Node_Id) return Node_Id; -- Node5
9450
9451 function Explicit_Actual_Parameter
9452 (N : Node_Id) return Node_Id; -- Node3
9453
9454 function Expansion_Delayed
9455 (N : Node_Id) return Boolean; -- Flag11
9456
9457 function Explicit_Generic_Actual_Parameter
9458 (N : Node_Id) return Node_Id; -- Node1
9459
9460 function Expression
9461 (N : Node_Id) return Node_Id; -- Node3
9462
9463 function Expression_Copy
9464 (N : Node_Id) return Node_Id; -- Node2
9465
9466 function Expressions
9467 (N : Node_Id) return List_Id; -- List1
9468
9469 function First_Bit
9470 (N : Node_Id) return Node_Id; -- Node3
9471
9472 function First_Inlined_Subprogram
9473 (N : Node_Id) return Entity_Id; -- Node3
9474
9475 function First_Name
9476 (N : Node_Id) return Boolean; -- Flag5
9477
9478 function First_Named_Actual
9479 (N : Node_Id) return Node_Id; -- Node4
9480
9481 function First_Real_Statement
9482 (N : Node_Id) return Node_Id; -- Node2
9483
9484 function First_Subtype_Link
9485 (N : Node_Id) return Entity_Id; -- Node5
9486
9487 function Float_Truncate
9488 (N : Node_Id) return Boolean; -- Flag11
9489
9490 function Formal_Type_Definition
9491 (N : Node_Id) return Node_Id; -- Node3
9492
9493 function Forwards_OK
9494 (N : Node_Id) return Boolean; -- Flag5
9495
9496 function From_Aspect_Specification
9497 (N : Node_Id) return Boolean; -- Flag13
9498
9499 function From_At_End
9500 (N : Node_Id) return Boolean; -- Flag4
9501
9502 function From_At_Mod
9503 (N : Node_Id) return Boolean; -- Flag4
9504
9505 function From_Conditional_Expression
9506 (N : Node_Id) return Boolean; -- Flag1
9507
9508 function From_Default
9509 (N : Node_Id) return Boolean; -- Flag6
9510
9511 function Generalized_Indexing
9512 (N : Node_Id) return Node_Id; -- Node4
9513
9514 function Generic_Associations
9515 (N : Node_Id) return List_Id; -- List3
9516
9517 function Generic_Formal_Declarations
9518 (N : Node_Id) return List_Id; -- List2
9519
9520 function Generic_Parent
9521 (N : Node_Id) return Node_Id; -- Node5
9522
9523 function Generic_Parent_Type
9524 (N : Node_Id) return Node_Id; -- Node4
9525
9526 function Handled_Statement_Sequence
9527 (N : Node_Id) return Node_Id; -- Node4
9528
9529 function Handler_List_Entry
9530 (N : Node_Id) return Node_Id; -- Node2
9531
9532 function Has_Created_Identifier
9533 (N : Node_Id) return Boolean; -- Flag15
9534
9535 function Has_Dereference_Action
9536 (N : Node_Id) return Boolean; -- Flag13
9537
9538 function Has_Dynamic_Length_Check
9539 (N : Node_Id) return Boolean; -- Flag10
9540
9541 function Has_Dynamic_Range_Check
9542 (N : Node_Id) return Boolean; -- Flag12
9543
9544 function Has_Init_Expression
9545 (N : Node_Id) return Boolean; -- Flag14
9546
9547 function Has_Local_Raise
9548 (N : Node_Id) return Boolean; -- Flag8
9549
9550 function Has_No_Elaboration_Code
9551 (N : Node_Id) return Boolean; -- Flag17
9552
9553 function Has_Pragma_Suppress_All
9554 (N : Node_Id) return Boolean; -- Flag14
9555
9556 function Has_Private_View
9557 (N : Node_Id) return Boolean; -- Flag11
9558
9559 function Has_Relative_Deadline_Pragma
9560 (N : Node_Id) return Boolean; -- Flag9
9561
9562 function Has_Self_Reference
9563 (N : Node_Id) return Boolean; -- Flag13
9564
9565 function Has_SP_Choice
9566 (N : Node_Id) return Boolean; -- Flag15
9567
9568 function Has_Storage_Size_Pragma
9569 (N : Node_Id) return Boolean; -- Flag5
9570
9571 function Has_Target_Names
9572 (N : Node_Id) return Boolean; -- Flag8
9573
9574 function Has_Wide_Character
9575 (N : Node_Id) return Boolean; -- Flag11
9576
9577 function Has_Wide_Wide_Character
9578 (N : Node_Id) return Boolean; -- Flag13
9579
9580 function Header_Size_Added
9581 (N : Node_Id) return Boolean; -- Flag11
9582
9583 function Hidden_By_Use_Clause
9584 (N : Node_Id) return Elist_Id; -- Elist5
9585
9586 function High_Bound
9587 (N : Node_Id) return Node_Id; -- Node2
9588
9589 function Identifier
9590 (N : Node_Id) return Node_Id; -- Node1
9591
9592 function Interface_List
9593 (N : Node_Id) return List_Id; -- List2
9594
9595 function Interface_Present
9596 (N : Node_Id) return Boolean; -- Flag16
9597
9598 function Implicit_With
9599 (N : Node_Id) return Boolean; -- Flag16
9600
9601 function Implicit_With_From_Instantiation
9602 (N : Node_Id) return Boolean; -- Flag12
9603
9604 function Import_Interface_Present
9605 (N : Node_Id) return Boolean; -- Flag16
9606
9607 function In_Present
9608 (N : Node_Id) return Boolean; -- Flag15
9609
9610 function Includes_Infinities
9611 (N : Node_Id) return Boolean; -- Flag11
9612
9613 function Incomplete_View
9614 (N : Node_Id) return Node_Id; -- Node2
9615
9616 function Inherited_Discriminant
9617 (N : Node_Id) return Boolean; -- Flag13
9618
9619 function Instance_Spec
9620 (N : Node_Id) return Node_Id; -- Node5
9621
9622 function Intval
9623 (N : Node_Id) return Uint; -- Uint3
9624
9625 function Is_Abort_Block
9626 (N : Node_Id) return Boolean; -- Flag4
9627
9628 function Is_Accessibility_Actual
9629 (N : Node_Id) return Boolean; -- Flag13
9630
9631 function Is_Analyzed_Pragma
9632 (N : Node_Id) return Boolean; -- Flag5
9633
9634 function Is_Asynchronous_Call_Block
9635 (N : Node_Id) return Boolean; -- Flag7
9636
9637 function Is_Boolean_Aspect
9638 (N : Node_Id) return Boolean; -- Flag16
9639
9640 function Is_Checked
9641 (N : Node_Id) return Boolean; -- Flag11
9642
9643 function Is_Checked_Ghost_Pragma
9644 (N : Node_Id) return Boolean; -- Flag3
9645
9646 function Is_Component_Left_Opnd
9647 (N : Node_Id) return Boolean; -- Flag13
9648
9649 function Is_Component_Right_Opnd
9650 (N : Node_Id) return Boolean; -- Flag14
9651
9652 function Is_Controlling_Actual
9653 (N : Node_Id) return Boolean; -- Flag16
9654
9655 function Is_Declaration_Level_Node
9656 (N : Node_Id) return Boolean; -- Flag5
9657
9658 function Is_Delayed_Aspect
9659 (N : Node_Id) return Boolean; -- Flag14
9660
9661 function Is_Disabled
9662 (N : Node_Id) return Boolean; -- Flag15
9663
9664 function Is_Dispatching_Call
9665 (N : Node_Id) return Boolean; -- Flag3
9666
9667 function Is_Dynamic_Coextension
9668 (N : Node_Id) return Boolean; -- Flag18
9669
9670 function Is_Effective_Use_Clause
9671 (N : Node_Id) return Boolean; -- Flag1
9672
9673 function Is_Elaboration_Checks_OK_Node
9674 (N : Node_Id) return Boolean; -- Flag1
9675
9676 function Is_Elsif
9677 (N : Node_Id) return Boolean; -- Flag13
9678
9679 function Is_Entry_Barrier_Function
9680 (N : Node_Id) return Boolean; -- Flag8
9681
9682 function Is_Expanded_Build_In_Place_Call
9683 (N : Node_Id) return Boolean; -- Flag11
9684
9685 function Is_Expanded_Contract
9686 (N : Node_Id) return Boolean; -- Flag1
9687
9688 function Is_Finalization_Wrapper
9689 (N : Node_Id) return Boolean; -- Flag9
9690
9691 function Is_Folded_In_Parser
9692 (N : Node_Id) return Boolean; -- Flag4
9693
9694 function Is_Generic_Contract_Pragma
9695 (N : Node_Id) return Boolean; -- Flag2
9696
9697 function Is_Ignored
9698 (N : Node_Id) return Boolean; -- Flag9
9699
9700 function Is_Ignored_Ghost_Pragma
9701 (N : Node_Id) return Boolean; -- Flag8
9702
9703 function Is_In_Discriminant_Check
9704 (N : Node_Id) return Boolean; -- Flag11
9705
9706 function Is_Inherited_Pragma
9707 (N : Node_Id) return Boolean; -- Flag4
9708
9709 function Is_Initialization_Block
9710 (N : Node_Id) return Boolean; -- Flag1
9711
9712 function Is_Known_Guaranteed_ABE
9713 (N : Node_Id) return Boolean; -- Flag18
9714
9715 function Is_Machine_Number
9716 (N : Node_Id) return Boolean; -- Flag11
9717
9718 function Is_Null_Loop
9719 (N : Node_Id) return Boolean; -- Flag16
9720
9721 function Is_Overloaded
9722 (N : Node_Id) return Boolean; -- Flag5
9723
9724 function Is_Power_Of_2_For_Shift
9725 (N : Node_Id) return Boolean; -- Flag13
9726
9727 function Is_Prefixed_Call
9728 (N : Node_Id) return Boolean; -- Flag17
9729
9730 function Is_Protected_Subprogram_Body
9731 (N : Node_Id) return Boolean; -- Flag7
9732
9733 function Is_Qualified_Universal_Literal
9734 (N : Node_Id) return Boolean; -- Flag4
9735
9736 function Is_Recorded_Scenario
9737 (N : Node_Id) return Boolean; -- Flag6
9738
9739 function Is_Source_Call
9740 (N : Node_Id) return Boolean; -- Flag4
9741
9742 function Is_SPARK_Mode_On_Node
9743 (N : Node_Id) return Boolean; -- Flag2
9744
9745 function Is_Static_Coextension
9746 (N : Node_Id) return Boolean; -- Flag14
9747
9748 function Is_Static_Expression
9749 (N : Node_Id) return Boolean; -- Flag6
9750
9751 function Is_Subprogram_Descriptor
9752 (N : Node_Id) return Boolean; -- Flag16
9753
9754 function Is_Task_Allocation_Block
9755 (N : Node_Id) return Boolean; -- Flag6
9756
9757 function Is_Task_Body_Procedure
9758 (N : Node_Id) return Boolean; -- Flag1
9759
9760 function Is_Task_Master
9761 (N : Node_Id) return Boolean; -- Flag5
9762
9763 function Iteration_Scheme
9764 (N : Node_Id) return Node_Id; -- Node2
9765
9766 function Iterator_Specification
9767 (N : Node_Id) return Node_Id; -- Node2
9768
9769 function Itype
9770 (N : Node_Id) return Entity_Id; -- Node1
9771
9772 function Kill_Range_Check
9773 (N : Node_Id) return Boolean; -- Flag11
9774
9775 function Label_Construct
9776 (N : Node_Id) return Node_Id; -- Node2
9777
9778 function Left_Opnd
9779 (N : Node_Id) return Node_Id; -- Node2
9780
9781 function Last_Bit
9782 (N : Node_Id) return Node_Id; -- Node4
9783
9784 function Last_Name
9785 (N : Node_Id) return Boolean; -- Flag6
9786
9787 function Library_Unit
9788 (N : Node_Id) return Node_Id; -- Node4
9789
9790 function Limited_View_Installed
9791 (N : Node_Id) return Boolean; -- Flag18
9792
9793 function Limited_Present
9794 (N : Node_Id) return Boolean; -- Flag17
9795
9796 function Literals
9797 (N : Node_Id) return List_Id; -- List1
9798
9799 function Local_Raise_Not_OK
9800 (N : Node_Id) return Boolean; -- Flag7
9801
9802 function Local_Raise_Statements
9803 (N : Node_Id) return Elist_Id; -- Elist1
9804
9805 function Loop_Actions
9806 (N : Node_Id) return List_Id; -- List2
9807
9808 function Loop_Parameter_Specification
9809 (N : Node_Id) return Node_Id; -- Node4
9810
9811 function Low_Bound
9812 (N : Node_Id) return Node_Id; -- Node1
9813
9814 function Mod_Clause
9815 (N : Node_Id) return Node_Id; -- Node2
9816
9817 function More_Ids
9818 (N : Node_Id) return Boolean; -- Flag5
9819
9820 function Must_Be_Byte_Aligned
9821 (N : Node_Id) return Boolean; -- Flag14
9822
9823 function Must_Not_Freeze
9824 (N : Node_Id) return Boolean; -- Flag8
9825
9826 function Must_Not_Override
9827 (N : Node_Id) return Boolean; -- Flag15
9828
9829 function Must_Override
9830 (N : Node_Id) return Boolean; -- Flag14
9831
9832 function Name
9833 (N : Node_Id) return Node_Id; -- Node2
9834
9835 function Names
9836 (N : Node_Id) return List_Id; -- List2
9837
9838 function Next_Entity
9839 (N : Node_Id) return Node_Id; -- Node2
9840
9841 function Next_Exit_Statement
9842 (N : Node_Id) return Node_Id; -- Node3
9843
9844 function Next_Implicit_With
9845 (N : Node_Id) return Node_Id; -- Node3
9846
9847 function Next_Named_Actual
9848 (N : Node_Id) return Node_Id; -- Node4
9849
9850 function Next_Pragma
9851 (N : Node_Id) return Node_Id; -- Node1
9852
9853 function Next_Rep_Item
9854 (N : Node_Id) return Node_Id; -- Node5
9855
9856 function Next_Use_Clause
9857 (N : Node_Id) return Node_Id; -- Node3
9858
9859 function No_Ctrl_Actions
9860 (N : Node_Id) return Boolean; -- Flag7
9861
9862 function No_Entities_Ref_In_Spec
9863 (N : Node_Id) return Boolean; -- Flag8
9864
9865 function No_Initialization
9866 (N : Node_Id) return Boolean; -- Flag13
9867
9868 function No_Minimize_Eliminate
9869 (N : Node_Id) return Boolean; -- Flag17
9870
9871 function No_Side_Effect_Removal
9872 (N : Node_Id) return Boolean; -- Flag17
9873
9874 function No_Truncation
9875 (N : Node_Id) return Boolean; -- Flag17
9876
9877 function Null_Excluding_Subtype
9878 (N : Node_Id) return Boolean; -- Flag16
9879
9880 function Null_Exclusion_Present
9881 (N : Node_Id) return Boolean; -- Flag11
9882
9883 function Null_Exclusion_In_Return_Present
9884 (N : Node_Id) return Boolean; -- Flag14
9885
9886 function Null_Present
9887 (N : Node_Id) return Boolean; -- Flag13
9888
9889 function Null_Record_Present
9890 (N : Node_Id) return Boolean; -- Flag17
9891
9892 function Null_Statement
9893 (N : Node_Id) return Node_Id; -- Node2
9894
9895 function Object_Definition
9896 (N : Node_Id) return Node_Id; -- Node4
9897
9898 function Of_Present
9899 (N : Node_Id) return Boolean; -- Flag16
9900
9901 function Original_Discriminant
9902 (N : Node_Id) return Node_Id; -- Node2
9903
9904 function Original_Entity
9905 (N : Node_Id) return Entity_Id; -- Node2
9906
9907 function Others_Discrete_Choices
9908 (N : Node_Id) return List_Id; -- List1
9909
9910 function Out_Present
9911 (N : Node_Id) return Boolean; -- Flag17
9912
9913 function Parameter_Associations
9914 (N : Node_Id) return List_Id; -- List3
9915
9916 function Parameter_Specifications
9917 (N : Node_Id) return List_Id; -- List3
9918
9919 function Parameter_Type
9920 (N : Node_Id) return Node_Id; -- Node2
9921
9922 function Parent_Spec
9923 (N : Node_Id) return Node_Id; -- Node4
9924
9925 function Position
9926 (N : Node_Id) return Node_Id; -- Node2
9927
9928 function Pragma_Argument_Associations
9929 (N : Node_Id) return List_Id; -- List2
9930
9931 function Pragma_Identifier
9932 (N : Node_Id) return Node_Id; -- Node4
9933
9934 function Pragmas_After
9935 (N : Node_Id) return List_Id; -- List5
9936
9937 function Pragmas_Before
9938 (N : Node_Id) return List_Id; -- List4
9939
9940 function Pre_Post_Conditions
9941 (N : Node_Id) return Node_Id; -- Node1
9942
9943 function Prefix
9944 (N : Node_Id) return Node_Id; -- Node3
9945
9946 function Premature_Use
9947 (N : Node_Id) return Node_Id; -- Node5
9948
9949 function Present_Expr
9950 (N : Node_Id) return Uint; -- Uint3
9951
9952 function Prev_Ids
9953 (N : Node_Id) return Boolean; -- Flag6
9954
9955 function Prev_Use_Clause
9956 (N : Node_Id) return Node_Id; -- Node1
9957
9958 function Print_In_Hex
9959 (N : Node_Id) return Boolean; -- Flag13
9960
9961 function Private_Declarations
9962 (N : Node_Id) return List_Id; -- List3
9963
9964 function Private_Present
9965 (N : Node_Id) return Boolean; -- Flag15
9966
9967 function Procedure_To_Call
9968 (N : Node_Id) return Node_Id; -- Node2
9969
9970 function Proper_Body
9971 (N : Node_Id) return Node_Id; -- Node1
9972
9973 function Protected_Definition
9974 (N : Node_Id) return Node_Id; -- Node3
9975
9976 function Protected_Present
9977 (N : Node_Id) return Boolean; -- Flag6
9978
9979 function Raises_Constraint_Error
9980 (N : Node_Id) return Boolean; -- Flag7
9981
9982 function Range_Constraint
9983 (N : Node_Id) return Node_Id; -- Node4
9984
9985 function Range_Expression
9986 (N : Node_Id) return Node_Id; -- Node4
9987
9988 function Real_Range_Specification
9989 (N : Node_Id) return Node_Id; -- Node4
9990
9991 function Realval
9992 (N : Node_Id) return Ureal; -- Ureal3
9993
9994 function Reason
9995 (N : Node_Id) return Uint; -- Uint3
9996
9997 function Record_Extension_Part
9998 (N : Node_Id) return Node_Id; -- Node3
9999
10000 function Redundant_Use
10001 (N : Node_Id) return Boolean; -- Flag13
10002
10003 function Renaming_Exception
10004 (N : Node_Id) return Node_Id; -- Node2
10005
10006 function Result_Definition
10007 (N : Node_Id) return Node_Id; -- Node4
10008
10009 function Return_Object_Declarations
10010 (N : Node_Id) return List_Id; -- List3
10011
10012 function Return_Statement_Entity
10013 (N : Node_Id) return Node_Id; -- Node5
10014
10015 function Reverse_Present
10016 (N : Node_Id) return Boolean; -- Flag15
10017
10018 function Right_Opnd
10019 (N : Node_Id) return Node_Id; -- Node3
10020
10021 function Rounded_Result
10022 (N : Node_Id) return Boolean; -- Flag18
10023
10024 function SCIL_Controlling_Tag
10025 (N : Node_Id) return Node_Id; -- Node5
10026
10027 function SCIL_Entity
10028 (N : Node_Id) return Node_Id; -- Node4
10029
10030 function SCIL_Tag_Value
10031 (N : Node_Id) return Node_Id; -- Node5
10032
10033 function SCIL_Target_Prim
10034 (N : Node_Id) return Node_Id; -- Node2
10035
10036 function Scope
10037 (N : Node_Id) return Node_Id; -- Node3
10038
10039 function Select_Alternatives
10040 (N : Node_Id) return List_Id; -- List1
10041
10042 function Selector_Name
10043 (N : Node_Id) return Node_Id; -- Node2
10044
10045 function Selector_Names
10046 (N : Node_Id) return List_Id; -- List1
10047
10048 function Shift_Count_OK
10049 (N : Node_Id) return Boolean; -- Flag4
10050
10051 function Source_Type
10052 (N : Node_Id) return Entity_Id; -- Node1
10053
10054 function Specification
10055 (N : Node_Id) return Node_Id; -- Node1
10056
10057 function Split_PPC
10058 (N : Node_Id) return Boolean; -- Flag17
10059
10060 function Statements
10061 (N : Node_Id) return List_Id; -- List3
10062
10063 function Storage_Pool
10064 (N : Node_Id) return Node_Id; -- Node1
10065
10066 function Subpool_Handle_Name
10067 (N : Node_Id) return Node_Id; -- Node4
10068
10069 function Strval
10070 (N : Node_Id) return String_Id; -- Str3
10071
10072 function Subtype_Indication
10073 (N : Node_Id) return Node_Id; -- Node5
10074
10075 function Subtype_Mark
10076 (N : Node_Id) return Node_Id; -- Node4
10077
10078 function Subtype_Marks
10079 (N : Node_Id) return List_Id; -- List2
10080
10081 function Suppress_Assignment_Checks
10082 (N : Node_Id) return Boolean; -- Flag18
10083
10084 function Suppress_Loop_Warnings
10085 (N : Node_Id) return Boolean; -- Flag17
10086
10087 function Synchronized_Present
10088 (N : Node_Id) return Boolean; -- Flag7
10089
10090 function Tagged_Present
10091 (N : Node_Id) return Boolean; -- Flag15
10092
10093 function Target
10094 (N : Node_Id) return Entity_Id; -- Node1
10095
10096 function Target_Type
10097 (N : Node_Id) return Entity_Id; -- Node2
10098
10099 function Task_Definition
10100 (N : Node_Id) return Node_Id; -- Node3
10101
10102 function Task_Present
10103 (N : Node_Id) return Boolean; -- Flag5
10104
10105 function Then_Actions
10106 (N : Node_Id) return List_Id; -- List2
10107
10108 function Then_Statements
10109 (N : Node_Id) return List_Id; -- List2
10110
10111 function Treat_Fixed_As_Integer
10112 (N : Node_Id) return Boolean; -- Flag14
10113
10114 function Triggering_Alternative
10115 (N : Node_Id) return Node_Id; -- Node1
10116
10117 function Triggering_Statement
10118 (N : Node_Id) return Node_Id; -- Node1
10119
10120 function TSS_Elist
10121 (N : Node_Id) return Elist_Id; -- Elist3
10122
10123 function Type_Definition
10124 (N : Node_Id) return Node_Id; -- Node3
10125
10126 function Uneval_Old_Accept
10127 (N : Node_Id) return Boolean; -- Flag7
10128
10129 function Uneval_Old_Warn
10130 (N : Node_Id) return Boolean; -- Flag18
10131
10132 function Unit
10133 (N : Node_Id) return Node_Id; -- Node2
10134
10135 function Unknown_Discriminants_Present
10136 (N : Node_Id) return Boolean; -- Flag13
10137
10138 function Unreferenced_In_Spec
10139 (N : Node_Id) return Boolean; -- Flag7
10140
10141 function Variant_Part
10142 (N : Node_Id) return Node_Id; -- Node4
10143
10144 function Variants
10145 (N : Node_Id) return List_Id; -- List1
10146
10147 function Visible_Declarations
10148 (N : Node_Id) return List_Id; -- List2
10149
10150 function Uninitialized_Variable
10151 (N : Node_Id) return Node_Id; -- Node3
10152
10153 function Used_Operations
10154 (N : Node_Id) return Elist_Id; -- Elist2
10155
10156 function Was_Attribute_Reference
10157 (N : Node_Id) return Boolean; -- Flag2
10158
10159 function Was_Expression_Function
10160 (N : Node_Id) return Boolean; -- Flag18
10161
10162 function Was_Originally_Stub
10163 (N : Node_Id) return Boolean; -- Flag13
10164
10165 function Withed_Body
10166 (N : Node_Id) return Node_Id; -- Node1
10167
10168 -- End functions (note used by xsinfo utility program to end processing)
10169
10170 ----------------------------
10171 -- Node Update Procedures --
10172 ----------------------------
10173
10174 -- These are the corresponding node update routines, which again provide
10175 -- a high level logical access with type checking. In addition to setting
10176 -- the indicated field of the node N to the given Val, in the case of
10177 -- tree pointers (List1-4), the parent pointer of the Val node is set to
10178 -- point back to node N. This automates the setting of the parent pointer.
10179
10180 procedure Set_Abort_Present
10181 (N : Node_Id; Val : Boolean := True); -- Flag15
10182
10183 procedure Set_Abortable_Part
10184 (N : Node_Id; Val : Node_Id); -- Node2
10185
10186 procedure Set_Abstract_Present
10187 (N : Node_Id; Val : Boolean := True); -- Flag4
10188
10189 procedure Set_Accept_Handler_Records
10190 (N : Node_Id; Val : List_Id); -- List5
10191
10192 procedure Set_Accept_Statement
10193 (N : Node_Id; Val : Node_Id); -- Node2
10194
10195 procedure Set_Access_Definition
10196 (N : Node_Id; Val : Node_Id); -- Node3
10197
10198 procedure Set_Access_To_Subprogram_Definition
10199 (N : Node_Id; Val : Node_Id); -- Node3
10200
10201 procedure Set_Access_Types_To_Process
10202 (N : Node_Id; Val : Elist_Id); -- Elist2
10203
10204 procedure Set_Actions
10205 (N : Node_Id; Val : List_Id); -- List1
10206
10207 procedure Set_Activation_Chain_Entity
10208 (N : Node_Id; Val : Node_Id); -- Node3
10209
10210 procedure Set_Acts_As_Spec
10211 (N : Node_Id; Val : Boolean := True); -- Flag4
10212
10213 procedure Set_Actual_Designated_Subtype
10214 (N : Node_Id; Val : Node_Id); -- Node4
10215
10216 procedure Set_Address_Warning_Posted
10217 (N : Node_Id; Val : Boolean := True); -- Flag18
10218
10219 procedure Set_Aggregate_Bounds
10220 (N : Node_Id; Val : Node_Id); -- Node3
10221
10222 procedure Set_Aliased_Present
10223 (N : Node_Id; Val : Boolean := True); -- Flag4
10224
10225 procedure Set_Alloc_For_BIP_Return
10226 (N : Node_Id; Val : Boolean := True); -- Flag1
10227
10228 procedure Set_All_Others
10229 (N : Node_Id; Val : Boolean := True); -- Flag11
10230
10231 procedure Set_All_Present
10232 (N : Node_Id; Val : Boolean := True); -- Flag15
10233
10234 procedure Set_Alternatives
10235 (N : Node_Id; Val : List_Id); -- List4
10236
10237 procedure Set_Ancestor_Part
10238 (N : Node_Id; Val : Node_Id); -- Node3
10239
10240 procedure Set_Atomic_Sync_Required
10241 (N : Node_Id; Val : Boolean := True); -- Flag14
10242
10243 procedure Set_Array_Aggregate
10244 (N : Node_Id; Val : Node_Id); -- Node3
10245
10246 procedure Set_Aspect_Rep_Item
10247 (N : Node_Id; Val : Node_Id); -- Node2
10248
10249 procedure Set_Assignment_OK
10250 (N : Node_Id; Val : Boolean := True); -- Flag15
10251
10252 procedure Set_Associated_Node
10253 (N : Node_Id; Val : Node_Id); -- Node4
10254
10255 procedure Set_Attribute_Name
10256 (N : Node_Id; Val : Name_Id); -- Name2
10257
10258 procedure Set_At_End_Proc
10259 (N : Node_Id; Val : Node_Id); -- Node1
10260
10261 procedure Set_Aux_Decls_Node
10262 (N : Node_Id; Val : Node_Id); -- Node5
10263
10264 procedure Set_Backwards_OK
10265 (N : Node_Id; Val : Boolean := True); -- Flag6
10266
10267 procedure Set_Bad_Is_Detected
10268 (N : Node_Id; Val : Boolean := True); -- Flag15
10269
10270 procedure Set_Body_Required
10271 (N : Node_Id; Val : Boolean := True); -- Flag13
10272
10273 procedure Set_Body_To_Inline
10274 (N : Node_Id; Val : Node_Id); -- Node3
10275
10276 procedure Set_Box_Present
10277 (N : Node_Id; Val : Boolean := True); -- Flag15
10278
10279 procedure Set_By_Ref
10280 (N : Node_Id; Val : Boolean := True); -- Flag5
10281
10282 procedure Set_Char_Literal_Value
10283 (N : Node_Id; Val : Uint); -- Uint2
10284
10285 procedure Set_Chars
10286 (N : Node_Id; Val : Name_Id); -- Name1
10287
10288 procedure Set_Check_Address_Alignment
10289 (N : Node_Id; Val : Boolean := True); -- Flag11
10290
10291 procedure Set_Choice_Parameter
10292 (N : Node_Id; Val : Node_Id); -- Node2
10293
10294 procedure Set_Choices
10295 (N : Node_Id; Val : List_Id); -- List1
10296
10297 procedure Set_Class_Present
10298 (N : Node_Id; Val : Boolean := True); -- Flag6
10299
10300 procedure Set_Classifications
10301 (N : Node_Id; Val : Node_Id); -- Node3
10302
10303 procedure Set_Cleanup_Actions
10304 (N : Node_Id; Val : List_Id); -- List5
10305
10306 procedure Set_Comes_From_Extended_Return_Statement
10307 (N : Node_Id; Val : Boolean := True); -- Flag18
10308
10309 procedure Set_Compile_Time_Known_Aggregate
10310 (N : Node_Id; Val : Boolean := True); -- Flag18
10311
10312 procedure Set_Component_Associations
10313 (N : Node_Id; Val : List_Id); -- List2
10314
10315 procedure Set_Component_Clauses
10316 (N : Node_Id; Val : List_Id); -- List3
10317
10318 procedure Set_Component_Definition
10319 (N : Node_Id; Val : Node_Id); -- Node4
10320
10321 procedure Set_Component_Items
10322 (N : Node_Id; Val : List_Id); -- List3
10323
10324 procedure Set_Component_List
10325 (N : Node_Id; Val : Node_Id); -- Node1
10326
10327 procedure Set_Component_Name
10328 (N : Node_Id; Val : Node_Id); -- Node1
10329
10330 procedure Set_Componentwise_Assignment
10331 (N : Node_Id; Val : Boolean := True); -- Flag14
10332
10333 procedure Set_Condition
10334 (N : Node_Id; Val : Node_Id); -- Node1
10335
10336 procedure Set_Condition_Actions
10337 (N : Node_Id; Val : List_Id); -- List3
10338
10339 procedure Set_Config_Pragmas
10340 (N : Node_Id; Val : List_Id); -- List4
10341
10342 procedure Set_Constant_Present
10343 (N : Node_Id; Val : Boolean := True); -- Flag17
10344
10345 procedure Set_Constraint
10346 (N : Node_Id; Val : Node_Id); -- Node3
10347
10348 procedure Set_Constraints
10349 (N : Node_Id; Val : List_Id); -- List1
10350
10351 procedure Set_Context_Installed
10352 (N : Node_Id; Val : Boolean := True); -- Flag13
10353
10354 procedure Set_Context_Items
10355 (N : Node_Id; Val : List_Id); -- List1
10356
10357 procedure Set_Context_Pending
10358 (N : Node_Id; Val : Boolean := True); -- Flag16
10359
10360 procedure Set_Contract_Test_Cases
10361 (N : Node_Id; Val : Node_Id); -- Node2
10362
10363 procedure Set_Controlling_Argument
10364 (N : Node_Id; Val : Node_Id); -- Node1
10365
10366 procedure Set_Conversion_OK
10367 (N : Node_Id; Val : Boolean := True); -- Flag14
10368
10369 procedure Set_Convert_To_Return_False
10370 (N : Node_Id; Val : Boolean := True); -- Flag13
10371
10372 procedure Set_Corresponding_Aspect
10373 (N : Node_Id; Val : Node_Id); -- Node3
10374
10375 procedure Set_Corresponding_Body
10376 (N : Node_Id; Val : Node_Id); -- Node5
10377
10378 procedure Set_Corresponding_Formal_Spec
10379 (N : Node_Id; Val : Node_Id); -- Node3
10380
10381 procedure Set_Corresponding_Generic_Association
10382 (N : Node_Id; Val : Node_Id); -- Node5
10383
10384 procedure Set_Corresponding_Integer_Value
10385 (N : Node_Id; Val : Uint); -- Uint4
10386
10387 procedure Set_Corresponding_Spec
10388 (N : Node_Id; Val : Entity_Id); -- Node5
10389
10390 procedure Set_Corresponding_Spec_Of_Stub
10391 (N : Node_Id; Val : Node_Id); -- Node2
10392
10393 procedure Set_Corresponding_Stub
10394 (N : Node_Id; Val : Node_Id); -- Node3
10395
10396 procedure Set_Dcheck_Function
10397 (N : Node_Id; Val : Entity_Id); -- Node5
10398
10399 procedure Set_Declarations
10400 (N : Node_Id; Val : List_Id); -- List2
10401
10402 procedure Set_Default_Expression
10403 (N : Node_Id; Val : Node_Id); -- Node5
10404
10405 procedure Set_Default_Storage_Pool
10406 (N : Node_Id; Val : Node_Id); -- Node3
10407
10408 procedure Set_Default_Name
10409 (N : Node_Id; Val : Node_Id); -- Node2
10410
10411 procedure Set_Defining_Identifier
10412 (N : Node_Id; Val : Entity_Id); -- Node1
10413
10414 procedure Set_Defining_Unit_Name
10415 (N : Node_Id; Val : Node_Id); -- Node1
10416
10417 procedure Set_Delay_Alternative
10418 (N : Node_Id; Val : Node_Id); -- Node4
10419
10420 procedure Set_Delay_Statement
10421 (N : Node_Id; Val : Node_Id); -- Node2
10422
10423 procedure Set_Delta_Expression
10424 (N : Node_Id; Val : Node_Id); -- Node3
10425
10426 procedure Set_Digits_Expression
10427 (N : Node_Id; Val : Node_Id); -- Node2
10428
10429 procedure Set_Discr_Check_Funcs_Built
10430 (N : Node_Id; Val : Boolean := True); -- Flag11
10431
10432 procedure Set_Discrete_Choices
10433 (N : Node_Id; Val : List_Id); -- List4
10434
10435 procedure Set_Discrete_Range
10436 (N : Node_Id; Val : Node_Id); -- Node4
10437
10438 procedure Set_Discrete_Subtype_Definition
10439 (N : Node_Id; Val : Node_Id); -- Node4
10440
10441 procedure Set_Discrete_Subtype_Definitions
10442 (N : Node_Id; Val : List_Id); -- List2
10443
10444 procedure Set_Discriminant_Specifications
10445 (N : Node_Id; Val : List_Id); -- List4
10446
10447 procedure Set_Discriminant_Type
10448 (N : Node_Id; Val : Node_Id); -- Node5
10449
10450 procedure Set_Do_Accessibility_Check
10451 (N : Node_Id; Val : Boolean := True); -- Flag13
10452
10453 procedure Set_Do_Discriminant_Check
10454 (N : Node_Id; Val : Boolean := True); -- Flag3
10455
10456 procedure Set_Do_Division_Check
10457 (N : Node_Id; Val : Boolean := True); -- Flag13
10458
10459 procedure Set_Do_Length_Check
10460 (N : Node_Id; Val : Boolean := True); -- Flag4
10461
10462 procedure Set_Do_Overflow_Check
10463 (N : Node_Id; Val : Boolean := True); -- Flag17
10464
10465 procedure Set_Do_Range_Check
10466 (N : Node_Id; Val : Boolean := True); -- Flag9
10467
10468 procedure Set_Do_Storage_Check
10469 (N : Node_Id; Val : Boolean := True); -- Flag17
10470
10471 procedure Set_Do_Tag_Check
10472 (N : Node_Id; Val : Boolean := True); -- Flag13
10473
10474 procedure Set_Elaborate_All_Desirable
10475 (N : Node_Id; Val : Boolean := True); -- Flag9
10476
10477 procedure Set_Elaborate_All_Present
10478 (N : Node_Id; Val : Boolean := True); -- Flag14
10479
10480 procedure Set_Elaborate_Desirable
10481 (N : Node_Id; Val : Boolean := True); -- Flag11
10482
10483 procedure Set_Elaborate_Present
10484 (N : Node_Id; Val : Boolean := True); -- Flag4
10485
10486 procedure Set_Else_Actions
10487 (N : Node_Id; Val : List_Id); -- List3
10488
10489 procedure Set_Else_Statements
10490 (N : Node_Id; Val : List_Id); -- List4
10491
10492 procedure Set_Elsif_Parts
10493 (N : Node_Id; Val : List_Id); -- List3
10494
10495 procedure Set_Enclosing_Variant
10496 (N : Node_Id; Val : Node_Id); -- Node2
10497
10498 procedure Set_End_Label
10499 (N : Node_Id; Val : Node_Id); -- Node4
10500
10501 procedure Set_End_Span
10502 (N : Node_Id; Val : Uint); -- Uint5
10503
10504 procedure Set_Entity
10505 (N : Node_Id; Val : Node_Id); -- Node4
10506
10507 procedure Set_Entry_Body_Formal_Part
10508 (N : Node_Id; Val : Node_Id); -- Node5
10509
10510 procedure Set_Entry_Call_Alternative
10511 (N : Node_Id; Val : Node_Id); -- Node1
10512
10513 procedure Set_Entry_Call_Statement
10514 (N : Node_Id; Val : Node_Id); -- Node1
10515
10516 procedure Set_Entry_Direct_Name
10517 (N : Node_Id; Val : Node_Id); -- Node1
10518
10519 procedure Set_Entry_Index
10520 (N : Node_Id; Val : Node_Id); -- Node5
10521
10522 procedure Set_Entry_Index_Specification
10523 (N : Node_Id; Val : Node_Id); -- Node4
10524
10525 procedure Set_Etype
10526 (N : Node_Id; Val : Node_Id); -- Node5
10527
10528 procedure Set_Exception_Choices
10529 (N : Node_Id; Val : List_Id); -- List4
10530
10531 procedure Set_Exception_Handlers
10532 (N : Node_Id; Val : List_Id); -- List5
10533
10534 procedure Set_Exception_Junk
10535 (N : Node_Id; Val : Boolean := True); -- Flag8
10536
10537 procedure Set_Exception_Label
10538 (N : Node_Id; Val : Node_Id); -- Node5
10539
10540 procedure Set_Expansion_Delayed
10541 (N : Node_Id; Val : Boolean := True); -- Flag11
10542
10543 procedure Set_Explicit_Actual_Parameter
10544 (N : Node_Id; Val : Node_Id); -- Node3
10545
10546 procedure Set_Explicit_Generic_Actual_Parameter
10547 (N : Node_Id; Val : Node_Id); -- Node1
10548
10549 procedure Set_Expression
10550 (N : Node_Id; Val : Node_Id); -- Node3
10551
10552 procedure Set_Expression_Copy
10553 (N : Node_Id; Val : Node_Id); -- Node2
10554
10555 procedure Set_Expressions
10556 (N : Node_Id; Val : List_Id); -- List1
10557
10558 procedure Set_First_Bit
10559 (N : Node_Id; Val : Node_Id); -- Node3
10560
10561 procedure Set_First_Inlined_Subprogram
10562 (N : Node_Id; Val : Entity_Id); -- Node3
10563
10564 procedure Set_First_Name
10565 (N : Node_Id; Val : Boolean := True); -- Flag5
10566
10567 procedure Set_First_Named_Actual
10568 (N : Node_Id; Val : Node_Id); -- Node4
10569
10570 procedure Set_First_Real_Statement
10571 (N : Node_Id; Val : Node_Id); -- Node2
10572
10573 procedure Set_First_Subtype_Link
10574 (N : Node_Id; Val : Entity_Id); -- Node5
10575
10576 procedure Set_Float_Truncate
10577 (N : Node_Id; Val : Boolean := True); -- Flag11
10578
10579 procedure Set_Formal_Type_Definition
10580 (N : Node_Id; Val : Node_Id); -- Node3
10581
10582 procedure Set_Forwards_OK
10583 (N : Node_Id; Val : Boolean := True); -- Flag5
10584
10585 procedure Set_From_Aspect_Specification
10586 (N : Node_Id; Val : Boolean := True); -- Flag13
10587
10588 procedure Set_From_At_End
10589 (N : Node_Id; Val : Boolean := True); -- Flag4
10590
10591 procedure Set_From_At_Mod
10592 (N : Node_Id; Val : Boolean := True); -- Flag4
10593
10594 procedure Set_From_Conditional_Expression
10595 (N : Node_Id; Val : Boolean := True); -- Flag1
10596
10597 procedure Set_From_Default
10598 (N : Node_Id; Val : Boolean := True); -- Flag6
10599
10600 procedure Set_Generalized_Indexing
10601 (N : Node_Id; Val : Node_Id); -- Node4
10602
10603 procedure Set_Generic_Associations
10604 (N : Node_Id; Val : List_Id); -- List3
10605
10606 procedure Set_Generic_Formal_Declarations
10607 (N : Node_Id; Val : List_Id); -- List2
10608
10609 procedure Set_Generic_Parent
10610 (N : Node_Id; Val : Node_Id); -- Node5
10611
10612 procedure Set_Generic_Parent_Type
10613 (N : Node_Id; Val : Node_Id); -- Node4
10614
10615 procedure Set_Handled_Statement_Sequence
10616 (N : Node_Id; Val : Node_Id); -- Node4
10617
10618 procedure Set_Handler_List_Entry
10619 (N : Node_Id; Val : Node_Id); -- Node2
10620
10621 procedure Set_Has_Created_Identifier
10622 (N : Node_Id; Val : Boolean := True); -- Flag15
10623
10624 procedure Set_Has_Dereference_Action
10625 (N : Node_Id; Val : Boolean := True); -- Flag13
10626
10627 procedure Set_Has_Dynamic_Length_Check
10628 (N : Node_Id; Val : Boolean := True); -- Flag10
10629
10630 procedure Set_Has_Dynamic_Range_Check
10631 (N : Node_Id; Val : Boolean := True); -- Flag12
10632
10633 procedure Set_Has_Init_Expression
10634 (N : Node_Id; Val : Boolean := True); -- Flag14
10635
10636 procedure Set_Has_Local_Raise
10637 (N : Node_Id; Val : Boolean := True); -- Flag8
10638
10639 procedure Set_Has_No_Elaboration_Code
10640 (N : Node_Id; Val : Boolean := True); -- Flag17
10641
10642 procedure Set_Has_Pragma_Suppress_All
10643 (N : Node_Id; Val : Boolean := True); -- Flag14
10644
10645 procedure Set_Has_Private_View
10646 (N : Node_Id; Val : Boolean := True); -- Flag11
10647
10648 procedure Set_Has_Relative_Deadline_Pragma
10649 (N : Node_Id; Val : Boolean := True); -- Flag9
10650
10651 procedure Set_Has_Self_Reference
10652 (N : Node_Id; Val : Boolean := True); -- Flag13
10653
10654 procedure Set_Has_SP_Choice
10655 (N : Node_Id; Val : Boolean := True); -- Flag15
10656
10657 procedure Set_Has_Storage_Size_Pragma
10658 (N : Node_Id; Val : Boolean := True); -- Flag5
10659
10660 procedure Set_Has_Target_Names
10661 (N : Node_Id; Val : Boolean := True); -- Flag8
10662
10663 procedure Set_Has_Wide_Character
10664 (N : Node_Id; Val : Boolean := True); -- Flag11
10665
10666 procedure Set_Has_Wide_Wide_Character
10667 (N : Node_Id; Val : Boolean := True); -- Flag13
10668
10669 procedure Set_Header_Size_Added
10670 (N : Node_Id; Val : Boolean := True); -- Flag11
10671
10672 procedure Set_Hidden_By_Use_Clause
10673 (N : Node_Id; Val : Elist_Id); -- Elist5
10674
10675 procedure Set_High_Bound
10676 (N : Node_Id; Val : Node_Id); -- Node2
10677
10678 procedure Set_Identifier
10679 (N : Node_Id; Val : Node_Id); -- Node1
10680
10681 procedure Set_Interface_List
10682 (N : Node_Id; Val : List_Id); -- List2
10683
10684 procedure Set_Interface_Present
10685 (N : Node_Id; Val : Boolean := True); -- Flag16
10686
10687 procedure Set_Implicit_With
10688 (N : Node_Id; Val : Boolean := True); -- Flag16
10689
10690 procedure Set_Implicit_With_From_Instantiation
10691 (N : Node_Id; Val : Boolean := True); -- Flag12
10692
10693 procedure Set_Import_Interface_Present
10694 (N : Node_Id; Val : Boolean := True); -- Flag16
10695
10696 procedure Set_In_Present
10697 (N : Node_Id; Val : Boolean := True); -- Flag15
10698
10699 procedure Set_Includes_Infinities
10700 (N : Node_Id; Val : Boolean := True); -- Flag11
10701
10702 procedure Set_Incomplete_View
10703 (N : Node_Id; Val : Node_Id); -- Node2
10704
10705 procedure Set_Inherited_Discriminant
10706 (N : Node_Id; Val : Boolean := True); -- Flag13
10707
10708 procedure Set_Instance_Spec
10709 (N : Node_Id; Val : Node_Id); -- Node5
10710
10711 procedure Set_Intval
10712 (N : Node_Id; Val : Uint); -- Uint3
10713
10714 procedure Set_Is_Abort_Block
10715 (N : Node_Id; Val : Boolean := True); -- Flag4
10716
10717 procedure Set_Is_Accessibility_Actual
10718 (N : Node_Id; Val : Boolean := True); -- Flag13
10719
10720 procedure Set_Is_Analyzed_Pragma
10721 (N : Node_Id; Val : Boolean := True); -- Flag5
10722
10723 procedure Set_Is_Asynchronous_Call_Block
10724 (N : Node_Id; Val : Boolean := True); -- Flag7
10725
10726 procedure Set_Is_Boolean_Aspect
10727 (N : Node_Id; Val : Boolean := True); -- Flag16
10728
10729 procedure Set_Is_Checked
10730 (N : Node_Id; Val : Boolean := True); -- Flag11
10731
10732 procedure Set_Is_Checked_Ghost_Pragma
10733 (N : Node_Id; Val : Boolean := True); -- Flag3
10734
10735 procedure Set_Is_Component_Left_Opnd
10736 (N : Node_Id; Val : Boolean := True); -- Flag13
10737
10738 procedure Set_Is_Component_Right_Opnd
10739 (N : Node_Id; Val : Boolean := True); -- Flag14
10740
10741 procedure Set_Is_Controlling_Actual
10742 (N : Node_Id; Val : Boolean := True); -- Flag16
10743
10744 procedure Set_Is_Declaration_Level_Node
10745 (N : Node_Id; Val : Boolean := True); -- Flag5
10746
10747 procedure Set_Is_Delayed_Aspect
10748 (N : Node_Id; Val : Boolean := True); -- Flag14
10749
10750 procedure Set_Is_Disabled
10751 (N : Node_Id; Val : Boolean := True); -- Flag15
10752
10753 procedure Set_Is_Dispatching_Call
10754 (N : Node_Id; Val : Boolean := True); -- Flag3
10755
10756 procedure Set_Is_Dynamic_Coextension
10757 (N : Node_Id; Val : Boolean := True); -- Flag18
10758
10759 procedure Set_Is_Effective_Use_Clause
10760 (N : Node_Id; Val : Boolean := True); -- Flag1
10761
10762 procedure Set_Is_Elaboration_Checks_OK_Node
10763 (N : Node_Id; Val : Boolean := True); -- Flag1
10764
10765 procedure Set_Is_Elsif
10766 (N : Node_Id; Val : Boolean := True); -- Flag13
10767
10768 procedure Set_Is_Entry_Barrier_Function
10769 (N : Node_Id; Val : Boolean := True); -- Flag8
10770
10771 procedure Set_Is_Expanded_Build_In_Place_Call
10772 (N : Node_Id; Val : Boolean := True); -- Flag11
10773
10774 procedure Set_Is_Expanded_Contract
10775 (N : Node_Id; Val : Boolean := True); -- Flag1
10776
10777 procedure Set_Is_Finalization_Wrapper
10778 (N : Node_Id; Val : Boolean := True); -- Flag9
10779
10780 procedure Set_Is_Folded_In_Parser
10781 (N : Node_Id; Val : Boolean := True); -- Flag4
10782
10783 procedure Set_Is_Generic_Contract_Pragma
10784 (N : Node_Id; Val : Boolean := True); -- Flag2
10785
10786 procedure Set_Is_Ignored
10787 (N : Node_Id; Val : Boolean := True); -- Flag9
10788
10789 procedure Set_Is_Ignored_Ghost_Pragma
10790 (N : Node_Id; Val : Boolean := True); -- Flag8
10791
10792 procedure Set_Is_In_Discriminant_Check
10793 (N : Node_Id; Val : Boolean := True); -- Flag11
10794
10795 procedure Set_Is_Inherited_Pragma
10796 (N : Node_Id; Val : Boolean := True); -- Flag4
10797
10798 procedure Set_Is_Initialization_Block
10799 (N : Node_Id; Val : Boolean := True); -- Flag1
10800
10801 procedure Set_Is_Known_Guaranteed_ABE
10802 (N : Node_Id; Val : Boolean := True); -- Flag18
10803
10804 procedure Set_Is_Machine_Number
10805 (N : Node_Id; Val : Boolean := True); -- Flag11
10806
10807 procedure Set_Is_Null_Loop
10808 (N : Node_Id; Val : Boolean := True); -- Flag16
10809
10810 procedure Set_Is_Overloaded
10811 (N : Node_Id; Val : Boolean := True); -- Flag5
10812
10813 procedure Set_Is_Power_Of_2_For_Shift
10814 (N : Node_Id; Val : Boolean := True); -- Flag13
10815
10816 procedure Set_Is_Prefixed_Call
10817 (N : Node_Id; Val : Boolean := True); -- Flag17
10818
10819 procedure Set_Is_Protected_Subprogram_Body
10820 (N : Node_Id; Val : Boolean := True); -- Flag7
10821
10822 procedure Set_Is_Qualified_Universal_Literal
10823 (N : Node_Id; Val : Boolean := True); -- Flag4
10824
10825 procedure Set_Is_Recorded_Scenario
10826 (N : Node_Id; Val : Boolean := True); -- Flag6
10827
10828 procedure Set_Is_Source_Call
10829 (N : Node_Id; Val : Boolean := True); -- Flag4
10830
10831 procedure Set_Is_SPARK_Mode_On_Node
10832 (N : Node_Id; Val : Boolean := True); -- Flag2
10833
10834 procedure Set_Is_Static_Coextension
10835 (N : Node_Id; Val : Boolean := True); -- Flag14
10836
10837 procedure Set_Is_Static_Expression
10838 (N : Node_Id; Val : Boolean := True); -- Flag6
10839
10840 procedure Set_Is_Subprogram_Descriptor
10841 (N : Node_Id; Val : Boolean := True); -- Flag16
10842
10843 procedure Set_Is_Task_Allocation_Block
10844 (N : Node_Id; Val : Boolean := True); -- Flag6
10845
10846 procedure Set_Is_Task_Body_Procedure
10847 (N : Node_Id; Val : Boolean := True); -- Flag1
10848
10849 procedure Set_Is_Task_Master
10850 (N : Node_Id; Val : Boolean := True); -- Flag5
10851
10852 procedure Set_Iteration_Scheme
10853 (N : Node_Id; Val : Node_Id); -- Node2
10854
10855 procedure Set_Iterator_Specification
10856 (N : Node_Id; Val : Node_Id); -- Node2
10857
10858 procedure Set_Itype
10859 (N : Node_Id; Val : Entity_Id); -- Node1
10860
10861 procedure Set_Kill_Range_Check
10862 (N : Node_Id; Val : Boolean := True); -- Flag11
10863
10864 procedure Set_Last_Bit
10865 (N : Node_Id; Val : Node_Id); -- Node4
10866
10867 procedure Set_Last_Name
10868 (N : Node_Id; Val : Boolean := True); -- Flag6
10869
10870 procedure Set_Library_Unit
10871 (N : Node_Id; Val : Node_Id); -- Node4
10872
10873 procedure Set_Label_Construct
10874 (N : Node_Id; Val : Node_Id); -- Node2
10875
10876 procedure Set_Left_Opnd
10877 (N : Node_Id; Val : Node_Id); -- Node2
10878
10879 procedure Set_Limited_View_Installed
10880 (N : Node_Id; Val : Boolean := True); -- Flag18
10881
10882 procedure Set_Limited_Present
10883 (N : Node_Id; Val : Boolean := True); -- Flag17
10884
10885 procedure Set_Literals
10886 (N : Node_Id; Val : List_Id); -- List1
10887
10888 procedure Set_Local_Raise_Not_OK
10889 (N : Node_Id; Val : Boolean := True); -- Flag7
10890
10891 procedure Set_Local_Raise_Statements
10892 (N : Node_Id; Val : Elist_Id); -- Elist1
10893
10894 procedure Set_Loop_Actions
10895 (N : Node_Id; Val : List_Id); -- List2
10896
10897 procedure Set_Loop_Parameter_Specification
10898 (N : Node_Id; Val : Node_Id); -- Node4
10899
10900 procedure Set_Low_Bound
10901 (N : Node_Id; Val : Node_Id); -- Node1
10902
10903 procedure Set_Mod_Clause
10904 (N : Node_Id; Val : Node_Id); -- Node2
10905
10906 procedure Set_More_Ids
10907 (N : Node_Id; Val : Boolean := True); -- Flag5
10908
10909 procedure Set_Must_Be_Byte_Aligned
10910 (N : Node_Id; Val : Boolean := True); -- Flag14
10911
10912 procedure Set_Must_Not_Freeze
10913 (N : Node_Id; Val : Boolean := True); -- Flag8
10914
10915 procedure Set_Must_Not_Override
10916 (N : Node_Id; Val : Boolean := True); -- Flag15
10917
10918 procedure Set_Must_Override
10919 (N : Node_Id; Val : Boolean := True); -- Flag14
10920
10921 procedure Set_Name
10922 (N : Node_Id; Val : Node_Id); -- Node2
10923
10924 procedure Set_Names
10925 (N : Node_Id; Val : List_Id); -- List2
10926
10927 procedure Set_Next_Entity
10928 (N : Node_Id; Val : Node_Id); -- Node2
10929
10930 procedure Set_Next_Exit_Statement
10931 (N : Node_Id; Val : Node_Id); -- Node3
10932
10933 procedure Set_Next_Implicit_With
10934 (N : Node_Id; Val : Node_Id); -- Node3
10935
10936 procedure Set_Next_Named_Actual
10937 (N : Node_Id; Val : Node_Id); -- Node4
10938
10939 procedure Set_Next_Pragma
10940 (N : Node_Id; Val : Node_Id); -- Node1
10941
10942 procedure Set_Next_Rep_Item
10943 (N : Node_Id; Val : Node_Id); -- Node5
10944
10945 procedure Set_Next_Use_Clause
10946 (N : Node_Id; Val : Node_Id); -- Node3
10947
10948 procedure Set_No_Ctrl_Actions
10949 (N : Node_Id; Val : Boolean := True); -- Flag7
10950
10951 procedure Set_No_Entities_Ref_In_Spec
10952 (N : Node_Id; Val : Boolean := True); -- Flag8
10953
10954 procedure Set_No_Initialization
10955 (N : Node_Id; Val : Boolean := True); -- Flag13
10956
10957 procedure Set_No_Minimize_Eliminate
10958 (N : Node_Id; Val : Boolean := True); -- Flag17
10959
10960 procedure Set_No_Side_Effect_Removal
10961 (N : Node_Id; Val : Boolean := True); -- Flag17
10962
10963 procedure Set_No_Truncation
10964 (N : Node_Id; Val : Boolean := True); -- Flag17
10965
10966 procedure Set_Null_Excluding_Subtype
10967 (N : Node_Id; Val : Boolean := True); -- Flag16
10968
10969 procedure Set_Null_Exclusion_Present
10970 (N : Node_Id; Val : Boolean := True); -- Flag11
10971
10972 procedure Set_Null_Exclusion_In_Return_Present
10973 (N : Node_Id; Val : Boolean := True); -- Flag14
10974
10975 procedure Set_Null_Present
10976 (N : Node_Id; Val : Boolean := True); -- Flag13
10977
10978 procedure Set_Null_Record_Present
10979 (N : Node_Id; Val : Boolean := True); -- Flag17
10980
10981 procedure Set_Null_Statement
10982 (N : Node_Id; Val : Node_Id); -- Node2
10983
10984 procedure Set_Object_Definition
10985 (N : Node_Id; Val : Node_Id); -- Node4
10986
10987 procedure Set_Of_Present
10988 (N : Node_Id; Val : Boolean := True); -- Flag16
10989
10990 procedure Set_Original_Discriminant
10991 (N : Node_Id; Val : Node_Id); -- Node2
10992
10993 procedure Set_Original_Entity
10994 (N : Node_Id; Val : Entity_Id); -- Node2
10995
10996 procedure Set_Others_Discrete_Choices
10997 (N : Node_Id; Val : List_Id); -- List1
10998
10999 procedure Set_Out_Present
11000 (N : Node_Id; Val : Boolean := True); -- Flag17
11001
11002 procedure Set_Parameter_Associations
11003 (N : Node_Id; Val : List_Id); -- List3
11004
11005 procedure Set_Parameter_Specifications
11006 (N : Node_Id; Val : List_Id); -- List3
11007
11008 procedure Set_Parameter_Type
11009 (N : Node_Id; Val : Node_Id); -- Node2
11010
11011 procedure Set_Parent_Spec
11012 (N : Node_Id; Val : Node_Id); -- Node4
11013
11014 procedure Set_Position
11015 (N : Node_Id; Val : Node_Id); -- Node2
11016
11017 procedure Set_Pragma_Argument_Associations
11018 (N : Node_Id; Val : List_Id); -- List2
11019
11020 procedure Set_Pragma_Identifier
11021 (N : Node_Id; Val : Node_Id); -- Node4
11022
11023 procedure Set_Pragmas_After
11024 (N : Node_Id; Val : List_Id); -- List5
11025
11026 procedure Set_Pragmas_Before
11027 (N : Node_Id; Val : List_Id); -- List4
11028
11029 procedure Set_Pre_Post_Conditions
11030 (N : Node_Id; Val : Node_Id); -- Node1
11031
11032 procedure Set_Prefix
11033 (N : Node_Id; Val : Node_Id); -- Node3
11034
11035 procedure Set_Premature_Use
11036 (N : Node_Id; Val : Node_Id); -- Node5
11037
11038 procedure Set_Present_Expr
11039 (N : Node_Id; Val : Uint); -- Uint3
11040
11041 procedure Set_Prev_Ids
11042 (N : Node_Id; Val : Boolean := True); -- Flag6
11043
11044 procedure Set_Prev_Use_Clause
11045 (N : Node_Id; Val : Node_Id); -- Node1
11046
11047 procedure Set_Print_In_Hex
11048 (N : Node_Id; Val : Boolean := True); -- Flag13
11049
11050 procedure Set_Private_Declarations
11051 (N : Node_Id; Val : List_Id); -- List3
11052
11053 procedure Set_Private_Present
11054 (N : Node_Id; Val : Boolean := True); -- Flag15
11055
11056 procedure Set_Procedure_To_Call
11057 (N : Node_Id; Val : Node_Id); -- Node2
11058
11059 procedure Set_Proper_Body
11060 (N : Node_Id; Val : Node_Id); -- Node1
11061
11062 procedure Set_Protected_Definition
11063 (N : Node_Id; Val : Node_Id); -- Node3
11064
11065 procedure Set_Protected_Present
11066 (N : Node_Id; Val : Boolean := True); -- Flag6
11067
11068 procedure Set_Raises_Constraint_Error
11069 (N : Node_Id; Val : Boolean := True); -- Flag7
11070
11071 procedure Set_Range_Constraint
11072 (N : Node_Id; Val : Node_Id); -- Node4
11073
11074 procedure Set_Range_Expression
11075 (N : Node_Id; Val : Node_Id); -- Node4
11076
11077 procedure Set_Real_Range_Specification
11078 (N : Node_Id; Val : Node_Id); -- Node4
11079
11080 procedure Set_Realval
11081 (N : Node_Id; Val : Ureal); -- Ureal3
11082
11083 procedure Set_Reason
11084 (N : Node_Id; Val : Uint); -- Uint3
11085
11086 procedure Set_Record_Extension_Part
11087 (N : Node_Id; Val : Node_Id); -- Node3
11088
11089 procedure Set_Redundant_Use
11090 (N : Node_Id; Val : Boolean := True); -- Flag13
11091
11092 procedure Set_Renaming_Exception
11093 (N : Node_Id; Val : Node_Id); -- Node2
11094
11095 procedure Set_Result_Definition
11096 (N : Node_Id; Val : Node_Id); -- Node4
11097
11098 procedure Set_Return_Object_Declarations
11099 (N : Node_Id; Val : List_Id); -- List3
11100
11101 procedure Set_Return_Statement_Entity
11102 (N : Node_Id; Val : Node_Id); -- Node5
11103
11104 procedure Set_Reverse_Present
11105 (N : Node_Id; Val : Boolean := True); -- Flag15
11106
11107 procedure Set_Right_Opnd
11108 (N : Node_Id; Val : Node_Id); -- Node3
11109
11110 procedure Set_Rounded_Result
11111 (N : Node_Id; Val : Boolean := True); -- Flag18
11112
11113 procedure Set_SCIL_Controlling_Tag
11114 (N : Node_Id; Val : Node_Id); -- Node5
11115
11116 procedure Set_SCIL_Entity
11117 (N : Node_Id; Val : Node_Id); -- Node4
11118
11119 procedure Set_SCIL_Tag_Value
11120 (N : Node_Id; Val : Node_Id); -- Node5
11121
11122 procedure Set_SCIL_Target_Prim
11123 (N : Node_Id; Val : Node_Id); -- Node2
11124
11125 procedure Set_Scope
11126 (N : Node_Id; Val : Node_Id); -- Node3
11127
11128 procedure Set_Select_Alternatives
11129 (N : Node_Id; Val : List_Id); -- List1
11130
11131 procedure Set_Selector_Name
11132 (N : Node_Id; Val : Node_Id); -- Node2
11133
11134 procedure Set_Selector_Names
11135 (N : Node_Id; Val : List_Id); -- List1
11136
11137 procedure Set_Shift_Count_OK
11138 (N : Node_Id; Val : Boolean := True); -- Flag4
11139
11140 procedure Set_Source_Type
11141 (N : Node_Id; Val : Entity_Id); -- Node1
11142
11143 procedure Set_Specification
11144 (N : Node_Id; Val : Node_Id); -- Node1
11145
11146 procedure Set_Split_PPC
11147 (N : Node_Id; Val : Boolean); -- Flag17
11148
11149 procedure Set_Statements
11150 (N : Node_Id; Val : List_Id); -- List3
11151
11152 procedure Set_Storage_Pool
11153 (N : Node_Id; Val : Node_Id); -- Node1
11154
11155 procedure Set_Subpool_Handle_Name
11156 (N : Node_Id; Val : Node_Id); -- Node4
11157
11158 procedure Set_Strval
11159 (N : Node_Id; Val : String_Id); -- Str3
11160
11161 procedure Set_Subtype_Indication
11162 (N : Node_Id; Val : Node_Id); -- Node5
11163
11164 procedure Set_Subtype_Mark
11165 (N : Node_Id; Val : Node_Id); -- Node4
11166
11167 procedure Set_Subtype_Marks
11168 (N : Node_Id; Val : List_Id); -- List2
11169
11170 procedure Set_Suppress_Assignment_Checks
11171 (N : Node_Id; Val : Boolean := True); -- Flag18
11172
11173 procedure Set_Suppress_Loop_Warnings
11174 (N : Node_Id; Val : Boolean := True); -- Flag17
11175
11176 procedure Set_Synchronized_Present
11177 (N : Node_Id; Val : Boolean := True); -- Flag7
11178
11179 procedure Set_Tagged_Present
11180 (N : Node_Id; Val : Boolean := True); -- Flag15
11181
11182 procedure Set_Target
11183 (N : Node_Id; Val : Entity_Id); -- Node1
11184
11185 procedure Set_Target_Type
11186 (N : Node_Id; Val : Entity_Id); -- Node2
11187
11188 procedure Set_Task_Definition
11189 (N : Node_Id; Val : Node_Id); -- Node3
11190
11191 procedure Set_Task_Present
11192 (N : Node_Id; Val : Boolean := True); -- Flag5
11193
11194 procedure Set_Then_Actions
11195 (N : Node_Id; Val : List_Id); -- List2
11196
11197 procedure Set_Then_Statements
11198 (N : Node_Id; Val : List_Id); -- List2
11199
11200 procedure Set_Treat_Fixed_As_Integer
11201 (N : Node_Id; Val : Boolean := True); -- Flag14
11202
11203 procedure Set_Triggering_Alternative
11204 (N : Node_Id; Val : Node_Id); -- Node1
11205
11206 procedure Set_Triggering_Statement
11207 (N : Node_Id; Val : Node_Id); -- Node1
11208
11209 procedure Set_TSS_Elist
11210 (N : Node_Id; Val : Elist_Id); -- Elist3
11211
11212 procedure Set_Type_Definition
11213 (N : Node_Id; Val : Node_Id); -- Node3
11214
11215 procedure Set_Uneval_Old_Accept
11216 (N : Node_Id; Val : Boolean := True); -- Flag7
11217
11218 procedure Set_Uneval_Old_Warn
11219 (N : Node_Id; Val : Boolean := True); -- Flag18
11220
11221 procedure Set_Unit
11222 (N : Node_Id; Val : Node_Id); -- Node2
11223
11224 procedure Set_Unknown_Discriminants_Present
11225 (N : Node_Id; Val : Boolean := True); -- Flag13
11226
11227 procedure Set_Unreferenced_In_Spec
11228 (N : Node_Id; Val : Boolean := True); -- Flag7
11229
11230 procedure Set_Variant_Part
11231 (N : Node_Id; Val : Node_Id); -- Node4
11232
11233 procedure Set_Variants
11234 (N : Node_Id; Val : List_Id); -- List1
11235
11236 procedure Set_Visible_Declarations
11237 (N : Node_Id; Val : List_Id); -- List2
11238
11239 procedure Set_Uninitialized_Variable
11240 (N : Node_Id; Val : Node_Id); -- Node3
11241
11242 procedure Set_Used_Operations
11243 (N : Node_Id; Val : Elist_Id); -- Elist2
11244
11245 procedure Set_Was_Attribute_Reference
11246 (N : Node_Id; Val : Boolean := True); -- Flag2
11247
11248 procedure Set_Was_Expression_Function
11249 (N : Node_Id; Val : Boolean := True); -- Flag18
11250
11251 procedure Set_Was_Originally_Stub
11252 (N : Node_Id; Val : Boolean := True); -- Flag13
11253
11254 procedure Set_Withed_Body
11255 (N : Node_Id; Val : Node_Id); -- Node1
11256
11257 -------------------------
11258 -- Iterator Procedures --
11259 -------------------------
11260
11261 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
11262
11263 procedure Next_Entity (N : in out Node_Id);
11264 procedure Next_Named_Actual (N : in out Node_Id);
11265 procedure Next_Rep_Item (N : in out Node_Id);
11266 procedure Next_Use_Clause (N : in out Node_Id);
11267
11268 -------------------------------------------
11269 -- Miscellaneous Tree Access Subprograms --
11270 -------------------------------------------
11271
11272 function End_Location (N : Node_Id) return Source_Ptr;
11273 -- N is an N_If_Statement or N_Case_Statement node, and this function
11274 -- returns the location of the IF token in the END IF sequence by
11275 -- translating the value of the End_Span field.
11276
11277 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
11278 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
11279 -- the End_Span field to correspond to the given value S. In other words,
11280 -- End_Span is set to the difference between S and Sloc (N), the starting
11281 -- location.
11282
11283 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
11284 -- Given an argument to a pragma Arg, this function returns the expression
11285 -- for the argument. This is Arg itself, or, in the case where Arg is a
11286 -- pragma argument association node, the expression from this node.
11287
11288 --------------------------------
11289 -- Node_Kind Membership Tests --
11290 --------------------------------
11291
11292 -- The following functions allow a convenient notation for testing whether
11293 -- a Node_Kind value matches any one of a list of possible values. In each
11294 -- case True is returned if the given T argument is equal to any of the V
11295 -- arguments. Note that there is a similar set of functions defined in
11296 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
11297
11298 function Nkind_In
11299 (T : Node_Kind;
11300 V1 : Node_Kind;
11301 V2 : Node_Kind) return Boolean;
11302
11303 function Nkind_In
11304 (T : Node_Kind;
11305 V1 : Node_Kind;
11306 V2 : Node_Kind;
11307 V3 : Node_Kind) return Boolean;
11308
11309 function Nkind_In
11310 (T : Node_Kind;
11311 V1 : Node_Kind;
11312 V2 : Node_Kind;
11313 V3 : Node_Kind;
11314 V4 : Node_Kind) return Boolean;
11315
11316 function Nkind_In
11317 (T : Node_Kind;
11318 V1 : Node_Kind;
11319 V2 : Node_Kind;
11320 V3 : Node_Kind;
11321 V4 : Node_Kind;
11322 V5 : Node_Kind) return Boolean;
11323
11324 function Nkind_In
11325 (T : Node_Kind;
11326 V1 : Node_Kind;
11327 V2 : Node_Kind;
11328 V3 : Node_Kind;
11329 V4 : Node_Kind;
11330 V5 : Node_Kind;
11331 V6 : Node_Kind) return Boolean;
11332
11333 function Nkind_In
11334 (T : Node_Kind;
11335 V1 : Node_Kind;
11336 V2 : Node_Kind;
11337 V3 : Node_Kind;
11338 V4 : Node_Kind;
11339 V5 : Node_Kind;
11340 V6 : Node_Kind;
11341 V7 : Node_Kind) return Boolean;
11342
11343 function Nkind_In
11344 (T : Node_Kind;
11345 V1 : Node_Kind;
11346 V2 : Node_Kind;
11347 V3 : Node_Kind;
11348 V4 : Node_Kind;
11349 V5 : Node_Kind;
11350 V6 : Node_Kind;
11351 V7 : Node_Kind;
11352 V8 : Node_Kind) return Boolean;
11353
11354 function Nkind_In
11355 (T : Node_Kind;
11356 V1 : Node_Kind;
11357 V2 : Node_Kind;
11358 V3 : Node_Kind;
11359 V4 : Node_Kind;
11360 V5 : Node_Kind;
11361 V6 : Node_Kind;
11362 V7 : Node_Kind;
11363 V8 : Node_Kind;
11364 V9 : Node_Kind) return Boolean;
11365
11366 pragma Inline (Nkind_In);
11367 -- Inline all above functions
11368
11369 -----------------------
11370 -- Utility Functions --
11371 -----------------------
11372
11373 procedure Map_Pragma_Name (From, To : Name_Id);
11374 -- Used in the implementation of pragma Rename_Pragma. Maps pragma name
11375 -- From to pragma name To, so From can be used as a synonym for To.
11376
11377 Too_Many_Pragma_Mappings : exception;
11378 -- Raised if Map_Pragma_Name is called too many times. We expect that few
11379 -- programs will use it at all, and those that do will use it approximately
11380 -- once or twice.
11381
11382 function Pragma_Name (N : Node_Id) return Name_Id;
11383 -- Obtain the name of pragma N from the Chars field of its identifier. If
11384 -- the pragma has been renamed using Rename_Pragma, this routine returns
11385 -- the name of the renaming.
11386
11387 function Pragma_Name_Unmapped (N : Node_Id) return Name_Id;
11388 -- Obtain the name of pragma N from the Chars field of its identifier. This
11389 -- form of name extraction does not take into account renamings performed
11390 -- by Rename_Pragma.
11391
11392 -----------------------------
11393 -- Syntactic Parent Tables --
11394 -----------------------------
11395
11396 -- These tables show for each node, and for each of the five fields,
11397 -- whether the corresponding field is syntactic (True) or semantic (False).
11398 -- Unused entries are also set to False.
11399
11400 subtype Field_Num is Natural range 1 .. 5;
11401
11402 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
11403
11404 -- Following entries can be built automatically from the sinfo sources
11405 -- using the makeisf utility (currently this program is in spitbol).
11406
11407 N_Identifier =>
11408 (1 => True, -- Chars (Name1)
11409 2 => False, -- Original_Discriminant (Node2-Sem)
11410 3 => False, -- unused
11411 4 => False, -- Entity (Node4-Sem)
11412 5 => False), -- Etype (Node5-Sem)
11413
11414 N_Integer_Literal =>
11415 (1 => False, -- unused
11416 2 => False, -- Original_Entity (Node2-Sem)
11417 3 => True, -- Intval (Uint3)
11418 4 => False, -- unused
11419 5 => False), -- Etype (Node5-Sem)
11420
11421 N_Real_Literal =>
11422 (1 => False, -- unused
11423 2 => False, -- Original_Entity (Node2-Sem)
11424 3 => True, -- Realval (Ureal3)
11425 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
11426 5 => False), -- Etype (Node5-Sem)
11427
11428 N_Character_Literal =>
11429 (1 => True, -- Chars (Name1)
11430 2 => True, -- Char_Literal_Value (Uint2)
11431 3 => False, -- unused
11432 4 => False, -- Entity (Node4-Sem)
11433 5 => False), -- Etype (Node5-Sem)
11434
11435 N_String_Literal =>
11436 (1 => False, -- unused
11437 2 => False, -- unused
11438 3 => True, -- Strval (Str3)
11439 4 => False, -- unused
11440 5 => False), -- Etype (Node5-Sem)
11441
11442 N_Pragma =>
11443 (1 => False, -- Next_Pragma (Node1-Sem)
11444 2 => True, -- Pragma_Argument_Associations (List2)
11445 3 => False, -- Corresponding_Aspect (Node3-Sem)
11446 4 => True, -- Pragma_Identifier (Node4)
11447 5 => False), -- Next_Rep_Item (Node5-Sem)
11448
11449 N_Pragma_Argument_Association =>
11450 (1 => True, -- Chars (Name1)
11451 2 => False, -- Expression_Copy (Node2-Sem)
11452 3 => True, -- Expression (Node3)
11453 4 => False, -- unused
11454 5 => False), -- unused
11455
11456 N_Defining_Identifier =>
11457 (1 => True, -- Chars (Name1)
11458 2 => False, -- Next_Entity (Node2-Sem)
11459 3 => False, -- Scope (Node3-Sem)
11460 4 => False, -- unused
11461 5 => False), -- Etype (Node5-Sem)
11462
11463 N_Full_Type_Declaration =>
11464 (1 => True, -- Defining_Identifier (Node1)
11465 2 => False, -- Incomplete_View (Node2-Sem)
11466 3 => True, -- Type_Definition (Node3)
11467 4 => True, -- Discriminant_Specifications (List4)
11468 5 => False), -- unused
11469
11470 N_Subtype_Declaration =>
11471 (1 => True, -- Defining_Identifier (Node1)
11472 2 => False, -- unused
11473 3 => False, -- unused
11474 4 => False, -- Generic_Parent_Type (Node4-Sem)
11475 5 => True), -- Subtype_Indication (Node5)
11476
11477 N_Subtype_Indication =>
11478 (1 => False, -- unused
11479 2 => False, -- unused
11480 3 => True, -- Constraint (Node3)
11481 4 => True, -- Subtype_Mark (Node4)
11482 5 => False), -- Etype (Node5-Sem)
11483
11484 N_Object_Declaration =>
11485 (1 => True, -- Defining_Identifier (Node1)
11486 2 => False, -- Handler_List_Entry (Node2-Sem)
11487 3 => True, -- Expression (Node3)
11488 4 => True, -- Object_Definition (Node4)
11489 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11490
11491 N_Number_Declaration =>
11492 (1 => True, -- Defining_Identifier (Node1)
11493 2 => False, -- unused
11494 3 => True, -- Expression (Node3)
11495 4 => False, -- unused
11496 5 => False), -- unused
11497
11498 N_Derived_Type_Definition =>
11499 (1 => False, -- unused
11500 2 => True, -- Interface_List (List2)
11501 3 => True, -- Record_Extension_Part (Node3)
11502 4 => False, -- unused
11503 5 => True), -- Subtype_Indication (Node5)
11504
11505 N_Range_Constraint =>
11506 (1 => False, -- unused
11507 2 => False, -- unused
11508 3 => False, -- unused
11509 4 => True, -- Range_Expression (Node4)
11510 5 => False), -- unused
11511
11512 N_Range =>
11513 (1 => True, -- Low_Bound (Node1)
11514 2 => True, -- High_Bound (Node2)
11515 3 => False, -- unused
11516 4 => False, -- unused
11517 5 => False), -- Etype (Node5-Sem)
11518
11519 N_Enumeration_Type_Definition =>
11520 (1 => True, -- Literals (List1)
11521 2 => False, -- unused
11522 3 => False, -- unused
11523 4 => True, -- End_Label (Node4)
11524 5 => False), -- unused
11525
11526 N_Defining_Character_Literal =>
11527 (1 => True, -- Chars (Name1)
11528 2 => False, -- Next_Entity (Node2-Sem)
11529 3 => False, -- Scope (Node3-Sem)
11530 4 => False, -- unused
11531 5 => False), -- Etype (Node5-Sem)
11532
11533 N_Signed_Integer_Type_Definition =>
11534 (1 => True, -- Low_Bound (Node1)
11535 2 => True, -- High_Bound (Node2)
11536 3 => False, -- unused
11537 4 => False, -- unused
11538 5 => False), -- unused
11539
11540 N_Modular_Type_Definition =>
11541 (1 => False, -- unused
11542 2 => False, -- unused
11543 3 => True, -- Expression (Node3)
11544 4 => False, -- unused
11545 5 => False), -- unused
11546
11547 N_Floating_Point_Definition =>
11548 (1 => False, -- unused
11549 2 => True, -- Digits_Expression (Node2)
11550 3 => False, -- unused
11551 4 => True, -- Real_Range_Specification (Node4)
11552 5 => False), -- unused
11553
11554 N_Real_Range_Specification =>
11555 (1 => True, -- Low_Bound (Node1)
11556 2 => True, -- High_Bound (Node2)
11557 3 => False, -- unused
11558 4 => False, -- unused
11559 5 => False), -- unused
11560
11561 N_Ordinary_Fixed_Point_Definition =>
11562 (1 => False, -- unused
11563 2 => False, -- unused
11564 3 => True, -- Delta_Expression (Node3)
11565 4 => True, -- Real_Range_Specification (Node4)
11566 5 => False), -- unused
11567
11568 N_Decimal_Fixed_Point_Definition =>
11569 (1 => False, -- unused
11570 2 => True, -- Digits_Expression (Node2)
11571 3 => True, -- Delta_Expression (Node3)
11572 4 => True, -- Real_Range_Specification (Node4)
11573 5 => False), -- unused
11574
11575 N_Digits_Constraint =>
11576 (1 => False, -- unused
11577 2 => True, -- Digits_Expression (Node2)
11578 3 => False, -- unused
11579 4 => True, -- Range_Constraint (Node4)
11580 5 => False), -- unused
11581
11582 N_Unconstrained_Array_Definition =>
11583 (1 => False, -- unused
11584 2 => True, -- Subtype_Marks (List2)
11585 3 => False, -- unused
11586 4 => True, -- Component_Definition (Node4)
11587 5 => False), -- unused
11588
11589 N_Constrained_Array_Definition =>
11590 (1 => False, -- unused
11591 2 => True, -- Discrete_Subtype_Definitions (List2)
11592 3 => False, -- unused
11593 4 => True, -- Component_Definition (Node4)
11594 5 => False), -- unused
11595
11596 N_Component_Definition =>
11597 (1 => False, -- unused
11598 2 => False, -- unused
11599 3 => True, -- Access_Definition (Node3)
11600 4 => False, -- unused
11601 5 => True), -- Subtype_Indication (Node5)
11602
11603 N_Discriminant_Specification =>
11604 (1 => True, -- Defining_Identifier (Node1)
11605 2 => False, -- unused
11606 3 => True, -- Expression (Node3)
11607 4 => False, -- unused
11608 5 => True), -- Discriminant_Type (Node5)
11609
11610 N_Index_Or_Discriminant_Constraint =>
11611 (1 => True, -- Constraints (List1)
11612 2 => False, -- unused
11613 3 => False, -- unused
11614 4 => False, -- unused
11615 5 => False), -- unused
11616
11617 N_Discriminant_Association =>
11618 (1 => True, -- Selector_Names (List1)
11619 2 => False, -- unused
11620 3 => True, -- Expression (Node3)
11621 4 => False, -- unused
11622 5 => False), -- unused
11623
11624 N_Record_Definition =>
11625 (1 => True, -- Component_List (Node1)
11626 2 => True, -- Interface_List (List2)
11627 3 => False, -- unused
11628 4 => True, -- End_Label (Node4)
11629 5 => False), -- unused
11630
11631 N_Component_List =>
11632 (1 => False, -- unused
11633 2 => False, -- unused
11634 3 => True, -- Component_Items (List3)
11635 4 => True, -- Variant_Part (Node4)
11636 5 => False), -- unused
11637
11638 N_Component_Declaration =>
11639 (1 => True, -- Defining_Identifier (Node1)
11640 2 => False, -- unused
11641 3 => True, -- Expression (Node3)
11642 4 => True, -- Component_Definition (Node4)
11643 5 => False), -- unused
11644
11645 N_Variant_Part =>
11646 (1 => True, -- Variants (List1)
11647 2 => True, -- Name (Node2)
11648 3 => False, -- unused
11649 4 => False, -- unused
11650 5 => False), -- unused
11651
11652 N_Variant =>
11653 (1 => True, -- Component_List (Node1)
11654 2 => False, -- Enclosing_Variant (Node2-Sem)
11655 3 => False, -- Present_Expr (Uint3-Sem)
11656 4 => True, -- Discrete_Choices (List4)
11657 5 => False), -- Dcheck_Function (Node5-Sem)
11658
11659 N_Others_Choice =>
11660 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11661 2 => False, -- unused
11662 3 => False, -- unused
11663 4 => False, -- unused
11664 5 => False), -- unused
11665
11666 N_Access_To_Object_Definition =>
11667 (1 => False, -- unused
11668 2 => False, -- unused
11669 3 => False, -- unused
11670 4 => False, -- unused
11671 5 => True), -- Subtype_Indication (Node5)
11672
11673 N_Access_Function_Definition =>
11674 (1 => False, -- unused
11675 2 => False, -- unused
11676 3 => True, -- Parameter_Specifications (List3)
11677 4 => True, -- Result_Definition (Node4)
11678 5 => False), -- unused
11679
11680 N_Access_Procedure_Definition =>
11681 (1 => False, -- unused
11682 2 => False, -- unused
11683 3 => True, -- Parameter_Specifications (List3)
11684 4 => False, -- unused
11685 5 => False), -- unused
11686
11687 N_Access_Definition =>
11688 (1 => False, -- unused
11689 2 => False, -- unused
11690 3 => True, -- Access_To_Subprogram_Definition (Node3)
11691 4 => True, -- Subtype_Mark (Node4)
11692 5 => False), -- unused
11693
11694 N_Incomplete_Type_Declaration =>
11695 (1 => True, -- Defining_Identifier (Node1)
11696 2 => False, -- unused
11697 3 => False, -- unused
11698 4 => True, -- Discriminant_Specifications (List4)
11699 5 => False), -- Premature_Use
11700
11701 N_Explicit_Dereference =>
11702 (1 => False, -- unused
11703 2 => False, -- unused
11704 3 => True, -- Prefix (Node3)
11705 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11706 5 => False), -- Etype (Node5-Sem)
11707
11708 N_Indexed_Component =>
11709 (1 => True, -- Expressions (List1)
11710 2 => False, -- unused
11711 3 => True, -- Prefix (Node3)
11712 4 => False, -- Generalized_Indexing (Node4-Sem)
11713 5 => False), -- Etype (Node5-Sem)
11714
11715 N_Slice =>
11716 (1 => False, -- unused
11717 2 => False, -- unused
11718 3 => True, -- Prefix (Node3)
11719 4 => True, -- Discrete_Range (Node4)
11720 5 => False), -- Etype (Node5-Sem)
11721
11722 N_Selected_Component =>
11723 (1 => False, -- unused
11724 2 => True, -- Selector_Name (Node2)
11725 3 => True, -- Prefix (Node3)
11726 4 => False, -- unused
11727 5 => False), -- Etype (Node5-Sem)
11728
11729 N_Attribute_Reference =>
11730 (1 => True, -- Expressions (List1)
11731 2 => True, -- Attribute_Name (Name2)
11732 3 => True, -- Prefix (Node3)
11733 4 => False, -- Entity (Node4-Sem)
11734 5 => False), -- Etype (Node5-Sem)
11735
11736 N_Aggregate =>
11737 (1 => True, -- Expressions (List1)
11738 2 => True, -- Component_Associations (List2)
11739 3 => False, -- Aggregate_Bounds (Node3-Sem)
11740 4 => False, -- unused
11741 5 => False), -- Etype (Node5-Sem)
11742
11743 N_Component_Association =>
11744 (1 => True, -- Choices (List1)
11745 2 => False, -- Loop_Actions (List2-Sem)
11746 3 => True, -- Expression (Node3)
11747 4 => False, -- unused
11748 5 => False), -- unused
11749
11750 N_Iterated_Component_Association =>
11751 (1 => True, -- Defining_Identifier (Node1)
11752 2 => False, -- unused
11753 3 => True, -- Expression (Node3)
11754 4 => True, -- Discrete_Choices (List4)
11755 5 => False), -- unused
11756
11757 N_Delta_Aggregate =>
11758 (1 => False, -- Expressions (List1)
11759 2 => True, -- Component_Associations (List2)
11760 3 => True, -- Expression (Node3)
11761 4 => False, -- Unused
11762 5 => False), -- Etype (Node5-Sem)
11763
11764 N_Extension_Aggregate =>
11765 (1 => True, -- Expressions (List1)
11766 2 => True, -- Component_Associations (List2)
11767 3 => True, -- Ancestor_Part (Node3)
11768 4 => False, -- unused
11769 5 => False), -- Etype (Node5-Sem)
11770
11771 N_Null =>
11772 (1 => False, -- unused
11773 2 => False, -- unused
11774 3 => False, -- unused
11775 4 => False, -- unused
11776 5 => False), -- Etype (Node5-Sem)
11777
11778 N_And_Then =>
11779 (1 => False, -- Actions (List1-Sem)
11780 2 => True, -- Left_Opnd (Node2)
11781 3 => True, -- Right_Opnd (Node3)
11782 4 => False, -- unused
11783 5 => False), -- Etype (Node5-Sem)
11784
11785 N_Or_Else =>
11786 (1 => False, -- Actions (List1-Sem)
11787 2 => True, -- Left_Opnd (Node2)
11788 3 => True, -- Right_Opnd (Node3)
11789 4 => False, -- unused
11790 5 => False), -- Etype (Node5-Sem)
11791
11792 N_In =>
11793 (1 => False, -- unused
11794 2 => True, -- Left_Opnd (Node2)
11795 3 => True, -- Right_Opnd (Node3)
11796 4 => True, -- Alternatives (List4)
11797 5 => False), -- Etype (Node5-Sem)
11798
11799 N_Not_In =>
11800 (1 => False, -- unused
11801 2 => True, -- Left_Opnd (Node2)
11802 3 => True, -- Right_Opnd (Node3)
11803 4 => True, -- Alternatives (List4)
11804 5 => False), -- Etype (Node5-Sem)
11805
11806 N_Op_And =>
11807 (1 => True, -- Chars (Name1)
11808 2 => True, -- Left_Opnd (Node2)
11809 3 => True, -- Right_Opnd (Node3)
11810 4 => False, -- Entity (Node4-Sem)
11811 5 => False), -- Etype (Node5-Sem)
11812
11813 N_Op_Or =>
11814 (1 => True, -- Chars (Name1)
11815 2 => True, -- Left_Opnd (Node2)
11816 3 => True, -- Right_Opnd (Node3)
11817 4 => False, -- Entity (Node4-Sem)
11818 5 => False), -- Etype (Node5-Sem)
11819
11820 N_Op_Xor =>
11821 (1 => True, -- Chars (Name1)
11822 2 => True, -- Left_Opnd (Node2)
11823 3 => True, -- Right_Opnd (Node3)
11824 4 => False, -- Entity (Node4-Sem)
11825 5 => False), -- Etype (Node5-Sem)
11826
11827 N_Op_Eq =>
11828 (1 => True, -- Chars (Name1)
11829 2 => True, -- Left_Opnd (Node2)
11830 3 => True, -- Right_Opnd (Node3)
11831 4 => False, -- Entity (Node4-Sem)
11832 5 => False), -- Etype (Node5-Sem)
11833
11834 N_Op_Ne =>
11835 (1 => True, -- Chars (Name1)
11836 2 => True, -- Left_Opnd (Node2)
11837 3 => True, -- Right_Opnd (Node3)
11838 4 => False, -- Entity (Node4-Sem)
11839 5 => False), -- Etype (Node5-Sem)
11840
11841 N_Op_Lt =>
11842 (1 => True, -- Chars (Name1)
11843 2 => True, -- Left_Opnd (Node2)
11844 3 => True, -- Right_Opnd (Node3)
11845 4 => False, -- Entity (Node4-Sem)
11846 5 => False), -- Etype (Node5-Sem)
11847
11848 N_Op_Le =>
11849 (1 => True, -- Chars (Name1)
11850 2 => True, -- Left_Opnd (Node2)
11851 3 => True, -- Right_Opnd (Node3)
11852 4 => False, -- Entity (Node4-Sem)
11853 5 => False), -- Etype (Node5-Sem)
11854
11855 N_Op_Gt =>
11856 (1 => True, -- Chars (Name1)
11857 2 => True, -- Left_Opnd (Node2)
11858 3 => True, -- Right_Opnd (Node3)
11859 4 => False, -- Entity (Node4-Sem)
11860 5 => False), -- Etype (Node5-Sem)
11861
11862 N_Op_Ge =>
11863 (1 => True, -- Chars (Name1)
11864 2 => True, -- Left_Opnd (Node2)
11865 3 => True, -- Right_Opnd (Node3)
11866 4 => False, -- Entity (Node4-Sem)
11867 5 => False), -- Etype (Node5-Sem)
11868
11869 N_Op_Add =>
11870 (1 => True, -- Chars (Name1)
11871 2 => True, -- Left_Opnd (Node2)
11872 3 => True, -- Right_Opnd (Node3)
11873 4 => False, -- Entity (Node4-Sem)
11874 5 => False), -- Etype (Node5-Sem)
11875
11876 N_Op_Subtract =>
11877 (1 => True, -- Chars (Name1)
11878 2 => True, -- Left_Opnd (Node2)
11879 3 => True, -- Right_Opnd (Node3)
11880 4 => False, -- Entity (Node4-Sem)
11881 5 => False), -- Etype (Node5-Sem)
11882
11883 N_Op_Concat =>
11884 (1 => True, -- Chars (Name1)
11885 2 => True, -- Left_Opnd (Node2)
11886 3 => True, -- Right_Opnd (Node3)
11887 4 => False, -- Entity (Node4-Sem)
11888 5 => False), -- Etype (Node5-Sem)
11889
11890 N_Op_Multiply =>
11891 (1 => True, -- Chars (Name1)
11892 2 => True, -- Left_Opnd (Node2)
11893 3 => True, -- Right_Opnd (Node3)
11894 4 => False, -- Entity (Node4-Sem)
11895 5 => False), -- Etype (Node5-Sem)
11896
11897 N_Op_Divide =>
11898 (1 => True, -- Chars (Name1)
11899 2 => True, -- Left_Opnd (Node2)
11900 3 => True, -- Right_Opnd (Node3)
11901 4 => False, -- Entity (Node4-Sem)
11902 5 => False), -- Etype (Node5-Sem)
11903
11904 N_Op_Mod =>
11905 (1 => True, -- Chars (Name1)
11906 2 => True, -- Left_Opnd (Node2)
11907 3 => True, -- Right_Opnd (Node3)
11908 4 => False, -- Entity (Node4-Sem)
11909 5 => False), -- Etype (Node5-Sem)
11910
11911 N_Op_Rem =>
11912 (1 => True, -- Chars (Name1)
11913 2 => True, -- Left_Opnd (Node2)
11914 3 => True, -- Right_Opnd (Node3)
11915 4 => False, -- Entity (Node4-Sem)
11916 5 => False), -- Etype (Node5-Sem)
11917
11918 N_Op_Expon =>
11919 (1 => True, -- Chars (Name1)
11920 2 => True, -- Left_Opnd (Node2)
11921 3 => True, -- Right_Opnd (Node3)
11922 4 => False, -- Entity (Node4-Sem)
11923 5 => False), -- Etype (Node5-Sem)
11924
11925 N_Op_Plus =>
11926 (1 => True, -- Chars (Name1)
11927 2 => False, -- unused
11928 3 => True, -- Right_Opnd (Node3)
11929 4 => False, -- Entity (Node4-Sem)
11930 5 => False), -- Etype (Node5-Sem)
11931
11932 N_Op_Minus =>
11933 (1 => True, -- Chars (Name1)
11934 2 => False, -- unused
11935 3 => True, -- Right_Opnd (Node3)
11936 4 => False, -- Entity (Node4-Sem)
11937 5 => False), -- Etype (Node5-Sem)
11938
11939 N_Op_Abs =>
11940 (1 => True, -- Chars (Name1)
11941 2 => False, -- unused
11942 3 => True, -- Right_Opnd (Node3)
11943 4 => False, -- Entity (Node4-Sem)
11944 5 => False), -- Etype (Node5-Sem)
11945
11946 N_Op_Not =>
11947 (1 => True, -- Chars (Name1)
11948 2 => False, -- unused
11949 3 => True, -- Right_Opnd (Node3)
11950 4 => False, -- Entity (Node4-Sem)
11951 5 => False), -- Etype (Node5-Sem)
11952
11953 N_Type_Conversion =>
11954 (1 => False, -- unused
11955 2 => False, -- unused
11956 3 => True, -- Expression (Node3)
11957 4 => True, -- Subtype_Mark (Node4)
11958 5 => False), -- Etype (Node5-Sem)
11959
11960 N_Qualified_Expression =>
11961 (1 => False, -- unused
11962 2 => False, -- unused
11963 3 => True, -- Expression (Node3)
11964 4 => True, -- Subtype_Mark (Node4)
11965 5 => False), -- Etype (Node5-Sem)
11966
11967 N_Quantified_Expression =>
11968 (1 => True, -- Condition (Node1)
11969 2 => True, -- Iterator_Specification
11970 3 => False, -- unused
11971 4 => True, -- Loop_Parameter_Specification (Node4)
11972 5 => False), -- Etype (Node5-Sem)
11973
11974 N_Allocator =>
11975 (1 => False, -- Storage_Pool (Node1-Sem)
11976 2 => False, -- Procedure_To_Call (Node2-Sem)
11977 3 => True, -- Expression (Node3)
11978 4 => True, -- Subpool_Handle_Name (Node4)
11979 5 => False), -- Etype (Node5-Sem)
11980
11981 N_Null_Statement =>
11982 (1 => False, -- unused
11983 2 => False, -- unused
11984 3 => False, -- unused
11985 4 => False, -- unused
11986 5 => False), -- unused
11987
11988 N_Label =>
11989 (1 => True, -- Identifier (Node1)
11990 2 => False, -- unused
11991 3 => False, -- unused
11992 4 => False, -- unused
11993 5 => False), -- unused
11994
11995 N_Assignment_Statement =>
11996 (1 => False, -- unused
11997 2 => True, -- Name (Node2)
11998 3 => True, -- Expression (Node3)
11999 4 => False, -- unused
12000 5 => False), -- unused
12001
12002 N_Target_Name =>
12003 (1 => False, -- unused
12004 2 => False, -- unused
12005 3 => False, -- unused
12006 4 => False, -- unused
12007 5 => False), -- Etype (Node5-Sem)
12008
12009 N_If_Statement =>
12010 (1 => True, -- Condition (Node1)
12011 2 => True, -- Then_Statements (List2)
12012 3 => True, -- Elsif_Parts (List3)
12013 4 => True, -- Else_Statements (List4)
12014 5 => True), -- End_Span (Uint5)
12015
12016 N_Elsif_Part =>
12017 (1 => True, -- Condition (Node1)
12018 2 => True, -- Then_Statements (List2)
12019 3 => False, -- Condition_Actions (List3-Sem)
12020 4 => False, -- unused
12021 5 => False), -- unused
12022
12023 N_Case_Expression =>
12024 (1 => False, -- unused
12025 2 => False, -- unused
12026 3 => True, -- Expression (Node3)
12027 4 => True, -- Alternatives (List4)
12028 5 => False), -- unused
12029
12030 N_Case_Expression_Alternative =>
12031 (1 => False, -- Actions (List1-Sem)
12032 2 => False, -- unused
12033 3 => True, -- Expression (Node3)
12034 4 => True, -- Discrete_Choices (List4)
12035 5 => False), -- unused
12036
12037 N_Case_Statement =>
12038 (1 => False, -- unused
12039 2 => False, -- unused
12040 3 => True, -- Expression (Node3)
12041 4 => True, -- Alternatives (List4)
12042 5 => True), -- End_Span (Uint5)
12043
12044 N_Case_Statement_Alternative =>
12045 (1 => False, -- unused
12046 2 => False, -- unused
12047 3 => True, -- Statements (List3)
12048 4 => True, -- Discrete_Choices (List4)
12049 5 => False), -- unused
12050
12051 N_Loop_Statement =>
12052 (1 => True, -- Identifier (Node1)
12053 2 => True, -- Iteration_Scheme (Node2)
12054 3 => True, -- Statements (List3)
12055 4 => True, -- End_Label (Node4)
12056 5 => False), -- unused
12057
12058 N_Iteration_Scheme =>
12059 (1 => True, -- Condition (Node1)
12060 2 => True, -- Iterator_Specification (Node2)
12061 3 => False, -- Condition_Actions (List3-Sem)
12062 4 => True, -- Loop_Parameter_Specification (Node4)
12063 5 => False), -- unused
12064
12065 N_Loop_Parameter_Specification =>
12066 (1 => True, -- Defining_Identifier (Node1)
12067 2 => False, -- unused
12068 3 => False, -- unused
12069 4 => True, -- Discrete_Subtype_Definition (Node4)
12070 5 => False), -- unused
12071
12072 N_Iterator_Specification =>
12073 (1 => True, -- Defining_Identifier (Node1)
12074 2 => True, -- Name (Node2)
12075 3 => False, -- Unused
12076 4 => False, -- Unused
12077 5 => True), -- Subtype_Indication (Node5)
12078
12079 N_Block_Statement =>
12080 (1 => True, -- Identifier (Node1)
12081 2 => True, -- Declarations (List2)
12082 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12083 4 => True, -- Handled_Statement_Sequence (Node4)
12084 5 => False), -- unused
12085
12086 N_Exit_Statement =>
12087 (1 => True, -- Condition (Node1)
12088 2 => True, -- Name (Node2)
12089 3 => False, -- unused
12090 4 => False, -- unused
12091 5 => False), -- unused
12092
12093 N_Goto_Statement =>
12094 (1 => False, -- unused
12095 2 => True, -- Name (Node2)
12096 3 => False, -- unused
12097 4 => False, -- unused
12098 5 => False), -- unused
12099
12100 N_Subprogram_Declaration =>
12101 (1 => True, -- Specification (Node1)
12102 2 => False, -- unused
12103 3 => False, -- Body_To_Inline (Node3-Sem)
12104 4 => False, -- Parent_Spec (Node4-Sem)
12105 5 => False), -- Corresponding_Body (Node5-Sem)
12106
12107 N_Abstract_Subprogram_Declaration =>
12108 (1 => True, -- Specification (Node1)
12109 2 => False, -- unused
12110 3 => False, -- unused
12111 4 => False, -- unused
12112 5 => False), -- unused
12113
12114 N_Function_Specification =>
12115 (1 => True, -- Defining_Unit_Name (Node1)
12116 2 => False, -- unused
12117 3 => True, -- Parameter_Specifications (List3)
12118 4 => True, -- Result_Definition (Node4)
12119 5 => False), -- Generic_Parent (Node5-Sem)
12120
12121 N_Procedure_Specification =>
12122 (1 => True, -- Defining_Unit_Name (Node1)
12123 2 => False, -- Null_Statement (Node2-Sem)
12124 3 => True, -- Parameter_Specifications (List3)
12125 4 => False, -- unused
12126 5 => False), -- Generic_Parent (Node5-Sem)
12127
12128 N_Designator =>
12129 (1 => True, -- Identifier (Node1)
12130 2 => True, -- Name (Node2)
12131 3 => False, -- unused
12132 4 => False, -- unused
12133 5 => False), -- unused
12134
12135 N_Defining_Program_Unit_Name =>
12136 (1 => True, -- Defining_Identifier (Node1)
12137 2 => True, -- Name (Node2)
12138 3 => False, -- unused
12139 4 => False, -- unused
12140 5 => False), -- unused
12141
12142 N_Operator_Symbol =>
12143 (1 => True, -- Chars (Name1)
12144 2 => False, -- unused
12145 3 => True, -- Strval (Str3)
12146 4 => False, -- Entity (Node4-Sem)
12147 5 => False), -- Etype (Node5-Sem)
12148
12149 N_Defining_Operator_Symbol =>
12150 (1 => True, -- Chars (Name1)
12151 2 => False, -- Next_Entity (Node2-Sem)
12152 3 => False, -- Scope (Node3-Sem)
12153 4 => False, -- unused
12154 5 => False), -- Etype (Node5-Sem)
12155
12156 N_Parameter_Specification =>
12157 (1 => True, -- Defining_Identifier (Node1)
12158 2 => True, -- Parameter_Type (Node2)
12159 3 => True, -- Expression (Node3)
12160 4 => False, -- unused
12161 5 => False), -- Default_Expression (Node5-Sem)
12162
12163 N_Subprogram_Body =>
12164 (1 => True, -- Specification (Node1)
12165 2 => True, -- Declarations (List2)
12166 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12167 4 => True, -- Handled_Statement_Sequence (Node4)
12168 5 => False), -- Corresponding_Spec (Node5-Sem)
12169
12170 N_Expression_Function =>
12171 (1 => True, -- Specification (Node1)
12172 2 => False, -- unused
12173 3 => True, -- Expression (Node3)
12174 4 => False, -- unused
12175 5 => False), -- unused
12176
12177 N_Procedure_Call_Statement =>
12178 (1 => False, -- Controlling_Argument (Node1-Sem)
12179 2 => True, -- Name (Node2)
12180 3 => True, -- Parameter_Associations (List3)
12181 4 => False, -- First_Named_Actual (Node4-Sem)
12182 5 => False), -- Etype (Node5-Sem)
12183
12184 N_Function_Call =>
12185 (1 => False, -- Controlling_Argument (Node1-Sem)
12186 2 => True, -- Name (Node2)
12187 3 => True, -- Parameter_Associations (List3)
12188 4 => False, -- First_Named_Actual (Node4-Sem)
12189 5 => False), -- Etype (Node5-Sem)
12190
12191 N_Parameter_Association =>
12192 (1 => False, -- unused
12193 2 => True, -- Selector_Name (Node2)
12194 3 => True, -- Explicit_Actual_Parameter (Node3)
12195 4 => False, -- Next_Named_Actual (Node4-Sem)
12196 5 => False), -- unused
12197
12198 N_Simple_Return_Statement =>
12199 (1 => False, -- Storage_Pool (Node1-Sem)
12200 2 => False, -- Procedure_To_Call (Node2-Sem)
12201 3 => True, -- Expression (Node3)
12202 4 => False, -- unused
12203 5 => False), -- Return_Statement_Entity (Node5-Sem)
12204
12205 N_Extended_Return_Statement =>
12206 (1 => False, -- Storage_Pool (Node1-Sem)
12207 2 => False, -- Procedure_To_Call (Node2-Sem)
12208 3 => True, -- Return_Object_Declarations (List3)
12209 4 => True, -- Handled_Statement_Sequence (Node4)
12210 5 => False), -- Return_Statement_Entity (Node5-Sem)
12211
12212 N_Package_Declaration =>
12213 (1 => True, -- Specification (Node1)
12214 2 => False, -- unused
12215 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12216 4 => False, -- Parent_Spec (Node4-Sem)
12217 5 => False), -- Corresponding_Body (Node5-Sem)
12218
12219 N_Package_Specification =>
12220 (1 => True, -- Defining_Unit_Name (Node1)
12221 2 => True, -- Visible_Declarations (List2)
12222 3 => True, -- Private_Declarations (List3)
12223 4 => True, -- End_Label (Node4)
12224 5 => False), -- Generic_Parent (Node5-Sem)
12225
12226 N_Package_Body =>
12227 (1 => True, -- Defining_Unit_Name (Node1)
12228 2 => True, -- Declarations (List2)
12229 3 => False, -- unused
12230 4 => True, -- Handled_Statement_Sequence (Node4)
12231 5 => False), -- Corresponding_Spec (Node5-Sem)
12232
12233 N_Private_Type_Declaration =>
12234 (1 => True, -- Defining_Identifier (Node1)
12235 2 => False, -- unused
12236 3 => False, -- unused
12237 4 => True, -- Discriminant_Specifications (List4)
12238 5 => False), -- unused
12239
12240 N_Private_Extension_Declaration =>
12241 (1 => True, -- Defining_Identifier (Node1)
12242 2 => True, -- Interface_List (List2)
12243 3 => False, -- unused
12244 4 => True, -- Discriminant_Specifications (List4)
12245 5 => True), -- Subtype_Indication (Node5)
12246
12247 N_Use_Package_Clause =>
12248 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12249 2 => True, -- Name (Node2)
12250 3 => False, -- Next_Use_Clause (Node3-Sem)
12251 4 => False, -- Associated_Node (Node4-Sem)
12252 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
12253
12254 N_Use_Type_Clause =>
12255 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12256 2 => False, -- Used_Operations (Elist2-Sem)
12257 3 => False, -- Next_Use_Clause (Node3-Sem)
12258 4 => True, -- Subtype_Mark (Node4)
12259 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
12260
12261 N_Object_Renaming_Declaration =>
12262 (1 => True, -- Defining_Identifier (Node1)
12263 2 => True, -- Name (Node2)
12264 3 => True, -- Access_Definition (Node3)
12265 4 => True, -- Subtype_Mark (Node4)
12266 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
12267
12268 N_Exception_Renaming_Declaration =>
12269 (1 => True, -- Defining_Identifier (Node1)
12270 2 => True, -- Name (Node2)
12271 3 => False, -- unused
12272 4 => False, -- unused
12273 5 => False), -- unused
12274
12275 N_Package_Renaming_Declaration =>
12276 (1 => True, -- Defining_Unit_Name (Node1)
12277 2 => True, -- Name (Node2)
12278 3 => False, -- unused
12279 4 => False, -- Parent_Spec (Node4-Sem)
12280 5 => False), -- unused
12281
12282 N_Subprogram_Renaming_Declaration =>
12283 (1 => True, -- Specification (Node1)
12284 2 => True, -- Name (Node2)
12285 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
12286 4 => False, -- Parent_Spec (Node4-Sem)
12287 5 => False), -- Corresponding_Spec (Node5-Sem)
12288
12289 N_Generic_Package_Renaming_Declaration =>
12290 (1 => True, -- Defining_Unit_Name (Node1)
12291 2 => True, -- Name (Node2)
12292 3 => False, -- unused
12293 4 => False, -- Parent_Spec (Node4-Sem)
12294 5 => False), -- unused
12295
12296 N_Generic_Procedure_Renaming_Declaration =>
12297 (1 => True, -- Defining_Unit_Name (Node1)
12298 2 => True, -- Name (Node2)
12299 3 => False, -- unused
12300 4 => False, -- Parent_Spec (Node4-Sem)
12301 5 => False), -- unused
12302
12303 N_Generic_Function_Renaming_Declaration =>
12304 (1 => True, -- Defining_Unit_Name (Node1)
12305 2 => True, -- Name (Node2)
12306 3 => False, -- unused
12307 4 => False, -- Parent_Spec (Node4-Sem)
12308 5 => False), -- unused
12309
12310 N_Task_Type_Declaration =>
12311 (1 => True, -- Defining_Identifier (Node1)
12312 2 => True, -- Interface_List (List2)
12313 3 => True, -- Task_Definition (Node3)
12314 4 => True, -- Discriminant_Specifications (List4)
12315 5 => False), -- Corresponding_Body (Node5-Sem)
12316
12317 N_Single_Task_Declaration =>
12318 (1 => True, -- Defining_Identifier (Node1)
12319 2 => True, -- Interface_List (List2)
12320 3 => True, -- Task_Definition (Node3)
12321 4 => False, -- unused
12322 5 => False), -- unused
12323
12324 N_Task_Definition =>
12325 (1 => False, -- unused
12326 2 => True, -- Visible_Declarations (List2)
12327 3 => True, -- Private_Declarations (List3)
12328 4 => True, -- End_Label (Node4)
12329 5 => False), -- unused
12330
12331 N_Task_Body =>
12332 (1 => True, -- Defining_Identifier (Node1)
12333 2 => True, -- Declarations (List2)
12334 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12335 4 => True, -- Handled_Statement_Sequence (Node4)
12336 5 => False), -- Corresponding_Spec (Node5-Sem)
12337
12338 N_Protected_Type_Declaration =>
12339 (1 => True, -- Defining_Identifier (Node1)
12340 2 => True, -- Interface_List (List2)
12341 3 => True, -- Protected_Definition (Node3)
12342 4 => True, -- Discriminant_Specifications (List4)
12343 5 => False), -- Corresponding_Body (Node5-Sem)
12344
12345 N_Single_Protected_Declaration =>
12346 (1 => True, -- Defining_Identifier (Node1)
12347 2 => True, -- Interface_List (List2)
12348 3 => True, -- Protected_Definition (Node3)
12349 4 => False, -- unused
12350 5 => False), -- unused
12351
12352 N_Protected_Definition =>
12353 (1 => False, -- unused
12354 2 => True, -- Visible_Declarations (List2)
12355 3 => True, -- Private_Declarations (List3)
12356 4 => True, -- End_Label (Node4)
12357 5 => False), -- unused
12358
12359 N_Protected_Body =>
12360 (1 => True, -- Defining_Identifier (Node1)
12361 2 => True, -- Declarations (List2)
12362 3 => False, -- unused
12363 4 => True, -- End_Label (Node4)
12364 5 => False), -- Corresponding_Spec (Node5-Sem)
12365
12366 N_Entry_Declaration =>
12367 (1 => True, -- Defining_Identifier (Node1)
12368 2 => False, -- unused
12369 3 => True, -- Parameter_Specifications (List3)
12370 4 => True, -- Discrete_Subtype_Definition (Node4)
12371 5 => False), -- Corresponding_Body (Node5-Sem)
12372
12373 N_Accept_Statement =>
12374 (1 => True, -- Entry_Direct_Name (Node1)
12375 2 => True, -- Declarations (List2)
12376 3 => True, -- Parameter_Specifications (List3)
12377 4 => True, -- Handled_Statement_Sequence (Node4)
12378 5 => True), -- Entry_Index (Node5)
12379
12380 N_Entry_Body =>
12381 (1 => True, -- Defining_Identifier (Node1)
12382 2 => True, -- Declarations (List2)
12383 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12384 4 => True, -- Handled_Statement_Sequence (Node4)
12385 5 => True), -- Entry_Body_Formal_Part (Node5)
12386
12387 N_Entry_Body_Formal_Part =>
12388 (1 => True, -- Condition (Node1)
12389 2 => False, -- unused
12390 3 => True, -- Parameter_Specifications (List3)
12391 4 => True, -- Entry_Index_Specification (Node4)
12392 5 => False), -- unused
12393
12394 N_Entry_Index_Specification =>
12395 (1 => True, -- Defining_Identifier (Node1)
12396 2 => False, -- unused
12397 3 => False, -- unused
12398 4 => True, -- Discrete_Subtype_Definition (Node4)
12399 5 => False), -- unused
12400
12401 N_Entry_Call_Statement =>
12402 (1 => False, -- unused
12403 2 => True, -- Name (Node2)
12404 3 => True, -- Parameter_Associations (List3)
12405 4 => False, -- First_Named_Actual (Node4-Sem)
12406 5 => False), -- unused
12407
12408 N_Requeue_Statement =>
12409 (1 => False, -- unused
12410 2 => True, -- Name (Node2)
12411 3 => False, -- unused
12412 4 => False, -- unused
12413 5 => False), -- unused
12414
12415 N_Delay_Until_Statement =>
12416 (1 => False, -- unused
12417 2 => False, -- unused
12418 3 => True, -- Expression (Node3)
12419 4 => False, -- unused
12420 5 => False), -- unused
12421
12422 N_Delay_Relative_Statement =>
12423 (1 => False, -- unused
12424 2 => False, -- unused
12425 3 => True, -- Expression (Node3)
12426 4 => False, -- unused
12427 5 => False), -- unused
12428
12429 N_Selective_Accept =>
12430 (1 => True, -- Select_Alternatives (List1)
12431 2 => False, -- unused
12432 3 => False, -- unused
12433 4 => True, -- Else_Statements (List4)
12434 5 => False), -- unused
12435
12436 N_Accept_Alternative =>
12437 (1 => True, -- Condition (Node1)
12438 2 => True, -- Accept_Statement (Node2)
12439 3 => True, -- Statements (List3)
12440 4 => True, -- Pragmas_Before (List4)
12441 5 => False), -- Accept_Handler_Records (List5-Sem)
12442
12443 N_Delay_Alternative =>
12444 (1 => True, -- Condition (Node1)
12445 2 => True, -- Delay_Statement (Node2)
12446 3 => True, -- Statements (List3)
12447 4 => True, -- Pragmas_Before (List4)
12448 5 => False), -- unused
12449
12450 N_Terminate_Alternative =>
12451 (1 => True, -- Condition (Node1)
12452 2 => False, -- unused
12453 3 => False, -- unused
12454 4 => True, -- Pragmas_Before (List4)
12455 5 => True), -- Pragmas_After (List5)
12456
12457 N_Timed_Entry_Call =>
12458 (1 => True, -- Entry_Call_Alternative (Node1)
12459 2 => False, -- unused
12460 3 => False, -- unused
12461 4 => True, -- Delay_Alternative (Node4)
12462 5 => False), -- unused
12463
12464 N_Entry_Call_Alternative =>
12465 (1 => True, -- Entry_Call_Statement (Node1)
12466 2 => False, -- unused
12467 3 => True, -- Statements (List3)
12468 4 => True, -- Pragmas_Before (List4)
12469 5 => False), -- unused
12470
12471 N_Conditional_Entry_Call =>
12472 (1 => True, -- Entry_Call_Alternative (Node1)
12473 2 => False, -- unused
12474 3 => False, -- unused
12475 4 => True, -- Else_Statements (List4)
12476 5 => False), -- unused
12477
12478 N_Asynchronous_Select =>
12479 (1 => True, -- Triggering_Alternative (Node1)
12480 2 => True, -- Abortable_Part (Node2)
12481 3 => False, -- unused
12482 4 => False, -- unused
12483 5 => False), -- unused
12484
12485 N_Triggering_Alternative =>
12486 (1 => True, -- Triggering_Statement (Node1)
12487 2 => False, -- unused
12488 3 => True, -- Statements (List3)
12489 4 => True, -- Pragmas_Before (List4)
12490 5 => False), -- unused
12491
12492 N_Abortable_Part =>
12493 (1 => False, -- unused
12494 2 => False, -- unused
12495 3 => True, -- Statements (List3)
12496 4 => False, -- unused
12497 5 => False), -- unused
12498
12499 N_Abort_Statement =>
12500 (1 => False, -- unused
12501 2 => True, -- Names (List2)
12502 3 => False, -- unused
12503 4 => False, -- unused
12504 5 => False), -- unused
12505
12506 N_Compilation_Unit =>
12507 (1 => True, -- Context_Items (List1)
12508 2 => True, -- Unit (Node2)
12509 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
12510 4 => False, -- Library_Unit (Node4-Sem)
12511 5 => True), -- Aux_Decls_Node (Node5)
12512
12513 N_Compilation_Unit_Aux =>
12514 (1 => True, -- Actions (List1)
12515 2 => True, -- Declarations (List2)
12516 3 => False, -- Default_Storage_Pool (Node3)
12517 4 => True, -- Config_Pragmas (List4)
12518 5 => True), -- Pragmas_After (List5)
12519
12520 N_With_Clause =>
12521 (1 => False, -- unused
12522 2 => True, -- Name (Node2)
12523 3 => False, -- unused
12524 4 => False, -- Library_Unit (Node4-Sem)
12525 5 => False), -- Corresponding_Spec (Node5-Sem)
12526
12527 N_Subprogram_Body_Stub =>
12528 (1 => True, -- Specification (Node1)
12529 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12530 3 => False, -- unused
12531 4 => False, -- Library_Unit (Node4-Sem)
12532 5 => False), -- Corresponding_Body (Node5-Sem)
12533
12534 N_Package_Body_Stub =>
12535 (1 => True, -- Defining_Identifier (Node1)
12536 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12537 3 => False, -- unused
12538 4 => False, -- Library_Unit (Node4-Sem)
12539 5 => False), -- Corresponding_Body (Node5-Sem)
12540
12541 N_Task_Body_Stub =>
12542 (1 => True, -- Defining_Identifier (Node1)
12543 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12544 3 => False, -- unused
12545 4 => False, -- Library_Unit (Node4-Sem)
12546 5 => False), -- Corresponding_Body (Node5-Sem)
12547
12548 N_Protected_Body_Stub =>
12549 (1 => True, -- Defining_Identifier (Node1)
12550 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12551 3 => False, -- unused
12552 4 => False, -- Library_Unit (Node4-Sem)
12553 5 => False), -- Corresponding_Body (Node5-Sem)
12554
12555 N_Subunit =>
12556 (1 => True, -- Proper_Body (Node1)
12557 2 => True, -- Name (Node2)
12558 3 => False, -- Corresponding_Stub (Node3-Sem)
12559 4 => False, -- unused
12560 5 => False), -- unused
12561
12562 N_Exception_Declaration =>
12563 (1 => True, -- Defining_Identifier (Node1)
12564 2 => False, -- unused
12565 3 => False, -- Expression (Node3-Sem)
12566 4 => False, -- unused
12567 5 => False), -- unused
12568
12569 N_Handled_Sequence_Of_Statements =>
12570 (1 => True, -- At_End_Proc (Node1)
12571 2 => False, -- First_Real_Statement (Node2-Sem)
12572 3 => True, -- Statements (List3)
12573 4 => True, -- End_Label (Node4)
12574 5 => True), -- Exception_Handlers (List5)
12575
12576 N_Exception_Handler =>
12577 (1 => False, -- Local_Raise_Statements (Elist1)
12578 2 => True, -- Choice_Parameter (Node2)
12579 3 => True, -- Statements (List3)
12580 4 => True, -- Exception_Choices (List4)
12581 5 => False), -- Exception_Label (Node5)
12582
12583 N_Raise_Statement =>
12584 (1 => False, -- unused
12585 2 => True, -- Name (Node2)
12586 3 => True, -- Expression (Node3)
12587 4 => False, -- unused
12588 5 => False), -- unused
12589
12590 N_Raise_Expression =>
12591 (1 => False, -- unused
12592 2 => True, -- Name (Node2)
12593 3 => True, -- Expression (Node3)
12594 4 => False, -- unused
12595 5 => False), -- Etype (Node5-Sem)
12596
12597 N_Generic_Subprogram_Declaration =>
12598 (1 => True, -- Specification (Node1)
12599 2 => True, -- Generic_Formal_Declarations (List2)
12600 3 => False, -- unused
12601 4 => False, -- Parent_Spec (Node4-Sem)
12602 5 => False), -- Corresponding_Body (Node5-Sem)
12603
12604 N_Generic_Package_Declaration =>
12605 (1 => True, -- Specification (Node1)
12606 2 => True, -- Generic_Formal_Declarations (List2)
12607 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12608 4 => False, -- Parent_Spec (Node4-Sem)
12609 5 => False), -- Corresponding_Body (Node5-Sem)
12610
12611 N_Package_Instantiation =>
12612 (1 => True, -- Defining_Unit_Name (Node1)
12613 2 => True, -- Name (Node2)
12614 3 => True, -- Generic_Associations (List3)
12615 4 => False, -- Parent_Spec (Node4-Sem)
12616 5 => False), -- Instance_Spec (Node5-Sem)
12617
12618 N_Procedure_Instantiation =>
12619 (1 => True, -- Defining_Unit_Name (Node1)
12620 2 => True, -- Name (Node2)
12621 3 => True, -- Generic_Associations (List3)
12622 4 => False, -- Parent_Spec (Node4-Sem)
12623 5 => False), -- Instance_Spec (Node5-Sem)
12624
12625 N_Function_Instantiation =>
12626 (1 => True, -- Defining_Unit_Name (Node1)
12627 2 => True, -- Name (Node2)
12628 3 => True, -- Generic_Associations (List3)
12629 4 => False, -- Parent_Spec (Node4-Sem)
12630 5 => False), -- Instance_Spec (Node5-Sem)
12631
12632 N_Generic_Association =>
12633 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12634 2 => True, -- Selector_Name (Node2)
12635 3 => False, -- unused
12636 4 => False, -- unused
12637 5 => False), -- unused
12638
12639 N_Formal_Object_Declaration =>
12640 (1 => True, -- Defining_Identifier (Node1)
12641 2 => False, -- unused
12642 3 => True, -- Access_Definition (Node3)
12643 4 => True, -- Subtype_Mark (Node4)
12644 5 => True), -- Default_Expression (Node5)
12645
12646 N_Formal_Type_Declaration =>
12647 (1 => True, -- Defining_Identifier (Node1)
12648 2 => False, -- unused
12649 3 => True, -- Formal_Type_Definition (Node3)
12650 4 => True, -- Discriminant_Specifications (List4)
12651 5 => False), -- unused
12652
12653 N_Formal_Private_Type_Definition =>
12654 (1 => False, -- unused
12655 2 => False, -- unused
12656 3 => False, -- unused
12657 4 => False, -- unused
12658 5 => False), -- unused
12659
12660 N_Formal_Incomplete_Type_Definition =>
12661 (1 => False, -- unused
12662 2 => False, -- unused
12663 3 => False, -- unused
12664 4 => False, -- unused
12665 5 => False), -- unused
12666
12667 N_Formal_Derived_Type_Definition =>
12668 (1 => False, -- unused
12669 2 => True, -- Interface_List (List2)
12670 3 => False, -- unused
12671 4 => True, -- Subtype_Mark (Node4)
12672 5 => False), -- unused
12673
12674 N_Formal_Discrete_Type_Definition =>
12675 (1 => False, -- unused
12676 2 => False, -- unused
12677 3 => False, -- unused
12678 4 => False, -- unused
12679 5 => False), -- unused
12680
12681 N_Formal_Signed_Integer_Type_Definition =>
12682 (1 => False, -- unused
12683 2 => False, -- unused
12684 3 => False, -- unused
12685 4 => False, -- unused
12686 5 => False), -- unused
12687
12688 N_Formal_Modular_Type_Definition =>
12689 (1 => False, -- unused
12690 2 => False, -- unused
12691 3 => False, -- unused
12692 4 => False, -- unused
12693 5 => False), -- unused
12694
12695 N_Formal_Floating_Point_Definition =>
12696 (1 => False, -- unused
12697 2 => False, -- unused
12698 3 => False, -- unused
12699 4 => False, -- unused
12700 5 => False), -- unused
12701
12702 N_Formal_Ordinary_Fixed_Point_Definition =>
12703 (1 => False, -- unused
12704 2 => False, -- unused
12705 3 => False, -- unused
12706 4 => False, -- unused
12707 5 => False), -- unused
12708
12709 N_Formal_Decimal_Fixed_Point_Definition =>
12710 (1 => False, -- unused
12711 2 => False, -- unused
12712 3 => False, -- unused
12713 4 => False, -- unused
12714 5 => False), -- unused
12715
12716 N_Formal_Concrete_Subprogram_Declaration =>
12717 (1 => True, -- Specification (Node1)
12718 2 => True, -- Default_Name (Node2)
12719 3 => False, -- unused
12720 4 => False, -- unused
12721 5 => False), -- unused
12722
12723 N_Formal_Abstract_Subprogram_Declaration =>
12724 (1 => True, -- Specification (Node1)
12725 2 => True, -- Default_Name (Node2)
12726 3 => False, -- unused
12727 4 => False, -- unused
12728 5 => False), -- unused
12729
12730 N_Formal_Package_Declaration =>
12731 (1 => True, -- Defining_Identifier (Node1)
12732 2 => True, -- Name (Node2)
12733 3 => True, -- Generic_Associations (List3)
12734 4 => False, -- unused
12735 5 => False), -- Instance_Spec (Node5-Sem)
12736
12737 N_Attribute_Definition_Clause =>
12738 (1 => True, -- Chars (Name1)
12739 2 => True, -- Name (Node2)
12740 3 => True, -- Expression (Node3)
12741 4 => False, -- unused
12742 5 => False), -- Next_Rep_Item (Node5-Sem)
12743
12744 N_Aspect_Specification =>
12745 (1 => True, -- Identifier (Node1)
12746 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12747 3 => True, -- Expression (Node3)
12748 4 => False, -- Entity (Node4-Sem)
12749 5 => False), -- Next_Rep_Item (Node5-Sem)
12750
12751 N_Enumeration_Representation_Clause =>
12752 (1 => True, -- Identifier (Node1)
12753 2 => False, -- unused
12754 3 => True, -- Array_Aggregate (Node3)
12755 4 => False, -- unused
12756 5 => False), -- Next_Rep_Item (Node5-Sem)
12757
12758 N_Record_Representation_Clause =>
12759 (1 => True, -- Identifier (Node1)
12760 2 => True, -- Mod_Clause (Node2)
12761 3 => True, -- Component_Clauses (List3)
12762 4 => False, -- unused
12763 5 => False), -- Next_Rep_Item (Node5-Sem)
12764
12765 N_Component_Clause =>
12766 (1 => True, -- Component_Name (Node1)
12767 2 => True, -- Position (Node2)
12768 3 => True, -- First_Bit (Node3)
12769 4 => True, -- Last_Bit (Node4)
12770 5 => False), -- unused
12771
12772 N_Code_Statement =>
12773 (1 => False, -- unused
12774 2 => False, -- unused
12775 3 => True, -- Expression (Node3)
12776 4 => False, -- unused
12777 5 => False), -- unused
12778
12779 N_Op_Rotate_Left =>
12780 (1 => True, -- Chars (Name1)
12781 2 => True, -- Left_Opnd (Node2)
12782 3 => True, -- Right_Opnd (Node3)
12783 4 => False, -- Entity (Node4-Sem)
12784 5 => False), -- Etype (Node5-Sem)
12785
12786 N_Op_Rotate_Right =>
12787 (1 => True, -- Chars (Name1)
12788 2 => True, -- Left_Opnd (Node2)
12789 3 => True, -- Right_Opnd (Node3)
12790 4 => False, -- Entity (Node4-Sem)
12791 5 => False), -- Etype (Node5-Sem)
12792
12793 N_Op_Shift_Left =>
12794 (1 => True, -- Chars (Name1)
12795 2 => True, -- Left_Opnd (Node2)
12796 3 => True, -- Right_Opnd (Node3)
12797 4 => False, -- Entity (Node4-Sem)
12798 5 => False), -- Etype (Node5-Sem)
12799
12800 N_Op_Shift_Right_Arithmetic =>
12801 (1 => True, -- Chars (Name1)
12802 2 => True, -- Left_Opnd (Node2)
12803 3 => True, -- Right_Opnd (Node3)
12804 4 => False, -- Entity (Node4-Sem)
12805 5 => False), -- Etype (Node5-Sem)
12806
12807 N_Op_Shift_Right =>
12808 (1 => True, -- Chars (Name1)
12809 2 => True, -- Left_Opnd (Node2)
12810 3 => True, -- Right_Opnd (Node3)
12811 4 => False, -- Entity (Node4-Sem)
12812 5 => False), -- Etype (Node5-Sem)
12813
12814 N_Delta_Constraint =>
12815 (1 => False, -- unused
12816 2 => False, -- unused
12817 3 => True, -- Delta_Expression (Node3)
12818 4 => True, -- Range_Constraint (Node4)
12819 5 => False), -- unused
12820
12821 N_At_Clause =>
12822 (1 => True, -- Identifier (Node1)
12823 2 => False, -- unused
12824 3 => True, -- Expression (Node3)
12825 4 => False, -- unused
12826 5 => False), -- unused
12827
12828 N_Mod_Clause =>
12829 (1 => False, -- unused
12830 2 => False, -- unused
12831 3 => True, -- Expression (Node3)
12832 4 => True, -- Pragmas_Before (List4)
12833 5 => False), -- unused
12834
12835 N_If_Expression =>
12836 (1 => True, -- Expressions (List1)
12837 2 => False, -- Then_Actions (List2-Sem)
12838 3 => False, -- Else_Actions (List3-Sem)
12839 4 => False, -- unused
12840 5 => False), -- Etype (Node5-Sem)
12841
12842 N_Compound_Statement =>
12843 (1 => True, -- Actions (List1)
12844 2 => False, -- unused
12845 3 => False, -- unused
12846 4 => False, -- unused
12847 5 => False), -- unused
12848
12849 N_Contract =>
12850 (1 => False, -- Pre_Post_Conditions (Node1-Sem)
12851 2 => False, -- Contract_Test_Cases (Node2-Sem)
12852 3 => False, -- Classifications (Node3-Sem)
12853 4 => False, -- unused
12854 5 => False), -- unused
12855
12856 N_Expanded_Name =>
12857 (1 => True, -- Chars (Name1)
12858 2 => True, -- Selector_Name (Node2)
12859 3 => True, -- Prefix (Node3)
12860 4 => False, -- Entity (Node4-Sem)
12861 5 => False), -- Etype (Node5-Sem)
12862
12863 N_Expression_With_Actions =>
12864 (1 => True, -- Actions (List1)
12865 2 => False, -- unused
12866 3 => True, -- Expression (Node3)
12867 4 => False, -- unused
12868 5 => False), -- unused
12869
12870 N_Free_Statement =>
12871 (1 => False, -- Storage_Pool (Node1-Sem)
12872 2 => False, -- Procedure_To_Call (Node2-Sem)
12873 3 => True, -- Expression (Node3)
12874 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12875 5 => False), -- unused
12876
12877 N_Freeze_Entity =>
12878 (1 => True, -- Actions (List1)
12879 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12880 3 => False, -- TSS_Elist (Elist3-Sem)
12881 4 => False, -- Entity (Node4-Sem)
12882 5 => False), -- First_Subtype_Link (Node5-Sem)
12883
12884 N_Freeze_Generic_Entity =>
12885 (1 => False, -- unused
12886 2 => False, -- unused
12887 3 => False, -- unused
12888 4 => False, -- Entity (Node4-Sem)
12889 5 => False), -- unused
12890
12891 N_Implicit_Label_Declaration =>
12892 (1 => True, -- Defining_Identifier (Node1)
12893 2 => False, -- Label_Construct (Node2-Sem)
12894 3 => False, -- unused
12895 4 => False, -- unused
12896 5 => False), -- unused
12897
12898 N_Itype_Reference =>
12899 (1 => False, -- Itype (Node1-Sem)
12900 2 => False, -- unused
12901 3 => False, -- unused
12902 4 => False, -- unused
12903 5 => False), -- unused
12904
12905 N_Raise_Constraint_Error =>
12906 (1 => True, -- Condition (Node1)
12907 2 => False, -- unused
12908 3 => True, -- Reason (Uint3)
12909 4 => False, -- unused
12910 5 => False), -- Etype (Node5-Sem)
12911
12912 N_Raise_Program_Error =>
12913 (1 => True, -- Condition (Node1)
12914 2 => False, -- unused
12915 3 => True, -- Reason (Uint3)
12916 4 => False, -- unused
12917 5 => False), -- Etype (Node5-Sem)
12918
12919 N_Raise_Storage_Error =>
12920 (1 => True, -- Condition (Node1)
12921 2 => False, -- unused
12922 3 => True, -- Reason (Uint3)
12923 4 => False, -- unused
12924 5 => False), -- Etype (Node5-Sem)
12925
12926 N_Push_Constraint_Error_Label =>
12927 (1 => False, -- unused
12928 2 => False, -- unused
12929 3 => False, -- unused
12930 4 => False, -- unused
12931 5 => False), -- unused
12932
12933 N_Push_Program_Error_Label =>
12934 (1 => False, -- unused
12935 2 => False, -- unused
12936 3 => False, -- unused
12937 4 => False, -- unused
12938 5 => False), -- Exception_Label
12939
12940 N_Push_Storage_Error_Label =>
12941 (1 => False, -- unused
12942 2 => False, -- unused
12943 3 => False, -- unused
12944 4 => False, -- unused
12945 5 => False), -- Exception_Label
12946
12947 N_Pop_Constraint_Error_Label =>
12948 (1 => False, -- unused
12949 2 => False, -- unused
12950 3 => False, -- unused
12951 4 => False, -- unused
12952 5 => False), -- unused
12953
12954 N_Pop_Program_Error_Label =>
12955 (1 => False, -- unused
12956 2 => False, -- unused
12957 3 => False, -- unused
12958 4 => False, -- unused
12959 5 => False), -- unused
12960
12961 N_Pop_Storage_Error_Label =>
12962 (1 => False, -- unused
12963 2 => False, -- unused
12964 3 => False, -- unused
12965 4 => False, -- unused
12966 5 => False), -- unused
12967
12968 N_Reference =>
12969 (1 => False, -- unused
12970 2 => False, -- unused
12971 3 => True, -- Prefix (Node3)
12972 4 => False, -- unused
12973 5 => False), -- Etype (Node5-Sem)
12974
12975 N_Unchecked_Expression =>
12976 (1 => False, -- unused
12977 2 => False, -- unused
12978 3 => True, -- Expression (Node3)
12979 4 => False, -- unused
12980 5 => False), -- Etype (Node5-Sem)
12981
12982 N_Unchecked_Type_Conversion =>
12983 (1 => False, -- unused
12984 2 => False, -- unused
12985 3 => True, -- Expression (Node3)
12986 4 => True, -- Subtype_Mark (Node4)
12987 5 => False), -- Etype (Node5-Sem)
12988
12989 N_Validate_Unchecked_Conversion =>
12990 (1 => False, -- Source_Type (Node1-Sem)
12991 2 => False, -- Target_Type (Node2-Sem)
12992 3 => False, -- unused
12993 4 => False, -- unused
12994 5 => False), -- unused
12995
12996 -- Entries for SCIL nodes
12997
12998 N_SCIL_Dispatch_Table_Tag_Init =>
12999 (1 => False, -- unused
13000 2 => False, -- unused
13001 3 => False, -- unused
13002 4 => False, -- SCIL_Entity (Node4-Sem)
13003 5 => False), -- unused
13004
13005 N_SCIL_Dispatching_Call =>
13006 (1 => False, -- unused
13007 2 => False, -- SCIL_Target_Prim (Node2-Sem)
13008 3 => False, -- unused
13009 4 => False, -- SCIL_Entity (Node4-Sem)
13010 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
13011
13012 N_SCIL_Membership_Test =>
13013 (1 => False, -- unused
13014 2 => False, -- unused
13015 3 => False, -- unused
13016 4 => False, -- SCIL_Entity (Node4-Sem)
13017 5 => False), -- SCIL_Tag_Value (Node5-Sem)
13018
13019 N_Call_Marker =>
13020 (1 => False, -- Target (Node1-Sem)
13021 2 => False, -- unused
13022 3 => False, -- unused
13023 4 => False, -- unused
13024 5 => False), -- unused
13025
13026 -- Entries for Empty, Error and Unused. Even thought these have a Chars
13027 -- field for debugging purposes, they are not really syntactic fields, so
13028 -- we mark all fields as unused.
13029
13030 N_Empty =>
13031 (1 => False, -- unused
13032 2 => False, -- unused
13033 3 => False, -- unused
13034 4 => False, -- unused
13035 5 => False), -- unused
13036
13037 N_Error =>
13038 (1 => False, -- unused
13039 2 => False, -- unused
13040 3 => False, -- unused
13041 4 => False, -- unused
13042 5 => False), -- unused
13043
13044 N_Unused_At_Start =>
13045 (1 => False, -- unused
13046 2 => False, -- unused
13047 3 => False, -- unused
13048 4 => False, -- unused
13049 5 => False), -- unused
13050
13051 N_Unused_At_End =>
13052 (1 => False, -- unused
13053 2 => False, -- unused
13054 3 => False, -- unused
13055 4 => False, -- unused
13056 5 => False)); -- unused
13057
13058 --------------------
13059 -- Inline Pragmas --
13060 --------------------
13061
13062 pragma Inline (Abort_Present);
13063 pragma Inline (Abortable_Part);
13064 pragma Inline (Abstract_Present);
13065 pragma Inline (Accept_Handler_Records);
13066 pragma Inline (Accept_Statement);
13067 pragma Inline (Access_Definition);
13068 pragma Inline (Access_To_Subprogram_Definition);
13069 pragma Inline (Access_Types_To_Process);
13070 pragma Inline (Actions);
13071 pragma Inline (Activation_Chain_Entity);
13072 pragma Inline (Acts_As_Spec);
13073 pragma Inline (Actual_Designated_Subtype);
13074 pragma Inline (Address_Warning_Posted);
13075 pragma Inline (Aggregate_Bounds);
13076 pragma Inline (Aliased_Present);
13077 pragma Inline (Alloc_For_BIP_Return);
13078 pragma Inline (All_Others);
13079 pragma Inline (All_Present);
13080 pragma Inline (Alternatives);
13081 pragma Inline (Ancestor_Part);
13082 pragma Inline (Atomic_Sync_Required);
13083 pragma Inline (Array_Aggregate);
13084 pragma Inline (Aspect_Rep_Item);
13085 pragma Inline (Assignment_OK);
13086 pragma Inline (Associated_Node);
13087 pragma Inline (At_End_Proc);
13088 pragma Inline (Attribute_Name);
13089 pragma Inline (Aux_Decls_Node);
13090 pragma Inline (Backwards_OK);
13091 pragma Inline (Bad_Is_Detected);
13092 pragma Inline (Body_To_Inline);
13093 pragma Inline (Body_Required);
13094 pragma Inline (By_Ref);
13095 pragma Inline (Box_Present);
13096 pragma Inline (Char_Literal_Value);
13097 pragma Inline (Chars);
13098 pragma Inline (Check_Address_Alignment);
13099 pragma Inline (Choice_Parameter);
13100 pragma Inline (Choices);
13101 pragma Inline (Class_Present);
13102 pragma Inline (Classifications);
13103 pragma Inline (Cleanup_Actions);
13104 pragma Inline (Comes_From_Extended_Return_Statement);
13105 pragma Inline (Compile_Time_Known_Aggregate);
13106 pragma Inline (Component_Associations);
13107 pragma Inline (Component_Clauses);
13108 pragma Inline (Component_Definition);
13109 pragma Inline (Component_Items);
13110 pragma Inline (Component_List);
13111 pragma Inline (Component_Name);
13112 pragma Inline (Componentwise_Assignment);
13113 pragma Inline (Condition);
13114 pragma Inline (Condition_Actions);
13115 pragma Inline (Config_Pragmas);
13116 pragma Inline (Constant_Present);
13117 pragma Inline (Constraint);
13118 pragma Inline (Constraints);
13119 pragma Inline (Context_Installed);
13120 pragma Inline (Context_Items);
13121 pragma Inline (Context_Pending);
13122 pragma Inline (Contract_Test_Cases);
13123 pragma Inline (Controlling_Argument);
13124 pragma Inline (Convert_To_Return_False);
13125 pragma Inline (Conversion_OK);
13126 pragma Inline (Corresponding_Aspect);
13127 pragma Inline (Corresponding_Body);
13128 pragma Inline (Corresponding_Formal_Spec);
13129 pragma Inline (Corresponding_Generic_Association);
13130 pragma Inline (Corresponding_Integer_Value);
13131 pragma Inline (Corresponding_Spec);
13132 pragma Inline (Corresponding_Spec_Of_Stub);
13133 pragma Inline (Corresponding_Stub);
13134 pragma Inline (Dcheck_Function);
13135 pragma Inline (Declarations);
13136 pragma Inline (Default_Expression);
13137 pragma Inline (Default_Storage_Pool);
13138 pragma Inline (Default_Name);
13139 pragma Inline (Defining_Identifier);
13140 pragma Inline (Defining_Unit_Name);
13141 pragma Inline (Delay_Alternative);
13142 pragma Inline (Delay_Statement);
13143 pragma Inline (Delta_Expression);
13144 pragma Inline (Digits_Expression);
13145 pragma Inline (Discr_Check_Funcs_Built);
13146 pragma Inline (Discrete_Choices);
13147 pragma Inline (Discrete_Range);
13148 pragma Inline (Discrete_Subtype_Definition);
13149 pragma Inline (Discrete_Subtype_Definitions);
13150 pragma Inline (Discriminant_Specifications);
13151 pragma Inline (Discriminant_Type);
13152 pragma Inline (Do_Accessibility_Check);
13153 pragma Inline (Do_Discriminant_Check);
13154 pragma Inline (Do_Length_Check);
13155 pragma Inline (Do_Division_Check);
13156 pragma Inline (Do_Overflow_Check);
13157 pragma Inline (Do_Range_Check);
13158 pragma Inline (Do_Storage_Check);
13159 pragma Inline (Do_Tag_Check);
13160 pragma Inline (Elaborate_All_Desirable);
13161 pragma Inline (Elaborate_All_Present);
13162 pragma Inline (Elaborate_Desirable);
13163 pragma Inline (Elaborate_Present);
13164 pragma Inline (Else_Actions);
13165 pragma Inline (Else_Statements);
13166 pragma Inline (Elsif_Parts);
13167 pragma Inline (Enclosing_Variant);
13168 pragma Inline (End_Label);
13169 pragma Inline (End_Span);
13170 pragma Inline (Entity);
13171 pragma Inline (Entity_Or_Associated_Node);
13172 pragma Inline (Entry_Body_Formal_Part);
13173 pragma Inline (Entry_Call_Alternative);
13174 pragma Inline (Entry_Call_Statement);
13175 pragma Inline (Entry_Direct_Name);
13176 pragma Inline (Entry_Index);
13177 pragma Inline (Entry_Index_Specification);
13178 pragma Inline (Etype);
13179 pragma Inline (Exception_Choices);
13180 pragma Inline (Exception_Handlers);
13181 pragma Inline (Exception_Junk);
13182 pragma Inline (Exception_Label);
13183 pragma Inline (Expansion_Delayed);
13184 pragma Inline (Explicit_Actual_Parameter);
13185 pragma Inline (Explicit_Generic_Actual_Parameter);
13186 pragma Inline (Expression);
13187 pragma Inline (Expression_Copy);
13188 pragma Inline (Expressions);
13189 pragma Inline (First_Bit);
13190 pragma Inline (First_Inlined_Subprogram);
13191 pragma Inline (First_Name);
13192 pragma Inline (First_Named_Actual);
13193 pragma Inline (First_Real_Statement);
13194 pragma Inline (First_Subtype_Link);
13195 pragma Inline (Float_Truncate);
13196 pragma Inline (Formal_Type_Definition);
13197 pragma Inline (Forwards_OK);
13198 pragma Inline (From_Aspect_Specification);
13199 pragma Inline (From_At_End);
13200 pragma Inline (From_At_Mod);
13201 pragma Inline (From_Conditional_Expression);
13202 pragma Inline (From_Default);
13203 pragma Inline (Generalized_Indexing);
13204 pragma Inline (Generic_Associations);
13205 pragma Inline (Generic_Formal_Declarations);
13206 pragma Inline (Generic_Parent);
13207 pragma Inline (Generic_Parent_Type);
13208 pragma Inline (Handled_Statement_Sequence);
13209 pragma Inline (Handler_List_Entry);
13210 pragma Inline (Has_Created_Identifier);
13211 pragma Inline (Has_Dereference_Action);
13212 pragma Inline (Has_Dynamic_Length_Check);
13213 pragma Inline (Has_Dynamic_Range_Check);
13214 pragma Inline (Has_Init_Expression);
13215 pragma Inline (Has_Local_Raise);
13216 pragma Inline (Has_Self_Reference);
13217 pragma Inline (Has_SP_Choice);
13218 pragma Inline (Has_No_Elaboration_Code);
13219 pragma Inline (Has_Pragma_Suppress_All);
13220 pragma Inline (Has_Private_View);
13221 pragma Inline (Has_Relative_Deadline_Pragma);
13222 pragma Inline (Has_Storage_Size_Pragma);
13223 pragma Inline (Has_Target_Names);
13224 pragma Inline (Has_Wide_Character);
13225 pragma Inline (Has_Wide_Wide_Character);
13226 pragma Inline (Header_Size_Added);
13227 pragma Inline (Hidden_By_Use_Clause);
13228 pragma Inline (High_Bound);
13229 pragma Inline (Identifier);
13230 pragma Inline (Implicit_With);
13231 pragma Inline (Implicit_With_From_Instantiation);
13232 pragma Inline (Interface_List);
13233 pragma Inline (Interface_Present);
13234 pragma Inline (Includes_Infinities);
13235 pragma Inline (Import_Interface_Present);
13236 pragma Inline (In_Present);
13237 pragma Inline (Incomplete_View);
13238 pragma Inline (Inherited_Discriminant);
13239 pragma Inline (Instance_Spec);
13240 pragma Inline (Intval);
13241 pragma Inline (Iterator_Specification);
13242 pragma Inline (Is_Abort_Block);
13243 pragma Inline (Is_Accessibility_Actual);
13244 pragma Inline (Is_Analyzed_Pragma);
13245 pragma Inline (Is_Asynchronous_Call_Block);
13246 pragma Inline (Is_Boolean_Aspect);
13247 pragma Inline (Is_Checked);
13248 pragma Inline (Is_Checked_Ghost_Pragma);
13249 pragma Inline (Is_Component_Left_Opnd);
13250 pragma Inline (Is_Component_Right_Opnd);
13251 pragma Inline (Is_Controlling_Actual);
13252 pragma Inline (Is_Declaration_Level_Node);
13253 pragma Inline (Is_Delayed_Aspect);
13254 pragma Inline (Is_Disabled);
13255 pragma Inline (Is_Dispatching_Call);
13256 pragma Inline (Is_Dynamic_Coextension);
13257 pragma Inline (Is_Effective_Use_Clause);
13258 pragma Inline (Is_Elaboration_Checks_OK_Node);
13259 pragma Inline (Is_Elsif);
13260 pragma Inline (Is_Entry_Barrier_Function);
13261 pragma Inline (Is_Expanded_Build_In_Place_Call);
13262 pragma Inline (Is_Expanded_Contract);
13263 pragma Inline (Is_Finalization_Wrapper);
13264 pragma Inline (Is_Folded_In_Parser);
13265 pragma Inline (Is_Generic_Contract_Pragma);
13266 pragma Inline (Is_Ignored);
13267 pragma Inline (Is_Ignored_Ghost_Pragma);
13268 pragma Inline (Is_In_Discriminant_Check);
13269 pragma Inline (Is_Inherited_Pragma);
13270 pragma Inline (Is_Initialization_Block);
13271 pragma Inline (Is_Known_Guaranteed_ABE);
13272 pragma Inline (Is_Machine_Number);
13273 pragma Inline (Is_Null_Loop);
13274 pragma Inline (Is_Overloaded);
13275 pragma Inline (Is_Power_Of_2_For_Shift);
13276 pragma Inline (Is_Prefixed_Call);
13277 pragma Inline (Is_Protected_Subprogram_Body);
13278 pragma Inline (Is_Qualified_Universal_Literal);
13279 pragma Inline (Is_Recorded_Scenario);
13280 pragma Inline (Is_Source_Call);
13281 pragma Inline (Is_SPARK_Mode_On_Node);
13282 pragma Inline (Is_Static_Coextension);
13283 pragma Inline (Is_Static_Expression);
13284 pragma Inline (Is_Subprogram_Descriptor);
13285 pragma Inline (Is_Task_Allocation_Block);
13286 pragma Inline (Is_Task_Body_Procedure);
13287 pragma Inline (Is_Task_Master);
13288 pragma Inline (Iteration_Scheme);
13289 pragma Inline (Itype);
13290 pragma Inline (Kill_Range_Check);
13291 pragma Inline (Last_Bit);
13292 pragma Inline (Last_Name);
13293 pragma Inline (Library_Unit);
13294 pragma Inline (Label_Construct);
13295 pragma Inline (Left_Opnd);
13296 pragma Inline (Limited_View_Installed);
13297 pragma Inline (Limited_Present);
13298 pragma Inline (Literals);
13299 pragma Inline (Local_Raise_Not_OK);
13300 pragma Inline (Local_Raise_Statements);
13301 pragma Inline (Loop_Actions);
13302 pragma Inline (Loop_Parameter_Specification);
13303 pragma Inline (Low_Bound);
13304 pragma Inline (Mod_Clause);
13305 pragma Inline (More_Ids);
13306 pragma Inline (Must_Be_Byte_Aligned);
13307 pragma Inline (Must_Not_Freeze);
13308 pragma Inline (Must_Not_Override);
13309 pragma Inline (Must_Override);
13310 pragma Inline (Name);
13311 pragma Inline (Names);
13312 pragma Inline (Next_Entity);
13313 pragma Inline (Next_Exit_Statement);
13314 pragma Inline (Next_Implicit_With);
13315 pragma Inline (Next_Named_Actual);
13316 pragma Inline (Next_Pragma);
13317 pragma Inline (Next_Rep_Item);
13318 pragma Inline (Next_Use_Clause);
13319 pragma Inline (No_Ctrl_Actions);
13320 pragma Inline (No_Entities_Ref_In_Spec);
13321 pragma Inline (No_Initialization);
13322 pragma Inline (No_Minimize_Eliminate);
13323 pragma Inline (No_Side_Effect_Removal);
13324 pragma Inline (No_Truncation);
13325 pragma Inline (Null_Excluding_Subtype);
13326 pragma Inline (Null_Exclusion_Present);
13327 pragma Inline (Null_Exclusion_In_Return_Present);
13328 pragma Inline (Null_Present);
13329 pragma Inline (Null_Record_Present);
13330 pragma Inline (Null_Statement);
13331 pragma Inline (Object_Definition);
13332 pragma Inline (Of_Present);
13333 pragma Inline (Original_Discriminant);
13334 pragma Inline (Original_Entity);
13335 pragma Inline (Others_Discrete_Choices);
13336 pragma Inline (Out_Present);
13337 pragma Inline (Parameter_Associations);
13338 pragma Inline (Parameter_Specifications);
13339 pragma Inline (Parameter_Type);
13340 pragma Inline (Parent_Spec);
13341 pragma Inline (Position);
13342 pragma Inline (Pragma_Argument_Associations);
13343 pragma Inline (Pragma_Identifier);
13344 pragma Inline (Pragmas_After);
13345 pragma Inline (Pragmas_Before);
13346 pragma Inline (Pre_Post_Conditions);
13347 pragma Inline (Prefix);
13348 pragma Inline (Premature_Use);
13349 pragma Inline (Present_Expr);
13350 pragma Inline (Prev_Ids);
13351 pragma Inline (Prev_Use_Clause);
13352 pragma Inline (Print_In_Hex);
13353 pragma Inline (Private_Declarations);
13354 pragma Inline (Private_Present);
13355 pragma Inline (Procedure_To_Call);
13356 pragma Inline (Proper_Body);
13357 pragma Inline (Protected_Definition);
13358 pragma Inline (Protected_Present);
13359 pragma Inline (Raises_Constraint_Error);
13360 pragma Inline (Range_Constraint);
13361 pragma Inline (Range_Expression);
13362 pragma Inline (Real_Range_Specification);
13363 pragma Inline (Realval);
13364 pragma Inline (Reason);
13365 pragma Inline (Record_Extension_Part);
13366 pragma Inline (Redundant_Use);
13367 pragma Inline (Renaming_Exception);
13368 pragma Inline (Result_Definition);
13369 pragma Inline (Return_Object_Declarations);
13370 pragma Inline (Return_Statement_Entity);
13371 pragma Inline (Reverse_Present);
13372 pragma Inline (Right_Opnd);
13373 pragma Inline (Rounded_Result);
13374 pragma Inline (SCIL_Controlling_Tag);
13375 pragma Inline (SCIL_Entity);
13376 pragma Inline (SCIL_Tag_Value);
13377 pragma Inline (SCIL_Target_Prim);
13378 pragma Inline (Scope);
13379 pragma Inline (Select_Alternatives);
13380 pragma Inline (Selector_Name);
13381 pragma Inline (Selector_Names);
13382 pragma Inline (Shift_Count_OK);
13383 pragma Inline (Source_Type);
13384 pragma Inline (Specification);
13385 pragma Inline (Split_PPC);
13386 pragma Inline (Statements);
13387 pragma Inline (Storage_Pool);
13388 pragma Inline (Subpool_Handle_Name);
13389 pragma Inline (Strval);
13390 pragma Inline (Subtype_Indication);
13391 pragma Inline (Subtype_Mark);
13392 pragma Inline (Subtype_Marks);
13393 pragma Inline (Suppress_Assignment_Checks);
13394 pragma Inline (Suppress_Loop_Warnings);
13395 pragma Inline (Synchronized_Present);
13396 pragma Inline (Tagged_Present);
13397 pragma Inline (Target);
13398 pragma Inline (Target_Type);
13399 pragma Inline (Task_Definition);
13400 pragma Inline (Task_Present);
13401 pragma Inline (Then_Actions);
13402 pragma Inline (Then_Statements);
13403 pragma Inline (Triggering_Alternative);
13404 pragma Inline (Triggering_Statement);
13405 pragma Inline (Treat_Fixed_As_Integer);
13406 pragma Inline (TSS_Elist);
13407 pragma Inline (Type_Definition);
13408 pragma Inline (Uneval_Old_Accept);
13409 pragma Inline (Uneval_Old_Warn);
13410 pragma Inline (Unit);
13411 pragma Inline (Uninitialized_Variable);
13412 pragma Inline (Unknown_Discriminants_Present);
13413 pragma Inline (Unreferenced_In_Spec);
13414 pragma Inline (Variant_Part);
13415 pragma Inline (Variants);
13416 pragma Inline (Visible_Declarations);
13417 pragma Inline (Used_Operations);
13418 pragma Inline (Was_Attribute_Reference);
13419 pragma Inline (Was_Expression_Function);
13420 pragma Inline (Was_Originally_Stub);
13421 pragma Inline (Withed_Body);
13422
13423 pragma Inline (Set_Abort_Present);
13424 pragma Inline (Set_Abortable_Part);
13425 pragma Inline (Set_Abstract_Present);
13426 pragma Inline (Set_Accept_Handler_Records);
13427 pragma Inline (Set_Accept_Statement);
13428 pragma Inline (Set_Access_Definition);
13429 pragma Inline (Set_Access_To_Subprogram_Definition);
13430 pragma Inline (Set_Access_Types_To_Process);
13431 pragma Inline (Set_Actions);
13432 pragma Inline (Set_Activation_Chain_Entity);
13433 pragma Inline (Set_Acts_As_Spec);
13434 pragma Inline (Set_Actual_Designated_Subtype);
13435 pragma Inline (Set_Address_Warning_Posted);
13436 pragma Inline (Set_Aggregate_Bounds);
13437 pragma Inline (Set_Aliased_Present);
13438 pragma Inline (Set_Alloc_For_BIP_Return);
13439 pragma Inline (Set_All_Others);
13440 pragma Inline (Set_All_Present);
13441 pragma Inline (Set_Alternatives);
13442 pragma Inline (Set_Ancestor_Part);
13443 pragma Inline (Set_Array_Aggregate);
13444 pragma Inline (Set_Aspect_Rep_Item);
13445 pragma Inline (Set_Assignment_OK);
13446 pragma Inline (Set_Associated_Node);
13447 pragma Inline (Set_At_End_Proc);
13448 pragma Inline (Set_Atomic_Sync_Required);
13449 pragma Inline (Set_Attribute_Name);
13450 pragma Inline (Set_Aux_Decls_Node);
13451 pragma Inline (Set_Backwards_OK);
13452 pragma Inline (Set_Bad_Is_Detected);
13453 pragma Inline (Set_Body_Required);
13454 pragma Inline (Set_Body_To_Inline);
13455 pragma Inline (Set_Box_Present);
13456 pragma Inline (Set_By_Ref);
13457 pragma Inline (Set_Char_Literal_Value);
13458 pragma Inline (Set_Chars);
13459 pragma Inline (Set_Check_Address_Alignment);
13460 pragma Inline (Set_Choice_Parameter);
13461 pragma Inline (Set_Choices);
13462 pragma Inline (Set_Class_Present);
13463 pragma Inline (Set_Classifications);
13464 pragma Inline (Set_Cleanup_Actions);
13465 pragma Inline (Set_Comes_From_Extended_Return_Statement);
13466 pragma Inline (Set_Compile_Time_Known_Aggregate);
13467 pragma Inline (Set_Component_Associations);
13468 pragma Inline (Set_Component_Clauses);
13469 pragma Inline (Set_Component_Definition);
13470 pragma Inline (Set_Component_Items);
13471 pragma Inline (Set_Component_List);
13472 pragma Inline (Set_Component_Name);
13473 pragma Inline (Set_Componentwise_Assignment);
13474 pragma Inline (Set_Condition);
13475 pragma Inline (Set_Condition_Actions);
13476 pragma Inline (Set_Config_Pragmas);
13477 pragma Inline (Set_Constant_Present);
13478 pragma Inline (Set_Constraint);
13479 pragma Inline (Set_Constraints);
13480 pragma Inline (Set_Context_Installed);
13481 pragma Inline (Set_Context_Items);
13482 pragma Inline (Set_Context_Pending);
13483 pragma Inline (Set_Contract_Test_Cases);
13484 pragma Inline (Set_Controlling_Argument);
13485 pragma Inline (Set_Conversion_OK);
13486 pragma Inline (Set_Convert_To_Return_False);
13487 pragma Inline (Set_Corresponding_Aspect);
13488 pragma Inline (Set_Corresponding_Body);
13489 pragma Inline (Set_Corresponding_Formal_Spec);
13490 pragma Inline (Set_Corresponding_Generic_Association);
13491 pragma Inline (Set_Corresponding_Integer_Value);
13492 pragma Inline (Set_Corresponding_Spec);
13493 pragma Inline (Set_Corresponding_Spec_Of_Stub);
13494 pragma Inline (Set_Corresponding_Stub);
13495 pragma Inline (Set_Dcheck_Function);
13496 pragma Inline (Set_Declarations);
13497 pragma Inline (Set_Default_Expression);
13498 pragma Inline (Set_Default_Name);
13499 pragma Inline (Set_Default_Storage_Pool);
13500 pragma Inline (Set_Defining_Identifier);
13501 pragma Inline (Set_Defining_Unit_Name);
13502 pragma Inline (Set_Delay_Alternative);
13503 pragma Inline (Set_Delay_Statement);
13504 pragma Inline (Set_Delta_Expression);
13505 pragma Inline (Set_Digits_Expression);
13506 pragma Inline (Set_Discr_Check_Funcs_Built);
13507 pragma Inline (Set_Discrete_Choices);
13508 pragma Inline (Set_Discrete_Range);
13509 pragma Inline (Set_Discrete_Subtype_Definition);
13510 pragma Inline (Set_Discrete_Subtype_Definitions);
13511 pragma Inline (Set_Discriminant_Specifications);
13512 pragma Inline (Set_Discriminant_Type);
13513 pragma Inline (Set_Do_Accessibility_Check);
13514 pragma Inline (Set_Do_Discriminant_Check);
13515 pragma Inline (Set_Do_Division_Check);
13516 pragma Inline (Set_Do_Length_Check);
13517 pragma Inline (Set_Do_Overflow_Check);
13518 pragma Inline (Set_Do_Range_Check);
13519 pragma Inline (Set_Do_Storage_Check);
13520 pragma Inline (Set_Do_Tag_Check);
13521 pragma Inline (Set_Elaborate_All_Desirable);
13522 pragma Inline (Set_Elaborate_All_Present);
13523 pragma Inline (Set_Elaborate_Desirable);
13524 pragma Inline (Set_Elaborate_Present);
13525 pragma Inline (Set_Else_Actions);
13526 pragma Inline (Set_Else_Statements);
13527 pragma Inline (Set_Elsif_Parts);
13528 pragma Inline (Set_Enclosing_Variant);
13529 pragma Inline (Set_End_Label);
13530 pragma Inline (Set_End_Span);
13531 pragma Inline (Set_Entity);
13532 pragma Inline (Set_Entry_Body_Formal_Part);
13533 pragma Inline (Set_Entry_Call_Alternative);
13534 pragma Inline (Set_Entry_Call_Statement);
13535 pragma Inline (Set_Entry_Direct_Name);
13536 pragma Inline (Set_Entry_Index);
13537 pragma Inline (Set_Entry_Index_Specification);
13538 pragma Inline (Set_Etype);
13539 pragma Inline (Set_Exception_Choices);
13540 pragma Inline (Set_Exception_Handlers);
13541 pragma Inline (Set_Exception_Junk);
13542 pragma Inline (Set_Exception_Label);
13543 pragma Inline (Set_Expansion_Delayed);
13544 pragma Inline (Set_Explicit_Actual_Parameter);
13545 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
13546 pragma Inline (Set_Expression);
13547 pragma Inline (Set_Expression_Copy);
13548 pragma Inline (Set_Expressions);
13549 pragma Inline (Set_First_Bit);
13550 pragma Inline (Set_First_Inlined_Subprogram);
13551 pragma Inline (Set_First_Name);
13552 pragma Inline (Set_First_Named_Actual);
13553 pragma Inline (Set_First_Real_Statement);
13554 pragma Inline (Set_First_Subtype_Link);
13555 pragma Inline (Set_Float_Truncate);
13556 pragma Inline (Set_Formal_Type_Definition);
13557 pragma Inline (Set_Forwards_OK);
13558 pragma Inline (Set_From_Aspect_Specification);
13559 pragma Inline (Set_From_At_End);
13560 pragma Inline (Set_From_At_Mod);
13561 pragma Inline (Set_From_Conditional_Expression);
13562 pragma Inline (Set_From_Default);
13563 pragma Inline (Set_Generalized_Indexing);
13564 pragma Inline (Set_Generic_Associations);
13565 pragma Inline (Set_Generic_Formal_Declarations);
13566 pragma Inline (Set_Generic_Parent);
13567 pragma Inline (Set_Generic_Parent_Type);
13568 pragma Inline (Set_Handled_Statement_Sequence);
13569 pragma Inline (Set_Handler_List_Entry);
13570 pragma Inline (Set_Has_Created_Identifier);
13571 pragma Inline (Set_Has_Dereference_Action);
13572 pragma Inline (Set_Has_Dynamic_Length_Check);
13573 pragma Inline (Set_Has_Dynamic_Range_Check);
13574 pragma Inline (Set_Has_Init_Expression);
13575 pragma Inline (Set_Has_Local_Raise);
13576 pragma Inline (Set_Has_No_Elaboration_Code);
13577 pragma Inline (Set_Has_Pragma_Suppress_All);
13578 pragma Inline (Set_Has_Private_View);
13579 pragma Inline (Set_Has_Relative_Deadline_Pragma);
13580 pragma Inline (Set_Has_Self_Reference);
13581 pragma Inline (Set_Has_SP_Choice);
13582 pragma Inline (Set_Has_Storage_Size_Pragma);
13583 pragma Inline (Set_Has_Target_Names);
13584 pragma Inline (Set_Has_Wide_Character);
13585 pragma Inline (Set_Has_Wide_Wide_Character);
13586 pragma Inline (Set_Header_Size_Added);
13587 pragma Inline (Set_Hidden_By_Use_Clause);
13588 pragma Inline (Set_High_Bound);
13589 pragma Inline (Set_Identifier);
13590 pragma Inline (Set_Implicit_With);
13591 pragma Inline (Set_Import_Interface_Present);
13592 pragma Inline (Set_In_Present);
13593 pragma Inline (Set_Includes_Infinities);
13594 pragma Inline (Set_Incomplete_View);
13595 pragma Inline (Set_Inherited_Discriminant);
13596 pragma Inline (Set_Instance_Spec);
13597 pragma Inline (Set_Interface_List);
13598 pragma Inline (Set_Interface_Present);
13599 pragma Inline (Set_Intval);
13600 pragma Inline (Set_Is_Abort_Block);
13601 pragma Inline (Set_Is_Accessibility_Actual);
13602 pragma Inline (Set_Is_Analyzed_Pragma);
13603 pragma Inline (Set_Is_Asynchronous_Call_Block);
13604 pragma Inline (Set_Is_Boolean_Aspect);
13605 pragma Inline (Set_Is_Checked);
13606 pragma Inline (Set_Is_Checked_Ghost_Pragma);
13607 pragma Inline (Set_Is_Component_Left_Opnd);
13608 pragma Inline (Set_Is_Component_Right_Opnd);
13609 pragma Inline (Set_Is_Controlling_Actual);
13610 pragma Inline (Set_Is_Declaration_Level_Node);
13611 pragma Inline (Set_Is_Delayed_Aspect);
13612 pragma Inline (Set_Is_Disabled);
13613 pragma Inline (Set_Is_Dispatching_Call);
13614 pragma Inline (Set_Is_Dynamic_Coextension);
13615 pragma Inline (Set_Is_Effective_Use_Clause);
13616 pragma Inline (Set_Is_Elaboration_Checks_OK_Node);
13617 pragma Inline (Set_Is_Elsif);
13618 pragma Inline (Set_Is_Entry_Barrier_Function);
13619 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
13620 pragma Inline (Set_Is_Expanded_Contract);
13621 pragma Inline (Set_Is_Finalization_Wrapper);
13622 pragma Inline (Set_Is_Folded_In_Parser);
13623 pragma Inline (Set_Is_Generic_Contract_Pragma);
13624 pragma Inline (Set_Is_Ignored);
13625 pragma Inline (Set_Is_Ignored_Ghost_Pragma);
13626 pragma Inline (Set_Is_In_Discriminant_Check);
13627 pragma Inline (Set_Is_Inherited_Pragma);
13628 pragma Inline (Set_Is_Initialization_Block);
13629 pragma Inline (Set_Is_Known_Guaranteed_ABE);
13630 pragma Inline (Set_Is_Machine_Number);
13631 pragma Inline (Set_Is_Null_Loop);
13632 pragma Inline (Set_Is_Overloaded);
13633 pragma Inline (Set_Is_Power_Of_2_For_Shift);
13634 pragma Inline (Set_Is_Prefixed_Call);
13635 pragma Inline (Set_Is_Protected_Subprogram_Body);
13636 pragma Inline (Set_Is_Qualified_Universal_Literal);
13637 pragma Inline (Set_Is_Recorded_Scenario);
13638 pragma Inline (Set_Is_Source_Call);
13639 pragma Inline (Set_Is_SPARK_Mode_On_Node);
13640 pragma Inline (Set_Is_Static_Coextension);
13641 pragma Inline (Set_Is_Static_Expression);
13642 pragma Inline (Set_Is_Subprogram_Descriptor);
13643 pragma Inline (Set_Is_Task_Allocation_Block);
13644 pragma Inline (Set_Is_Task_Body_Procedure);
13645 pragma Inline (Set_Is_Task_Master);
13646 pragma Inline (Set_Iteration_Scheme);
13647 pragma Inline (Set_Iterator_Specification);
13648 pragma Inline (Set_Itype);
13649 pragma Inline (Set_Kill_Range_Check);
13650 pragma Inline (Set_Label_Construct);
13651 pragma Inline (Set_Last_Bit);
13652 pragma Inline (Set_Last_Name);
13653 pragma Inline (Set_Left_Opnd);
13654 pragma Inline (Set_Library_Unit);
13655 pragma Inline (Set_Limited_Present);
13656 pragma Inline (Set_Limited_View_Installed);
13657 pragma Inline (Set_Literals);
13658 pragma Inline (Set_Local_Raise_Not_OK);
13659 pragma Inline (Set_Local_Raise_Statements);
13660 pragma Inline (Set_Loop_Actions);
13661 pragma Inline (Set_Loop_Parameter_Specification);
13662 pragma Inline (Set_Low_Bound);
13663 pragma Inline (Set_Mod_Clause);
13664 pragma Inline (Set_More_Ids);
13665 pragma Inline (Set_Must_Be_Byte_Aligned);
13666 pragma Inline (Set_Must_Not_Freeze);
13667 pragma Inline (Set_Must_Not_Override);
13668 pragma Inline (Set_Must_Override);
13669 pragma Inline (Set_Name);
13670 pragma Inline (Set_Names);
13671 pragma Inline (Set_Next_Entity);
13672 pragma Inline (Set_Next_Exit_Statement);
13673 pragma Inline (Set_Next_Implicit_With);
13674 pragma Inline (Set_Next_Named_Actual);
13675 pragma Inline (Set_Next_Pragma);
13676 pragma Inline (Set_Next_Rep_Item);
13677 pragma Inline (Set_Next_Use_Clause);
13678 pragma Inline (Set_No_Ctrl_Actions);
13679 pragma Inline (Set_No_Entities_Ref_In_Spec);
13680 pragma Inline (Set_No_Initialization);
13681 pragma Inline (Set_No_Minimize_Eliminate);
13682 pragma Inline (Set_No_Side_Effect_Removal);
13683 pragma Inline (Set_No_Truncation);
13684 pragma Inline (Set_Null_Excluding_Subtype);
13685 pragma Inline (Set_Null_Exclusion_Present);
13686 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13687 pragma Inline (Set_Null_Present);
13688 pragma Inline (Set_Null_Record_Present);
13689 pragma Inline (Set_Null_Statement);
13690 pragma Inline (Set_Object_Definition);
13691 pragma Inline (Set_Of_Present);
13692 pragma Inline (Set_Original_Discriminant);
13693 pragma Inline (Set_Original_Entity);
13694 pragma Inline (Set_Others_Discrete_Choices);
13695 pragma Inline (Set_Out_Present);
13696 pragma Inline (Set_Parameter_Associations);
13697 pragma Inline (Set_Parameter_Specifications);
13698 pragma Inline (Set_Parameter_Type);
13699 pragma Inline (Set_Parent_Spec);
13700 pragma Inline (Set_Position);
13701 pragma Inline (Set_Pragma_Argument_Associations);
13702 pragma Inline (Set_Pragma_Identifier);
13703 pragma Inline (Set_Pragmas_After);
13704 pragma Inline (Set_Pragmas_Before);
13705 pragma Inline (Set_Pre_Post_Conditions);
13706 pragma Inline (Set_Prefix);
13707 pragma Inline (Set_Premature_Use);
13708 pragma Inline (Set_Present_Expr);
13709 pragma Inline (Set_Prev_Ids);
13710 pragma Inline (Set_Prev_Use_Clause);
13711 pragma Inline (Set_Print_In_Hex);
13712 pragma Inline (Set_Private_Declarations);
13713 pragma Inline (Set_Private_Present);
13714 pragma Inline (Set_Procedure_To_Call);
13715 pragma Inline (Set_Proper_Body);
13716 pragma Inline (Set_Protected_Definition);
13717 pragma Inline (Set_Protected_Present);
13718 pragma Inline (Set_Raises_Constraint_Error);
13719 pragma Inline (Set_Range_Constraint);
13720 pragma Inline (Set_Range_Expression);
13721 pragma Inline (Set_Real_Range_Specification);
13722 pragma Inline (Set_Realval);
13723 pragma Inline (Set_Reason);
13724 pragma Inline (Set_Record_Extension_Part);
13725 pragma Inline (Set_Redundant_Use);
13726 pragma Inline (Set_Renaming_Exception);
13727 pragma Inline (Set_Result_Definition);
13728 pragma Inline (Set_Return_Object_Declarations);
13729 pragma Inline (Set_Reverse_Present);
13730 pragma Inline (Set_Right_Opnd);
13731 pragma Inline (Set_Rounded_Result);
13732 pragma Inline (Set_SCIL_Controlling_Tag);
13733 pragma Inline (Set_SCIL_Entity);
13734 pragma Inline (Set_SCIL_Tag_Value);
13735 pragma Inline (Set_SCIL_Target_Prim);
13736 pragma Inline (Set_Scope);
13737 pragma Inline (Set_Select_Alternatives);
13738 pragma Inline (Set_Selector_Name);
13739 pragma Inline (Set_Selector_Names);
13740 pragma Inline (Set_Shift_Count_OK);
13741 pragma Inline (Set_Source_Type);
13742 pragma Inline (Set_Split_PPC);
13743 pragma Inline (Set_Statements);
13744 pragma Inline (Set_Storage_Pool);
13745 pragma Inline (Set_Strval);
13746 pragma Inline (Set_Subpool_Handle_Name);
13747 pragma Inline (Set_Subtype_Indication);
13748 pragma Inline (Set_Subtype_Mark);
13749 pragma Inline (Set_Subtype_Marks);
13750 pragma Inline (Set_Suppress_Assignment_Checks);
13751 pragma Inline (Set_Suppress_Loop_Warnings);
13752 pragma Inline (Set_Synchronized_Present);
13753 pragma Inline (Set_TSS_Elist);
13754 pragma Inline (Set_Tagged_Present);
13755 pragma Inline (Set_Target);
13756 pragma Inline (Set_Target_Type);
13757 pragma Inline (Set_Task_Definition);
13758 pragma Inline (Set_Task_Present);
13759 pragma Inline (Set_Then_Actions);
13760 pragma Inline (Set_Then_Statements);
13761 pragma Inline (Set_Treat_Fixed_As_Integer);
13762 pragma Inline (Set_Triggering_Alternative);
13763 pragma Inline (Set_Triggering_Statement);
13764 pragma Inline (Set_Type_Definition);
13765 pragma Inline (Set_Uneval_Old_Accept);
13766 pragma Inline (Set_Uneval_Old_Warn);
13767 pragma Inline (Set_Unit);
13768 pragma Inline (Set_Uninitialized_Variable);
13769 pragma Inline (Set_Unknown_Discriminants_Present);
13770 pragma Inline (Set_Unreferenced_In_Spec);
13771 pragma Inline (Set_Used_Operations);
13772 pragma Inline (Set_Variant_Part);
13773 pragma Inline (Set_Variants);
13774 pragma Inline (Set_Visible_Declarations);
13775 pragma Inline (Set_Was_Attribute_Reference);
13776 pragma Inline (Set_Was_Expression_Function);
13777 pragma Inline (Set_Was_Originally_Stub);
13778 pragma Inline (Set_Withed_Body);
13779
13780 end Sinfo;