]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/sinfo.ads
[multiple changes]
[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-2015, 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 -- When a declaration is subject to pragma Ghost, it establishes a Ghost
532 -- region depending on the Ghost assertion policy in effect at the point
533 -- of declaration. This region is temporal and starts right before the
534 -- analysis of the Ghost declaration and ends after its expansion. The
535 -- values of global variable Opt.Ghost_Mode are as follows:
536
537 -- 1. Check - All static semantics as defined in SPARK RM 6.9 are in
538 -- effect.
539
540 -- 2. Ignore - Same as Check, ignored Ghost code is not present in ALI
541 -- files, object files as well as the final executable.
542
543 -- To achieve the runtime semantics of "Ignore", the compiler marks each
544 -- node created during an ignored Ghost region and signals all enclosing
545 -- scopes that such a node resides within. The compilation unit where the
546 -- node resides is also added to an auxiliary table for post processing.
547
548 -- After the analysis and expansion of all compilation units takes place
549 -- as well as the instantiation of all inlined [generic] bodies, the GNAT
550 -- driver initiates a separate pass which removes all ignored Ghost code
551 -- from all units stored in the auxiliary table.
552
553 --------------------
554 -- GNATprove Mode --
555 --------------------
556
557 -- When a file is compiled in GNATprove mode (-gnatd.F), a very light
558 -- expansion is performed and the analysis must generate a tree in a
559 -- form that meets additional requirements.
560
561 -- This light expansion does two transformations of the tree that cannot
562 -- be postponed till after semantic analysis:
563
564 -- 1. Replace object renamings by renamed object. This requires the
565 -- introduction of temporaries at the point of the renaming, which
566 -- must be properly analyzed.
567
568 -- 2. Fully qualify entity names. This is needed to generate suitable
569 -- local effects and call-graphs in ALI files, with the completely
570 -- qualified names (in particular the suffix to distinguish homonyms).
571
572 -- The tree after this light expansion should be fully analyzed
573 -- semantically, which sometimes requires the insertion of semantic
574 -- pre-analysis, for example for subprogram contracts and pragma
575 -- check/assert. In particular, all expression must have their proper type,
576 -- and semantic links should be set between tree nodes (partial to full
577 -- view, etc.) Some kinds of nodes should be either absent, or can be
578 -- ignored by the formal verification backend:
579
580 -- N_Object_Renaming_Declaration: can be ignored safely
581 -- N_Expression_Function: absent (rewritten)
582 -- N_Expression_With_Actions: absent (not generated)
583
584 -- SPARK cross-references are generated from the regular cross-references
585 -- (used for browsing and code understanding) and additional references
586 -- collected during semantic analysis, in particular on all dereferences.
587 -- These SPARK cross-references are output in a separate section of ALI
588 -- files, as described in spark_xrefs.adb. They are the basis for the
589 -- computation of data dependences in GNATprove. This implies that all
590 -- cross-references should be generated in this mode, even those that would
591 -- not make sense from a user point-of-view, and that cross-references that
592 -- do not lead to data dependences for subprograms can be safely ignored.
593
594 -- GNATprove relies on the following front end behaviors:
595
596 -- 1. The first declarations in the list of visible declarations of
597 -- a package declaration for a generic instance, up to the first
598 -- declaration which comes from source, should correspond to
599 -- the "mappings nodes" between formal and actual generic parameters.
600
601 -- 2. In addition pragma Debug statements are removed from the tree
602 -- (rewritten to NULL stmt), since they should be ignored in formal
603 -- verification.
604
605 -- 3. An error is also issued for missing subunits, similar to the
606 -- warning issued when generating code, to avoid formal verification
607 -- of a partial unit.
608
609 -- 4. Unconstrained types are not replaced by constrained types whose
610 -- bounds are generated from an expression: Expand_Subtype_From_Expr
611 -- should be a no-op.
612
613 -- 5. Errors (instead of warnings) are issued on compile-time-known
614 -- constraint errors even though such cases do not correspond to
615 -- illegalities in the Ada RM (this is simply another case where
616 -- GNATprove implements a subset of the full language).
617 --
618 -- However, there are a few exceptions to this rule for cases where
619 -- we want to allow the GNATprove analysis to proceed (e.g. range
620 -- checks on empty ranges, which typically appear in deactivated
621 -- code in a particular configuration).
622
623 -- 6. Subtypes should match in the AST, even after a generic is
624 -- instantiated. In particular, GNATprove relies on the fact that,
625 -- on a selected component, the type of the selected component is
626 -- the type of the corresponding component in the prefix of the
627 -- selected component.
628 --
629 -- Note that, in some cases, we know that this rule is broken by the
630 -- frontend. In particular, if the selected component is a packed
631 -- array depending on a discriminant of a unconstrained formal object
632 -- parameter of a generic.
633
634 -----------------------
635 -- Check Flag Fields --
636 -----------------------
637
638 -- The following flag fields appear in expression nodes:
639
640 -- Do_Division_Check
641 -- Do_Overflow_Check
642 -- Do_Range_Check
643
644 -- These three flags are always set by the front end during semantic
645 -- analysis, on expression nodes that may trigger the corresponding
646 -- check. The front end then inserts or not the check during expansion. In
647 -- particular, these flags should also be correctly set in ASIS mode and
648 -- GNATprove mode.
649
650 -- Note: the expander always takes care of the Do_Range check case,
651 -- so this flag will never be set in the expanded tree passed to the
652 -- back end code generator.
653
654 -- Note that this accounts for all nodes that trigger the corresponding
655 -- checks, except for range checks on subtype_indications, which may be
656 -- required to check that a range_constraint is compatible with the given
657 -- subtype (RM 3.2.2(11)).
658
659 -- The following flag fields appear in various nodes:
660
661 -- Do_Accessibility_Check
662 -- Do_Discriminant_Check
663 -- Do_Length_Check
664 -- Do_Storage_Check
665 -- Do_Tag_Check
666
667 -- These flags are used in some specific cases by the front end, either
668 -- during semantic analysis or during expansion, and cannot be expected
669 -- to be set on all nodes that trigger the corresponding check.
670
671 ------------------------
672 -- Common Flag Fields --
673 ------------------------
674
675 -- The following flag fields appear in all nodes:
676
677 -- Analyzed
678 -- This flag is used to indicate that a node (and all its children have
679 -- been analyzed. It is used to avoid reanalysis of a node that has
680 -- already been analyzed, both for efficiency and functional correctness
681 -- reasons.
682
683 -- Comes_From_Source
684 -- This flag is set if the node comes directly from an explicit construct
685 -- in the source. It is normally on for any nodes built by the scanner or
686 -- parser from the source program, with the exception that in a few cases
687 -- the parser adds nodes to normalize the representation (in particular
688 -- a null statement is added to a package body if there is no begin/end
689 -- initialization section.
690 --
691 -- Most nodes inserted by the analyzer or expander are not considered
692 -- as coming from source, so the flag is off for such nodes. In a few
693 -- cases, the expander constructs nodes closely equivalent to nodes
694 -- from the source program (e.g. the allocator built for build-in-place
695 -- case), and the Comes_From_Source flag is deliberately set.
696
697 -- Error_Posted
698 -- This flag is used to avoid multiple error messages being posted on or
699 -- referring to the same node. This flag is set if an error message
700 -- refers to a node or is posted on its source location, and has the
701 -- effect of inhibiting further messages involving this same node.
702
703 -----------------------
704 -- Modify_Tree_For_C --
705 -----------------------
706
707 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
708 -- in ways that help match the semantics better with C, easing the task of
709 -- interfacing to C code generators (other than GCC, where the work is done
710 -- in gigi, and there is no point in changing that), and also making life
711 -- easier for Cprint in generating C source code.
712
713 -- The current modifications implemented are as follows:
714
715 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
716 -- are eliminated from the tree (since these operations do not exist in
717 -- C), and the operations are rewritten in terms of logical shifts and
718 -- other logical operations that do exist in C. See Exp_Ch4 expansion
719 -- routines for these operators for details of the transformations made.
720
721 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
722 -- less than the word size (since other values are not well-defined in
723 -- C). This is done using an explicit test if necessary.
724
725 -- Min and Max attributes are expanded into equivalent if expressions,
726 -- dealing properly with side effect issues.
727
728 -- Mod for signed integer types is expanded into equivalent expressions
729 -- using Rem (which is % in C) and other C-available operators.
730
731 -- Functions returning bounded arrays are transformed into procedures
732 -- with an extra out parameter, and the calls updated accordingly.
733
734 -- Aggregates are only kept unexpanded for object declarations, otherwise
735 -- they are systematically expanded into loops (for arrays) and
736 -- individual assignments (for records).
737
738 ------------------------------------
739 -- Description of Semantic Fields --
740 ------------------------------------
741
742 -- The meaning of the syntactic fields is generally clear from their names
743 -- without any further description, since the names are chosen to
744 -- correspond very closely to the syntax in the reference manual. This
745 -- section describes the usage of the semantic fields, which are used to
746 -- contain additional information determined during semantic analysis.
747
748 -- ABE_Is_Certain (Flag18-Sem)
749 -- This flag is set in an instantiation node or a call node is determined
750 -- to be sure to raise an ABE. This is used to trigger special handling
751 -- of such cases, particularly in the instantiation case where we avoid
752 -- instantiating the body if this flag is set. This flag is also present
753 -- in an N_Formal_Package_Declaration_Node since formal package
754 -- declarations are treated like instantiations, but it is always set to
755 -- False in this context.
756
757 -- Accept_Handler_Records (List5-Sem)
758 -- This field is present only in an N_Accept_Alternative node. It is used
759 -- to temporarily hold the exception handler records from an accept
760 -- statement in a selective accept. These exception handlers will
761 -- eventually be placed in the Handler_Records list of the procedure
762 -- built for this accept (see Expand_N_Selective_Accept procedure in
763 -- Exp_Ch9 for further details).
764
765 -- Access_Types_To_Process (Elist2-Sem)
766 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
767 -- Contains the list of access types which may require specific treatment
768 -- when the nature of the type completion is completely known. An example
769 -- of such treatment is the generation of the associated_final_chain.
770
771 -- Actions (List1-Sem)
772 -- This field contains a sequence of actions that are associated with the
773 -- node holding the field. See the individual node types for details of
774 -- how this field is used, as well as the description of the specific use
775 -- for a particular node type.
776
777 -- Activation_Chain_Entity (Node3-Sem)
778 -- This is used in tree nodes representing task activators (blocks,
779 -- subprogram bodies, package declarations, and task bodies). It is
780 -- initially Empty, and then gets set to point to the entity for the
781 -- declared Activation_Chain variable when the first task is declared.
782 -- When tasks are declared in the corresponding declarative region this
783 -- entity is located by name (its name is always _Chain) and the declared
784 -- tasks are added to the chain. Note that N_Extended_Return_Statement
785 -- does not have this attribute, although it does have an activation
786 -- chain. This chain is used to store the tasks temporarily, and is not
787 -- used for activating them. On successful completion of the return
788 -- statement, the tasks are moved to the caller's chain, and the caller
789 -- activates them.
790
791 -- Acts_As_Spec (Flag4-Sem)
792 -- A flag set in the N_Subprogram_Body node for a subprogram body which
793 -- is acting as its own spec. In the case of a library-level subprogram
794 -- the flag is set as well on the parent compilation unit node.
795
796 -- Actual_Designated_Subtype (Node4-Sem)
797 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
798 -- needs to known the dynamic constrained subtype of the designated
799 -- object, this attribute is set to that type. This is done for
800 -- N_Free_Statements for access-to-classwide types and access to
801 -- unconstrained packed array types, and for N_Explicit_Dereference when
802 -- the designated type is an unconstrained packed array and the
803 -- dereference is the prefix of a 'Size attribute reference.
804
805 -- Address_Warning_Posted (Flag18-Sem)
806 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
807 -- posted a warning for the address clause regarding size or alignment
808 -- issues. Used to inhibit multiple redundant messages.
809
810 -- Aggregate_Bounds (Node3-Sem)
811 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
812 -- known at compile time, this field points to an N_Range node with those
813 -- bounds. Otherwise Empty.
814
815 -- All_Others (Flag11-Sem)
816 -- Present in an N_Others_Choice node. This flag is set for an others
817 -- exception where all exceptions are to be caught, even those that are
818 -- not normally handled (in particular the tasking abort signal). This
819 -- is used for translation of the at end handler into a normal exception
820 -- handler.
821
822 -- Aspect_Rep_Item (Node2-Sem)
823 -- Present in N_Aspect_Specification nodes. Points to the corresponding
824 -- pragma/attribute definition node used to process the aspect.
825
826 -- Assignment_OK (Flag15-Sem)
827 -- This flag is set in a subexpression node for an object, indicating
828 -- that the associated object can be modified, even if this would not
829 -- normally be permissible (either by direct assignment, or by being
830 -- passed as an out or in-out parameter). This is used by the expander
831 -- for a number of purposes, including initialization of constants and
832 -- limited type objects (such as tasks), setting discriminant fields,
833 -- setting tag values, etc. N_Object_Declaration nodes also have this
834 -- flag defined. Here it is used to indicate that an initialization
835 -- expression is valid, even where it would normally not be allowed
836 -- (e.g. where the type involved is limited). It is also used to stop
837 -- a Force_Evaluation call for an unchecked conversion, but this usage
838 -- is unclear and not documented ???
839
840 -- Associated_Node (Node4-Sem)
841 -- Present in nodes that can denote an entity: identifiers, character
842 -- literals, operator symbols, expanded names, operator nodes, and
843 -- attribute reference nodes (all these nodes have an Entity field).
844 -- This field is also present in N_Aggregate, N_Selected_Component, and
845 -- N_Extension_Aggregate nodes. This field is used in generic processing
846 -- to create links between the generic template and the generic copy.
847 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
848 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
849 -- the normal function of Entity is not required at the point where the
850 -- Associated_Node is set. Note also, that in generic templates, this
851 -- means that the Entity field does not necessarily point to an Entity.
852 -- Since the back end is expected to ignore generic templates, this is
853 -- harmless.
854
855 -- Atomic_Sync_Required (Flag14-Sem)
856 -- This flag is set on a node for which atomic synchronization is
857 -- required for the corresponding reference or modification.
858
859 -- At_End_Proc (Node1)
860 -- This field is present in an N_Handled_Sequence_Of_Statements node.
861 -- It contains an identifier reference for the cleanup procedure to be
862 -- called. See description of this node for further details.
863
864 -- Backwards_OK (Flag6-Sem)
865 -- A flag present in the N_Assignment_Statement node. It is used only
866 -- if the type being assigned is an array type, and is set if analysis
867 -- determines that it is definitely safe to do the copy backwards, i.e.
868 -- starting at the highest addressed element. This is the case if either
869 -- the operands do not overlap, or they may overlap, but if they do,
870 -- then the left operand is at a higher address than the right operand.
871 --
872 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
873 -- means that the front end could not determine that either direction is
874 -- definitely safe, and a runtime check may be required if the backend
875 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
876 -- set, it means that the front end can assure no overlap of operands.
877
878 -- Body_To_Inline (Node3-Sem)
879 -- Present in subprogram declarations. Denotes analyzed but unexpanded
880 -- body of subprogram, to be used when inlining calls. Present when the
881 -- subprogram has an Inline pragma and inlining is enabled. If the
882 -- declaration is completed by a renaming_as_body, and the renamed en-
883 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
884 -- which is used directly in later calls to the original subprogram.
885
886 -- Body_Required (Flag13-Sem)
887 -- A flag that appears in the N_Compilation_Unit node indicating that
888 -- the corresponding unit requires a body. For the package case, this
889 -- indicates that a completion is required. In Ada 95, if the flag is not
890 -- set for the package case, then a body may not be present. In Ada 83,
891 -- if the flag is not set for the package case, then body is optional.
892 -- For a subprogram declaration, the flag is set except in the case where
893 -- a pragma Import or Interface applies, in which case no body is
894 -- permitted (in Ada 83 or Ada 95).
895
896 -- By_Ref (Flag5-Sem)
897 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
898 -- this flag is set when the returned expression is already allocated on
899 -- the secondary stack and thus the result is passed by reference rather
900 -- than copied another time.
901
902 -- Cleanup_Actions (List5-Sem)
903 -- Present in block statements created for transient blocks, contains
904 -- additional cleanup actions carried over from the transient scope.
905
906 -- Check_Address_Alignment (Flag11-Sem)
907 -- A flag present in N_Attribute_Definition clause for a 'Address
908 -- attribute definition. This flag is set if a dynamic check should be
909 -- generated at the freeze point for the entity to which this address
910 -- clause applies. The reason that we need this flag is that we want to
911 -- check for range checks being suppressed at the point where the
912 -- attribute definition clause is given, rather than testing this at the
913 -- freeze point.
914
915 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
916 -- Present in N_Simple_Return_Statement nodes. True if this node was
917 -- constructed as part of the N_Extended_Return_Statement expansion.
918
919 -- Compile_Time_Known_Aggregate (Flag18-Sem)
920 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
921 -- evaluated at compile time without raising constraint error. Such
922 -- aggregates can be passed as is the back end without any expansion.
923 -- See Exp_Aggr for specific conditions under which this flag gets set.
924
925 -- Componentwise_Assignment (Flag14-Sem)
926 -- Present in N_Assignment_Statement nodes. Set for a record assignment
927 -- where all that needs doing is to expand it into component-by-component
928 -- assignments. This is used internally for the case of tagged types with
929 -- rep clauses, where we need to avoid recursion (we don't want to try to
930 -- generate a call to the primitive operation, because this is the case
931 -- where we are compiling the primitive operation). Note that when we are
932 -- expanding component assignments in this case, we never assign the _tag
933 -- field, but we recursively assign components of the parent type.
934
935 -- Condition_Actions (List3-Sem)
936 -- This field appears in else-if nodes and in the iteration scheme node
937 -- for while loops. This field is only used during semantic processing to
938 -- temporarily hold actions inserted into the tree. In the tree passed
939 -- to gigi, the condition actions field is always set to No_List. For
940 -- details on how this field is used, see the routine Insert_Actions in
941 -- package Exp_Util, and also the expansion routines for the relevant
942 -- nodes.
943
944 -- Context_Pending (Flag16-Sem)
945 -- This field appears in Compilation_Unit nodes, to indicate that the
946 -- context of the unit is being compiled. Used to detect circularities
947 -- that are not otherwise detected by the loading mechanism. Such
948 -- circularities can occur in the presence of limited and non-limited
949 -- with_clauses that mention the same units.
950
951 -- Controlling_Argument (Node1-Sem)
952 -- This field is set in procedure and function call nodes if the call
953 -- is a dispatching call (it is Empty for a non-dispatching call). It
954 -- indicates the source of the call's controlling tag. For procedure
955 -- calls, the Controlling_Argument is one of the actuals. For function
956 -- that has a dispatching result, it is an entity in the context of the
957 -- call that can provide a tag, or else it is the tag of the root type
958 -- of the class. It can also specify a tag directly rather than being a
959 -- tagged object. The latter is needed by the implementations of AI-239
960 -- and AI-260.
961
962 -- Conversion_OK (Flag14-Sem)
963 -- A flag set on type conversion nodes to indicate that the conversion
964 -- is to be considered as being valid, even though it is the case that
965 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
966 -- Fixed_Value and Integer_Value, for internal conversions done for
967 -- fixed-point operations, and for certain conversions for calls to
968 -- initialization procedures. If Conversion_OK is set, then Etype must be
969 -- set (the analyzer assumes that Etype has been set). For the case of
970 -- fixed-point operands, it also indicates that the conversion is to be
971 -- direct conversion of the underlying integer result, with no regard to
972 -- the small operand.
973
974 -- Convert_To_Return_False (Flag13-Sem)
975 -- Present in N_Raise_Expression nodes that appear in the body of the
976 -- special predicateM function used to test a predicate in the context
977 -- of a membership test, where raise expression results in returning a
978 -- value of False rather than raising an exception.
979
980 -- Corresponding_Aspect (Node3-Sem)
981 -- Present in N_Pragma node. Used to point back to the source aspect from
982 -- the corresponding pragma. This field is Empty for source pragmas.
983
984 -- Corresponding_Body (Node5-Sem)
985 -- This field is set in subprogram declarations, package declarations,
986 -- entry declarations of protected types, and in generic units. It points
987 -- to the defining entity for the corresponding body (NOT the node for
988 -- the body itself).
989
990 -- Corresponding_Formal_Spec (Node3-Sem)
991 -- This field is set in subprogram renaming declarations, where it points
992 -- to the defining entity for a formal subprogram in the case where the
993 -- renaming corresponds to a generic formal subprogram association in an
994 -- instantiation. The field is Empty if the renaming does not correspond
995 -- to such a formal association.
996
997 -- Corresponding_Generic_Association (Node5-Sem)
998 -- This field is defined for object declarations and object renaming
999 -- declarations. It is set for the declarations within an instance that
1000 -- map generic formals to their actuals. If set, the field points to
1001 -- a generic_association which is the original parent of the expression
1002 -- or name appearing in the declaration. This simplifies ASIS queries.
1003
1004 -- Corresponding_Integer_Value (Uint4-Sem)
1005 -- This field is set in real literals of fixed-point types (it is not
1006 -- used for floating-point types). It contains the integer value used
1007 -- to represent the fixed-point value. It is also set on the universal
1008 -- real literals used to represent bounds of fixed-point base types
1009 -- and their first named subtypes.
1010
1011 -- Corresponding_Spec (Node5-Sem)
1012 -- This field is set in subprogram, package, task, and protected body
1013 -- nodes, where it points to the defining entity in the corresponding
1014 -- spec. The attribute is also set in N_With_Clause nodes where it points
1015 -- to the defining entity for the with'ed spec, and in a subprogram
1016 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
1017 -- if there is no corresponding spec, as in the case of a subprogram body
1018 -- that serves as its own spec.
1019 --
1020 -- In Ada 2012, Corresponding_Spec is set on expression functions that
1021 -- complete a subprogram declaration.
1022
1023 -- Corresponding_Spec_Of_Stub (Node2-Sem)
1024 -- This field is present in subprogram, package, task and protected body
1025 -- stubs where it points to the corresponding spec of the stub. Due to
1026 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
1027
1028 -- Corresponding_Stub (Node3-Sem)
1029 -- This field is present in an N_Subunit node. It holds the node in
1030 -- the parent unit that is the stub declaration for the subunit. It is
1031 -- set when analysis of the stub forces loading of the proper body. If
1032 -- expansion of the proper body creates new declarative nodes, they are
1033 -- inserted at the point of the corresponding_stub.
1034
1035 -- Dcheck_Function (Node5-Sem)
1036 -- This field is present in an N_Variant node, It references the entity
1037 -- for the discriminant checking function for the variant.
1038
1039 -- Default_Expression (Node5-Sem)
1040 -- This field is Empty if there is no default expression. If there is a
1041 -- simple default expression (one with no side effects), then this field
1042 -- simply contains a copy of the Expression field (both point to the tree
1043 -- for the default expression). Default_Expression is used for
1044 -- conformance checking.
1045
1046 -- Default_Storage_Pool (Node3-Sem)
1047 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
1048 -- copy of Opt.Default_Pool at the end of the compilation unit. See
1049 -- package Opt for details. This is used for inheriting the
1050 -- Default_Storage_Pool in child units.
1051
1052 -- Discr_Check_Funcs_Built (Flag11-Sem)
1053 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
1054 -- discriminant checking functions are constructed. The purpose is to
1055 -- avoid attempting to set these functions more than once.
1056
1057 -- Do_Accessibility_Check (Flag13-Sem)
1058 -- This flag is set on N_Parameter_Specification nodes to indicate
1059 -- that an accessibility check is required for the parameter. It is
1060 -- not yet decided who takes care of this check (TBD ???).
1061
1062 -- Do_Discriminant_Check (Flag1-Sem)
1063 -- This flag is set on N_Selected_Component nodes to indicate that a
1064 -- discriminant check is required using the discriminant check routine
1065 -- associated with the selector. The actual check is generated by the
1066 -- expander when processing selected components. In the case of
1067 -- Unchecked_Union, the flag is also set, but no discriminant check
1068 -- routine is associated with the selector, and the expander does not
1069 -- generate a check. This flag is also present in assignment statements
1070 -- (and set if the assignment requires a discriminant check), and in type
1071 -- conversion nodes (and set if the conversion requires a check).
1072
1073 -- Do_Division_Check (Flag13-Sem)
1074 -- This flag is set on a division operator (/ mod rem) to indicate
1075 -- that a zero divide check is required. The actual check is dealt
1076 -- with by the backend (all the front end does is to set the flag).
1077
1078 -- Do_Length_Check (Flag4-Sem)
1079 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1080 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1081 -- is required. It is not determined who deals with this flag (???).
1082
1083 -- Do_Overflow_Check (Flag17-Sem)
1084 -- This flag is set on an operator where an overflow check is required on
1085 -- the operation. The actual check is dealt with by the backend (all the
1086 -- front end does is to set the flag). The other cases where this flag is
1087 -- used is on a Type_Conversion node and for attribute reference nodes.
1088 -- For a type conversion, it means that the conversion is from one base
1089 -- type to another, and the value may not fit in the target base type.
1090 -- See also the description of Do_Range_Check for this case. The only
1091 -- attribute references which use this flag are Pred and Succ, where it
1092 -- means that the result should be checked for going outside the base
1093 -- range. Note that this flag is not set for modular types. This flag is
1094 -- also set on if and case expression nodes if we are operating in either
1095 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1096 -- properly process overflow checking for dependent expressions).
1097
1098 -- Do_Range_Check (Flag9-Sem)
1099 -- This flag is set on an expression which appears in a context where a
1100 -- range check is required. The target type is clear from the context.
1101 -- The contexts in which this flag can appear are the following:
1102
1103 -- Right side of an assignment. In this case the target type is
1104 -- taken from the left side of the assignment, which is referenced
1105 -- by the Name of the N_Assignment_Statement node.
1106
1107 -- Subscript expressions in an indexed component. In this case the
1108 -- target type is determined from the type of the array, which is
1109 -- referenced by the Prefix of the N_Indexed_Component node.
1110
1111 -- Argument expression for a parameter, appearing either directly in
1112 -- the Parameter_Associations list of a call or as the Expression of an
1113 -- N_Parameter_Association node that appears in this list. In either
1114 -- case, the check is against the type of the formal. Note that the
1115 -- flag is relevant only in IN and IN OUT parameters, and will be
1116 -- ignored for OUT parameters, where no check is required in the call,
1117 -- and if a check is required on the return, it is generated explicitly
1118 -- with a type conversion.
1119
1120 -- Initialization expression for the initial value in an object
1121 -- declaration. In this case the Do_Range_Check flag is set on
1122 -- the initialization expression, and the check is against the
1123 -- range of the type of the object being declared. This includes the
1124 -- cases of expressions providing default discriminant values, and
1125 -- expressions used to initialize record components.
1126
1127 -- The expression of a type conversion. In this case the range check is
1128 -- against the target type of the conversion. See also the use of
1129 -- Do_Overflow_Check on a type conversion. The distinction is that the
1130 -- overflow check protects against a value that is outside the range of
1131 -- the target base type, whereas a range check checks that the
1132 -- resulting value (which is a value of the base type of the target
1133 -- type), satisfies the range constraint of the target type.
1134
1135 -- Note: when a range check is required in contexts other than those
1136 -- listed above (e.g. in a return statement), an additional type
1137 -- conversion node is introduced to represent the required check.
1138
1139 -- A special case arises for the arguments of the Pred/Succ attributes.
1140 -- Here the range check needed is against First + 1 .. Last (Pred) or
1141 -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
1142 -- these checks are what would be performed within the implicit body of
1143 -- the functions that correspond to these attributes. In these cases,
1144 -- the Do_Range check flag is set on the argument to the attribute
1145 -- function, and the back end must special case the appropriate range
1146 -- to check against.
1147
1148 -- Do_Storage_Check (Flag17-Sem)
1149 -- This flag is set in an N_Allocator node to indicate that a storage
1150 -- check is required for the allocation, or in an N_Subprogram_Body node
1151 -- to indicate that a stack check is required in the subprogram prologue.
1152 -- The N_Allocator case is handled by the routine that expands the call
1153 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1154 -- backend, and all the semantics does is set the flag.
1155
1156 -- Do_Tag_Check (Flag13-Sem)
1157 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1158 -- N_Procedure_Call_Statement, N_Type_Conversion,
1159 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1160 -- node to indicate that the tag check can be suppressed. It is not
1161 -- yet decided how this flag is used (TBD ???).
1162
1163 -- Elaborate_Present (Flag4-Sem)
1164 -- This flag is set in the N_With_Clause node to indicate that pragma
1165 -- Elaborate pragma appears for the with'ed units.
1166
1167 -- Elaborate_All_Desirable (Flag9-Sem)
1168 -- This flag is set in the N_With_Clause mode to indicate that the static
1169 -- elaboration processing has determined that an Elaborate_All pragma is
1170 -- desirable for correct elaboration for this unit.
1171
1172 -- Elaborate_All_Present (Flag14-Sem)
1173 -- This flag is set in the N_With_Clause node to indicate that a
1174 -- pragma Elaborate_All pragma appears for the with'ed units.
1175
1176 -- Elaborate_Desirable (Flag11-Sem)
1177 -- This flag is set in the N_With_Clause mode to indicate that the static
1178 -- elaboration processing has determined that an Elaborate pragma is
1179 -- desirable for correct elaboration for this unit.
1180
1181 -- Else_Actions (List3-Sem)
1182 -- This field is present in if expression nodes. During code
1183 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1184 -- actions at an appropriate place in the tree to get elaborated at the
1185 -- right time. For if expressions, we have to be sure that the actions
1186 -- for the Else branch are only elaborated if the condition is False.
1187 -- The Else_Actions field is used as a temporary parking place for
1188 -- these actions. The final tree is always rewritten to eliminate the
1189 -- need for this field, so in the tree passed to Gigi, this field is
1190 -- always set to No_List.
1191
1192 -- Enclosing_Variant (Node2-Sem)
1193 -- This field is present in the N_Variant node and identifies the Node_Id
1194 -- corresponding to the immediately enclosing variant when the variant is
1195 -- nested, and N_Empty otherwise. Set during semantic processing of the
1196 -- variant part of a record type.
1197
1198 -- Entity (Node4-Sem)
1199 -- Appears in all direct names (identifiers, character literals, and
1200 -- operator symbols), as well as expanded names, and attributes that
1201 -- denote entities, such as 'Class. Points to entity for corresponding
1202 -- defining occurrence. Set after name resolution. For identifiers in a
1203 -- WITH list, the corresponding defining occurrence is in a separately
1204 -- compiled file, and Entity must be set by the library Load procedure.
1205 --
1206 -- Note: During name resolution, the value in Entity may be temporarily
1207 -- incorrect (e.g. during overload resolution, Entity is initially set to
1208 -- the first possible correct interpretation, and then later modified if
1209 -- necessary to contain the correct value after resolution).
1210 --
1211 -- Note: This field overlaps Associated_Node, which is used during
1212 -- generic processing (see Sem_Ch12 for details). Note also that in
1213 -- generic templates, this means that the Entity field does not always
1214 -- point to an Entity. Since the back end is expected to ignore generic
1215 -- templates, this is harmless.
1216 --
1217 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1218 -- It is used only for stream attributes definition clauses. In this
1219 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1220 -- conceptually at the point of the clause. Thus the visibility of the
1221 -- attribute definition clause (in the sense of 8.3(23) as amended by
1222 -- AI-195) can be checked by testing the visibility of that subprogram.
1223 --
1224 -- Note: Normally the Entity field of an identifier points to the entity
1225 -- for the corresponding defining identifier, and hence the Chars field
1226 -- of an identifier will match the Chars field of the entity. However,
1227 -- there is no requirement that these match, and there are obscure cases
1228 -- of generated code where they do not match.
1229
1230 -- Note: Ada 2012 aspect specifications require additional links between
1231 -- identifiers and various attributes. These attributes can be of
1232 -- arbitrary types, and the entity field of identifiers that denote
1233 -- aspects must be used to store arbitrary expressions for later semantic
1234 -- checks. See section on aspect specifications for details.
1235
1236 -- Entity_Or_Associated_Node (Node4-Sem)
1237 -- A synonym for both Entity and Associated_Node. Used by convention in
1238 -- the code when referencing this field in cases where it is not known
1239 -- whether the field contains an Entity or an Associated_Node.
1240
1241 -- Etype (Node5-Sem)
1242 -- Appears in all expression nodes, all direct names, and all entities.
1243 -- Points to the entity for the related type. Set after type resolution.
1244 -- Normally this is the actual subtype of the expression. However, in
1245 -- certain contexts such as the right side of an assignment, subscripts,
1246 -- arguments to calls, returned value in a function, initial value etc.
1247 -- it is the desired target type. In the event that this is different
1248 -- from the actual type, the Do_Range_Check flag will be set if a range
1249 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1250 -- points to an essentially arbitrary choice from the possible set of
1251 -- types.
1252
1253 -- Exception_Junk (Flag8-Sem)
1254 -- This flag is set in a various nodes appearing in a statement sequence
1255 -- to indicate that the corresponding node is an artifact of the
1256 -- generated code for exception handling, and should be ignored when
1257 -- analyzing the control flow of the relevant sequence of statements
1258 -- (e.g. to check that it does not end with a bad return statement).
1259
1260 -- Exception_Label (Node5-Sem)
1261 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1262 -- to be used for transforming the corresponding exception into a goto,
1263 -- or contains Empty, if this exception is not to be transformed. Also
1264 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1265 -- that there may be a local raise for the handler, so that expansion
1266 -- to allow a goto is required (and this field contains the label for
1267 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1268
1269 -- Expansion_Delayed (Flag11-Sem)
1270 -- Set on aggregates and extension aggregates that need a top-down rather
1271 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1272 -- up. For nested aggregates the expansion is delayed until the enclosing
1273 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1274 -- delay it we set this flag. This is done to avoid creating a temporary
1275 -- for each level of a nested aggregates, and also to prevent the
1276 -- premature generation of constraint checks. This is also a requirement
1277 -- if we want to generate the proper attachment to the internal
1278 -- finalization lists (for record with controlled components). Top down
1279 -- expansion of aggregates is also used for in-place array aggregate
1280 -- assignment or initialization. When the full context is known, the
1281 -- target of the assignment or initialization is used to generate the
1282 -- left-hand side of individual assignment to each sub-component.
1283
1284 -- First_Inlined_Subprogram (Node3-Sem)
1285 -- Present in the N_Compilation_Unit node for the main program. Points
1286 -- to a chain of entities for subprograms that are to be inlined. The
1287 -- Next_Inlined_Subprogram field of these entities is used as a link
1288 -- pointer with Empty marking the end of the list. This field is Empty
1289 -- if there are no inlined subprograms or inlining is not active.
1290
1291 -- First_Named_Actual (Node4-Sem)
1292 -- Present in procedure call statement and function call nodes, and also
1293 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1294 -- named parameter where parameters are ordered by declaration order (as
1295 -- opposed to the actual order in the call which may be different due to
1296 -- named associations). Note: this field points to the explicit actual
1297 -- parameter itself, not the N_Parameter_Association node (its parent).
1298
1299 -- First_Real_Statement (Node2-Sem)
1300 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1301 -- Empty. Used only when declarations are moved into the statement part
1302 -- of a construct as a result of wrapping an AT END handler that is
1303 -- required to cover the declarations. In this case, this field is used
1304 -- to remember the location in the statements list of the first real
1305 -- statement, i.e. the statement that used to be first in the statement
1306 -- list before the declarations were prepended.
1307
1308 -- First_Subtype_Link (Node5-Sem)
1309 -- Present in N_Freeze_Entity node for an anonymous base type that is
1310 -- implicitly created by the declaration of a first subtype. It points
1311 -- to the entity for the first subtype.
1312
1313 -- Float_Truncate (Flag11-Sem)
1314 -- A flag present in type conversion nodes. This is used for float to
1315 -- integer conversions where truncation is required rather than rounding.
1316
1317 -- Forwards_OK (Flag5-Sem)
1318 -- A flag present in the N_Assignment_Statement node. It is used only
1319 -- if the type being assigned is an array type, and is set if analysis
1320 -- determines that it is definitely safe to do the copy forwards, i.e.
1321 -- starting at the lowest addressed element. This is the case if either
1322 -- the operands do not overlap, or they may overlap, but if they do,
1323 -- then the left operand is at a lower address than the right operand.
1324 --
1325 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1326 -- means that the front end could not determine that either direction is
1327 -- definitely safe, and a runtime check may be required if the backend
1328 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1329 -- set, it means that the front end can assure no overlap of operands.
1330
1331 -- From_Aspect_Specification (Flag13-Sem)
1332 -- Processing of aspect specifications typically results in insertion in
1333 -- the tree of corresponding pragma or attribute definition clause nodes.
1334 -- These generated nodes have the From_Aspect_Specification flag set to
1335 -- indicate that they came from aspect specifications originally.
1336
1337 -- From_At_End (Flag4-Sem)
1338 -- This flag is set on an N_Raise_Statement node if it corresponds to
1339 -- the reraise statement generated as the last statement of an AT END
1340 -- handler when SJLJ exception handling is active. It is used to stop
1341 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1342 -- because if the restriction is set, the reraise is not generated.
1343
1344 -- From_At_Mod (Flag4-Sem)
1345 -- This flag is set on the attribute definition clause node that is
1346 -- generated by a transformation of an at mod phrase in a record
1347 -- representation clause. This is used to give slightly different (Ada 83
1348 -- compatible) semantics to such a clause, namely it is used to specify a
1349 -- minimum acceptable alignment for the base type and all subtypes. In
1350 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1351 -- must be a multiple of the given value, and the representation clause
1352 -- is considered to be type specific instead of subtype specific.
1353
1354 -- From_Conditional_Expression (Flag1-Sem)
1355 -- This flag is set on if and case statements generated by the expansion
1356 -- of if and case expressions respectively. The flag is used to suppress
1357 -- any finalization of controlled objects found within these statements.
1358
1359 -- From_Default (Flag6-Sem)
1360 -- This flag is set on the subprogram renaming declaration created in an
1361 -- instance for a formal subprogram, when the formal is declared with a
1362 -- box, and there is no explicit actual. If the flag is present, the
1363 -- declaration is treated as an implicit reference to the formal in the
1364 -- ali file.
1365
1366 -- Generalized_Indexing (Node4-Sem)
1367 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1368 -- that are Ada 2012 container indexing operations. The value of the
1369 -- attribute is a function call (possibly dereferenced) that corresponds
1370 -- to the proper expansion of the source indexing operation. Before
1371 -- expansion, the source node is rewritten as the resolved generalized
1372 -- indexing. In ASIS mode, the expansion does not take place, so that
1373 -- the source is preserved and properly annotated with types.
1374
1375 -- Generic_Parent (Node5-Sem)
1376 -- Generic_Parent is defined on declaration nodes that are instances. The
1377 -- value of Generic_Parent is the generic entity from which the instance
1378 -- is obtained. Generic_Parent is also defined for the renaming
1379 -- declarations and object declarations created for the actuals in an
1380 -- instantiation. The generic parent of such a declaration is the
1381 -- corresponding generic association in the Instantiation node.
1382
1383 -- Generic_Parent_Type (Node4-Sem)
1384 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1385 -- actuals of formal private and derived types. Within the instance, the
1386 -- operations on the actual are those inherited from the parent. For a
1387 -- formal private type, the parent type is the generic type itself. The
1388 -- Generic_Parent_Type is also used in an instance to determine whether a
1389 -- private operation overrides an inherited one.
1390
1391 -- Handler_List_Entry (Node2-Sem)
1392 -- This field is present in N_Object_Declaration nodes. It is set only
1393 -- for the Handler_Record entry generated for an exception in zero cost
1394 -- exception handling mode. It references the corresponding item in the
1395 -- handler list, and is used to delete this entry if the corresponding
1396 -- handler is deleted during optimization. For further details on why
1397 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1398
1399 -- Has_Dereference_Action (Flag13-Sem)
1400 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1401 -- indicate that the expansion has aready produced a call to primitive
1402 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1403 -- Such dereference actions are produced for debugging purposes.
1404
1405 -- Has_Dynamic_Length_Check (Flag10-Sem)
1406 -- This flag is present in all expression nodes. It is set to indicate
1407 -- that one of the routines in unit Checks has generated a length check
1408 -- action which has been inserted at the flagged node. This is used to
1409 -- avoid the generation of duplicate checks.
1410
1411 -- Has_Dynamic_Range_Check (Flag12-Sem)
1412 -- This flag is present in N_Subtype_Declaration nodes and on all
1413 -- expression nodes. It is set to indicate that one of the routines in
1414 -- unit Checks has generated a range check action which has been inserted
1415 -- at the flagged node. This is used to avoid the generation of duplicate
1416 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1417 -- it mean in that context???
1418
1419 -- Has_Local_Raise (Flag8-Sem)
1420 -- Present in exception handler nodes. Set if the handler can be entered
1421 -- via a local raise that gets transformed to a goto statement. This will
1422 -- always be set if Local_Raise_Statements is non-empty, but can also be
1423 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1424 -- nodes requiring generation of back end checks.
1425
1426 -- Has_No_Elaboration_Code (Flag17-Sem)
1427 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1428 -- or not elaboration code is present for this unit. It is initially set
1429 -- true for subprogram specs and bodies and for all generic units and
1430 -- false for non-generic package specs and bodies. Gigi may set the flag
1431 -- in the non-generic package case if it determines that no elaboration
1432 -- code is generated. Note that this flag is not related to the
1433 -- Is_Preelaborated status, there can be preelaborated packages that
1434 -- generate elaboration code, and non-preelaborated packages which do
1435 -- not generate elaboration code.
1436
1437 -- Has_Pragma_Suppress_All (Flag14-Sem)
1438 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1439 -- pragma appears anywhere in the unit. This accommodates the rather
1440 -- strange placement rules of other compilers (DEC permits it at the
1441 -- end of a unit, and Rational allows it as a program unit pragma). We
1442 -- allow it anywhere at all, and consider it equivalent to a pragma
1443 -- Suppress (All_Checks) appearing at the start of the configuration
1444 -- pragmas for the unit.
1445
1446 -- Has_Private_View (Flag11-Sem)
1447 -- A flag present in generic nodes that have an entity, to indicate that
1448 -- the node has a private type. Used to exchange private and full
1449 -- declarations if the visibility at instantiation is different from the
1450 -- visibility at generic definition.
1451
1452 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1453 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1454 -- flag the presence of a pragma Relative_Deadline.
1455
1456 -- Has_Self_Reference (Flag13-Sem)
1457 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1458 -- of the expressions contains an access attribute reference to the
1459 -- enclosing type. Such a self-reference can only appear in default-
1460 -- initialized aggregate for a record type.
1461
1462 -- Has_SP_Choice (Flag15-Sem)
1463 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1464 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1465 -- True if the Discrete_Choices list has at least one occurrence of a
1466 -- statically predicated subtype.
1467
1468 -- Has_Storage_Size_Pragma (Flag5-Sem)
1469 -- A flag present in an N_Task_Definition node to flag the presence of a
1470 -- Storage_Size pragma.
1471
1472 -- Has_Wide_Character (Flag11-Sem)
1473 -- Present in string literals, set if any wide character (i.e. character
1474 -- code outside the Character range but within Wide_Character range)
1475 -- appears in the string. Used to implement pragma preference rules.
1476
1477 -- Has_Wide_Wide_Character (Flag13-Sem)
1478 -- Present in string literals, set if any wide character (i.e. character
1479 -- code outside the Wide_Character range) appears in the string. Used to
1480 -- implement pragma preference rules.
1481
1482 -- Header_Size_Added (Flag11-Sem)
1483 -- Present in N_Attribute_Reference nodes, set only for attribute
1484 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1485 -- hidden list header used by the runtime finalization support has been
1486 -- added to the size of the prefix. The flag also prevents the infinite
1487 -- expansion of the same attribute in the said context.
1488
1489 -- Hidden_By_Use_Clause (Elist4-Sem)
1490 -- An entity list present in use clauses that appear within
1491 -- instantiations. For the resolution of local entities, entities
1492 -- introduced by these use clauses have priority over global ones, and
1493 -- outer entities must be explicitly hidden/restored on exit.
1494
1495 -- Implicit_With (Flag16-Sem)
1496 -- This flag is set in the N_With_Clause node that is implicitly
1497 -- generated for runtime units that are loaded by the expander, and also
1498 -- for package System, if it is loaded implicitly by a use of the
1499 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1500 -- as well.
1501
1502 -- Implicit_With_From_Instantiation (Flag12-Sem)
1503 -- Set in N_With_Clause nodes from generic instantiations.
1504
1505 -- Import_Interface_Present (Flag16-Sem)
1506 -- This flag is set in an Interface or Import pragma if a matching
1507 -- pragma of the other kind is also present. This is used to avoid
1508 -- generating some unwanted error messages.
1509
1510 -- Includes_Infinities (Flag11-Sem)
1511 -- This flag is present in N_Range nodes. It is set for the range of
1512 -- unconstrained float types defined in Standard, which include not only
1513 -- the given range of values, but also legitimately can include infinite
1514 -- values. This flag is false for any float type for which an explicit
1515 -- range is given by the programmer, even if that range is identical to
1516 -- the range for Float.
1517
1518 -- Incomplete_View (Node2-Sem)
1519 -- Present in full type declarations that are completions of incomplete
1520 -- type declarations. Denotes the corresponding incomplete type
1521 -- declaration. Used to simplify the retrieval of primitive operations
1522 -- that may be declared between the partial and the full view of an
1523 -- untagged type.
1524
1525 -- Inherited_Discriminant (Flag13-Sem)
1526 -- This flag is present in N_Component_Association nodes. It indicates
1527 -- that a given component association in an extension aggregate is the
1528 -- value obtained from a constraint on an ancestor. Used to prevent
1529 -- double expansion when the aggregate has expansion delayed.
1530
1531 -- Instance_Spec (Node5-Sem)
1532 -- This field is present in generic instantiation nodes, and also in
1533 -- formal package declaration nodes (formal package declarations are
1534 -- treated in a manner very similar to package instantiations). It points
1535 -- to the node for the spec of the instance, inserted as part of the
1536 -- semantic processing for instantiations in Sem_Ch12.
1537
1538 -- Is_Accessibility_Actual (Flag13-Sem)
1539 -- Present in N_Parameter_Association nodes. True if the parameter is
1540 -- an extra actual that carries the accessibility level of the actual
1541 -- for an access parameter, in a function that dispatches on result and
1542 -- is called in a dispatching context. Used to prevent a formal/actual
1543 -- mismatch when the call is rewritten as a dispatching call.
1544
1545 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1546 -- A flag set in a Block_Statement node to indicate that it is the
1547 -- expansion of an asynchronous entry call. Such a block needs cleanup
1548 -- handler to assure that the call is cancelled.
1549
1550 -- Is_Boolean_Aspect (Flag16-Sem)
1551 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1552 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1553
1554 -- Is_Checked (Flag11-Sem)
1555 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1556 -- assertion aspect or pragma, or check pragma for an assertion, that
1557 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1558 -- is set (they cannot both be set), then this means that the status of
1559 -- the pragma has been checked at the appropriate point and should not
1560 -- be further modified (in some cases these flags are copied when a
1561 -- pragma is rewritten).
1562
1563 -- Is_Component_Left_Opnd (Flag13-Sem)
1564 -- Is_Component_Right_Opnd (Flag14-Sem)
1565 -- Present in concatenation nodes, to indicate that the corresponding
1566 -- operand is of the component type of the result. Used in resolving
1567 -- concatenation nodes in instances.
1568
1569 -- Is_Controlling_Actual (Flag16-Sem)
1570 -- This flag is set on in an expression that is a controlling argument in
1571 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1572 -- details of its use.
1573
1574 -- Is_Delayed_Aspect (Flag14-Sem)
1575 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1576 -- come from aspect specifications, where the evaluation of the aspect
1577 -- must be delayed to the freeze point. This flag is also set True in
1578 -- the corresponding N_Aspect_Specification node.
1579
1580 -- Is_Disabled (Flag15-Sem)
1581 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1582 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1583 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1584 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1585 -- If this flag is set, the aspect or policy is not analyzed for semantic
1586 -- correctness, so any expressions etc will not be marked as analyzed.
1587
1588 -- Is_Dynamic_Coextension (Flag18-Sem)
1589 -- Present in allocator nodes, to indicate that this is an allocator
1590 -- for an access discriminant of a dynamically allocated object. The
1591 -- coextension must be deallocated and finalized at the same time as
1592 -- the enclosing object.
1593
1594 -- Is_Entry_Barrier_Function (Flag8-Sem)
1595 -- This flag is set in an N_Subprogram_Body node which is the expansion
1596 -- of an entry barrier from a protected entry body. It is used for the
1597 -- circuitry checking for incorrect use of Current_Task.
1598
1599 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1600 -- This flag is set in an N_Function_Call node to indicate that the extra
1601 -- actuals to support a build-in-place style of call have been added to
1602 -- the call.
1603
1604 -- Is_Finalization_Wrapper (Flag9-Sem);
1605 -- This flag is present in N_Block_Statement nodes. It is set when the
1606 -- block acts as a wrapper of a handled construct which has controlled
1607 -- objects. The wrapper prevents interference between exception handlers
1608 -- and At_End handlers.
1609
1610 -- Is_Generic_Contract_Pragma (Flag2-Sem)
1611 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1612 -- a source construct, applies to a generic unit or its body and denotes
1613 -- one of the following contract-related annotations:
1614 -- Abstract_State
1615 -- Contract_Cases
1616 -- Depends
1617 -- Extensions_Visible
1618 -- Global
1619 -- Initial_Condition
1620 -- Initializes
1621 -- Post
1622 -- Post_Class
1623 -- Postcondition
1624 -- Pre
1625 -- Pre_Class
1626 -- Precondition
1627 -- Refined_Depends
1628 -- Refined_Global
1629 -- Refined_Post
1630 -- Refined_State
1631 -- Test_Case
1632
1633 -- Is_Ghost_Pragma (Flag3-Sem)
1634 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1635 -- either declared within a Ghost construct or it applies to a Ghost
1636 -- construct.
1637
1638 -- Is_Ignored (Flag9-Sem)
1639 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1640 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1641 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1642 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1643 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1644 -- gives a policy for the aspect or pragma, then there are two cases. For
1645 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1646 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1647 -- ignored because of the absence of a -gnata switch. For any other
1648 -- aspects or pragmas, the flag is off. If this flag is set, the
1649 -- aspect/pragma is fully analyzed and checked for other syntactic
1650 -- and semantic errors, but it does not have any semantic effect.
1651
1652 -- Is_In_Discriminant_Check (Flag11-Sem)
1653 -- This flag is present in a selected component, and is used to indicate
1654 -- that the reference occurs within a discriminant check. The
1655 -- significance is that optimizations based on assuming that the
1656 -- discriminant check has a correct value cannot be performed in this
1657 -- case (or the discriminant check may be optimized away).
1658
1659 -- Is_Inherited (Flag4-Sem)
1660 -- This flag is set in an N_Pragma node that appears in a N_Contract node
1661 -- to indicate that the pragma has been inherited from a parent context.
1662
1663 -- Is_Machine_Number (Flag11-Sem)
1664 -- This flag is set in an N_Real_Literal node to indicate that the value
1665 -- is a machine number. This avoids some unnecessary cases of converting
1666 -- real literals to machine numbers.
1667
1668 -- Is_Null_Loop (Flag16-Sem)
1669 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1670 -- can be determined to be null at compile time. This is used to remove
1671 -- the loop entirely at expansion time.
1672
1673 -- Is_Overloaded (Flag5-Sem)
1674 -- A flag present in all expression nodes. Used temporarily during
1675 -- overloading determination. The setting of this flag is not relevant
1676 -- once overloading analysis is complete.
1677
1678 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1679 -- A flag present only in N_Op_Expon nodes. It is set when the
1680 -- exponentiation is of the form 2 ** N, where the type of N is an
1681 -- unsigned integral subtype whose size does not exceed the size of
1682 -- Standard_Integer (i.e. a type that can be safely converted to
1683 -- Natural), and the exponentiation appears as the right operand of an
1684 -- integer multiplication or an integer division where the dividend is
1685 -- unsigned. It is also required that overflow checking is off for both
1686 -- the exponentiation and the multiply/divide node. If this set of
1687 -- conditions holds, and the flag is set, then the division or
1688 -- multiplication can be (and is) converted to a shift.
1689
1690 -- Is_Prefixed_Call (Flag17-Sem)
1691 -- This flag is set in a selected component within a generic unit, if
1692 -- it resolves to a prefixed call to a primitive operation. The flag
1693 -- is used to prevent accidental overloadings in an instance, when a
1694 -- primitive operation and a private record component may be homographs.
1695
1696 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1697 -- A flag set in a Subprogram_Body block to indicate that it is the
1698 -- implementation of a protected subprogram. Such a body needs cleanup
1699 -- handler to make sure that the associated protected object is unlocked
1700 -- when the subprogram completes.
1701
1702 -- Is_Static_Coextension (Flag14-Sem)
1703 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1704 -- of an object allocated on the stack rather than the heap.
1705
1706 -- Is_Static_Expression (Flag6-Sem)
1707 -- Indicates that an expression is a static expression according to the
1708 -- rules in (RM 4.9). Note that it is possible for this flag to be set
1709 -- when Raises_Constraint_Error is also set. In practice almost all cases
1710 -- where a static expression is required do not allow an expression which
1711 -- raises Constraint_Error, so almost always, callers should call the
1712 -- Is_Ok_Static_Expression routine instead of testing this flag. See
1713 -- spec of package Sem_Eval for full details on the use of this flag.
1714
1715 -- Is_Subprogram_Descriptor (Flag16-Sem)
1716 -- Present in N_Object_Declaration, and set only for the object
1717 -- declaration generated for a subprogram descriptor in fast exception
1718 -- mode. See Exp_Ch11 for details of use.
1719
1720 -- Is_Task_Allocation_Block (Flag6-Sem)
1721 -- A flag set in a Block_Statement node to indicate that it is the
1722 -- expansion of a task allocator, or the allocator of an object
1723 -- containing tasks. Such a block requires a cleanup handler to call
1724 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1725 -- allocated but not activated when the allocator completes abnormally.
1726
1727 -- Is_Task_Master (Flag5-Sem)
1728 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1729 -- indicate that the construct is a task master (i.e. has declared tasks
1730 -- or declares an access to a task type).
1731
1732 -- Itype (Node1-Sem)
1733 -- Used in N_Itype_Reference node to reference an itype for which it is
1734 -- important to ensure that it is defined. See description of this node
1735 -- for further details.
1736
1737 -- Kill_Range_Check (Flag11-Sem)
1738 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1739 -- result should not be subjected to range checks. This is used for the
1740 -- implementation of Normalize_Scalars.
1741
1742 -- Label_Construct (Node2-Sem)
1743 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1744 -- N_Block_Statement or N_Loop_Statement node to which the label
1745 -- declaration applies. This attribute is used both in the compiler and
1746 -- in the implementation of ASIS queries. The field is left empty for the
1747 -- special labels generated as part of expanding raise statements with a
1748 -- local exception handler.
1749
1750 -- Library_Unit (Node4-Sem)
1751 -- In a stub node, Library_Unit points to the compilation unit node of
1752 -- the corresponding subunit.
1753 --
1754 -- In a with clause node, Library_Unit points to the spec of the with'ed
1755 -- unit.
1756 --
1757 -- In a compilation unit node, the usage depends on the unit type:
1758 --
1759 -- For a library unit body, Library_Unit points to the compilation unit
1760 -- node of the corresponding spec, unless it's a subprogram body with
1761 -- Acts_As_Spec set, in which case it points to itself.
1762 --
1763 -- For a spec, Library_Unit points to the compilation unit node of the
1764 -- corresponding body, if present. The body will be present if the spec
1765 -- is or contains generics that we needed to instantiate. Similarly, the
1766 -- body will be present if we needed it for inlining purposes. Thus, if
1767 -- we have a spec/body pair, both of which are present, they point to
1768 -- each other via Library_Unit.
1769 --
1770 -- For a subunit, Library_Unit points to the compilation unit node of
1771 -- the parent body.
1772 -- ??? not (always) true, in (at least some, maybe all?) cases it points
1773 -- to the corresponding spec for the parent body.
1774 --
1775 -- Note that this field is not used to hold the parent pointer for child
1776 -- unit (which might in any case need to use it for some other purpose as
1777 -- described above). Instead for a child unit, implicit with's are
1778 -- generated for all parents.
1779
1780 -- Local_Raise_Statements (Elist1)
1781 -- This field is present in exception handler nodes. It is set to
1782 -- No_Elist in the normal case. If there is at least one raise statement
1783 -- which can potentially be handled as a local raise, then this field
1784 -- points to a list of raise nodes, which are calls to a routine to raise
1785 -- an exception. These are raise nodes which can be optimized into gotos
1786 -- if the handler turns out to meet the conditions which permit this
1787 -- transformation. Note that this does NOT include instances of the
1788 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1789 -- handled by the back end (using the N_Push/N_Pop mechanism).
1790
1791 -- Loop_Actions (List2-Sem)
1792 -- A list present in Component_Association nodes in array aggregates.
1793 -- Used to collect actions that must be executed within the loop because
1794 -- they may need to be evaluated anew each time through.
1795
1796 -- Limited_View_Installed (Flag18-Sem)
1797 -- Present in With_Clauses and in package specifications. If set on
1798 -- with_clause, it indicates that this clause has created the current
1799 -- limited view of the designated package. On a package specification, it
1800 -- indicates that the limited view has already been created because the
1801 -- package is mentioned in a limited_with_clause in the closure of the
1802 -- unit being compiled.
1803
1804 -- Local_Raise_Not_OK (Flag7-Sem)
1805 -- Present in N_Exception_Handler nodes. Set if the handler contains
1806 -- a construct (reraise statement, or call to subprogram in package
1807 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1808 -- for a local raise (one that could otherwise be converted to a goto).
1809
1810 -- Must_Be_Byte_Aligned (Flag14-Sem)
1811 -- This flag is present in N_Attribute_Reference nodes. It can be set
1812 -- only for the Address and Unrestricted_Access attributes. If set it
1813 -- means that the object for which the address/access is given must be on
1814 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1815 -- of the object is to be made before taking the address (this copy is in
1816 -- the current scope on the stack frame). This is used for certain cases
1817 -- of code generated by the expander that passes parameters by address.
1818 --
1819 -- The reason the copy is not made by the front end is that the back end
1820 -- has more information about type layout and may be able to (but is not
1821 -- guaranteed to) prevent making unnecessary copies.
1822
1823 -- Must_Not_Freeze (Flag8-Sem)
1824 -- A flag present in all expression nodes. Normally expressions cause
1825 -- freezing as described in the RM. If this flag is set, then this is
1826 -- inhibited. This is used by the analyzer and expander to label nodes
1827 -- that are created by semantic analysis or expansion and which must not
1828 -- cause freezing even though they normally would. This flag is also
1829 -- present in an N_Subtype_Indication node, since we also use these in
1830 -- calls to Freeze_Expression.
1831
1832 -- Next_Entity (Node2-Sem)
1833 -- Present in defining identifiers, defining character literals and
1834 -- defining operator symbols (i.e. in all entities). The entities of a
1835 -- scope are chained, and this field is used as the forward pointer for
1836 -- this list. See Einfo for further details.
1837
1838 -- Next_Exit_Statement (Node3-Sem)
1839 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1840 -- chained (in reverse order of appearance) from the First_Exit_Statement
1841 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1842 -- the next entry on this chain (Empty = end of list).
1843
1844 -- Next_Implicit_With (Node3-Sem)
1845 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1846 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1847 -- to prevent multiple with_clauses for the same unit in a given context.
1848 -- A postorder traversal of the tree whose nodes are units and whose
1849 -- links are with_clauses defines the order in which CodePeer must
1850 -- examine a compiled unit and its full context. This ordering ensures
1851 -- that any subprogram call is examined after the subprogram declaration
1852 -- has been seen.
1853
1854 -- Next_Named_Actual (Node4-Sem)
1855 -- Present in parameter association nodes. Set during semantic analysis
1856 -- to point to the next named parameter, where parameters are ordered by
1857 -- declaration order (as opposed to the actual order in the call, which
1858 -- may be different due to named associations). Not that this field
1859 -- points to the explicit actual parameter itself, not to the
1860 -- N_Parameter_Association node (its parent).
1861
1862 -- Next_Pragma (Node1-Sem)
1863 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1864 -- nodes. Currently used for two purposes:
1865 --
1866 -- Create a list of linked Check_Policy pragmas. The head of this list
1867 -- is stored in Opt.Check_Policy_List (which has further details).
1868 --
1869 -- Used by processing for Pre/Postcondition pragmas to store a list of
1870 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1871 -- details).
1872 --
1873 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
1874 -- the apply to the same construct. These are visible/private mode for
1875 -- a package spec and declarative/statement mode for package body.
1876
1877 -- Next_Rep_Item (Node5-Sem)
1878 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1879 -- clauses, record rep clauses, aspect specification nodes. Used to link
1880 -- representation items that apply to an entity. See full description of
1881 -- First_Rep_Item field in Einfo for further details.
1882
1883 -- Next_Use_Clause (Node3-Sem)
1884 -- While use clauses are active during semantic processing, they are
1885 -- chained from the scope stack entry, using Next_Use_Clause as a link
1886 -- pointer, with Empty marking the end of the list. The head pointer is
1887 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1888 -- processing (i.e. when Gigi sees the tree, the contents of this field
1889 -- is undefined and should not be read).
1890
1891 -- No_Ctrl_Actions (Flag7-Sem)
1892 -- Present in N_Assignment_Statement to indicate that no Finalize nor
1893 -- Adjust should take place on this assignment even though the RHS is
1894 -- controlled. Also indicates that the primitive _assign should not be
1895 -- used for a tagged assignment. This is used in init procs and aggregate
1896 -- expansions where the generated assignments are initializations, not
1897 -- real assignments.
1898
1899 -- No_Elaboration_Check (Flag14-Sem)
1900 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1901 -- that no elaboration check is needed on the call, because it appears in
1902 -- the context of a local Suppress pragma. This is used on calls within
1903 -- task bodies, where the actual elaboration checks are applied after
1904 -- analysis, when the local scope stack is not present.
1905
1906 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1907 -- Present in N_With_Clause nodes. Set if the with clause is on the
1908 -- package or subprogram spec where the main unit is the corresponding
1909 -- body, and no entities of the with'ed unit are referenced by the spec
1910 -- (an entity may still be referenced in the body, so this flag is used
1911 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1912 -- full details).
1913
1914 -- No_Initialization (Flag13-Sem)
1915 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1916 -- object must not be initialized (by Initialize or call to an init
1917 -- proc). This is needed for controlled aggregates. When the Object
1918 -- declaration has an expression, this flag means that this expression
1919 -- should not be taken into account (needed for in place initialization
1920 -- with aggregates, and for object with an address clause, which are
1921 -- initialized with an assignment at freeze time).
1922
1923 -- No_Minimize_Eliminate (Flag17-Sem)
1924 -- This flag is present in membership operator nodes (N_In/N_Not_In).
1925 -- It is used to indicate that processing for extended overflow checking
1926 -- modes is not required (this is used to prevent infinite recursion).
1927
1928 -- No_Truncation (Flag17-Sem)
1929 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1930 -- only if the RM_Size of the source is greater than the RM_Size of the
1931 -- target for scalar operands. Normally in such a case we truncate some
1932 -- higher order bits of the source, and then sign/zero extend the result
1933 -- to form the output value. But if this flag is set, then we do not do
1934 -- any truncation, so for example, if an 8 bit input is converted to 5
1935 -- bit result which is in fact stored in 8 bits, then the high order
1936 -- three bits of the target result will be copied from the source. This
1937 -- is used for properly setting out of range values for use by pragmas
1938 -- Initialize_Scalars and Normalize_Scalars.
1939
1940 -- Non_Aliased_Prefix (Flag18-Sem)
1941 -- Present in N_Attribute_Reference nodes. Set only for the case of an
1942 -- Unrestricted_Access reference whose prefix is non-aliased, which is
1943 -- the case that is permitted for Unrestricted_Access except when the
1944 -- expected type is a thin pointer to unconstrained array. This flag is
1945 -- to assist in detecting this illegal use of Unrestricted_Access.
1946
1947 -- Null_Excluding_Subtype (Flag16)
1948 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
1949 -- indication carries a null-exclusion indicator, which is distinct from
1950 -- the null-exclusion indicator that may precede the access keyword.
1951
1952 -- Original_Discriminant (Node2-Sem)
1953 -- Present in identifiers. Used in references to discriminants that
1954 -- appear in generic units. Because the names of the discriminants may be
1955 -- different in an instance, we use this field to recover the position of
1956 -- the discriminant in the original type, and replace it with the
1957 -- discriminant at the same position in the instantiated type.
1958
1959 -- Original_Entity (Node2-Sem)
1960 -- Present in numeric literals. Used to denote the named number that has
1961 -- been constant-folded into the given literal. If literal is from
1962 -- source, or the result of some other constant-folding operation, then
1963 -- Original_Entity is empty. This field is needed to handle properly
1964 -- named numbers in generic units, where the Associated_Node field
1965 -- interferes with the Entity field, making it impossible to preserve the
1966 -- original entity at the point of instantiation (ASIS problem).
1967
1968 -- Others_Discrete_Choices (List1-Sem)
1969 -- When a case statement or variant is analyzed, the semantic checks
1970 -- determine the actual list of choices that correspond to an others
1971 -- choice. This list is materialized for later use by the expander and
1972 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1973 -- this materialized list of choices, which is in standard format for a
1974 -- list of discrete choices, except that of course it cannot contain an
1975 -- N_Others_Choice entry.
1976
1977 -- Parent_Spec (Node4-Sem)
1978 -- For a library unit that is a child unit spec (package or subprogram
1979 -- declaration, generic declaration or instantiation, or library level
1980 -- rename, this field points to the compilation unit node for the parent
1981 -- package specification. This field is Empty for library bodies (the
1982 -- parent spec in this case can be found from the corresponding spec).
1983
1984 -- Premature_Use (Node5-Sem)
1985 -- Present in N_Incomplete_Type_Declaration node. Used for improved
1986 -- error diagnostics: if there is a premature usage of an incomplete
1987 -- type, a subsequently generated error message indicates the position
1988 -- of its full declaration.
1989
1990 -- Present_Expr (Uint3-Sem)
1991 -- Present in an N_Variant node. This has a meaningful value only after
1992 -- Gigi has back annotated the tree with representation information. At
1993 -- this point, it contains a reference to a gcc expression that depends
1994 -- on the values of one or more discriminants. Give a set of discriminant
1995 -- values, this expression evaluates to False (zero) if variant is not
1996 -- present, and True (non-zero) if it is present. See unit Repinfo for
1997 -- further details on gigi back annotation. This field is used during
1998 -- ASIS processing (data decomposition annex) to determine if a field is
1999 -- present or not.
2000
2001 -- Print_In_Hex (Flag13-Sem)
2002 -- Set on an N_Integer_Literal node to indicate that the value should be
2003 -- printed in hexadecimal in the sprint listing. Has no effect on
2004 -- legality or semantics of program, only on the displayed output. This
2005 -- is used to clarify output from the packed array cases.
2006
2007 -- Procedure_To_Call (Node2-Sem)
2008 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2009 -- and N_Extended_Return_Statement nodes. References the entity for the
2010 -- declaration of the procedure to be called to accomplish the required
2011 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
2012 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
2013 -- allocating the return value), and for the Deallocate procedure in the
2014 -- case of N_Free_Statement.
2015
2016 -- Raises_Constraint_Error (Flag7-Sem)
2017 -- Set on an expression whose evaluation will definitely fail constraint
2018 -- error check. In the case of static expressions, this flag must be set
2019 -- accurately (and if it is set, the expression is typically illegal
2020 -- unless it appears as a non-elaborated branch of a short-circuit form).
2021 -- For a non-static expression, this flag may be set whenever an
2022 -- expression (e.g. an aggregate) is known to raise constraint error. If
2023 -- set, the expression definitely will raise CE if elaborated at runtime.
2024 -- If not set, the expression may or may not raise CE. In other words, on
2025 -- static expressions, the flag is set accurately, on non-static
2026 -- expressions it is set conservatively.
2027
2028 -- Redundant_Use (Flag13-Sem)
2029 -- Present in nodes that can appear as an operand in a use clause or use
2030 -- type clause (identifiers, expanded names, attribute references). Set
2031 -- to indicate that a use is redundant (and therefore need not be undone
2032 -- on scope exit).
2033
2034 -- Renaming_Exception (Node2-Sem)
2035 -- Present in N_Exception_Declaration node. Used to point back to the
2036 -- exception renaming for an exception declared within a subprogram.
2037 -- What happens is that an exception declared in a subprogram is moved
2038 -- to the library level with a unique name, and the original exception
2039 -- becomes a renaming. This link from the library level exception to the
2040 -- renaming declaration allows registering of the proper exception name.
2041
2042 -- Return_Statement_Entity (Node5-Sem)
2043 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
2044 -- Points to an E_Return_Statement representing the return statement.
2045
2046 -- Return_Object_Declarations (List3)
2047 -- Present in N_Extended_Return_Statement. Points to a list initially
2048 -- containing a single N_Object_Declaration representing the return
2049 -- object. We use a list (instead of just a pointer to the object decl)
2050 -- because Analyze wants to insert extra actions on this list.
2051
2052 -- Rounded_Result (Flag18-Sem)
2053 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
2054 -- Used in the fixed-point cases to indicate that the result must be
2055 -- rounded as a result of the use of the 'Round attribute. Also used for
2056 -- integer N_Op_Divide nodes to indicate that the result should be
2057 -- rounded to the nearest integer (breaking ties away from zero), rather
2058 -- than truncated towards zero as usual. These rounded integer operations
2059 -- are the result of expansion of rounded fixed-point divide, conversion
2060 -- and multiplication operations.
2061
2062 -- SCIL_Entity (Node4-Sem)
2063 -- Present in SCIL nodes. References the specific tagged type associated
2064 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
2065 -- the controlling type of the call; for an N_SCIL_Membership_Test node
2066 -- generated as part of testing membership in T'Class, this is T; for an
2067 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
2068
2069 -- SCIL_Controlling_Tag (Node5-Sem)
2070 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
2071 -- tag of a dispatching call. This is usually an N_Selected_Component
2072 -- node (for a _tag component), but may be an N_Object_Declaration or
2073 -- N_Parameter_Specification node in some cases (e.g., for a call to
2074 -- a classwide streaming operation or a call to an instance of
2075 -- Ada.Tags.Generic_Dispatching_Constructor).
2076
2077 -- SCIL_Tag_Value (Node5-Sem)
2078 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2079 -- of the value that is being tested.
2080
2081 -- SCIL_Target_Prim (Node2-Sem)
2082 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2083 -- operation named (statically) in a dispatching call.
2084
2085 -- Scope (Node3-Sem)
2086 -- Present in defining identifiers, defining character literals and
2087 -- defining operator symbols (i.e. in all entities). The entities of a
2088 -- scope all use this field to reference the corresponding scope entity.
2089 -- See Einfo for further details.
2090
2091 -- Shift_Count_OK (Flag4-Sem)
2092 -- A flag present in shift nodes to indicate that the shift count is
2093 -- known to be in range, i.e. is in the range from zero to word length
2094 -- minus one. If this flag is not set, then the shift count may be
2095 -- outside this range, i.e. larger than the word length, and the code
2096 -- must ensure that such shift counts give the appropriate result.
2097
2098 -- Source_Type (Node1-Sem)
2099 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2100 -- source type entity for the unchecked conversion instantiation
2101 -- which gigi must do size validation for.
2102
2103 -- Split_PPC (Flag17)
2104 -- When a Pre or Post aspect specification is processed, it is broken
2105 -- into AND THEN sections. The left most section has Split_PPC set to
2106 -- False, indicating that it is the original specification (e.g. for
2107 -- posting errors). For other sections, Split_PPC is set to True.
2108 -- This flag is set in both the N_Aspect_Specification node itself,
2109 -- and in the pragma which is generated from this node.
2110
2111 -- Storage_Pool (Node1-Sem)
2112 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2113 -- and N_Extended_Return_Statement nodes. References the entity for the
2114 -- storage pool to be used for the allocate or free call or for the
2115 -- allocation of the returned value from function. Empty indicates that
2116 -- the global default pool is to be used. Note that in the case
2117 -- of a return statement, this field is set only if the function returns
2118 -- value of a type whose size is not known at compile time on the
2119 -- secondary stack.
2120
2121 -- Suppress_Assignment_Checks (Flag18-Sem)
2122 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2123 -- and range checks in cases where the generated code knows that the
2124 -- value being assigned is in range and satisfies any predicate. Also
2125 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2126 -- checks on the initializing value. In assignment statements it also
2127 -- suppresses access checks in the generated code for out- and in-out
2128 -- parameters in entry calls.
2129
2130 -- Suppress_Loop_Warnings (Flag17-Sem)
2131 -- Used in N_Loop_Statement node to indicate that warnings within the
2132 -- body of the loop should be suppressed. This is set when the range
2133 -- of a FOR loop is known to be null, or is probably null (loop would
2134 -- only execute if invalid values are present).
2135
2136 -- Target_Type (Node2-Sem)
2137 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2138 -- type entity for the unchecked conversion instantiation which gigi must
2139 -- do size validation for.
2140
2141 -- Then_Actions (List3-Sem)
2142 -- This field is present in if expression nodes. During code expansion
2143 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2144 -- at an appropriate place in the tree to get elaborated at the right
2145 -- time. For if expressions, we have to be sure that the actions for
2146 -- for the Then branch are only elaborated if the condition is True.
2147 -- The Then_Actions field is used as a temporary parking place for
2148 -- these actions. The final tree is always rewritten to eliminate the
2149 -- need for this field, so in the tree passed to Gigi, this field is
2150 -- always set to No_List.
2151
2152 -- Treat_Fixed_As_Integer (Flag14-Sem)
2153 -- This flag appears in operator nodes for divide, multiply, mod and rem
2154 -- on fixed-point operands. It indicates that the operands are to be
2155 -- treated as integer values, ignoring small values. This flag is only
2156 -- set as a result of expansion of fixed-point operations. Typically a
2157 -- fixed-point multiplication in the source generates subsidiary
2158 -- multiplication and division operations that work with the underlying
2159 -- integer values and have this flag set. Note that this flag is not
2160 -- needed on other arithmetic operations (add, neg, subtract etc.) since
2161 -- in these cases it is always the case that fixed is treated as integer.
2162 -- The Etype field MUST be set if this flag is set. The analyzer knows to
2163 -- leave such nodes alone, and whoever makes them must set the correct
2164 -- Etype value.
2165
2166 -- TSS_Elist (Elist3-Sem)
2167 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2168 -- entries for each TSS (type support subprogram) associated with the
2169 -- frozen type. The elements of the list are the entities for the
2170 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2171 -- if there are no type support subprograms for the type or if the freeze
2172 -- node is not for a type.
2173
2174 -- Uneval_Old_Accept (Flag7-Sem)
2175 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
2176 -- (accept) at the point where the pragma is encountered (including the
2177 -- case of a pragma generated from an aspect specification). It is this
2178 -- setting that is relevant, rather than the setting at the point where
2179 -- a contract is finally analyzed after the delay till the freeze point.
2180
2181 -- Uneval_Old_Warn (Flag18-Sem)
2182 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
2183 -- (warn) at the point where the pragma is encountered (including the
2184 -- case of a pragma generated from an aspect specification). It is this
2185 -- setting that is relevant, rather than the setting at the point where
2186 -- a contract is finally analyzed after the delay till the freeze point.
2187
2188 -- Unreferenced_In_Spec (Flag7-Sem)
2189 -- Present in N_With_Clause nodes. Set if the with clause is on the
2190 -- package or subprogram spec where the main unit is the corresponding
2191 -- body, and is not referenced by the spec (it may still be referenced by
2192 -- the body, so this flag is used to generate the proper message (see
2193 -- Sem_Util.Check_Unused_Withs for details)
2194
2195 -- Uninitialized_Variable (Node3-Sem)
2196 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2197 -- Extension_Declarations. Indicates that a variable in a generic unit
2198 -- whose type is a formal private or derived type is read without being
2199 -- initialized. Used to warn if the corresponding actual type is not
2200 -- a fully initialized type.
2201
2202 -- Used_Operations (Elist5-Sem)
2203 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2204 -- are made potentially use-visible by the clause. Simplifies processing
2205 -- on exit from the scope of the use_type_clause, in particular in the
2206 -- case of Use_All_Type, when those operations several scopes.
2207
2208 -- Was_Originally_Stub (Flag13-Sem)
2209 -- This flag is set in the node for a proper body that replaces stub.
2210 -- During the analysis procedure, stubs in some situations get rewritten
2211 -- by the corresponding bodies, and we set this flag to remember that
2212 -- this happened. Note that it is not good enough to rely on the use of
2213 -- Original_Node here because of the case of nested instantiations where
2214 -- the substituted node can be copied.
2215
2216 -- Withed_Body (Node1-Sem)
2217 -- Present in N_With_Clause nodes. Set if the unit in whose context
2218 -- the with_clause appears instantiates a generic contained in the
2219 -- library unit of the with_clause and as a result loads its body.
2220 -- Used for a more precise unit traversal for CodePeer.
2221
2222 --------------------------------------------------
2223 -- Note on Use of End_Label and End_Span Fields --
2224 --------------------------------------------------
2225
2226 -- Several constructs have end lines:
2227
2228 -- Loop Statement end loop [loop_IDENTIFIER];
2229 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2230 -- Task Definition end [task_IDENTIFIER]
2231 -- Protected Definition end [protected_IDENTIFIER]
2232 -- Protected Body end [protected_IDENTIFIER]
2233
2234 -- Block Statement end [block_IDENTIFIER];
2235 -- Subprogram Body end [DESIGNATOR];
2236 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2237 -- Task Body end [task_IDENTIFIER];
2238 -- Accept Statement end [entry_IDENTIFIER]];
2239 -- Entry Body end [entry_IDENTIFIER];
2240
2241 -- If Statement end if;
2242 -- Case Statement end case;
2243
2244 -- Record Definition end record;
2245 -- Enumeration Definition );
2246
2247 -- The End_Label and End_Span fields are used to mark the locations of
2248 -- these lines, and also keep track of the label in the case where a label
2249 -- is present.
2250
2251 -- For the first group above, the End_Label field of the corresponding node
2252 -- is used to point to the label identifier. In the case where there is no
2253 -- label in the source, the parser supplies a dummy identifier (with
2254 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2255 -- marks the location of the token following the END token.
2256
2257 -- For the second group, the use of End_Label is similar, but the End_Label
2258 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2259 -- simply because in some cases there is no room in the parent node.
2260
2261 -- For the third group, there is never any label, and instead of using
2262 -- End_Label, we use the End_Span field which gives the location of the
2263 -- token following END, relative to the starting Sloc of the construct,
2264 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2265 -- following the End_Label.
2266
2267 -- The record definition case is handled specially, we treat it as though
2268 -- it required an optional label which is never present, and so the parser
2269 -- always builds a dummy identifier with Comes From Source set False. The
2270 -- reason we do this, rather than using End_Span in this case, is that we
2271 -- want to generate a cross-ref entry for the end of a record, since it
2272 -- represents a scope for name declaration purposes.
2273
2274 -- The enumeration definition case is handled in an exactly similar manner,
2275 -- building a dummy identifier to get a cross-reference.
2276
2277 -- Note: the reason we store the difference as a Uint, instead of storing
2278 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2279 -- distinguished from other types of values, and we count on all general
2280 -- use fields being self describing. To make things easier for clients,
2281 -- note that we provide function End_Location, and procedure
2282 -- Set_End_Location to allow access to the logical value (which is the
2283 -- Source_Ptr value for the end token).
2284
2285 ---------------------
2286 -- Syntactic Nodes --
2287 ---------------------
2288
2289 ---------------------
2290 -- 2.3 Identifier --
2291 ---------------------
2292
2293 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2294 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2295
2296 -- An IDENTIFIER shall not be a reserved word
2297
2298 -- In the Ada grammar identifiers are the bottom level tokens which have
2299 -- very few semantics. Actual program identifiers are direct names. If
2300 -- we were being 100% honest with the grammar, then we would have a node
2301 -- called N_Direct_Name which would point to an identifier. However,
2302 -- that's too many extra nodes, so we just use the N_Identifier node
2303 -- directly as a direct name, and it contains the expression fields and
2304 -- Entity field that correspond to its use as a direct name. In those
2305 -- few cases where identifiers appear in contexts where they are not
2306 -- direct names (pragmas, pragma argument associations, attribute
2307 -- references and attribute definition clauses), the Chars field of the
2308 -- node contains the Name_Id for the identifier name.
2309
2310 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2311 -- cases. First, an incorrect use of a reserved word as an identifier is
2312 -- diagnosed and then treated as a normal identifier. Second, an
2313 -- attribute designator of the form of a reserved word (access, delta,
2314 -- digits, range) is treated as an identifier.
2315
2316 -- Note: The set of letters that is permitted in an identifier depends
2317 -- on the character set in use. See package Csets for full details.
2318
2319 -- N_Identifier
2320 -- Sloc points to identifier
2321 -- Chars (Name1) contains the Name_Id for the identifier
2322 -- Entity (Node4-Sem)
2323 -- Associated_Node (Node4-Sem)
2324 -- Original_Discriminant (Node2-Sem)
2325 -- Redundant_Use (Flag13-Sem)
2326 -- Atomic_Sync_Required (Flag14-Sem)
2327 -- Has_Private_View (Flag11-Sem) (set in generic units)
2328 -- plus fields for expression
2329
2330 --------------------------
2331 -- 2.4 Numeric Literal --
2332 --------------------------
2333
2334 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2335
2336 ----------------------------
2337 -- 2.4.1 Decimal Literal --
2338 ----------------------------
2339
2340 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2341
2342 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2343
2344 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2345
2346 -- Decimal literals appear in the tree as either integer literal nodes
2347 -- or real literal nodes, depending on whether a period is present.
2348
2349 -- Note: literal nodes appear as a result of direct use of literals
2350 -- in the source program, and also as the result of evaluating
2351 -- expressions at compile time. In the latter case, it is possible
2352 -- to construct real literals that have no syntactic representation
2353 -- using the standard literal format. Such literals are listed by
2354 -- Sprint using the notation [numerator / denominator].
2355
2356 -- Note: the value of an integer literal node created by the front end
2357 -- is never outside the range of values of the base type. However, it
2358 -- can be the case that the created value is outside the range of the
2359 -- particular subtype. This happens in the case of integer overflows
2360 -- with checks suppressed.
2361
2362 -- N_Integer_Literal
2363 -- Sloc points to literal
2364 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2365 -- has been constant-folded into its literal value.
2366 -- Intval (Uint3) contains integer value of literal
2367 -- plus fields for expression
2368 -- Print_In_Hex (Flag13-Sem)
2369
2370 -- N_Real_Literal
2371 -- Sloc points to literal
2372 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2373 -- has been constant-folded into its literal value.
2374 -- Realval (Ureal3) contains real value of literal
2375 -- Corresponding_Integer_Value (Uint4-Sem)
2376 -- Is_Machine_Number (Flag11-Sem)
2377 -- plus fields for expression
2378
2379 --------------------------
2380 -- 2.4.2 Based Literal --
2381 --------------------------
2382
2383 -- BASED_LITERAL ::=
2384 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2385
2386 -- BASE ::= NUMERAL
2387
2388 -- BASED_NUMERAL ::=
2389 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2390
2391 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2392
2393 -- Based literals appear in the tree as either integer literal nodes
2394 -- or real literal nodes, depending on whether a period is present.
2395
2396 ----------------------------
2397 -- 2.5 Character Literal --
2398 ----------------------------
2399
2400 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2401
2402 -- N_Character_Literal
2403 -- Sloc points to literal
2404 -- Chars (Name1) contains the Name_Id for the identifier
2405 -- Char_Literal_Value (Uint2) contains the literal value
2406 -- Entity (Node4-Sem)
2407 -- Associated_Node (Node4-Sem)
2408 -- Has_Private_View (Flag11-Sem) set in generic units.
2409 -- plus fields for expression
2410
2411 -- Note: the Entity field will be missing (set to Empty) for character
2412 -- literals whose type is Standard.Wide_Character or Standard.Character
2413 -- or a type derived from one of these two. In this case the character
2414 -- literal stands for its own coding. The reason we take this irregular
2415 -- short cut is to avoid the need to build lots of junk defining
2416 -- character literal nodes.
2417
2418 -------------------------
2419 -- 2.6 String Literal --
2420 -------------------------
2421
2422 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2423
2424 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2425 -- single GRAPHIC_CHARACTER other than a quotation mark.
2426 --
2427 -- Is_Folded_In_Parser is True if the parser created this literal by
2428 -- folding a sequence of "&" operators. For example, if the source code
2429 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2430 -- is set. This flag is needed because the parser doesn't know about
2431 -- visibility, so the folded result might be wrong, and semantic
2432 -- analysis needs to check for that.
2433
2434 -- N_String_Literal
2435 -- Sloc points to literal
2436 -- Strval (Str3) contains Id of string value
2437 -- Has_Wide_Character (Flag11-Sem)
2438 -- Has_Wide_Wide_Character (Flag13-Sem)
2439 -- Is_Folded_In_Parser (Flag4)
2440 -- plus fields for expression
2441
2442 ------------------
2443 -- 2.7 Comment --
2444 ------------------
2445
2446 -- A COMMENT starts with two adjacent hyphens and extends up to the
2447 -- end of the line. A COMMENT may appear on any line of a program.
2448
2449 -- Comments are skipped by the scanner and do not appear in the tree.
2450 -- It is possible to reconstruct the position of comments with respect
2451 -- to the elements of the tree by using the source position (Sloc)
2452 -- pointers that appear in every tree node.
2453
2454 -----------------
2455 -- 2.8 Pragma --
2456 -----------------
2457
2458 -- PRAGMA ::= pragma IDENTIFIER
2459 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2460
2461 -- Note that a pragma may appear in the tree anywhere a declaration
2462 -- or a statement may appear, as well as in some other situations
2463 -- which are explicitly documented.
2464
2465 -- N_Pragma
2466 -- Sloc points to PRAGMA
2467 -- Next_Pragma (Node1-Sem)
2468 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2469 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2470 -- Pragma_Identifier (Node4)
2471 -- Next_Rep_Item (Node5-Sem)
2472 -- Class_Present (Flag6) set if from Aspect with 'Class
2473 -- From_Aspect_Specification (Flag13-Sem)
2474 -- Import_Interface_Present (Flag16-Sem)
2475 -- Is_Checked (Flag11-Sem)
2476 -- Is_Delayed_Aspect (Flag14-Sem)
2477 -- Is_Disabled (Flag15-Sem)
2478 -- Is_Generic_Contract_Pragma (Flag2-Sem)
2479 -- Is_Ghost_Pragma (Flag3-Sem);
2480 -- Is_Ignored (Flag9-Sem)
2481 -- Is_Inherited (Flag4-Sem)
2482 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2483 -- Uneval_Old_Accept (Flag7-Sem)
2484 -- Uneval_Old_Warn (Flag18-Sem)
2485
2486 -- Note: we should have a section on what pragmas are passed on to
2487 -- the back end to be processed. This section should note that pragma
2488 -- Psect_Object is always converted to Common_Object, but there are
2489 -- undoubtedly many other similar notes required ???
2490
2491 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2492 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2493
2494 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2495 -- aspect name, as does the Pragma_Identifier. In this case if the
2496 -- pragma has a local name argument (such as pragma Inline), it is
2497 -- resolved to point to the specific entity affected by the pragma.
2498
2499 --------------------------------------
2500 -- 2.8 Pragma Argument Association --
2501 --------------------------------------
2502
2503 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2504 -- [pragma_argument_IDENTIFIER =>] NAME
2505 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2506
2507 -- In Ada 2012, there are two more possibilities:
2508
2509 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2510 -- [pragma_argument_ASPECT_MARK =>] NAME
2511 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2512
2513 -- where the interesting allowed cases (which do not fit the syntax of
2514 -- the first alternative above) are
2515
2516 -- ASPECT_MARK => Pre'Class |
2517 -- Post'Class |
2518 -- Type_Invariant'Class |
2519 -- Invariant'Class
2520
2521 -- We allow this special usage in all Ada modes, but it would be a
2522 -- pain to allow these aspects to pervade the pragma syntax, and the
2523 -- representation of pragma nodes internally. So what we do is to
2524 -- replace these ASPECT_MARK forms with identifiers whose name is one
2525 -- of the special internal names _Pre, _Post or _Type_Invariant.
2526
2527 -- We do a similar replacement of these Aspect_Mark forms in the
2528 -- Expression of a pragma argument association for the cases of
2529 -- the first arguments of any Check pragmas and Check_Policy pragmas
2530
2531 -- N_Pragma_Argument_Association
2532 -- Sloc points to first token in association
2533 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2534 -- Expression (Node3)
2535
2536 ------------------------
2537 -- 2.9 Reserved Word --
2538 ------------------------
2539
2540 -- Reserved words are parsed by the scanner, and returned as the
2541 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2542
2543 ----------------------------
2544 -- 3.1 Basic Declaration --
2545 ----------------------------
2546
2547 -- BASIC_DECLARATION ::=
2548 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2549 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2550 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2551 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2552 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2553 -- | GENERIC_INSTANTIATION
2554
2555 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2556 -- see further description in section on semantic nodes.
2557
2558 -- Also, in the tree that is constructed, a pragma may appear
2559 -- anywhere that a declaration may appear.
2560
2561 ------------------------------
2562 -- 3.1 Defining Identifier --
2563 ------------------------------
2564
2565 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2566
2567 -- A defining identifier is an entity, which has additional fields
2568 -- depending on the setting of the Ekind field. These additional
2569 -- fields are defined (and access subprograms declared) in package
2570 -- Einfo.
2571
2572 -- Note: N_Defining_Identifier is an extended node whose fields are
2573 -- deliberate layed out to match the layout of fields in an ordinary
2574 -- N_Identifier node allowing for easy alteration of an identifier
2575 -- node into a defining identifier node. For details, see procedure
2576 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2577
2578 -- N_Defining_Identifier
2579 -- Sloc points to identifier
2580 -- Chars (Name1) contains the Name_Id for the identifier
2581 -- Next_Entity (Node2-Sem)
2582 -- Scope (Node3-Sem)
2583 -- Etype (Node5-Sem)
2584
2585 -----------------------------
2586 -- 3.2.1 Type Declaration --
2587 -----------------------------
2588
2589 -- TYPE_DECLARATION ::=
2590 -- FULL_TYPE_DECLARATION
2591 -- | INCOMPLETE_TYPE_DECLARATION
2592 -- | PRIVATE_TYPE_DECLARATION
2593 -- | PRIVATE_EXTENSION_DECLARATION
2594
2595 ----------------------------------
2596 -- 3.2.1 Full Type Declaration --
2597 ----------------------------------
2598
2599 -- FULL_TYPE_DECLARATION ::=
2600 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2601 -- is TYPE_DEFINITION
2602 -- [ASPECT_SPECIFICATIONS];
2603 -- | TASK_TYPE_DECLARATION
2604 -- | PROTECTED_TYPE_DECLARATION
2605
2606 -- The full type declaration node is used only for the first case. The
2607 -- second case (concurrent type declaration), is represented directly
2608 -- by a task type declaration or a protected type declaration.
2609
2610 -- N_Full_Type_Declaration
2611 -- Sloc points to TYPE
2612 -- Defining_Identifier (Node1)
2613 -- Incomplete_View (Node2-Sem)
2614 -- Discriminant_Specifications (List4) (set to No_List if none)
2615 -- Type_Definition (Node3)
2616 -- Discr_Check_Funcs_Built (Flag11-Sem)
2617
2618 ----------------------------
2619 -- 3.2.1 Type Definition --
2620 ----------------------------
2621
2622 -- TYPE_DEFINITION ::=
2623 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2624 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2625 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2626 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2627
2628 --------------------------------
2629 -- 3.2.2 Subtype Declaration --
2630 --------------------------------
2631
2632 -- SUBTYPE_DECLARATION ::=
2633 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2634 -- [ASPECT_SPECIFICATIONS];
2635
2636 -- The subtype indication field is set to Empty for subtypes
2637 -- declared in package Standard (Positive, Natural).
2638
2639 -- N_Subtype_Declaration
2640 -- Sloc points to SUBTYPE
2641 -- Defining_Identifier (Node1)
2642 -- Null_Exclusion_Present (Flag11)
2643 -- Subtype_Indication (Node5)
2644 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2645 -- Exception_Junk (Flag8-Sem)
2646 -- Has_Dynamic_Range_Check (Flag12-Sem)
2647
2648 -------------------------------
2649 -- 3.2.2 Subtype Indication --
2650 -------------------------------
2651
2652 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2653
2654 -- Note: if no constraint is present, the subtype indication appears
2655 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2656 -- node is used only if a constraint is present.
2657
2658 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2659 -- with the null-exclusion part (see AI-231), we had to introduce a new
2660 -- attribute in all the parents of subtype_indication nodes to indicate
2661 -- if the null-exclusion is present.
2662
2663 -- Note: the reason that this node has expression fields is that a
2664 -- subtype indication can appear as an operand of a membership test.
2665
2666 -- N_Subtype_Indication
2667 -- Sloc points to first token of subtype mark
2668 -- Subtype_Mark (Node4)
2669 -- Constraint (Node3)
2670 -- Etype (Node5-Sem)
2671 -- Must_Not_Freeze (Flag8-Sem)
2672
2673 -- Note: Depending on context, the Etype is either the entity of the
2674 -- Subtype_Mark field, or it is an itype constructed to reify the
2675 -- subtype indication. In particular, such itypes are created for a
2676 -- subtype indication that appears in an array type declaration. This
2677 -- simplifies constraint checking in indexed components.
2678
2679 -- For subtype indications that appear in scalar type and subtype
2680 -- declarations, the Etype is the entity of the subtype mark.
2681
2682 -------------------------
2683 -- 3.2.2 Subtype Mark --
2684 -------------------------
2685
2686 -- SUBTYPE_MARK ::= subtype_NAME
2687
2688 -----------------------
2689 -- 3.2.2 Constraint --
2690 -----------------------
2691
2692 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2693
2694 ------------------------------
2695 -- 3.2.2 Scalar Constraint --
2696 ------------------------------
2697
2698 -- SCALAR_CONSTRAINT ::=
2699 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2700
2701 ---------------------------------
2702 -- 3.2.2 Composite Constraint --
2703 ---------------------------------
2704
2705 -- COMPOSITE_CONSTRAINT ::=
2706 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2707
2708 -------------------------------
2709 -- 3.3.1 Object Declaration --
2710 -------------------------------
2711
2712 -- OBJECT_DECLARATION ::=
2713 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2714 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2715 -- [ASPECT_SPECIFICATIONS];
2716 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2717 -- ACCESS_DEFINITION [:= EXPRESSION]
2718 -- [ASPECT_SPECIFICATIONS];
2719 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2720 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2721 -- [ASPECT_SPECIFICATIONS];
2722 -- | SINGLE_TASK_DECLARATION
2723 -- | SINGLE_PROTECTED_DECLARATION
2724
2725 -- Note: aliased is not permitted in Ada 83 mode
2726
2727 -- The N_Object_Declaration node is only for the first two cases.
2728 -- Single task declaration is handled by P_Task (9.1)
2729 -- Single protected declaration is handled by P_protected (9.5)
2730
2731 -- Although the syntax allows multiple identifiers in the list, the
2732 -- semantics is as though successive declarations were given with
2733 -- identical type definition and expression components. To simplify
2734 -- semantic processing, the parser represents a multiple declaration
2735 -- case as a sequence of single declarations, using the More_Ids and
2736 -- Prev_Ids flags to preserve the original source form as described
2737 -- in the section on "Handling of Defining Identifier Lists".
2738
2739 -- The flag Has_Init_Expression is set if an initializing expression
2740 -- is present. Normally it is set if and only if Expression contains
2741 -- a non-empty value, but there is an exception to this. When the
2742 -- initializing expression is an aggregate which requires explicit
2743 -- assignments, the Expression field gets set to Empty, but this flag
2744 -- is still set, so we don't forget we had an initializing expression.
2745
2746 -- Note: if a range check is required for the initialization
2747 -- expression then the Do_Range_Check flag is set in the Expression,
2748 -- with the check being done against the type given by the object
2749 -- definition, which is also the Etype of the defining identifier.
2750
2751 -- Note: the contents of the Expression field must be ignored (i.e.
2752 -- treated as though it were Empty) if No_Initialization is set True.
2753
2754 -- Note: the back end places some restrictions on the form of the
2755 -- Expression field. If the object being declared is Atomic, then
2756 -- the Expression may not have the form of an aggregate (since this
2757 -- might cause the back end to generate separate assignments). In this
2758 -- case the front end must generate an extra temporary and initialize
2759 -- this temporary as required (the temporary itself is not atomic).
2760
2761 -- Note: there is not node kind for object definition. Instead, the
2762 -- corresponding field holds a subtype indication, an array type
2763 -- definition, or (Ada 2005, AI-406) an access definition.
2764
2765 -- N_Object_Declaration
2766 -- Sloc points to first identifier
2767 -- Defining_Identifier (Node1)
2768 -- Aliased_Present (Flag4)
2769 -- Constant_Present (Flag17) set if CONSTANT appears
2770 -- Null_Exclusion_Present (Flag11)
2771 -- Object_Definition (Node4) subtype indic./array type def./access def.
2772 -- Expression (Node3) (set to Empty if not present)
2773 -- Handler_List_Entry (Node2-Sem)
2774 -- Corresponding_Generic_Association (Node5-Sem)
2775 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2776 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2777 -- No_Initialization (Flag13-Sem)
2778 -- Assignment_OK (Flag15-Sem)
2779 -- Exception_Junk (Flag8-Sem)
2780 -- Is_Subprogram_Descriptor (Flag16-Sem)
2781 -- Has_Init_Expression (Flag14)
2782 -- Suppress_Assignment_Checks (Flag18-Sem)
2783
2784 -------------------------------------
2785 -- 3.3.1 Defining Identifier List --
2786 -------------------------------------
2787
2788 -- DEFINING_IDENTIFIER_LIST ::=
2789 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2790
2791 -------------------------------
2792 -- 3.3.2 Number Declaration --
2793 -------------------------------
2794
2795 -- NUMBER_DECLARATION ::=
2796 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2797
2798 -- Although the syntax allows multiple identifiers in the list, the
2799 -- semantics is as though successive declarations were given with
2800 -- identical expressions. To simplify semantic processing, the parser
2801 -- represents a multiple declaration case as a sequence of single
2802 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2803 -- the original source form as described in the section on "Handling
2804 -- of Defining Identifier Lists".
2805
2806 -- N_Number_Declaration
2807 -- Sloc points to first identifier
2808 -- Defining_Identifier (Node1)
2809 -- Expression (Node3)
2810 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2811 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2812
2813 ----------------------------------
2814 -- 3.4 Derived Type Definition --
2815 ----------------------------------
2816
2817 -- DERIVED_TYPE_DEFINITION ::=
2818 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2819 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2820
2821 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2822 -- in Ada 83 mode
2823
2824 -- Note: a record extension part is required if ABSTRACT is present
2825
2826 -- N_Derived_Type_Definition
2827 -- Sloc points to NEW
2828 -- Abstract_Present (Flag4)
2829 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2830 -- Subtype_Indication (Node5)
2831 -- Record_Extension_Part (Node3) (set to Empty if not present)
2832 -- Limited_Present (Flag17)
2833 -- Task_Present (Flag5) set in task interfaces
2834 -- Protected_Present (Flag6) set in protected interfaces
2835 -- Synchronized_Present (Flag7) set in interfaces
2836 -- Interface_List (List2) (set to No_List if none)
2837 -- Interface_Present (Flag16) set in abstract interfaces
2838
2839 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2840 -- Interface_List, and Interface_Present are used for abstract
2841 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2842
2843 ---------------------------
2844 -- 3.5 Range Constraint --
2845 ---------------------------
2846
2847 -- RANGE_CONSTRAINT ::= range RANGE
2848
2849 -- N_Range_Constraint
2850 -- Sloc points to RANGE
2851 -- Range_Expression (Node4)
2852
2853 ----------------
2854 -- 3.5 Range --
2855 ----------------
2856
2857 -- RANGE ::=
2858 -- RANGE_ATTRIBUTE_REFERENCE
2859 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2860
2861 -- Note: the case of a range given as a range attribute reference
2862 -- appears directly in the tree as an attribute reference.
2863
2864 -- Note: the field name for a reference to a range is Range_Expression
2865 -- rather than Range, because range is a reserved keyword in Ada.
2866
2867 -- Note: the reason that this node has expression fields is that a
2868 -- range can appear as an operand of a membership test. The Etype
2869 -- field is the type of the range (we do NOT construct an implicit
2870 -- subtype to represent the range exactly).
2871
2872 -- N_Range
2873 -- Sloc points to ..
2874 -- Low_Bound (Node1)
2875 -- High_Bound (Node2)
2876 -- Includes_Infinities (Flag11)
2877 -- plus fields for expression
2878
2879 -- Note: if the range appears in a context, such as a subtype
2880 -- declaration, where range checks are required on one or both of
2881 -- the expression fields, then type conversion nodes are inserted
2882 -- to represent the required checks.
2883
2884 ----------------------------------------
2885 -- 3.5.1 Enumeration Type Definition --
2886 ----------------------------------------
2887
2888 -- ENUMERATION_TYPE_DEFINITION ::=
2889 -- (ENUMERATION_LITERAL_SPECIFICATION
2890 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2891
2892 -- Note: the Literals field in the node described below is null for
2893 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2894 -- which special processing handles these types as special cases.
2895
2896 -- N_Enumeration_Type_Definition
2897 -- Sloc points to left parenthesis
2898 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2899 -- End_Label (Node4) (set to Empty if internally generated record)
2900
2901 ----------------------------------------------
2902 -- 3.5.1 Enumeration Literal Specification --
2903 ----------------------------------------------
2904
2905 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2906 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2907
2908 ---------------------------------------
2909 -- 3.5.1 Defining Character Literal --
2910 ---------------------------------------
2911
2912 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2913
2914 -- A defining character literal is an entity, which has additional
2915 -- fields depending on the setting of the Ekind field. These
2916 -- additional fields are defined (and access subprograms declared)
2917 -- in package Einfo.
2918
2919 -- Note: N_Defining_Character_Literal is an extended node whose fields
2920 -- are deliberate layed out to match the layout of fields in an ordinary
2921 -- N_Character_Literal node allowing for easy alteration of a character
2922 -- literal node into a defining character literal node. For details, see
2923 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2924
2925 -- N_Defining_Character_Literal
2926 -- Sloc points to literal
2927 -- Chars (Name1) contains the Name_Id for the identifier
2928 -- Next_Entity (Node2-Sem)
2929 -- Scope (Node3-Sem)
2930 -- Etype (Node5-Sem)
2931
2932 ------------------------------------
2933 -- 3.5.4 Integer Type Definition --
2934 ------------------------------------
2935
2936 -- Note: there is an error in this rule in the latest version of the
2937 -- grammar, so we have retained the old rule pending clarification.
2938
2939 -- INTEGER_TYPE_DEFINITION ::=
2940 -- SIGNED_INTEGER_TYPE_DEFINITION
2941 -- | MODULAR_TYPE_DEFINITION
2942
2943 -------------------------------------------
2944 -- 3.5.4 Signed Integer Type Definition --
2945 -------------------------------------------
2946
2947 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2948 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2949
2950 -- Note: the Low_Bound and High_Bound fields are set to Empty
2951 -- for integer types defined in package Standard.
2952
2953 -- N_Signed_Integer_Type_Definition
2954 -- Sloc points to RANGE
2955 -- Low_Bound (Node1)
2956 -- High_Bound (Node2)
2957
2958 ------------------------------------
2959 -- 3.5.4 Modular Type Definition --
2960 ------------------------------------
2961
2962 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2963
2964 -- N_Modular_Type_Definition
2965 -- Sloc points to MOD
2966 -- Expression (Node3)
2967
2968 ---------------------------------
2969 -- 3.5.6 Real Type Definition --
2970 ---------------------------------
2971
2972 -- REAL_TYPE_DEFINITION ::=
2973 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2974
2975 --------------------------------------
2976 -- 3.5.7 Floating Point Definition --
2977 --------------------------------------
2978
2979 -- FLOATING_POINT_DEFINITION ::=
2980 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2981
2982 -- Note: The Digits_Expression and Real_Range_Specifications fields
2983 -- are set to Empty for floating-point types declared in Standard.
2984
2985 -- N_Floating_Point_Definition
2986 -- Sloc points to DIGITS
2987 -- Digits_Expression (Node2)
2988 -- Real_Range_Specification (Node4) (set to Empty if not present)
2989
2990 -------------------------------------
2991 -- 3.5.7 Real Range Specification --
2992 -------------------------------------
2993
2994 -- REAL_RANGE_SPECIFICATION ::=
2995 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2996
2997 -- N_Real_Range_Specification
2998 -- Sloc points to RANGE
2999 -- Low_Bound (Node1)
3000 -- High_Bound (Node2)
3001
3002 -----------------------------------
3003 -- 3.5.9 Fixed Point Definition --
3004 -----------------------------------
3005
3006 -- FIXED_POINT_DEFINITION ::=
3007 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
3008
3009 --------------------------------------------
3010 -- 3.5.9 Ordinary Fixed Point Definition --
3011 --------------------------------------------
3012
3013 -- ORDINARY_FIXED_POINT_DEFINITION ::=
3014 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
3015
3016 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3017
3018 -- N_Ordinary_Fixed_Point_Definition
3019 -- Sloc points to DELTA
3020 -- Delta_Expression (Node3)
3021 -- Real_Range_Specification (Node4)
3022
3023 -------------------------------------------
3024 -- 3.5.9 Decimal Fixed Point Definition --
3025 -------------------------------------------
3026
3027 -- DECIMAL_FIXED_POINT_DEFINITION ::=
3028 -- delta static_EXPRESSION
3029 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
3030
3031 -- Note: decimal types are not permitted in Ada 83 mode
3032
3033 -- N_Decimal_Fixed_Point_Definition
3034 -- Sloc points to DELTA
3035 -- Delta_Expression (Node3)
3036 -- Digits_Expression (Node2)
3037 -- Real_Range_Specification (Node4) (set to Empty if not present)
3038
3039 ------------------------------
3040 -- 3.5.9 Digits Constraint --
3041 ------------------------------
3042
3043 -- DIGITS_CONSTRAINT ::=
3044 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
3045
3046 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3047 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
3048
3049 -- N_Digits_Constraint
3050 -- Sloc points to DIGITS
3051 -- Digits_Expression (Node2)
3052 -- Range_Constraint (Node4) (set to Empty if not present)
3053
3054 --------------------------------
3055 -- 3.6 Array Type Definition --
3056 --------------------------------
3057
3058 -- ARRAY_TYPE_DEFINITION ::=
3059 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
3060
3061 -----------------------------------------
3062 -- 3.6 Unconstrained Array Definition --
3063 -----------------------------------------
3064
3065 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
3066 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
3067 -- COMPONENT_DEFINITION
3068
3069 -- Note: dimensionality of array is indicated by number of entries in
3070 -- the Subtype_Marks list, which has one entry for each dimension.
3071
3072 -- N_Unconstrained_Array_Definition
3073 -- Sloc points to ARRAY
3074 -- Subtype_Marks (List2)
3075 -- Component_Definition (Node4)
3076
3077 -----------------------------------
3078 -- 3.6 Index Subtype Definition --
3079 -----------------------------------
3080
3081 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3082
3083 -- There is no explicit node in the tree for an index subtype
3084 -- definition since the N_Unconstrained_Array_Definition node
3085 -- incorporates the type marks which appear in this context.
3086
3087 ---------------------------------------
3088 -- 3.6 Constrained Array Definition --
3089 ---------------------------------------
3090
3091 -- CONSTRAINED_ARRAY_DEFINITION ::=
3092 -- array (DISCRETE_SUBTYPE_DEFINITION
3093 -- {, DISCRETE_SUBTYPE_DEFINITION})
3094 -- of COMPONENT_DEFINITION
3095
3096 -- Note: dimensionality of array is indicated by number of entries
3097 -- in the Discrete_Subtype_Definitions list, which has one entry
3098 -- for each dimension.
3099
3100 -- N_Constrained_Array_Definition
3101 -- Sloc points to ARRAY
3102 -- Discrete_Subtype_Definitions (List2)
3103 -- Component_Definition (Node4)
3104
3105 -- Note: although the language allows the full syntax for discrete
3106 -- subtype definitions (i.e. a discrete subtype indication or a range),
3107 -- in the generated tree, we always rewrite these as N_Range nodes.
3108
3109 --------------------------------------
3110 -- 3.6 Discrete Subtype Definition --
3111 --------------------------------------
3112
3113 -- DISCRETE_SUBTYPE_DEFINITION ::=
3114 -- discrete_SUBTYPE_INDICATION | RANGE
3115
3116 -------------------------------
3117 -- 3.6 Component Definition --
3118 -------------------------------
3119
3120 -- COMPONENT_DEFINITION ::=
3121 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3122
3123 -- Note: although the syntax does not permit a component definition to
3124 -- be an anonymous array (and the parser will diagnose such an attempt
3125 -- with an appropriate message), it is possible for anonymous arrays
3126 -- to appear as component definitions. The semantics and back end handle
3127 -- this case properly, and the expander in fact generates such cases.
3128 -- Access_Definition is an optional field that gives support to
3129 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3130 -- Subtype_Indication field or else the Access_Definition field.
3131
3132 -- N_Component_Definition
3133 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
3134 -- Aliased_Present (Flag4)
3135 -- Null_Exclusion_Present (Flag11)
3136 -- Subtype_Indication (Node5) (set to Empty if not present)
3137 -- Access_Definition (Node3) (set to Empty if not present)
3138
3139 -----------------------------
3140 -- 3.6.1 Index Constraint --
3141 -----------------------------
3142
3143 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3144
3145 -- It is not in general possible to distinguish between discriminant
3146 -- constraints and index constraints at parse time, since a simple
3147 -- name could be either the subtype mark of a discrete range, or an
3148 -- expression in a discriminant association with no name. Either
3149 -- entry appears simply as the name, and the semantic parse must
3150 -- distinguish between the two cases. Thus we use a common tree
3151 -- node format for both of these constraint types.
3152
3153 -- See Discriminant_Constraint for format of node
3154
3155 ---------------------------
3156 -- 3.6.1 Discrete Range --
3157 ---------------------------
3158
3159 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3160
3161 ----------------------------
3162 -- 3.7 Discriminant Part --
3163 ----------------------------
3164
3165 -- DISCRIMINANT_PART ::=
3166 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3167
3168 ------------------------------------
3169 -- 3.7 Unknown Discriminant Part --
3170 ------------------------------------
3171
3172 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3173
3174 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3175
3176 -- There is no explicit node in the tree for an unknown discriminant
3177 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3178 -- parent node.
3179
3180 ----------------------------------
3181 -- 3.7 Known Discriminant Part --
3182 ----------------------------------
3183
3184 -- KNOWN_DISCRIMINANT_PART ::=
3185 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3186
3187 -------------------------------------
3188 -- 3.7 Discriminant Specification --
3189 -------------------------------------
3190
3191 -- DISCRIMINANT_SPECIFICATION ::=
3192 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3193 -- [:= DEFAULT_EXPRESSION]
3194 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3195 -- [:= DEFAULT_EXPRESSION]
3196
3197 -- Although the syntax allows multiple identifiers in the list, the
3198 -- semantics is as though successive specifications were given with
3199 -- identical type definition and expression components. To simplify
3200 -- semantic processing, the parser represents a multiple declaration
3201 -- case as a sequence of single specifications, using the More_Ids and
3202 -- Prev_Ids flags to preserve the original source form as described
3203 -- in the section on "Handling of Defining Identifier Lists".
3204
3205 -- N_Discriminant_Specification
3206 -- Sloc points to first identifier
3207 -- Defining_Identifier (Node1)
3208 -- Null_Exclusion_Present (Flag11)
3209 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3210 -- Expression (Node3) (set to Empty if no default expression)
3211 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3212 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3213
3214 -----------------------------
3215 -- 3.7 Default Expression --
3216 -----------------------------
3217
3218 -- DEFAULT_EXPRESSION ::= EXPRESSION
3219
3220 ------------------------------------
3221 -- 3.7.1 Discriminant Constraint --
3222 ------------------------------------
3223
3224 -- DISCRIMINANT_CONSTRAINT ::=
3225 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3226
3227 -- It is not in general possible to distinguish between discriminant
3228 -- constraints and index constraints at parse time, since a simple
3229 -- name could be either the subtype mark of a discrete range, or an
3230 -- expression in a discriminant association with no name. Either
3231 -- entry appears simply as the name, and the semantic parse must
3232 -- distinguish between the two cases. Thus we use a common tree
3233 -- node format for both of these constraint types.
3234
3235 -- N_Index_Or_Discriminant_Constraint
3236 -- Sloc points to left paren
3237 -- Constraints (List1) points to list of discrete ranges or
3238 -- discriminant associations
3239
3240 -------------------------------------
3241 -- 3.7.1 Discriminant Association --
3242 -------------------------------------
3243
3244 -- DISCRIMINANT_ASSOCIATION ::=
3245 -- [discriminant_SELECTOR_NAME
3246 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3247
3248 -- Note: a discriminant association that has no selector name list
3249 -- appears directly as an expression in the tree.
3250
3251 -- N_Discriminant_Association
3252 -- Sloc points to first token of discriminant association
3253 -- Selector_Names (List1) (always non-empty, since if no selector
3254 -- names are present, this node is not used, see comment above)
3255 -- Expression (Node3)
3256
3257 ---------------------------------
3258 -- 3.8 Record Type Definition --
3259 ---------------------------------
3260
3261 -- RECORD_TYPE_DEFINITION ::=
3262 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3263
3264 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3265
3266 -- There is no explicit node in the tree for a record type definition.
3267 -- Instead the flags for Tagged_Present and Limited_Present appear in
3268 -- the N_Record_Definition node for a record definition appearing in
3269 -- the context of a record type definition.
3270
3271 ----------------------------
3272 -- 3.8 Record Definition --
3273 ----------------------------
3274
3275 -- RECORD_DEFINITION ::=
3276 -- record
3277 -- COMPONENT_LIST
3278 -- end record
3279 -- | null record
3280
3281 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
3282 -- flags appear only for a record definition appearing in a record
3283 -- type definition.
3284
3285 -- Note: the NULL RECORD case is not permitted in Ada 83
3286
3287 -- N_Record_Definition
3288 -- Sloc points to RECORD or NULL
3289 -- End_Label (Node4) (set to Empty if internally generated record)
3290 -- Abstract_Present (Flag4)
3291 -- Tagged_Present (Flag15)
3292 -- Limited_Present (Flag17)
3293 -- Component_List (Node1) empty in null record case
3294 -- Null_Present (Flag13) set in null record case
3295 -- Task_Present (Flag5) set in task interfaces
3296 -- Protected_Present (Flag6) set in protected interfaces
3297 -- Synchronized_Present (Flag7) set in interfaces
3298 -- Interface_Present (Flag16) set in abstract interfaces
3299 -- Interface_List (List2) (set to No_List if none)
3300
3301 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3302 -- Interface_List and Interface_Present are used for abstract
3303 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3304
3305 -------------------------
3306 -- 3.8 Component List --
3307 -------------------------
3308
3309 -- COMPONENT_LIST ::=
3310 -- COMPONENT_ITEM {COMPONENT_ITEM}
3311 -- | {COMPONENT_ITEM} VARIANT_PART
3312 -- | null;
3313
3314 -- N_Component_List
3315 -- Sloc points to first token of component list
3316 -- Component_Items (List3)
3317 -- Variant_Part (Node4) (set to Empty if no variant part)
3318 -- Null_Present (Flag13)
3319
3320 -------------------------
3321 -- 3.8 Component Item --
3322 -------------------------
3323
3324 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3325
3326 -- Note: A component item can also be a pragma, and in the tree
3327 -- that is obtained after semantic processing, a component item
3328 -- can be an N_Null node resulting from a non-recognized pragma.
3329
3330 --------------------------------
3331 -- 3.8 Component Declaration --
3332 --------------------------------
3333
3334 -- COMPONENT_DECLARATION ::=
3335 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3336 -- [:= DEFAULT_EXPRESSION]
3337 -- [ASPECT_SPECIFICATIONS];
3338
3339 -- Note: although the syntax does not permit a component definition to
3340 -- be an anonymous array (and the parser will diagnose such an attempt
3341 -- with an appropriate message), it is possible for anonymous arrays
3342 -- to appear as component definitions. The semantics and back end handle
3343 -- this case properly, and the expander in fact generates such cases.
3344
3345 -- Although the syntax allows multiple identifiers in the list, the
3346 -- semantics is as though successive declarations were given with the
3347 -- same component definition and expression components. To simplify
3348 -- semantic processing, the parser represents a multiple declaration
3349 -- case as a sequence of single declarations, using the More_Ids and
3350 -- Prev_Ids flags to preserve the original source form as described
3351 -- in the section on "Handling of Defining Identifier Lists".
3352
3353 -- N_Component_Declaration
3354 -- Sloc points to first identifier
3355 -- Defining_Identifier (Node1)
3356 -- Component_Definition (Node4)
3357 -- Expression (Node3) (set to Empty if no default expression)
3358 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3359 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3360
3361 -------------------------
3362 -- 3.8.1 Variant Part --
3363 -------------------------
3364
3365 -- VARIANT_PART ::=
3366 -- case discriminant_DIRECT_NAME is
3367 -- VARIANT {VARIANT}
3368 -- end case;
3369
3370 -- Note: the variants list can contain pragmas as well as variants.
3371 -- In a properly formed program there is at least one variant.
3372
3373 -- N_Variant_Part
3374 -- Sloc points to CASE
3375 -- Name (Node2)
3376 -- Variants (List1)
3377
3378 --------------------
3379 -- 3.8.1 Variant --
3380 --------------------
3381
3382 -- VARIANT ::=
3383 -- when DISCRETE_CHOICE_LIST =>
3384 -- COMPONENT_LIST
3385
3386 -- N_Variant
3387 -- Sloc points to WHEN
3388 -- Discrete_Choices (List4)
3389 -- Component_List (Node1)
3390 -- Enclosing_Variant (Node2-Sem)
3391 -- Present_Expr (Uint3-Sem)
3392 -- Dcheck_Function (Node5-Sem)
3393 -- Has_SP_Choice (Flag15-Sem)
3394
3395 -- Note: in the list of Discrete_Choices, the tree passed to the back
3396 -- end does not have choice entries corresponding to names of statically
3397 -- predicated subtypes. Such entries are always expanded out to the list
3398 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
3399 -- mode also has this expansion, but done with a proper Rewrite call on
3400 -- the N_Variant node so that ASIS can properly retrieve the original.
3401
3402 ---------------------------------
3403 -- 3.8.1 Discrete Choice List --
3404 ---------------------------------
3405
3406 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3407
3408 ----------------------------
3409 -- 3.8.1 Discrete Choice --
3410 ----------------------------
3411
3412 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3413
3414 -- Note: in Ada 83 mode, the expression must be a simple expression
3415
3416 -- The only choice that appears explicitly is the OTHERS choice, as
3417 -- defined here. Other cases of discrete choice (expression and
3418 -- discrete range) appear directly. This production is also used
3419 -- for the OTHERS possibility of an exception choice.
3420
3421 -- Note: in accordance with the syntax, the parser does not check that
3422 -- OTHERS appears at the end on its own in a choice list context. This
3423 -- is a semantic check.
3424
3425 -- N_Others_Choice
3426 -- Sloc points to OTHERS
3427 -- Others_Discrete_Choices (List1-Sem)
3428 -- All_Others (Flag11-Sem)
3429
3430 ----------------------------------
3431 -- 3.9.1 Record Extension Part --
3432 ----------------------------------
3433
3434 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3435
3436 -- Note: record extension parts are not permitted in Ada 83 mode
3437
3438 --------------------------------------
3439 -- 3.9.4 Interface Type Definition --
3440 --------------------------------------
3441
3442 -- INTERFACE_TYPE_DEFINITION ::=
3443 -- [limited | task | protected | synchronized]
3444 -- interface [interface_list]
3445
3446 -- Note: Interfaces are implemented with N_Record_Definition and
3447 -- N_Derived_Type_Definition nodes because most of the support
3448 -- for the analysis of abstract types has been reused to
3449 -- analyze abstract interfaces.
3450
3451 ----------------------------------
3452 -- 3.10 Access Type Definition --
3453 ----------------------------------
3454
3455 -- ACCESS_TYPE_DEFINITION ::=
3456 -- ACCESS_TO_OBJECT_DEFINITION
3457 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3458
3459 --------------------------
3460 -- 3.10 Null Exclusion --
3461 --------------------------
3462
3463 -- NULL_EXCLUSION ::= not null
3464
3465 ---------------------------------------
3466 -- 3.10 Access To Object Definition --
3467 ---------------------------------------
3468
3469 -- ACCESS_TO_OBJECT_DEFINITION ::=
3470 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3471 -- SUBTYPE_INDICATION
3472
3473 -- N_Access_To_Object_Definition
3474 -- Sloc points to ACCESS
3475 -- All_Present (Flag15)
3476 -- Null_Exclusion_Present (Flag11)
3477 -- Null_Excluding_Subtype (Flag16)
3478 -- Subtype_Indication (Node5)
3479 -- Constant_Present (Flag17)
3480
3481 -----------------------------------
3482 -- 3.10 General Access Modifier --
3483 -----------------------------------
3484
3485 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3486
3487 -- Note: general access modifiers are not permitted in Ada 83 mode
3488
3489 -- There is no explicit node in the tree for general access modifier.
3490 -- Instead the All_Present or Constant_Present flags are set in the
3491 -- parent node.
3492
3493 -------------------------------------------
3494 -- 3.10 Access To Subprogram Definition --
3495 -------------------------------------------
3496
3497 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3498 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3499 -- | [NULL_EXCLUSION] access [protected] function
3500 -- PARAMETER_AND_RESULT_PROFILE
3501
3502 -- Note: access to subprograms are not permitted in Ada 83 mode
3503
3504 -- N_Access_Function_Definition
3505 -- Sloc points to ACCESS
3506 -- Null_Exclusion_Present (Flag11)
3507 -- Null_Exclusion_In_Return_Present (Flag14)
3508 -- Protected_Present (Flag6)
3509 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3510 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3511
3512 -- N_Access_Procedure_Definition
3513 -- Sloc points to ACCESS
3514 -- Null_Exclusion_Present (Flag11)
3515 -- Protected_Present (Flag6)
3516 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3517
3518 -----------------------------
3519 -- 3.10 Access Definition --
3520 -----------------------------
3521
3522 -- ACCESS_DEFINITION ::=
3523 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3524 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3525
3526 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3527
3528 -- N_Access_Definition
3529 -- Sloc points to ACCESS
3530 -- Null_Exclusion_Present (Flag11)
3531 -- All_Present (Flag15)
3532 -- Constant_Present (Flag17)
3533 -- Subtype_Mark (Node4)
3534 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3535
3536 -----------------------------------------
3537 -- 3.10.1 Incomplete Type Declaration --
3538 -----------------------------------------
3539
3540 -- INCOMPLETE_TYPE_DECLARATION ::=
3541 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3542
3543 -- N_Incomplete_Type_Declaration
3544 -- Sloc points to TYPE
3545 -- Defining_Identifier (Node1)
3546 -- Discriminant_Specifications (List4) (set to No_List if no
3547 -- discriminant part, or if the discriminant part is an
3548 -- unknown discriminant part)
3549 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3550 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3551 -- Tagged_Present (Flag15)
3552
3553 ----------------------------
3554 -- 3.11 Declarative Part --
3555 ----------------------------
3556
3557 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3558
3559 -- Note: although the parser enforces the syntactic requirement that
3560 -- a declarative part can contain only declarations, the semantic
3561 -- processing may add statements to the list of actions in a
3562 -- declarative part, so the code generator should be prepared
3563 -- to accept a statement in this position.
3564
3565 ----------------------------
3566 -- 3.11 Declarative Item --
3567 ----------------------------
3568
3569 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3570
3571 ----------------------------------
3572 -- 3.11 Basic Declarative Item --
3573 ----------------------------------
3574
3575 -- BASIC_DECLARATIVE_ITEM ::=
3576 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3577
3578 ----------------
3579 -- 3.11 Body --
3580 ----------------
3581
3582 -- BODY ::= PROPER_BODY | BODY_STUB
3583
3584 -----------------------
3585 -- 3.11 Proper Body --
3586 -----------------------
3587
3588 -- PROPER_BODY ::=
3589 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3590
3591 ---------------
3592 -- 4.1 Name --
3593 ---------------
3594
3595 -- NAME ::=
3596 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3597 -- | INDEXED_COMPONENT | SLICE
3598 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3599 -- | TYPE_CONVERSION | FUNCTION_CALL
3600 -- | CHARACTER_LITERAL
3601
3602 ----------------------
3603 -- 4.1 Direct Name --
3604 ----------------------
3605
3606 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3607
3608 -----------------
3609 -- 4.1 Prefix --
3610 -----------------
3611
3612 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3613
3614 -------------------------------
3615 -- 4.1 Explicit Dereference --
3616 -------------------------------
3617
3618 -- EXPLICIT_DEREFERENCE ::= NAME . all
3619
3620 -- N_Explicit_Dereference
3621 -- Sloc points to ALL
3622 -- Prefix (Node3)
3623 -- Actual_Designated_Subtype (Node4-Sem)
3624 -- Atomic_Sync_Required (Flag14-Sem)
3625 -- Has_Dereference_Action (Flag13-Sem)
3626 -- plus fields for expression
3627
3628 -------------------------------
3629 -- 4.1 Implicit Dereference --
3630 -------------------------------
3631
3632 -- IMPLICIT_DEREFERENCE ::= NAME
3633
3634 ------------------------------
3635 -- 4.1.1 Indexed Component --
3636 ------------------------------
3637
3638 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3639
3640 -- Note: the parser may generate this node in some situations where it
3641 -- should be a function call. The semantic pass must correct this
3642 -- misidentification (which is inevitable at the parser level).
3643
3644 -- N_Indexed_Component
3645 -- Sloc contains a copy of the Sloc value of the Prefix
3646 -- Prefix (Node3)
3647 -- Expressions (List1)
3648 -- Generalized_Indexing (Node4-Sem)
3649 -- Atomic_Sync_Required (Flag14-Sem)
3650 -- plus fields for expression
3651
3652 -- Note: if any of the subscripts requires a range check, then the
3653 -- Do_Range_Check flag is set on the corresponding expression, with
3654 -- the index type being determined from the type of the Prefix, which
3655 -- references the array being indexed.
3656
3657 -- Note: in a fully analyzed and expanded indexed component node, and
3658 -- hence in any such node that gigi sees, if the prefix is an access
3659 -- type, then an explicit dereference operation has been inserted.
3660
3661 ------------------
3662 -- 4.1.2 Slice --
3663 ------------------
3664
3665 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3666
3667 -- Note: an implicit subtype is created to describe the resulting
3668 -- type, so that the bounds of this type are the bounds of the slice.
3669
3670 -- N_Slice
3671 -- Sloc points to first token of prefix
3672 -- Prefix (Node3)
3673 -- Discrete_Range (Node4)
3674 -- plus fields for expression
3675
3676 -------------------------------
3677 -- 4.1.3 Selected Component --
3678 -------------------------------
3679
3680 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3681
3682 -- Note: selected components that are semantically expanded names get
3683 -- changed during semantic processing into the separate N_Expanded_Name
3684 -- node. See description of this node in the section on semantic nodes.
3685
3686 -- N_Selected_Component
3687 -- Sloc points to period
3688 -- Prefix (Node3)
3689 -- Selector_Name (Node2)
3690 -- Associated_Node (Node4-Sem)
3691 -- Do_Discriminant_Check (Flag1-Sem)
3692 -- Is_In_Discriminant_Check (Flag11-Sem)
3693 -- Is_Prefixed_Call (Flag17-Sem)
3694 -- Atomic_Sync_Required (Flag14-Sem)
3695 -- plus fields for expression
3696
3697 --------------------------
3698 -- 4.1.3 Selector Name --
3699 --------------------------
3700
3701 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3702
3703 --------------------------------
3704 -- 4.1.4 Attribute Reference --
3705 --------------------------------
3706
3707 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3708
3709 -- Note: the syntax is quite ambiguous at this point. Consider:
3710
3711 -- A'Length (X) X is part of the attribute designator
3712 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3713 -- A'Class (X) X is the expression of a type conversion
3714
3715 -- It would be possible for the parser to distinguish these cases
3716 -- by looking at the attribute identifier. However, that would mean
3717 -- more work in introducing new implementation defined attributes,
3718 -- and also it would mean that special processing for attributes
3719 -- would be scattered around, instead of being centralized in the
3720 -- semantic routine that handles an N_Attribute_Reference node.
3721 -- Consequently, the parser in all the above cases stores the
3722 -- expression (X in these examples) as a single element list in
3723 -- in the Expressions field of the N_Attribute_Reference node.
3724
3725 -- Similarly, for attributes like Max which take two arguments,
3726 -- we store the two arguments as a two element list in the
3727 -- Expressions field. Of course it is clear at parse time that
3728 -- this case is really a function call with an attribute as the
3729 -- prefix, but it turns out to be convenient to handle the two
3730 -- argument case in a similar manner to the one argument case,
3731 -- and indeed in general the parser will accept any number of
3732 -- expressions in this position and store them as a list in the
3733 -- attribute reference node. This allows for future addition of
3734 -- attributes that take more than two arguments.
3735
3736 -- Note: named associates are not permitted in function calls where
3737 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3738 -- to skip the normal subprogram argument processing.
3739
3740 -- Note: for the attributes whose designators are technically keywords,
3741 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3742 -- the corresponding name, even though no identifier is involved.
3743
3744 -- Note: the generated code may contain stream attributes applied to
3745 -- limited types for which no stream routines exist officially. In such
3746 -- case, the result is to use the stream attribute for the underlying
3747 -- full type, or in the case of a protected type, the components
3748 -- (including any discriminants) are merely streamed in order.
3749
3750 -- See Exp_Attr for a complete description of which attributes are
3751 -- passed onto Gigi, and which are handled entirely by the front end.
3752
3753 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3754 -- a non-standard enumeration type or a nonzero/zero semantics
3755 -- boolean type, so the value is simply the stored representation.
3756
3757 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3758 -- references a subprogram that is a renaming, then the front end must
3759 -- rewrite the attribute to refer directly to the renamed entity.
3760
3761 -- Note: syntactically the prefix of an attribute reference must be a
3762 -- name, and this (somewhat artificial) requirement is enforced by the
3763 -- parser. However, for many attributes, such as 'Valid, it is quite
3764 -- reasonable to apply the attribute to any value, and hence to any
3765 -- expression. Internally in the tree, the prefix is an expression which
3766 -- does not have to be a name, and this is handled fine by the semantic
3767 -- analysis and expansion, and back ends. This arises for the case of
3768 -- attribute references built by the expander (e.g. 'Valid for the case
3769 -- of an implicit validity check).
3770
3771 -- Note: In generated code, the Address and Unrestricted_Access
3772 -- attributes can be applied to any expression, and the meaning is
3773 -- to create an object containing the value (the object is in the
3774 -- current stack frame), and pass the address of this value. If the
3775 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3776 -- is taken must be on a byte (storage unit) boundary, and if it is
3777 -- not (or may not be), then the generated code must create a copy
3778 -- that is byte aligned, and pass the address of this copy.
3779
3780 -- N_Attribute_Reference
3781 -- Sloc points to apostrophe
3782 -- Prefix (Node3) (general expression, see note above)
3783 -- Attribute_Name (Name2) identifier name from attribute designator
3784 -- Expressions (List1) (set to No_List if no associated expressions)
3785 -- Entity (Node4-Sem) used if the attribute yields a type
3786 -- Associated_Node (Node4-Sem)
3787 -- Do_Overflow_Check (Flag17-Sem)
3788 -- Header_Size_Added (Flag11-Sem)
3789 -- Must_Be_Byte_Aligned (Flag14-Sem)
3790 -- Non_Aliased_Prefix (Flag18-Sem)
3791 -- Redundant_Use (Flag13-Sem)
3792
3793 -- plus fields for expression
3794
3795 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
3796 -- into equivalent if expressions, properly taking care of side effects.
3797
3798 ---------------------------------
3799 -- 4.1.4 Attribute Designator --
3800 ---------------------------------
3801
3802 -- ATTRIBUTE_DESIGNATOR ::=
3803 -- IDENTIFIER [(static_EXPRESSION)]
3804 -- | access | delta | digits
3805
3806 -- There is no explicit node in the tree for an attribute designator.
3807 -- Instead the Attribute_Name and Expressions fields of the parent
3808 -- node (N_Attribute_Reference node) hold the information.
3809
3810 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3811 -- designator, then they are treated as identifiers internally
3812 -- rather than the keywords of the same name.
3813
3814 --------------------------------------
3815 -- 4.1.4 Range Attribute Reference --
3816 --------------------------------------
3817
3818 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3819
3820 -- A range attribute reference is represented in the tree using the
3821 -- normal N_Attribute_Reference node.
3822
3823 ---------------------------------------
3824 -- 4.1.4 Range Attribute Designator --
3825 ---------------------------------------
3826
3827 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3828
3829 -- A range attribute designator is represented in the tree using the
3830 -- normal N_Attribute_Reference node.
3831
3832 --------------------
3833 -- 4.3 Aggregate --
3834 --------------------
3835
3836 -- AGGREGATE ::=
3837 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3838
3839 -----------------------------
3840 -- 4.3.1 Record Aggregate --
3841 -----------------------------
3842
3843 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3844
3845 -- N_Aggregate
3846 -- Sloc points to left parenthesis
3847 -- Expressions (List1) (set to No_List if none or null record case)
3848 -- Component_Associations (List2) (set to No_List if none)
3849 -- Null_Record_Present (Flag17)
3850 -- Aggregate_Bounds (Node3-Sem)
3851 -- Associated_Node (Node4-Sem)
3852 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3853 -- Expansion_Delayed (Flag11-Sem)
3854 -- Has_Self_Reference (Flag13-Sem)
3855 -- plus fields for expression
3856
3857 -- Note: this structure is used for both record and array aggregates
3858 -- since the two cases are not separable by the parser. The parser
3859 -- makes no attempt to enforce consistency here, so it is up to the
3860 -- semantic phase to make sure that the aggregate is consistent (i.e.
3861 -- that it is not a "half-and-half" case that mixes record and array
3862 -- syntax. In particular, for a record aggregate, the expressions
3863 -- field will be set if there are positional associations.
3864
3865 -- Note: N_Aggregate is not used for all aggregates; in particular,
3866 -- there is a separate node kind for extension aggregates.
3867
3868 -- Note: gigi/gcc can handle array aggregates correctly providing that
3869 -- they are entirely positional, and the array subtype involved has a
3870 -- known at compile time length and is not bit packed, or a convention
3871 -- Fortran array with more than one dimension. If these conditions
3872 -- are not met, then the front end must translate the aggregate into
3873 -- an appropriate set of assignments into a temporary.
3874
3875 -- Note: for the record aggregate case, gigi/gcc can handle most cases
3876 -- of record aggregates, including those for packed, and rep-claused
3877 -- records, and also variant records, providing that there are no
3878 -- variable length fields whose size is not known at compile time,
3879 -- and providing that the aggregate is presented in fully named form.
3880
3881 -- The other situation in which array aggregates and record aggregates
3882 -- cannot be passed to the back end is if assignment to one or more
3883 -- components itself needs expansion, e.g. in the case of an assignment
3884 -- of an object of a controlled type. In such cases, the front end
3885 -- must expand the aggregate to a series of assignments, and apply
3886 -- the required expansion to the individual assignment statements.
3887
3888 ----------------------------------------------
3889 -- 4.3.1 Record Component Association List --
3890 ----------------------------------------------
3891
3892 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3893 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3894 -- | null record
3895
3896 -- There is no explicit node in the tree for a record component
3897 -- association list. Instead the Null_Record_Present flag is set in
3898 -- the parent node for the NULL RECORD case.
3899
3900 ------------------------------------------------------
3901 -- 4.3.1 Record Component Association (also 4.3.3) --
3902 ------------------------------------------------------
3903
3904 -- RECORD_COMPONENT_ASSOCIATION ::=
3905 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3906
3907 -- N_Component_Association
3908 -- Sloc points to first selector name
3909 -- Choices (List1)
3910 -- Loop_Actions (List2-Sem)
3911 -- Expression (Node3) (empty if Box_Present)
3912 -- Box_Present (Flag15)
3913 -- Inherited_Discriminant (Flag13)
3914
3915 -- Note: this structure is used for both record component associations
3916 -- and array component associations, since the two cases aren't always
3917 -- separable by the parser. The choices list may represent either a
3918 -- list of selector names in the record aggregate case, or a list of
3919 -- discrete choices in the array aggregate case or an N_Others_Choice
3920 -- node (which appears as a singleton list). Box_Present gives support
3921 -- to Ada 2005 (AI-287).
3922
3923 ----------------------------------
3924 -- 4.3.1 Component Choice List --
3925 ----------------------------------
3926
3927 -- COMPONENT_CHOICE_LIST ::=
3928 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3929 -- | others
3930
3931 -- The entries of a component choice list appear in the Choices list of
3932 -- the associated N_Component_Association, as either selector names, or
3933 -- as an N_Others_Choice node.
3934
3935 --------------------------------
3936 -- 4.3.2 Extension Aggregate --
3937 --------------------------------
3938
3939 -- EXTENSION_AGGREGATE ::=
3940 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3941
3942 -- Note: extension aggregates are not permitted in Ada 83 mode
3943
3944 -- N_Extension_Aggregate
3945 -- Sloc points to left parenthesis
3946 -- Ancestor_Part (Node3)
3947 -- Associated_Node (Node4-Sem)
3948 -- Expressions (List1) (set to No_List if none or null record case)
3949 -- Component_Associations (List2) (set to No_List if none)
3950 -- Null_Record_Present (Flag17)
3951 -- Expansion_Delayed (Flag11-Sem)
3952 -- Has_Self_Reference (Flag13-Sem)
3953 -- plus fields for expression
3954
3955 --------------------------
3956 -- 4.3.2 Ancestor Part --
3957 --------------------------
3958
3959 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3960
3961 ----------------------------
3962 -- 4.3.3 Array Aggregate --
3963 ----------------------------
3964
3965 -- ARRAY_AGGREGATE ::=
3966 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3967
3968 ---------------------------------------
3969 -- 4.3.3 Positional Array Aggregate --
3970 ---------------------------------------
3971
3972 -- POSITIONAL_ARRAY_AGGREGATE ::=
3973 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3974 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3975
3976 -- See Record_Aggregate (4.3.1) for node structure
3977
3978 ----------------------------------
3979 -- 4.3.3 Named Array Aggregate --
3980 ----------------------------------
3981
3982 -- NAMED_ARRAY_AGGREGATE ::=
3983 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3984
3985 -- See Record_Aggregate (4.3.1) for node structure
3986
3987 ----------------------------------------
3988 -- 4.3.3 Array Component Association --
3989 ----------------------------------------
3990
3991 -- ARRAY_COMPONENT_ASSOCIATION ::=
3992 -- DISCRETE_CHOICE_LIST => EXPRESSION
3993
3994 -- See Record_Component_Association (4.3.1) for node structure
3995
3996 --------------------------------------------------
3997 -- 4.4 Expression/Relation/Term/Factor/Primary --
3998 --------------------------------------------------
3999
4000 -- EXPRESSION ::=
4001 -- RELATION {LOGICAL_OPERATOR RELATION}
4002
4003 -- CHOICE_EXPRESSION ::=
4004 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
4005
4006 -- CHOICE_RELATION ::=
4007 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
4008
4009 -- RELATION ::=
4010 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4011 -- | RAISE_EXPRESSION
4012
4013 -- MEMBERSHIP_CHOICE_LIST ::=
4014 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4015
4016 -- MEMBERSHIP_CHOICE ::=
4017 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4018
4019 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
4020
4021 -- SIMPLE_EXPRESSION ::=
4022 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
4023
4024 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
4025
4026 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
4027
4028 -- No nodes are generated for any of these constructs. Instead, the
4029 -- node for the operator appears directly. When we refer to an
4030 -- expression in this description, we mean any of the possible
4031 -- constituent components of an expression (e.g. identifier is
4032 -- an example of an expression).
4033
4034 -- Note: the above syntax is that Ada 2012 syntax which restricts
4035 -- choice relations to simple expressions to avoid ambiguities in
4036 -- some contexts with set membership notation. It has been decided
4037 -- that in retrospect, the Ada 95 change allowing general expressions
4038 -- in this context was a mistake, so we have reverted to the above
4039 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
4040 -- expressions was there in Ada 83 from the start).
4041
4042 ------------------
4043 -- 4.4 Primary --
4044 ------------------
4045
4046 -- PRIMARY ::=
4047 -- NUMERIC_LITERAL | null
4048 -- | STRING_LITERAL | AGGREGATE
4049 -- | NAME | QUALIFIED_EXPRESSION
4050 -- | ALLOCATOR | (EXPRESSION)
4051
4052 -- Usually there is no explicit node in the tree for primary. Instead
4053 -- the constituent (e.g. AGGREGATE) appears directly. There are two
4054 -- exceptions. First, there is an explicit node for a null primary.
4055
4056 -- N_Null
4057 -- Sloc points to NULL
4058 -- plus fields for expression
4059
4060 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
4061 -- that the parser keep track of which subexpressions are enclosed
4062 -- in parentheses, and how many levels of parentheses are used. This
4063 -- information is required for optimization purposes, and also for
4064 -- some semantic checks (e.g. (((1))) in a procedure spec does not
4065 -- conform with ((((1)))) in the body).
4066
4067 -- The parentheses are recorded by keeping a Paren_Count field in every
4068 -- subexpression node (it is actually present in all nodes, but only
4069 -- used in subexpression nodes). This count records the number of
4070 -- levels of parentheses. If the number of levels in the source exceeds
4071 -- the maximum accommodated by this count, then the count is simply left
4072 -- at the maximum value. This means that there are some pathological
4073 -- cases of failure to detect conformance failures (e.g. an expression
4074 -- with 500 levels of parens will conform with one with 501 levels),
4075 -- but we do not need to lose sleep over this.
4076
4077 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4078 -- type N_Parenthesized_Expression used to accurately record unlimited
4079 -- numbers of levels of parentheses. However, it turned out to be a
4080 -- real nuisance to have to take into account the possible presence of
4081 -- this node during semantic analysis, since basically parentheses have
4082 -- zero relevance to semantic analysis.
4083
4084 -- Note: the level of parentheses always present in things like
4085 -- aggregates does not count, only the parentheses in the primary
4086 -- (EXPRESSION) affect the setting of the Paren_Count field.
4087
4088 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4089 -- treated as though it were Empty) if No_Initialization is set True.
4090
4091 --------------------------------------
4092 -- 4.5 Short Circuit Control Forms --
4093 --------------------------------------
4094
4095 -- EXPRESSION ::=
4096 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4097
4098 -- Gigi restriction: For both these control forms, the operand and
4099 -- result types are always Standard.Boolean. The expander inserts the
4100 -- required conversion operations where needed to ensure this is the
4101 -- case.
4102
4103 -- N_And_Then
4104 -- Sloc points to AND of AND THEN
4105 -- Left_Opnd (Node2)
4106 -- Right_Opnd (Node3)
4107 -- Actions (List1-Sem)
4108 -- plus fields for expression
4109
4110 -- N_Or_Else
4111 -- Sloc points to OR of OR ELSE
4112 -- Left_Opnd (Node2)
4113 -- Right_Opnd (Node3)
4114 -- Actions (List1-Sem)
4115 -- plus fields for expression
4116
4117 -- Note: The Actions field is used to hold actions associated with
4118 -- the right hand operand. These have to be treated specially since
4119 -- they are not unconditionally executed. See Insert_Actions for a
4120 -- more detailed description of how these actions are handled.
4121
4122 ---------------------------
4123 -- 4.5 Membership Tests --
4124 ---------------------------
4125
4126 -- RELATION ::=
4127 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4128
4129 -- MEMBERSHIP_CHOICE_LIST ::=
4130 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4131
4132 -- MEMBERSHIP_CHOICE ::=
4133 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4134
4135 -- Note: although the grammar above allows only a range or a subtype
4136 -- mark, the parser in fact will accept any simple expression in place
4137 -- of a subtype mark. This means that the semantic analyzer must be able
4138 -- to deal with, and diagnose a simple expression other than a name for
4139 -- the right operand. This simplifies error recovery in the parser.
4140
4141 -- The Alternatives field below is present only if there is more than
4142 -- one Membership_Choice present (which is legitimate only in Ada 2012
4143 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4144 -- the list of choices. In the tree passed to the back end, Alternatives
4145 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4146 -- expands out the complex set membership case using simple membership
4147 -- and equality operations).
4148
4149 -- Should we rename Alternatives here to Membership_Choices ???
4150
4151 -- N_In
4152 -- Sloc points to IN
4153 -- Left_Opnd (Node2)
4154 -- Right_Opnd (Node3)
4155 -- Alternatives (List4) (set to No_List if only one set alternative)
4156 -- No_Minimize_Eliminate (Flag17)
4157 -- plus fields for expression
4158
4159 -- N_Not_In
4160 -- Sloc points to NOT of NOT IN
4161 -- Left_Opnd (Node2)
4162 -- Right_Opnd (Node3)
4163 -- Alternatives (List4) (set to No_List if only one set alternative)
4164 -- No_Minimize_Eliminate (Flag17)
4165 -- plus fields for expression
4166
4167 --------------------
4168 -- 4.5 Operators --
4169 --------------------
4170
4171 -- LOGICAL_OPERATOR ::= and | or | xor
4172
4173 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4174
4175 -- BINARY_ADDING_OPERATOR ::= + | - | &
4176
4177 -- UNARY_ADDING_OPERATOR ::= + | -
4178
4179 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4180
4181 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4182
4183 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4184
4185 -- x #* y
4186 -- x #/ y
4187 -- x #mod y
4188 -- x #rem y
4189
4190 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4191 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4192 -- All handling of smalls for multiplication and division is handled
4193 -- by the front end (mod and rem result only from expansion). Gigi
4194 -- thus never needs to worry about small values (for other operators
4195 -- operating on fixed-point, e.g. addition, the small value does not
4196 -- have any semantic effect anyway, these are always integer operations.
4197
4198 -- Gigi restriction: For all operators taking Boolean operands, the
4199 -- type is always Standard.Boolean. The expander inserts the required
4200 -- conversion operations where needed to ensure this is the case.
4201
4202 -- N_Op_And
4203 -- Sloc points to AND
4204 -- Do_Length_Check (Flag4-Sem)
4205 -- plus fields for binary operator
4206 -- plus fields for expression
4207
4208 -- N_Op_Or
4209 -- Sloc points to OR
4210 -- Do_Length_Check (Flag4-Sem)
4211 -- plus fields for binary operator
4212 -- plus fields for expression
4213
4214 -- N_Op_Xor
4215 -- Sloc points to XOR
4216 -- Do_Length_Check (Flag4-Sem)
4217 -- plus fields for binary operator
4218 -- plus fields for expression
4219
4220 -- N_Op_Eq
4221 -- Sloc points to =
4222 -- plus fields for binary operator
4223 -- plus fields for expression
4224
4225 -- N_Op_Ne
4226 -- Sloc points to /=
4227 -- plus fields for binary operator
4228 -- plus fields for expression
4229
4230 -- N_Op_Lt
4231 -- Sloc points to <
4232 -- plus fields for binary operator
4233 -- plus fields for expression
4234
4235 -- N_Op_Le
4236 -- Sloc points to <=
4237 -- plus fields for binary operator
4238 -- plus fields for expression
4239
4240 -- N_Op_Gt
4241 -- Sloc points to >
4242 -- plus fields for binary operator
4243 -- plus fields for expression
4244
4245 -- N_Op_Ge
4246 -- Sloc points to >=
4247 -- plus fields for binary operator
4248 -- plus fields for expression
4249
4250 -- N_Op_Add
4251 -- Sloc points to + (binary)
4252 -- plus fields for binary operator
4253 -- plus fields for expression
4254
4255 -- N_Op_Subtract
4256 -- Sloc points to - (binary)
4257 -- plus fields for binary operator
4258 -- plus fields for expression
4259
4260 -- N_Op_Concat
4261 -- Sloc points to &
4262 -- Is_Component_Left_Opnd (Flag13-Sem)
4263 -- Is_Component_Right_Opnd (Flag14-Sem)
4264 -- plus fields for binary operator
4265 -- plus fields for expression
4266
4267 -- N_Op_Multiply
4268 -- Sloc points to *
4269 -- Treat_Fixed_As_Integer (Flag14-Sem)
4270 -- Rounded_Result (Flag18-Sem)
4271 -- plus fields for binary operator
4272 -- plus fields for expression
4273
4274 -- N_Op_Divide
4275 -- Sloc points to /
4276 -- Treat_Fixed_As_Integer (Flag14-Sem)
4277 -- Do_Division_Check (Flag13-Sem)
4278 -- Rounded_Result (Flag18-Sem)
4279 -- plus fields for binary operator
4280 -- plus fields for expression
4281
4282 -- N_Op_Mod
4283 -- Sloc points to MOD
4284 -- Treat_Fixed_As_Integer (Flag14-Sem)
4285 -- Do_Division_Check (Flag13-Sem)
4286 -- plus fields for binary operator
4287 -- plus fields for expression
4288
4289 -- N_Op_Rem
4290 -- Sloc points to REM
4291 -- Treat_Fixed_As_Integer (Flag14-Sem)
4292 -- Do_Division_Check (Flag13-Sem)
4293 -- plus fields for binary operator
4294 -- plus fields for expression
4295
4296 -- N_Op_Expon
4297 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4298 -- Sloc points to **
4299 -- plus fields for binary operator
4300 -- plus fields for expression
4301
4302 -- N_Op_Plus
4303 -- Sloc points to + (unary)
4304 -- plus fields for unary operator
4305 -- plus fields for expression
4306
4307 -- N_Op_Minus
4308 -- Sloc points to - (unary)
4309 -- plus fields for unary operator
4310 -- plus fields for expression
4311
4312 -- N_Op_Abs
4313 -- Sloc points to ABS
4314 -- plus fields for unary operator
4315 -- plus fields for expression
4316
4317 -- N_Op_Not
4318 -- Sloc points to NOT
4319 -- plus fields for unary operator
4320 -- plus fields for expression
4321
4322 -- See also shift operators in section B.2
4323
4324 -- Note on fixed-point operations passed to Gigi: For adding operators,
4325 -- the semantics is to treat these simply as integer operations, with
4326 -- the small values being ignored (the bounds are already stored in
4327 -- units of small, so that constraint checking works as usual). For the
4328 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4329 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4330 -- thus treat these nodes in identical manner, ignoring small values.
4331
4332 -- Note on equality/inequality tests for records. In the expanded tree,
4333 -- record comparisons are always expanded to be a series of component
4334 -- comparisons, so the back end will never see an equality or inequality
4335 -- operation with operands of a record type.
4336
4337 -- Note on overflow handling: When the overflow checking mode is set to
4338 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4339 -- be modified to use a larger type for the operands and result. In
4340 -- the case where the computed range exceeds that of Long_Long_Integer,
4341 -- and we are running in ELIMINATED mode, the operator node will be
4342 -- changed to be a call to the appropriate routine in System.Bignums.
4343
4344 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4345 -- for signed integer types (since there is no equivalent operator in
4346 -- C). Instead we rewrite such an operation in terms of REM (which is
4347 -- % in C) and other C-available operators.
4348
4349 ------------------------------------
4350 -- 4.5.7 Conditional Expressions --
4351 ------------------------------------
4352
4353 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4354
4355 --------------------------
4356 -- 4.5.7 If Expression --
4357 ----------------------------
4358
4359 -- IF_EXPRESSION ::=
4360 -- if CONDITION then DEPENDENT_EXPRESSION
4361 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4362 -- [else DEPENDENT_EXPRESSION]
4363
4364 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4365
4366 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4367 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4368 -- the Is_Elsif flag is set on the inner if expression.
4369
4370 -- N_If_Expression
4371 -- Sloc points to IF or ELSIF keyword
4372 -- Expressions (List1)
4373 -- Then_Actions (List2-Sem)
4374 -- Else_Actions (List3-Sem)
4375 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4376 -- Do_Overflow_Check (Flag17-Sem)
4377 -- plus fields for expression
4378
4379 -- Expressions here is a three-element list, whose first element is the
4380 -- condition, the second element is the dependent expression after THEN
4381 -- and the third element is the dependent expression after the ELSE
4382 -- (explicitly set to True if missing).
4383
4384 -- Note: the Then_Actions and Else_Actions fields are always set to
4385 -- No_List in the tree passed to the back end. These are used only
4386 -- for temporary processing purposes in the expander. Even though they
4387 -- are semantic fields, their parent pointers are set because analysis
4388 -- of actions nodes in those lists may generate additional actions that
4389 -- need to know their insertion point (for example for the creation of
4390 -- transient scopes).
4391
4392 -- Note: in the tree passed to the back end, if the result type is
4393 -- an unconstrained array, the if expression can only appears in the
4394 -- initializing expression of an object declaration (this avoids the
4395 -- back end having to create a variable length temporary on the fly).
4396
4397 ----------------------------
4398 -- 4.5.7 Case Expression --
4399 ----------------------------
4400
4401 -- CASE_EXPRESSION ::=
4402 -- case SELECTING_EXPRESSION is
4403 -- CASE_EXPRESSION_ALTERNATIVE
4404 -- {,CASE_EXPRESSION_ALTERNATIVE}
4405
4406 -- Note that the Alternatives cannot include pragmas (this contrasts
4407 -- with the situation of case statements where pragmas are allowed).
4408
4409 -- N_Case_Expression
4410 -- Sloc points to CASE
4411 -- Expression (Node3) (the selecting expression)
4412 -- Alternatives (List4) (the case expression alternatives)
4413 -- Do_Overflow_Check (Flag17-Sem)
4414
4415 ----------------------------------------
4416 -- 4.5.7 Case Expression Alternative --
4417 ----------------------------------------
4418
4419 -- CASE_EXPRESSION_ALTERNATIVE ::=
4420 -- when DISCRETE_CHOICE_LIST =>
4421 -- DEPENDENT_EXPRESSION
4422
4423 -- N_Case_Expression_Alternative
4424 -- Sloc points to WHEN
4425 -- Actions (List1)
4426 -- Discrete_Choices (List4)
4427 -- Expression (Node3)
4428 -- Has_SP_Choice (Flag15-Sem)
4429
4430 -- Note: The Actions field temporarily holds any actions associated with
4431 -- evaluation of the Expression. During expansion of the case expression
4432 -- these actions are wrapped into an N_Expressions_With_Actions node
4433 -- replacing the original expression.
4434
4435 -- Note: this node never appears in the tree passed to the back end,
4436 -- since the expander converts case expressions into case statements.
4437
4438 ---------------------------------
4439 -- 4.5.9 Quantified Expression --
4440 ---------------------------------
4441
4442 -- QUANTIFIED_EXPRESSION ::=
4443 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4444 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4445 --
4446 -- QUANTIFIER ::= all | some
4447
4448 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4449 -- is present at a time, in which case the other one is empty.
4450
4451 -- N_Quantified_Expression
4452 -- Sloc points to FOR
4453 -- Iterator_Specification (Node2)
4454 -- Loop_Parameter_Specification (Node4)
4455 -- Condition (Node1)
4456 -- All_Present (Flag15)
4457
4458 --------------------------
4459 -- 4.6 Type Conversion --
4460 --------------------------
4461
4462 -- TYPE_CONVERSION ::=
4463 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4464
4465 -- In the (NAME) case, the name is stored as the expression
4466
4467 -- Note: the parser never generates a type conversion node, since it
4468 -- looks like an indexed component which is generated by preference.
4469 -- The semantic pass must correct this misidentification.
4470
4471 -- Gigi handles conversions that involve no change in the root type,
4472 -- and also all conversions from integer to floating-point types.
4473 -- Conversions from floating-point to integer are only handled in
4474 -- the case where Float_Truncate flag set. Other conversions from
4475 -- floating-point to integer (involving rounding) and all conversions
4476 -- involving fixed-point types are handled by the expander.
4477
4478 -- Sprint syntax if Float_Truncate set: X^(Y)
4479 -- Sprint syntax if Conversion_OK set X?(Y)
4480 -- Sprint syntax if both flags set X?^(Y)
4481
4482 -- Note: If either the operand or result type is fixed-point, Gigi will
4483 -- only see a type conversion node with Conversion_OK set. The front end
4484 -- takes care of all handling of small's for fixed-point conversions.
4485
4486 -- N_Type_Conversion
4487 -- Sloc points to first token of subtype mark
4488 -- Subtype_Mark (Node4)
4489 -- Expression (Node3)
4490 -- Do_Discriminant_Check (Flag1-Sem)
4491 -- Do_Length_Check (Flag4-Sem)
4492 -- Float_Truncate (Flag11-Sem)
4493 -- Do_Tag_Check (Flag13-Sem)
4494 -- Conversion_OK (Flag14-Sem)
4495 -- Do_Overflow_Check (Flag17-Sem)
4496 -- Rounded_Result (Flag18-Sem)
4497 -- plus fields for expression
4498
4499 -- Note: if a range check is required, then the Do_Range_Check flag
4500 -- is set in the Expression with the check being done against the
4501 -- target type range (after the base type conversion, if any).
4502
4503 -------------------------------
4504 -- 4.7 Qualified Expression --
4505 -------------------------------
4506
4507 -- QUALIFIED_EXPRESSION ::=
4508 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4509
4510 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4511 -- the expression, so the Expression field of this node always points
4512 -- to a parenthesized expression in this case (i.e. Paren_Count will
4513 -- always be non-zero for the referenced expression if it is not an
4514 -- aggregate).
4515
4516 -- N_Qualified_Expression
4517 -- Sloc points to apostrophe
4518 -- Subtype_Mark (Node4)
4519 -- Expression (Node3) expression or aggregate
4520 -- plus fields for expression
4521
4522 --------------------
4523 -- 4.8 Allocator --
4524 --------------------
4525
4526 -- ALLOCATOR ::=
4527 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4528 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4529 --
4530 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4531
4532 -- Sprint syntax (when storage pool present)
4533 -- new xxx (storage_pool = pool)
4534 -- or
4535 -- new (subpool) xxx (storage_pool = pool)
4536
4537 -- N_Allocator
4538 -- Sloc points to NEW
4539 -- Expression (Node3) subtype indication or qualified expression
4540 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4541 -- Storage_Pool (Node1-Sem)
4542 -- Procedure_To_Call (Node2-Sem)
4543 -- Null_Exclusion_Present (Flag11)
4544 -- No_Initialization (Flag13-Sem)
4545 -- Is_Static_Coextension (Flag14-Sem)
4546 -- Do_Storage_Check (Flag17-Sem)
4547 -- Is_Dynamic_Coextension (Flag18-Sem)
4548 -- plus fields for expression
4549
4550 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4551 -- This flag has a special function in conjunction with the restriction
4552 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4553 -- is not set. This means that if a source allocator is replaced with
4554 -- a constructed allocator, the Comes_From_Source flag should be copied
4555 -- to the newly created allocator.
4556
4557 ---------------------------------
4558 -- 5.1 Sequence Of Statements --
4559 ---------------------------------
4560
4561 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4562
4563 -- Note: Although the parser will not accept a declaration as a
4564 -- statement, the semantic analyzer may insert declarations (e.g.
4565 -- declarations of implicit types needed for execution of other
4566 -- statements) into a sequence of statements, so the code generator
4567 -- should be prepared to accept a declaration where a statement is
4568 -- expected. Note also that pragmas can appear as statements.
4569
4570 --------------------
4571 -- 5.1 Statement --
4572 --------------------
4573
4574 -- STATEMENT ::=
4575 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4576
4577 -- There is no explicit node in the tree for a statement. Instead, the
4578 -- individual statement appears directly. Labels are treated as a
4579 -- kind of statement, i.e. they are linked into a statement list at
4580 -- the point they appear, so the labeled statement appears following
4581 -- the label or labels in the statement list.
4582
4583 ---------------------------
4584 -- 5.1 Simple Statement --
4585 ---------------------------
4586
4587 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4588 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4589 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4590 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4591 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4592 -- | ABORT_STATEMENT | RAISE_STATEMENT
4593 -- | CODE_STATEMENT
4594
4595 -----------------------------
4596 -- 5.1 Compound Statement --
4597 -----------------------------
4598
4599 -- COMPOUND_STATEMENT ::=
4600 -- IF_STATEMENT | CASE_STATEMENT
4601 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4602 -- | EXTENDED_RETURN_STATEMENT
4603 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4604
4605 -------------------------
4606 -- 5.1 Null Statement --
4607 -------------------------
4608
4609 -- NULL_STATEMENT ::= null;
4610
4611 -- N_Null_Statement
4612 -- Sloc points to NULL
4613
4614 ----------------
4615 -- 5.1 Label --
4616 ----------------
4617
4618 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4619
4620 -- Note that the occurrence of a label is not a defining identifier,
4621 -- but rather a referencing occurrence. The defining occurrence is
4622 -- in the implicit label declaration which occurs in the innermost
4623 -- enclosing block.
4624
4625 -- N_Label
4626 -- Sloc points to <<
4627 -- Identifier (Node1) direct name of statement identifier
4628 -- Exception_Junk (Flag8-Sem)
4629
4630 -- Note: Before Ada 2012, a label is always followed by a statement,
4631 -- and this is true in the tree even in Ada 2012 mode (the parser
4632 -- inserts a null statement marked with Comes_From_Source False).
4633
4634 -------------------------------
4635 -- 5.1 Statement Identifier --
4636 -------------------------------
4637
4638 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4639
4640 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4641 -- (not an OPERATOR_SYMBOL)
4642
4643 -------------------------------
4644 -- 5.2 Assignment Statement --
4645 -------------------------------
4646
4647 -- ASSIGNMENT_STATEMENT ::=
4648 -- variable_NAME := EXPRESSION;
4649
4650 -- N_Assignment_Statement
4651 -- Sloc points to :=
4652 -- Name (Node2)
4653 -- Expression (Node3)
4654 -- Do_Discriminant_Check (Flag1-Sem)
4655 -- Do_Tag_Check (Flag13-Sem)
4656 -- Do_Length_Check (Flag4-Sem)
4657 -- Forwards_OK (Flag5-Sem)
4658 -- Backwards_OK (Flag6-Sem)
4659 -- No_Ctrl_Actions (Flag7-Sem)
4660 -- Componentwise_Assignment (Flag14-Sem)
4661 -- Suppress_Assignment_Checks (Flag18-Sem)
4662
4663 -- Note: if a range check is required, then the Do_Range_Check flag
4664 -- is set in the Expression (right hand side), with the check being
4665 -- done against the type of the Name (left hand side).
4666
4667 -- Note: the back end places some restrictions on the form of the
4668 -- Expression field. If the object being assigned to is Atomic, then
4669 -- the Expression may not have the form of an aggregate (since this
4670 -- might cause the back end to generate separate assignments). In this
4671 -- case the front end must generate an extra temporary and initialize
4672 -- this temporary as required (the temporary itself is not atomic).
4673
4674 -----------------------
4675 -- 5.3 If Statement --
4676 -----------------------
4677
4678 -- IF_STATEMENT ::=
4679 -- if CONDITION then
4680 -- SEQUENCE_OF_STATEMENTS
4681 -- {elsif CONDITION then
4682 -- SEQUENCE_OF_STATEMENTS}
4683 -- [else
4684 -- SEQUENCE_OF_STATEMENTS]
4685 -- end if;
4686
4687 -- Gigi restriction: This expander ensures that the type of the
4688 -- Condition fields is always Standard.Boolean, even if the type
4689 -- in the source is some non-standard boolean type.
4690
4691 -- N_If_Statement
4692 -- Sloc points to IF
4693 -- Condition (Node1)
4694 -- Then_Statements (List2)
4695 -- Elsif_Parts (List3) (set to No_List if none present)
4696 -- Else_Statements (List4) (set to No_List if no else part present)
4697 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4698 -- From_Conditional_Expression (Flag1-Sem)
4699
4700 -- N_Elsif_Part
4701 -- Sloc points to ELSIF
4702 -- Condition (Node1)
4703 -- Then_Statements (List2)
4704 -- Condition_Actions (List3-Sem)
4705
4706 --------------------
4707 -- 5.3 Condition --
4708 --------------------
4709
4710 -- CONDITION ::= boolean_EXPRESSION
4711
4712 -------------------------
4713 -- 5.4 Case Statement --
4714 -------------------------
4715
4716 -- CASE_STATEMENT ::=
4717 -- case EXPRESSION is
4718 -- CASE_STATEMENT_ALTERNATIVE
4719 -- {CASE_STATEMENT_ALTERNATIVE}
4720 -- end case;
4721
4722 -- Note: the Alternatives can contain pragmas. These only occur at
4723 -- the start of the list, since any pragmas occurring after the first
4724 -- alternative are absorbed into the corresponding statement sequence.
4725
4726 -- N_Case_Statement
4727 -- Sloc points to CASE
4728 -- Expression (Node3)
4729 -- Alternatives (List4)
4730 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4731 -- From_Conditional_Expression (Flag1-Sem)
4732
4733 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4734 -- followed by a statement, and this is true in the tree even in Ada
4735 -- 2012 mode (the parser inserts a null statement marked with the flag
4736 -- Comes_From_Source False).
4737
4738 -------------------------------------
4739 -- 5.4 Case Statement Alternative --
4740 -------------------------------------
4741
4742 -- CASE_STATEMENT_ALTERNATIVE ::=
4743 -- when DISCRETE_CHOICE_LIST =>
4744 -- SEQUENCE_OF_STATEMENTS
4745
4746 -- N_Case_Statement_Alternative
4747 -- Sloc points to WHEN
4748 -- Discrete_Choices (List4)
4749 -- Statements (List3)
4750 -- Has_SP_Choice (Flag15-Sem)
4751
4752 -- Note: in the list of Discrete_Choices, the tree passed to the back
4753 -- end does not have choice entries corresponding to names of statically
4754 -- predicated subtypes. Such entries are always expanded out to the list
4755 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
4756 -- mode does not have this expansion, and has the original choices.
4757
4758 -------------------------
4759 -- 5.5 Loop Statement --
4760 -------------------------
4761
4762 -- LOOP_STATEMENT ::=
4763 -- [loop_STATEMENT_IDENTIFIER :]
4764 -- [ITERATION_SCHEME] loop
4765 -- SEQUENCE_OF_STATEMENTS
4766 -- end loop [loop_IDENTIFIER];
4767
4768 -- Note: The occurrence of a loop label is not a defining identifier
4769 -- but rather a referencing occurrence. The defining occurrence is in
4770 -- the implicit label declaration which occurs in the innermost
4771 -- enclosing block.
4772
4773 -- Note: there is always a loop statement identifier present in the
4774 -- tree, even if none was given in the source. In the case where no loop
4775 -- identifier is given in the source, the parser creates a name of the
4776 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
4777 -- that the loop names created in this manner do not conflict with any
4778 -- user defined identifiers), and the flag Has_Created_Identifier is set
4779 -- to True. The only exception to the rule that all loop statement nodes
4780 -- have identifiers occurs for loops constructed by the expander, and
4781 -- the semantic analyzer will create and supply dummy loop identifiers
4782 -- in these cases.
4783
4784 -- N_Loop_Statement
4785 -- Sloc points to LOOP
4786 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4787 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4788 -- Statements (List3)
4789 -- End_Label (Node4)
4790 -- Has_Created_Identifier (Flag15)
4791 -- Is_Null_Loop (Flag16)
4792 -- Suppress_Loop_Warnings (Flag17)
4793
4794 -- Note: the parser fills in the Identifier field if there is an
4795 -- explicit loop identifier. Otherwise the parser leaves this field
4796 -- set to Empty, and then the semantic processing for a loop statement
4797 -- creates an identifier, setting the Has_Created_Identifier flag to
4798 -- True. So after semantic analysis, the Identifier is always set,
4799 -- referencing an identifier whose entity has an Ekind of E_Loop.
4800
4801 ---------------------------
4802 -- 5.5 Iteration Scheme --
4803 ---------------------------
4804
4805 -- ITERATION_SCHEME ::=
4806 -- while CONDITION
4807 -- | for LOOP_PARAMETER_SPECIFICATION
4808 -- | for ITERATOR_SPECIFICATION
4809
4810 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4811 -- is present at a time, in which case the other one is empty. Both are
4812 -- empty in the case of a WHILE loop.
4813
4814 -- Gigi restriction: The expander ensures that the type of the Condition
4815 -- field is always Standard.Boolean, even if the type in the source is
4816 -- some non-standard boolean type.
4817
4818 -- N_Iteration_Scheme
4819 -- Sloc points to WHILE or FOR
4820 -- Condition (Node1) (set to Empty if FOR case)
4821 -- Condition_Actions (List3-Sem)
4822 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4823 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4824
4825 ---------------------------------------
4826 -- 5.5 Loop Parameter Specification --
4827 ---------------------------------------
4828
4829 -- LOOP_PARAMETER_SPECIFICATION ::=
4830 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4831
4832 -- N_Loop_Parameter_Specification
4833 -- Sloc points to first identifier
4834 -- Defining_Identifier (Node1)
4835 -- Reverse_Present (Flag15)
4836 -- Discrete_Subtype_Definition (Node4)
4837
4838 -----------------------------------
4839 -- 5.5.1 Iterator Specification --
4840 -----------------------------------
4841
4842 -- ITERATOR_SPECIFICATION ::=
4843 -- DEFINING_IDENTIFIER in [reverse] NAME
4844 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4845
4846 -- N_Iterator_Specification
4847 -- Sloc points to defining identifier
4848 -- Defining_Identifier (Node1)
4849 -- Name (Node2)
4850 -- Reverse_Present (Flag15)
4851 -- Of_Present (Flag16)
4852 -- Subtype_Indication (Node5)
4853
4854 -- Note: The Of_Present flag distinguishes the two forms
4855
4856 --------------------------
4857 -- 5.6 Block Statement --
4858 --------------------------
4859
4860 -- BLOCK_STATEMENT ::=
4861 -- [block_STATEMENT_IDENTIFIER:]
4862 -- [declare
4863 -- DECLARATIVE_PART]
4864 -- begin
4865 -- HANDLED_SEQUENCE_OF_STATEMENTS
4866 -- end [block_IDENTIFIER];
4867
4868 -- Note that the occurrence of a block identifier is not a defining
4869 -- identifier, but rather a referencing occurrence. The defining
4870 -- occurrence is an E_Block entity declared by the implicit label
4871 -- declaration which occurs in the innermost enclosing block statement
4872 -- or body; the block identifier denotes that E_Block.
4873
4874 -- For block statements that come from source code, there is always a
4875 -- block statement identifier present in the tree, denoting an E_Block.
4876 -- In the case where no block identifier is given in the source,
4877 -- the parser creates a name of the form B_n, where n is a decimal
4878 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
4879 -- constructed by the expander usually have no identifier, and no
4880 -- corresponding entity.
4881
4882 -- Note: the block statement created for an extended return statement
4883 -- has an entity, and this entity is an E_Return_Statement, rather than
4884 -- the usual E_Block.
4885
4886 -- Note: Exception_Junk is set for the wrapping blocks created during
4887 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4888
4889 -- Note: from a control flow viewpoint, a block statement defines an
4890 -- extended basic block, i.e. the entry of the block dominates every
4891 -- statement in the sequence. When generating new statements with
4892 -- exception handlers in the expander at the end of a sequence that
4893 -- comes from source code, it can be necessary to wrap them all in a
4894 -- block statement in order to expose the implicit control flow to
4895 -- gigi and thus prevent it from issuing bogus control flow warnings.
4896
4897 -- N_Block_Statement
4898 -- Sloc points to DECLARE or BEGIN
4899 -- Identifier (Node1) block direct name (set to Empty if not present)
4900 -- Declarations (List2) (set to No_List if no DECLARE part)
4901 -- Handled_Statement_Sequence (Node4)
4902 -- Cleanup_Actions (List5-Sem)
4903 -- Is_Task_Master (Flag5-Sem)
4904 -- Activation_Chain_Entity (Node3-Sem)
4905 -- Has_Created_Identifier (Flag15)
4906 -- Is_Task_Allocation_Block (Flag6)
4907 -- Is_Asynchronous_Call_Block (Flag7)
4908 -- Exception_Junk (Flag8-Sem)
4909 -- Is_Finalization_Wrapper (Flag9-Sem)
4910
4911 -------------------------
4912 -- 5.7 Exit Statement --
4913 -------------------------
4914
4915 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4916
4917 -- Gigi restriction: The expander ensures that the type of the Condition
4918 -- field is always Standard.Boolean, even if the type in the source is
4919 -- some non-standard boolean type.
4920
4921 -- N_Exit_Statement
4922 -- Sloc points to EXIT
4923 -- Name (Node2) (set to Empty if no loop name present)
4924 -- Condition (Node1) (set to Empty if no WHEN part present)
4925 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4926
4927 -------------------------
4928 -- 5.9 Goto Statement --
4929 -------------------------
4930
4931 -- GOTO_STATEMENT ::= goto label_NAME;
4932
4933 -- N_Goto_Statement
4934 -- Sloc points to GOTO
4935 -- Name (Node2)
4936 -- Exception_Junk (Flag8-Sem)
4937
4938 ---------------------------------
4939 -- 6.1 Subprogram Declaration --
4940 ---------------------------------
4941
4942 -- SUBPROGRAM_DECLARATION ::=
4943 -- SUBPROGRAM_SPECIFICATION
4944 -- [ASPECT_SPECIFICATIONS];
4945
4946 -- N_Subprogram_Declaration
4947 -- Sloc points to FUNCTION or PROCEDURE
4948 -- Specification (Node1)
4949 -- Body_To_Inline (Node3-Sem)
4950 -- Corresponding_Body (Node5-Sem)
4951 -- Parent_Spec (Node4-Sem)
4952
4953 ------------------------------------------
4954 -- 6.1 Abstract Subprogram Declaration --
4955 ------------------------------------------
4956
4957 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4958 -- SUBPROGRAM_SPECIFICATION is abstract
4959 -- [ASPECT_SPECIFICATIONS];
4960
4961 -- N_Abstract_Subprogram_Declaration
4962 -- Sloc points to ABSTRACT
4963 -- Specification (Node1)
4964
4965 -----------------------------------
4966 -- 6.1 Subprogram Specification --
4967 -----------------------------------
4968
4969 -- SUBPROGRAM_SPECIFICATION ::=
4970 -- [[not] overriding]
4971 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4972 -- | [[not] overriding]
4973 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4974
4975 -- Note: there are no separate nodes for the profiles, instead the
4976 -- information appears directly in the following nodes.
4977
4978 -- N_Function_Specification
4979 -- Sloc points to FUNCTION
4980 -- Defining_Unit_Name (Node1) (the designator)
4981 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4982 -- Null_Exclusion_Present (Flag11)
4983 -- Result_Definition (Node4) for result subtype
4984 -- Generic_Parent (Node5-Sem)
4985 -- Must_Override (Flag14) set if overriding indicator present
4986 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4987
4988 -- N_Procedure_Specification
4989 -- Sloc points to PROCEDURE
4990 -- Defining_Unit_Name (Node1)
4991 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4992 -- Generic_Parent (Node5-Sem)
4993 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4994 -- Must_Override (Flag14) set if overriding indicator present
4995 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4996
4997 -- Note: overriding indicator is an Ada 2005 feature
4998
4999 ---------------------
5000 -- 6.1 Designator --
5001 ---------------------
5002
5003 -- DESIGNATOR ::=
5004 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
5005
5006 -- Designators that are simply identifiers or operator symbols appear
5007 -- directly in the tree in this form. The following node is used only
5008 -- in the case where the designator has a parent unit name component.
5009
5010 -- N_Designator
5011 -- Sloc points to period
5012 -- Name (Node2) holds the parent unit name
5013 -- Identifier (Node1)
5014
5015 -- Note: Name is always non-Empty, since this node is only used for the
5016 -- case where a parent library unit package name is present.
5017
5018 -- Note that the identifier can also be an operator symbol here
5019
5020 ------------------------------
5021 -- 6.1 Defining Designator --
5022 ------------------------------
5023
5024 -- DEFINING_DESIGNATOR ::=
5025 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
5026
5027 -------------------------------------
5028 -- 6.1 Defining Program Unit Name --
5029 -------------------------------------
5030
5031 -- DEFINING_PROGRAM_UNIT_NAME ::=
5032 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
5033
5034 -- The parent unit name is present only in the case of a child unit name
5035 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
5036 -- at scope level one). If no such name is present, the defining program
5037 -- unit name is represented simply as the defining identifier. In the
5038 -- child unit case, the following node is used to represent the child
5039 -- unit name.
5040
5041 -- N_Defining_Program_Unit_Name
5042 -- Sloc points to period
5043 -- Name (Node2) holds the parent unit name
5044 -- Defining_Identifier (Node1)
5045
5046 -- Note: Name is always non-Empty, since this node is only used for the
5047 -- case where a parent unit name is present.
5048
5049 --------------------------
5050 -- 6.1 Operator Symbol --
5051 --------------------------
5052
5053 -- OPERATOR_SYMBOL ::= STRING_LITERAL
5054
5055 -- Note: the fields of the N_Operator_Symbol node are laid out to match
5056 -- the corresponding fields of an N_Character_Literal node. This allows
5057 -- easy conversion of the operator symbol node into a character literal
5058 -- node in the case where a string constant of the form of an operator
5059 -- symbol is scanned out as such, but turns out semantically to be a
5060 -- string literal that is not an operator. For details see Sinfo.CN.
5061 -- Change_Operator_Symbol_To_String_Literal.
5062
5063 -- N_Operator_Symbol
5064 -- Sloc points to literal
5065 -- Chars (Name1) contains the Name_Id for the operator symbol
5066 -- Strval (Str3) Id of string value. This is used if the operator
5067 -- symbol turns out to be a normal string after all.
5068 -- Entity (Node4-Sem)
5069 -- Associated_Node (Node4-Sem)
5070 -- Has_Private_View (Flag11-Sem) set in generic units.
5071 -- Etype (Node5-Sem)
5072
5073 -- Note: the Strval field may be set to No_String for generated
5074 -- operator symbols that are known not to be string literals
5075 -- semantically.
5076
5077 -----------------------------------
5078 -- 6.1 Defining Operator Symbol --
5079 -----------------------------------
5080
5081 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5082
5083 -- A defining operator symbol is an entity, which has additional
5084 -- fields depending on the setting of the Ekind field. These
5085 -- additional fields are defined (and access subprograms declared)
5086 -- in package Einfo.
5087
5088 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
5089 -- are deliberately layed out to match the layout of fields in an
5090 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5091 -- an operator symbol node into a defining operator symbol node.
5092 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5093 -- for further details.
5094
5095 -- N_Defining_Operator_Symbol
5096 -- Sloc points to literal
5097 -- Chars (Name1) contains the Name_Id for the operator symbol
5098 -- Next_Entity (Node2-Sem)
5099 -- Scope (Node3-Sem)
5100 -- Etype (Node5-Sem)
5101
5102 ----------------------------
5103 -- 6.1 Parameter Profile --
5104 ----------------------------
5105
5106 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5107
5108 ---------------------------------------
5109 -- 6.1 Parameter and Result Profile --
5110 ---------------------------------------
5111
5112 -- PARAMETER_AND_RESULT_PROFILE ::=
5113 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5114 -- | [FORMAL_PART] return ACCESS_DEFINITION
5115
5116 -- There is no explicit node in the tree for a parameter and result
5117 -- profile. Instead the information appears directly in the parent.
5118
5119 ----------------------
5120 -- 6.1 Formal Part --
5121 ----------------------
5122
5123 -- FORMAL_PART ::=
5124 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5125
5126 ----------------------------------
5127 -- 6.1 Parameter Specification --
5128 ----------------------------------
5129
5130 -- PARAMETER_SPECIFICATION ::=
5131 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5132 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
5133 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5134 -- [:= DEFAULT_EXPRESSION]
5135
5136 -- Although the syntax allows multiple identifiers in the list, the
5137 -- semantics is as though successive specifications were given with
5138 -- identical type definition and expression components. To simplify
5139 -- semantic processing, the parser represents a multiple declaration
5140 -- case as a sequence of single Specifications, using the More_Ids and
5141 -- Prev_Ids flags to preserve the original source form as described
5142 -- in the section on "Handling of Defining Identifier Lists".
5143
5144 -- ALIASED can only be present in Ada 2012 mode
5145
5146 -- N_Parameter_Specification
5147 -- Sloc points to first identifier
5148 -- Defining_Identifier (Node1)
5149 -- Aliased_Present (Flag4)
5150 -- In_Present (Flag15)
5151 -- Out_Present (Flag17)
5152 -- Null_Exclusion_Present (Flag11)
5153 -- Parameter_Type (Node2) subtype mark or access definition
5154 -- Expression (Node3) (set to Empty if no default expression present)
5155 -- Do_Accessibility_Check (Flag13-Sem)
5156 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5157 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5158 -- Default_Expression (Node5-Sem)
5159
5160 ---------------
5161 -- 6.1 Mode --
5162 ---------------
5163
5164 -- MODE ::= [in] | in out | out
5165
5166 -- There is no explicit node in the tree for the Mode. Instead the
5167 -- In_Present and Out_Present flags are set in the parent node to
5168 -- record the presence of keywords specifying the mode.
5169
5170 --------------------------
5171 -- 6.3 Subprogram Body --
5172 --------------------------
5173
5174 -- SUBPROGRAM_BODY ::=
5175 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5176 -- DECLARATIVE_PART
5177 -- begin
5178 -- HANDLED_SEQUENCE_OF_STATEMENTS
5179 -- end [DESIGNATOR];
5180
5181 -- N_Subprogram_Body
5182 -- Sloc points to FUNCTION or PROCEDURE
5183 -- Specification (Node1)
5184 -- Declarations (List2)
5185 -- Handled_Statement_Sequence (Node4)
5186 -- Activation_Chain_Entity (Node3-Sem)
5187 -- Corresponding_Spec (Node5-Sem)
5188 -- Acts_As_Spec (Flag4-Sem)
5189 -- Bad_Is_Detected (Flag15) used only by parser
5190 -- Do_Storage_Check (Flag17-Sem)
5191 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5192 -- Is_Entry_Barrier_Function (Flag8-Sem)
5193 -- Is_Task_Master (Flag5-Sem)
5194 -- Was_Originally_Stub (Flag13-Sem)
5195 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5196
5197 -------------------------
5198 -- Expression Function --
5199 -------------------------
5200
5201 -- This is an Ada 2012 extension, we put it here for now, to be labeled
5202 -- and put in its proper section when we know exactly where that is.
5203
5204 -- EXPRESSION_FUNCTION ::=
5205 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5206 -- [ASPECT_SPECIFICATIONS];
5207
5208 -- N_Expression_Function
5209 -- Sloc points to FUNCTION
5210 -- Specification (Node1)
5211 -- Expression (Node3)
5212 -- Corresponding_Spec (Node5-Sem)
5213
5214 -----------------------------------
5215 -- 6.4 Procedure Call Statement --
5216 -----------------------------------
5217
5218 -- PROCEDURE_CALL_STATEMENT ::=
5219 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5220
5221 -- Note: the reason that a procedure call has expression fields is that
5222 -- it semantically resembles an expression, e.g. overloading is allowed
5223 -- and a type is concocted for semantic processing purposes. Certain of
5224 -- these fields, such as Parens are not relevant, but it is easier to
5225 -- just supply all of them together.
5226
5227 -- N_Procedure_Call_Statement
5228 -- Sloc points to first token of name or prefix
5229 -- Name (Node2) stores name or prefix
5230 -- Parameter_Associations (List3) (set to No_List if no
5231 -- actual parameter part)
5232 -- First_Named_Actual (Node4-Sem)
5233 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5234 -- Do_Tag_Check (Flag13-Sem)
5235 -- No_Elaboration_Check (Flag14-Sem)
5236 -- ABE_Is_Certain (Flag18-Sem)
5237 -- plus fields for expression
5238
5239 -- If any IN parameter requires a range check, then the corresponding
5240 -- argument expression has the Do_Range_Check flag set, and the range
5241 -- check is done against the formal type. Note that this argument
5242 -- expression may appear directly in the Parameter_Associations list,
5243 -- or may be a descendent of an N_Parameter_Association node that
5244 -- appears in this list.
5245
5246 ------------------------
5247 -- 6.4 Function Call --
5248 ------------------------
5249
5250 -- FUNCTION_CALL ::=
5251 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5252
5253 -- Note: the parser may generate an indexed component node or simply
5254 -- a name node instead of a function call node. The semantic pass must
5255 -- correct this misidentification.
5256
5257 -- N_Function_Call
5258 -- Sloc points to first token of name or prefix
5259 -- Name (Node2) stores name or prefix
5260 -- Parameter_Associations (List3) (set to No_List if no
5261 -- actual parameter part)
5262 -- First_Named_Actual (Node4-Sem)
5263 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5264 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
5265 -- Do_Tag_Check (Flag13-Sem)
5266 -- No_Elaboration_Check (Flag14-Sem)
5267 -- ABE_Is_Certain (Flag18-Sem)
5268 -- plus fields for expression
5269
5270 --------------------------------
5271 -- 6.4 Actual Parameter Part --
5272 --------------------------------
5273
5274 -- ACTUAL_PARAMETER_PART ::=
5275 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5276
5277 --------------------------------
5278 -- 6.4 Parameter Association --
5279 --------------------------------
5280
5281 -- PARAMETER_ASSOCIATION ::=
5282 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5283
5284 -- Note: the N_Parameter_Association node is built only if a formal
5285 -- parameter selector name is present, otherwise the parameter
5286 -- association appears in the tree simply as the node for the
5287 -- explicit actual parameter.
5288
5289 -- N_Parameter_Association
5290 -- Sloc points to formal parameter
5291 -- Selector_Name (Node2) (always non-Empty)
5292 -- Explicit_Actual_Parameter (Node3)
5293 -- Next_Named_Actual (Node4-Sem)
5294 -- Is_Accessibility_Actual (Flag13-Sem)
5295
5296 ---------------------------
5297 -- 6.4 Actual Parameter --
5298 ---------------------------
5299
5300 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
5301
5302 ---------------------------
5303 -- 6.5 Return Statement --
5304 ---------------------------
5305
5306 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5307
5308 -- EXTENDED_RETURN_STATEMENT ::=
5309 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5310 -- [:= EXPRESSION] [do
5311 -- HANDLED_SEQUENCE_OF_STATEMENTS
5312 -- end return];
5313
5314 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5315
5316 -- The term "return statement" is defined in 6.5 to mean either a
5317 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5318 -- the use of this term, since it used to mean someting else in earlier
5319 -- versions of Ada.
5320
5321 -- N_Simple_Return_Statement
5322 -- Sloc points to RETURN
5323 -- Return_Statement_Entity (Node5-Sem)
5324 -- Expression (Node3) (set to Empty if no expression present)
5325 -- Storage_Pool (Node1-Sem)
5326 -- Procedure_To_Call (Node2-Sem)
5327 -- Do_Tag_Check (Flag13-Sem)
5328 -- By_Ref (Flag5-Sem)
5329 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5330
5331 -- Note: Return_Statement_Entity points to an E_Return_Statement
5332
5333 -- If a range check is required, then Do_Range_Check is set on the
5334 -- Expression. The check is against the return subtype of the function.
5335
5336 -- N_Extended_Return_Statement
5337 -- Sloc points to RETURN
5338 -- Return_Statement_Entity (Node5-Sem)
5339 -- Return_Object_Declarations (List3)
5340 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5341 -- Storage_Pool (Node1-Sem)
5342 -- Procedure_To_Call (Node2-Sem)
5343 -- Do_Tag_Check (Flag13-Sem)
5344 -- By_Ref (Flag5-Sem)
5345
5346 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5347
5348 -- Note that Return_Object_Declarations is a list containing the
5349 -- N_Object_Declaration -- see comment on this field above.
5350
5351 -- The declared object will have Is_Return_Object = True.
5352
5353 -- There is no such syntactic category as return_object_declaration
5354 -- in the RM. Return_Object_Declarations represents this portion of
5355 -- the syntax for EXTENDED_RETURN_STATEMENT:
5356 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5357 -- [:= EXPRESSION]
5358
5359 -- There are two entities associated with an extended_return_statement:
5360 -- the Return_Statement_Entity represents the statement itself,
5361 -- and the Defining_Identifier of the Object_Declaration in
5362 -- Return_Object_Declarations represents the object being
5363 -- returned. N_Simple_Return_Statement has only the former.
5364
5365 ------------------------------
5366 -- 7.1 Package Declaration --
5367 ------------------------------
5368
5369 -- PACKAGE_DECLARATION ::=
5370 -- PACKAGE_SPECIFICATION;
5371
5372 -- Note: the activation chain entity for a package spec is used for
5373 -- all tasks declared in the package spec, or in the package body.
5374
5375 -- N_Package_Declaration
5376 -- Sloc points to PACKAGE
5377 -- Specification (Node1)
5378 -- Corresponding_Body (Node5-Sem)
5379 -- Parent_Spec (Node4-Sem)
5380 -- Activation_Chain_Entity (Node3-Sem)
5381
5382 --------------------------------
5383 -- 7.1 Package Specification --
5384 --------------------------------
5385
5386 -- PACKAGE_SPECIFICATION ::=
5387 -- package DEFINING_PROGRAM_UNIT_NAME
5388 -- [ASPECT_SPECIFICATIONS]
5389 -- is
5390 -- {BASIC_DECLARATIVE_ITEM}
5391 -- [private
5392 -- {BASIC_DECLARATIVE_ITEM}]
5393 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5394
5395 -- N_Package_Specification
5396 -- Sloc points to PACKAGE
5397 -- Defining_Unit_Name (Node1)
5398 -- Visible_Declarations (List2)
5399 -- Private_Declarations (List3) (set to No_List if no private
5400 -- part present)
5401 -- End_Label (Node4)
5402 -- Generic_Parent (Node5-Sem)
5403 -- Limited_View_Installed (Flag18-Sem)
5404
5405 -----------------------
5406 -- 7.1 Package Body --
5407 -----------------------
5408
5409 -- PACKAGE_BODY ::=
5410 -- package body DEFINING_PROGRAM_UNIT_NAME
5411 -- [ASPECT_SPECIFICATIONS]
5412 -- is
5413 -- DECLARATIVE_PART
5414 -- [begin
5415 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5416 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5417
5418 -- N_Package_Body
5419 -- Sloc points to PACKAGE
5420 -- Defining_Unit_Name (Node1)
5421 -- Declarations (List2)
5422 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5423 -- Corresponding_Spec (Node5-Sem)
5424 -- Was_Originally_Stub (Flag13-Sem)
5425
5426 -- Note: if a source level package does not contain a handled sequence
5427 -- of statements, then the parser supplies a dummy one with a null
5428 -- sequence of statements. Comes_From_Source will be False in this
5429 -- constructed sequence. The reason we need this is for the End_Label
5430 -- field in the HSS.
5431
5432 -----------------------------------
5433 -- 7.4 Private Type Declaration --
5434 -----------------------------------
5435
5436 -- PRIVATE_TYPE_DECLARATION ::=
5437 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5438 -- is [[abstract] tagged] [limited] private
5439 -- [ASPECT_SPECIFICATIONS];
5440
5441 -- Note: TAGGED is not permitted in Ada 83 mode
5442
5443 -- N_Private_Type_Declaration
5444 -- Sloc points to TYPE
5445 -- Defining_Identifier (Node1)
5446 -- Discriminant_Specifications (List4) (set to No_List if no
5447 -- discriminant part)
5448 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5449 -- Abstract_Present (Flag4)
5450 -- Tagged_Present (Flag15)
5451 -- Limited_Present (Flag17)
5452
5453 ----------------------------------------
5454 -- 7.4 Private Extension Declaration --
5455 ----------------------------------------
5456
5457 -- PRIVATE_EXTENSION_DECLARATION ::=
5458 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5459 -- [abstract] [limited | synchronized]
5460 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5461 -- with private [ASPECT_SPECIFICATIONS];
5462
5463 -- Note: LIMITED, and private extension declarations are not allowed
5464 -- in Ada 83 mode.
5465
5466 -- N_Private_Extension_Declaration
5467 -- Sloc points to TYPE
5468 -- Defining_Identifier (Node1)
5469 -- Uninitialized_Variable (Node3-Sem)
5470 -- Discriminant_Specifications (List4) (set to No_List if no
5471 -- discriminant part)
5472 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5473 -- Abstract_Present (Flag4)
5474 -- Limited_Present (Flag17)
5475 -- Synchronized_Present (Flag7)
5476 -- Subtype_Indication (Node5)
5477 -- Interface_List (List2) (set to No_List if none)
5478
5479 ---------------------
5480 -- 8.4 Use Clause --
5481 ---------------------
5482
5483 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5484
5485 -----------------------------
5486 -- 8.4 Use Package Clause --
5487 -----------------------------
5488
5489 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5490
5491 -- N_Use_Package_Clause
5492 -- Sloc points to USE
5493 -- Names (List2)
5494 -- Next_Use_Clause (Node3-Sem)
5495 -- Hidden_By_Use_Clause (Elist4-Sem)
5496
5497 --------------------------
5498 -- 8.4 Use Type Clause --
5499 --------------------------
5500
5501 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5502
5503 -- Note: use type clause is not permitted in Ada 83 mode
5504
5505 -- Note: the ALL keyword can appear only in Ada 2012 mode
5506
5507 -- N_Use_Type_Clause
5508 -- Sloc points to USE
5509 -- Subtype_Marks (List2)
5510 -- Next_Use_Clause (Node3-Sem)
5511 -- Hidden_By_Use_Clause (Elist4-Sem)
5512 -- Used_Operations (Elist5-Sem)
5513 -- All_Present (Flag15)
5514
5515 -------------------------------
5516 -- 8.5 Renaming Declaration --
5517 -------------------------------
5518
5519 -- RENAMING_DECLARATION ::=
5520 -- OBJECT_RENAMING_DECLARATION
5521 -- | EXCEPTION_RENAMING_DECLARATION
5522 -- | PACKAGE_RENAMING_DECLARATION
5523 -- | SUBPROGRAM_RENAMING_DECLARATION
5524 -- | GENERIC_RENAMING_DECLARATION
5525
5526 --------------------------------------
5527 -- 8.5 Object Renaming Declaration --
5528 --------------------------------------
5529
5530 -- OBJECT_RENAMING_DECLARATION ::=
5531 -- DEFINING_IDENTIFIER :
5532 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5533 -- [ASPECT_SPECIFICATIONS];
5534 -- | DEFINING_IDENTIFIER :
5535 -- ACCESS_DEFINITION renames object_NAME
5536 -- [ASPECT_SPECIFICATIONS];
5537
5538 -- Note: Access_Definition is an optional field that gives support to
5539 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5540 -- Subtype_Indication field or else the Access_Definition field.
5541
5542 -- N_Object_Renaming_Declaration
5543 -- Sloc points to first identifier
5544 -- Defining_Identifier (Node1)
5545 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5546 -- Subtype_Mark (Node4) (set to Empty if not present)
5547 -- Access_Definition (Node3) (set to Empty if not present)
5548 -- Name (Node2)
5549 -- Corresponding_Generic_Association (Node5-Sem)
5550
5551 -----------------------------------------
5552 -- 8.5 Exception Renaming Declaration --
5553 -----------------------------------------
5554
5555 -- EXCEPTION_RENAMING_DECLARATION ::=
5556 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5557 -- [ASPECT_SPECIFICATIONS];
5558
5559 -- N_Exception_Renaming_Declaration
5560 -- Sloc points to first identifier
5561 -- Defining_Identifier (Node1)
5562 -- Name (Node2)
5563
5564 ---------------------------------------
5565 -- 8.5 Package Renaming Declaration --
5566 ---------------------------------------
5567
5568 -- PACKAGE_RENAMING_DECLARATION ::=
5569 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5570 -- [ASPECT_SPECIFICATIONS];
5571
5572 -- N_Package_Renaming_Declaration
5573 -- Sloc points to PACKAGE
5574 -- Defining_Unit_Name (Node1)
5575 -- Name (Node2)
5576 -- Parent_Spec (Node4-Sem)
5577
5578 ------------------------------------------
5579 -- 8.5 Subprogram Renaming Declaration --
5580 ------------------------------------------
5581
5582 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5583 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5584 -- [ASPECT_SPECIFICATIONS];
5585
5586 -- N_Subprogram_Renaming_Declaration
5587 -- Sloc points to RENAMES
5588 -- Specification (Node1)
5589 -- Name (Node2)
5590 -- Parent_Spec (Node4-Sem)
5591 -- Corresponding_Spec (Node5-Sem)
5592 -- Corresponding_Formal_Spec (Node3-Sem)
5593 -- From_Default (Flag6-Sem)
5594
5595 -----------------------------------------
5596 -- 8.5.5 Generic Renaming Declaration --
5597 -----------------------------------------
5598
5599 -- GENERIC_RENAMING_DECLARATION ::=
5600 -- generic package DEFINING_PROGRAM_UNIT_NAME
5601 -- renames generic_package_NAME
5602 -- [ASPECT_SPECIFICATIONS];
5603 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5604 -- renames generic_procedure_NAME
5605 -- [ASPECT_SPECIFICATIONS];
5606 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5607 -- renames generic_function_NAME
5608 -- [ASPECT_SPECIFICATIONS];
5609
5610 -- N_Generic_Package_Renaming_Declaration
5611 -- Sloc points to GENERIC
5612 -- Defining_Unit_Name (Node1)
5613 -- Name (Node2)
5614 -- Parent_Spec (Node4-Sem)
5615
5616 -- N_Generic_Procedure_Renaming_Declaration
5617 -- Sloc points to GENERIC
5618 -- Defining_Unit_Name (Node1)
5619 -- Name (Node2)
5620 -- Parent_Spec (Node4-Sem)
5621
5622 -- N_Generic_Function_Renaming_Declaration
5623 -- Sloc points to GENERIC
5624 -- Defining_Unit_Name (Node1)
5625 -- Name (Node2)
5626 -- Parent_Spec (Node4-Sem)
5627
5628 --------------------------------
5629 -- 9.1 Task Type Declaration --
5630 --------------------------------
5631
5632 -- TASK_TYPE_DECLARATION ::=
5633 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5634 -- [ASPECT_SPECIFICATIONS]
5635 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5636
5637 -- N_Task_Type_Declaration
5638 -- Sloc points to TASK
5639 -- Defining_Identifier (Node1)
5640 -- Discriminant_Specifications (List4) (set to No_List if no
5641 -- discriminant part)
5642 -- Interface_List (List2) (set to No_List if none)
5643 -- Task_Definition (Node3) (set to Empty if not present)
5644 -- Corresponding_Body (Node5-Sem)
5645
5646 ----------------------------------
5647 -- 9.1 Single Task Declaration --
5648 ----------------------------------
5649
5650 -- SINGLE_TASK_DECLARATION ::=
5651 -- task DEFINING_IDENTIFIER
5652 -- [ASPECT_SPECIFICATIONS]
5653 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5654
5655 -- N_Single_Task_Declaration
5656 -- Sloc points to TASK
5657 -- Defining_Identifier (Node1)
5658 -- Interface_List (List2) (set to No_List if none)
5659 -- Task_Definition (Node3) (set to Empty if not present)
5660
5661 --------------------------
5662 -- 9.1 Task Definition --
5663 --------------------------
5664
5665 -- TASK_DEFINITION ::=
5666 -- {TASK_ITEM}
5667 -- [private
5668 -- {TASK_ITEM}]
5669 -- end [task_IDENTIFIER]
5670
5671 -- Note: as a result of semantic analysis, the list of task items can
5672 -- include implicit type declarations resulting from entry families.
5673
5674 -- N_Task_Definition
5675 -- Sloc points to first token of task definition
5676 -- Visible_Declarations (List2)
5677 -- Private_Declarations (List3) (set to No_List if no private part)
5678 -- End_Label (Node4)
5679 -- Has_Storage_Size_Pragma (Flag5-Sem)
5680 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5681
5682 --------------------
5683 -- 9.1 Task Item --
5684 --------------------
5685
5686 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5687
5688 --------------------
5689 -- 9.1 Task Body --
5690 --------------------
5691
5692 -- TASK_BODY ::=
5693 -- task body task_DEFINING_IDENTIFIER
5694 -- [ASPECT_SPECIFICATIONS]
5695 -- is
5696 -- DECLARATIVE_PART
5697 -- begin
5698 -- HANDLED_SEQUENCE_OF_STATEMENTS
5699 -- end [task_IDENTIFIER];
5700
5701 -- Gigi restriction: This node never appears
5702
5703 -- N_Task_Body
5704 -- Sloc points to TASK
5705 -- Defining_Identifier (Node1)
5706 -- Declarations (List2)
5707 -- Handled_Statement_Sequence (Node4)
5708 -- Is_Task_Master (Flag5-Sem)
5709 -- Activation_Chain_Entity (Node3-Sem)
5710 -- Corresponding_Spec (Node5-Sem)
5711 -- Was_Originally_Stub (Flag13-Sem)
5712
5713 -------------------------------------
5714 -- 9.4 Protected Type Declaration --
5715 -------------------------------------
5716
5717 -- PROTECTED_TYPE_DECLARATION ::=
5718 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5719 -- [ASPECT_SPECIFICATIONS]
5720 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5721
5722 -- Note: protected type declarations are not permitted in Ada 83 mode
5723
5724 -- N_Protected_Type_Declaration
5725 -- Sloc points to PROTECTED
5726 -- Defining_Identifier (Node1)
5727 -- Discriminant_Specifications (List4) (set to No_List if no
5728 -- discriminant part)
5729 -- Interface_List (List2) (set to No_List if none)
5730 -- Protected_Definition (Node3)
5731 -- Corresponding_Body (Node5-Sem)
5732
5733 ---------------------------------------
5734 -- 9.4 Single Protected Declaration --
5735 ---------------------------------------
5736
5737 -- SINGLE_PROTECTED_DECLARATION ::=
5738 -- protected DEFINING_IDENTIFIER
5739 -- [ASPECT_SPECIFICATIONS]
5740 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5741
5742 -- Note: single protected declarations are not allowed in Ada 83 mode
5743
5744 -- N_Single_Protected_Declaration
5745 -- Sloc points to PROTECTED
5746 -- Defining_Identifier (Node1)
5747 -- Interface_List (List2) (set to No_List if none)
5748 -- Protected_Definition (Node3)
5749
5750 -------------------------------
5751 -- 9.4 Protected Definition --
5752 -------------------------------
5753
5754 -- PROTECTED_DEFINITION ::=
5755 -- {PROTECTED_OPERATION_DECLARATION}
5756 -- [private
5757 -- {PROTECTED_ELEMENT_DECLARATION}]
5758 -- end [protected_IDENTIFIER]
5759
5760 -- N_Protected_Definition
5761 -- Sloc points to first token of protected definition
5762 -- Visible_Declarations (List2)
5763 -- Private_Declarations (List3) (set to No_List if no private part)
5764 -- End_Label (Node4)
5765
5766 ------------------------------------------
5767 -- 9.4 Protected Operation Declaration --
5768 ------------------------------------------
5769
5770 -- PROTECTED_OPERATION_DECLARATION ::=
5771 -- SUBPROGRAM_DECLARATION
5772 -- | ENTRY_DECLARATION
5773 -- | REPRESENTATION_CLAUSE
5774
5775 ----------------------------------------
5776 -- 9.4 Protected Element Declaration --
5777 ----------------------------------------
5778
5779 -- PROTECTED_ELEMENT_DECLARATION ::=
5780 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5781
5782 -------------------------
5783 -- 9.4 Protected Body --
5784 -------------------------
5785
5786 -- PROTECTED_BODY ::=
5787 -- protected body DEFINING_IDENTIFIER
5788 -- [ASPECT_SPECIFICATIONS];
5789 -- is
5790 -- {PROTECTED_OPERATION_ITEM}
5791 -- end [protected_IDENTIFIER];
5792
5793 -- Note: protected bodies are not allowed in Ada 83 mode
5794
5795 -- Gigi restriction: This node never appears
5796
5797 -- N_Protected_Body
5798 -- Sloc points to PROTECTED
5799 -- Defining_Identifier (Node1)
5800 -- Declarations (List2) protected operation items (and pragmas)
5801 -- End_Label (Node4)
5802 -- Corresponding_Spec (Node5-Sem)
5803 -- Was_Originally_Stub (Flag13-Sem)
5804
5805 -----------------------------------
5806 -- 9.4 Protected Operation Item --
5807 -----------------------------------
5808
5809 -- PROTECTED_OPERATION_ITEM ::=
5810 -- SUBPROGRAM_DECLARATION
5811 -- | SUBPROGRAM_BODY
5812 -- | ENTRY_BODY
5813 -- | REPRESENTATION_CLAUSE
5814
5815 ------------------------------
5816 -- 9.5.2 Entry Declaration --
5817 ------------------------------
5818
5819 -- ENTRY_DECLARATION ::=
5820 -- [[not] overriding]
5821 -- entry DEFINING_IDENTIFIER
5822 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
5823 -- [ASPECT_SPECIFICATIONS];
5824
5825 -- N_Entry_Declaration
5826 -- Sloc points to ENTRY
5827 -- Defining_Identifier (Node1)
5828 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5829 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5830 -- Corresponding_Body (Node5-Sem)
5831 -- Must_Override (Flag14) set if overriding indicator present
5832 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5833
5834 -- Note: overriding indicator is an Ada 2005 feature
5835
5836 -----------------------------
5837 -- 9.5.2 Accept statement --
5838 -----------------------------
5839
5840 -- ACCEPT_STATEMENT ::=
5841 -- accept entry_DIRECT_NAME
5842 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5843 -- HANDLED_SEQUENCE_OF_STATEMENTS
5844 -- end [entry_IDENTIFIER]];
5845
5846 -- Gigi restriction: This node never appears
5847
5848 -- Note: there are no explicit declarations allowed in an accept
5849 -- statement. However, the implicit declarations for any statement
5850 -- identifiers (labels and block/loop identifiers) are declarations
5851 -- that belong logically to the accept statement, and that is why
5852 -- there is a Declarations field in this node.
5853
5854 -- N_Accept_Statement
5855 -- Sloc points to ACCEPT
5856 -- Entry_Direct_Name (Node1)
5857 -- Entry_Index (Node5) (set to Empty if not present)
5858 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5859 -- Handled_Statement_Sequence (Node4)
5860 -- Declarations (List2) (set to No_List if no declarations)
5861
5862 ------------------------
5863 -- 9.5.2 Entry Index --
5864 ------------------------
5865
5866 -- ENTRY_INDEX ::= EXPRESSION
5867
5868 -----------------------
5869 -- 9.5.2 Entry Body --
5870 -----------------------
5871
5872 -- ENTRY_BODY ::=
5873 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5874 -- DECLARATIVE_PART
5875 -- begin
5876 -- HANDLED_SEQUENCE_OF_STATEMENTS
5877 -- end [entry_IDENTIFIER];
5878
5879 -- ENTRY_BARRIER ::= when CONDITION
5880
5881 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5882 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5883 -- too full (it would otherwise have too many fields)
5884
5885 -- Gigi restriction: This node never appears
5886
5887 -- N_Entry_Body
5888 -- Sloc points to ENTRY
5889 -- Defining_Identifier (Node1)
5890 -- Entry_Body_Formal_Part (Node5)
5891 -- Declarations (List2)
5892 -- Handled_Statement_Sequence (Node4)
5893 -- Activation_Chain_Entity (Node3-Sem)
5894
5895 -----------------------------------
5896 -- 9.5.2 Entry Body Formal Part --
5897 -----------------------------------
5898
5899 -- ENTRY_BODY_FORMAL_PART ::=
5900 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5901
5902 -- Note that an entry body formal part node is present even if it is
5903 -- empty. This reflects the grammar, in which it is the components of
5904 -- the entry body formal part that are optional, not the entry body
5905 -- formal part itself. Also this means that the barrier condition
5906 -- always has somewhere to be stored.
5907
5908 -- Gigi restriction: This node never appears
5909
5910 -- N_Entry_Body_Formal_Part
5911 -- Sloc points to first token
5912 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5913 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5914 -- Condition (Node1) from entry barrier of entry body
5915
5916 --------------------------
5917 -- 9.5.2 Entry Barrier --
5918 --------------------------
5919
5920 -- ENTRY_BARRIER ::= when CONDITION
5921
5922 --------------------------------------
5923 -- 9.5.2 Entry Index Specification --
5924 --------------------------------------
5925
5926 -- ENTRY_INDEX_SPECIFICATION ::=
5927 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5928
5929 -- Gigi restriction: This node never appears
5930
5931 -- N_Entry_Index_Specification
5932 -- Sloc points to FOR
5933 -- Defining_Identifier (Node1)
5934 -- Discrete_Subtype_Definition (Node4)
5935
5936 ---------------------------------
5937 -- 9.5.3 Entry Call Statement --
5938 ---------------------------------
5939
5940 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5941
5942 -- The parser may generate a procedure call for this construct. The
5943 -- semantic pass must correct this misidentification where needed.
5944
5945 -- Gigi restriction: This node never appears
5946
5947 -- N_Entry_Call_Statement
5948 -- Sloc points to first token of name
5949 -- Name (Node2)
5950 -- Parameter_Associations (List3) (set to No_List if no
5951 -- actual parameter part)
5952 -- First_Named_Actual (Node4-Sem)
5953
5954 ------------------------------
5955 -- 9.5.4 Requeue Statement --
5956 ------------------------------
5957
5958 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5959
5960 -- Note: requeue statements are not permitted in Ada 83 mode
5961
5962 -- Gigi restriction: This node never appears
5963
5964 -- N_Requeue_Statement
5965 -- Sloc points to REQUEUE
5966 -- Name (Node2)
5967 -- Abort_Present (Flag15)
5968
5969 --------------------------
5970 -- 9.6 Delay Statement --
5971 --------------------------
5972
5973 -- DELAY_STATEMENT ::=
5974 -- DELAY_UNTIL_STATEMENT
5975 -- | DELAY_RELATIVE_STATEMENT
5976
5977 --------------------------------
5978 -- 9.6 Delay Until Statement --
5979 --------------------------------
5980
5981 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5982
5983 -- Note: delay until statements are not permitted in Ada 83 mode
5984
5985 -- Gigi restriction: This node never appears
5986
5987 -- N_Delay_Until_Statement
5988 -- Sloc points to DELAY
5989 -- Expression (Node3)
5990
5991 -----------------------------------
5992 -- 9.6 Delay Relative Statement --
5993 -----------------------------------
5994
5995 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5996
5997 -- Gigi restriction: This node never appears
5998
5999 -- N_Delay_Relative_Statement
6000 -- Sloc points to DELAY
6001 -- Expression (Node3)
6002
6003 ---------------------------
6004 -- 9.7 Select Statement --
6005 ---------------------------
6006
6007 -- SELECT_STATEMENT ::=
6008 -- SELECTIVE_ACCEPT
6009 -- | TIMED_ENTRY_CALL
6010 -- | CONDITIONAL_ENTRY_CALL
6011 -- | ASYNCHRONOUS_SELECT
6012
6013 -----------------------------
6014 -- 9.7.1 Selective Accept --
6015 -----------------------------
6016
6017 -- SELECTIVE_ACCEPT ::=
6018 -- select
6019 -- [GUARD]
6020 -- SELECT_ALTERNATIVE
6021 -- {or
6022 -- [GUARD]
6023 -- SELECT_ALTERNATIVE}
6024 -- [else
6025 -- SEQUENCE_OF_STATEMENTS]
6026 -- end select;
6027
6028 -- Gigi restriction: This node never appears
6029
6030 -- Note: the guard expression, if present, appears in the node for
6031 -- the select alternative.
6032
6033 -- N_Selective_Accept
6034 -- Sloc points to SELECT
6035 -- Select_Alternatives (List1)
6036 -- Else_Statements (List4) (set to No_List if no else part)
6037
6038 ------------------
6039 -- 9.7.1 Guard --
6040 ------------------
6041
6042 -- GUARD ::= when CONDITION =>
6043
6044 -- As noted above, the CONDITION that is part of a GUARD is included
6045 -- in the node for the select alternative for convenience.
6046
6047 -------------------------------
6048 -- 9.7.1 Select Alternative --
6049 -------------------------------
6050
6051 -- SELECT_ALTERNATIVE ::=
6052 -- ACCEPT_ALTERNATIVE
6053 -- | DELAY_ALTERNATIVE
6054 -- | TERMINATE_ALTERNATIVE
6055
6056 -------------------------------
6057 -- 9.7.1 Accept Alternative --
6058 -------------------------------
6059
6060 -- ACCEPT_ALTERNATIVE ::=
6061 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
6062
6063 -- Gigi restriction: This node never appears
6064
6065 -- N_Accept_Alternative
6066 -- Sloc points to ACCEPT
6067 -- Accept_Statement (Node2)
6068 -- Condition (Node1) from the guard (set to Empty if no guard present)
6069 -- Statements (List3) (set to Empty_List if no statements)
6070 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6071 -- Accept_Handler_Records (List5-Sem)
6072
6073 ------------------------------
6074 -- 9.7.1 Delay Alternative --
6075 ------------------------------
6076
6077 -- DELAY_ALTERNATIVE ::=
6078 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6079
6080 -- Gigi restriction: This node never appears
6081
6082 -- N_Delay_Alternative
6083 -- Sloc points to DELAY
6084 -- Delay_Statement (Node2)
6085 -- Condition (Node1) from the guard (set to Empty if no guard present)
6086 -- Statements (List3) (set to Empty_List if no statements)
6087 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6088
6089 ----------------------------------
6090 -- 9.7.1 Terminate Alternative --
6091 ----------------------------------
6092
6093 -- TERMINATE_ALTERNATIVE ::= terminate;
6094
6095 -- Gigi restriction: This node never appears
6096
6097 -- N_Terminate_Alternative
6098 -- Sloc points to TERMINATE
6099 -- Condition (Node1) from the guard (set to Empty if no guard present)
6100 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6101 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6102
6103 -----------------------------
6104 -- 9.7.2 Timed Entry Call --
6105 -----------------------------
6106
6107 -- TIMED_ENTRY_CALL ::=
6108 -- select
6109 -- ENTRY_CALL_ALTERNATIVE
6110 -- or
6111 -- DELAY_ALTERNATIVE
6112 -- end select;
6113
6114 -- Gigi restriction: This node never appears
6115
6116 -- N_Timed_Entry_Call
6117 -- Sloc points to SELECT
6118 -- Entry_Call_Alternative (Node1)
6119 -- Delay_Alternative (Node4)
6120
6121 -----------------------------------
6122 -- 9.7.2 Entry Call Alternative --
6123 -----------------------------------
6124
6125 -- ENTRY_CALL_ALTERNATIVE ::=
6126 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6127
6128 -- PROCEDURE_OR_ENTRY_CALL ::=
6129 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6130
6131 -- Gigi restriction: This node never appears
6132
6133 -- N_Entry_Call_Alternative
6134 -- Sloc points to first token of entry call statement
6135 -- Entry_Call_Statement (Node1)
6136 -- Statements (List3) (set to Empty_List if no statements)
6137 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6138
6139 -----------------------------------
6140 -- 9.7.3 Conditional Entry Call --
6141 -----------------------------------
6142
6143 -- CONDITIONAL_ENTRY_CALL ::=
6144 -- select
6145 -- ENTRY_CALL_ALTERNATIVE
6146 -- else
6147 -- SEQUENCE_OF_STATEMENTS
6148 -- end select;
6149
6150 -- Gigi restriction: This node never appears
6151
6152 -- N_Conditional_Entry_Call
6153 -- Sloc points to SELECT
6154 -- Entry_Call_Alternative (Node1)
6155 -- Else_Statements (List4)
6156
6157 --------------------------------
6158 -- 9.7.4 Asynchronous Select --
6159 --------------------------------
6160
6161 -- ASYNCHRONOUS_SELECT ::=
6162 -- select
6163 -- TRIGGERING_ALTERNATIVE
6164 -- then abort
6165 -- ABORTABLE_PART
6166 -- end select;
6167
6168 -- Note: asynchronous select is not permitted in Ada 83 mode
6169
6170 -- Gigi restriction: This node never appears
6171
6172 -- N_Asynchronous_Select
6173 -- Sloc points to SELECT
6174 -- Triggering_Alternative (Node1)
6175 -- Abortable_Part (Node2)
6176
6177 -----------------------------------
6178 -- 9.7.4 Triggering Alternative --
6179 -----------------------------------
6180
6181 -- TRIGGERING_ALTERNATIVE ::=
6182 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6183
6184 -- Gigi restriction: This node never appears
6185
6186 -- N_Triggering_Alternative
6187 -- Sloc points to first token of triggering statement
6188 -- Triggering_Statement (Node1)
6189 -- Statements (List3) (set to Empty_List if no statements)
6190 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6191
6192 ---------------------------------
6193 -- 9.7.4 Triggering Statement --
6194 ---------------------------------
6195
6196 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6197
6198 ---------------------------
6199 -- 9.7.4 Abortable Part --
6200 ---------------------------
6201
6202 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6203
6204 -- Gigi restriction: This node never appears
6205
6206 -- N_Abortable_Part
6207 -- Sloc points to ABORT
6208 -- Statements (List3)
6209
6210 --------------------------
6211 -- 9.8 Abort Statement --
6212 --------------------------
6213
6214 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6215
6216 -- Gigi restriction: This node never appears
6217
6218 -- N_Abort_Statement
6219 -- Sloc points to ABORT
6220 -- Names (List2)
6221
6222 -------------------------
6223 -- 10.1.1 Compilation --
6224 -------------------------
6225
6226 -- COMPILATION ::= {COMPILATION_UNIT}
6227
6228 -- There is no explicit node in the tree for a compilation, since in
6229 -- general the compiler is processing only a single compilation unit
6230 -- at a time. It is possible to parse multiple units in syntax check
6231 -- only mode, but the trees are discarded in that case.
6232
6233 ------------------------------
6234 -- 10.1.1 Compilation Unit --
6235 ------------------------------
6236
6237 -- COMPILATION_UNIT ::=
6238 -- CONTEXT_CLAUSE LIBRARY_ITEM
6239 -- | CONTEXT_CLAUSE SUBUNIT
6240
6241 -- The N_Compilation_Unit node itself represents the above syntax.
6242 -- However, there are two additional items not reflected in the above
6243 -- syntax. First we have the global declarations that are added by the
6244 -- code generator. These are outer level declarations (so they cannot
6245 -- be represented as being inside the units). An example is the wrapper
6246 -- subprograms that are created to do ABE checking. As always a list of
6247 -- declarations can contain actions as well (i.e. statements), and such
6248 -- statements are executed as part of the elaboration of the unit. Note
6249 -- that all such declarations are elaborated before the library unit.
6250
6251 -- Similarly, certain actions need to be elaborated at the completion
6252 -- of elaboration of the library unit (notably the statement that sets
6253 -- the Boolean flag indicating that elaboration is complete).
6254
6255 -- The third item not reflected in the syntax is pragmas that appear
6256 -- after the compilation unit. As always pragmas are a problem since
6257 -- they are not part of the formal syntax, but can be stuck into the
6258 -- source following a set of ad hoc rules, and we have to find an ad
6259 -- hoc way of sticking them into the tree. For pragmas that appear
6260 -- before the library unit, we just consider them to be part of the
6261 -- context clause, and pragmas can appear in the Context_Items list
6262 -- of the compilation unit. However, pragmas can also appear after
6263 -- the library item.
6264
6265 -- To deal with all these problems, we create an auxiliary node for
6266 -- a compilation unit, referenced from the N_Compilation_Unit node,
6267 -- that contains these items.
6268
6269 -- N_Compilation_Unit
6270 -- Sloc points to first token of defining unit name
6271 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6272 -- Context_Items (List1) context items and pragmas preceding unit
6273 -- Private_Present (Flag15) set if library unit has private keyword
6274 -- Unit (Node2) library item or subunit
6275 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6276 -- Has_No_Elaboration_Code (Flag17-Sem)
6277 -- Body_Required (Flag13-Sem) set for spec if body is required
6278 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6279 -- Context_Pending (Flag16-Sem)
6280 -- First_Inlined_Subprogram (Node3-Sem)
6281 -- Has_Pragma_Suppress_All (Flag14-Sem)
6282
6283 -- N_Compilation_Unit_Aux
6284 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6285 -- Declarations (List2) (set to No_List if no global declarations)
6286 -- Actions (List1) (set to No_List if no actions)
6287 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6288 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6289 -- Default_Storage_Pool (Node3-Sem)
6290
6291 --------------------------
6292 -- 10.1.1 Library Item --
6293 --------------------------
6294
6295 -- LIBRARY_ITEM ::=
6296 -- [private] LIBRARY_UNIT_DECLARATION
6297 -- | LIBRARY_UNIT_BODY
6298 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6299
6300 -- Note: PRIVATE is not allowed in Ada 83 mode
6301
6302 -- There is no explicit node in the tree for library item, instead
6303 -- the declaration or body, and the flag for private if present,
6304 -- appear in the N_Compilation_Unit node.
6305
6306 --------------------------------------
6307 -- 10.1.1 Library Unit Declaration --
6308 --------------------------------------
6309
6310 -- LIBRARY_UNIT_DECLARATION ::=
6311 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6312 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6313
6314 -----------------------------------------------
6315 -- 10.1.1 Library Unit Renaming Declaration --
6316 -----------------------------------------------
6317
6318 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6319 -- PACKAGE_RENAMING_DECLARATION
6320 -- | GENERIC_RENAMING_DECLARATION
6321 -- | SUBPROGRAM_RENAMING_DECLARATION
6322
6323 -------------------------------
6324 -- 10.1.1 Library unit body --
6325 -------------------------------
6326
6327 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6328
6329 ------------------------------
6330 -- 10.1.1 Parent Unit Name --
6331 ------------------------------
6332
6333 -- PARENT_UNIT_NAME ::= NAME
6334
6335 ----------------------------
6336 -- 10.1.2 Context clause --
6337 ----------------------------
6338
6339 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6340
6341 -- The context clause can include pragmas, and any pragmas that appear
6342 -- before the context clause proper (i.e. all configuration pragmas,
6343 -- also appear at the front of this list).
6344
6345 --------------------------
6346 -- 10.1.2 Context_Item --
6347 --------------------------
6348
6349 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6350
6351 -------------------------
6352 -- 10.1.2 With clause --
6353 -------------------------
6354
6355 -- WITH_CLAUSE ::=
6356 -- with library_unit_NAME {,library_unit_NAME};
6357
6358 -- A separate With clause is built for each name, so that we have
6359 -- a Corresponding_Spec field for each with'ed spec. The flags
6360 -- First_Name and Last_Name are used to reconstruct the exact
6361 -- source form. When a list of names appears in one with clause,
6362 -- the first name in the list has First_Name set, and the last
6363 -- has Last_Name set. If the with clause has only one name, then
6364 -- both of the flags First_Name and Last_Name are set in this name.
6365
6366 -- Note: in the case of implicit with's that are installed by the
6367 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6368 -- set to Standard_Location, but it is incorrect to test the Sloc
6369 -- to find out if a with clause is implicit, test the flag instead.
6370
6371 -- N_With_Clause
6372 -- Sloc points to first token of library unit name
6373 -- Withed_Body (Node1-Sem)
6374 -- Name (Node2)
6375 -- Next_Implicit_With (Node3-Sem)
6376 -- Library_Unit (Node4-Sem)
6377 -- Corresponding_Spec (Node5-Sem)
6378 -- First_Name (Flag5) (set to True if first name or only one name)
6379 -- Last_Name (Flag6) (set to True if last name or only one name)
6380 -- Context_Installed (Flag13-Sem)
6381 -- Elaborate_Present (Flag4-Sem)
6382 -- Elaborate_All_Present (Flag14-Sem)
6383 -- Elaborate_All_Desirable (Flag9-Sem)
6384 -- Elaborate_Desirable (Flag11-Sem)
6385 -- Private_Present (Flag15) set if with_clause has private keyword
6386 -- Implicit_With (Flag16-Sem)
6387 -- Implicit_With_From_Instantiation (Flag12-Sem)
6388 -- Limited_Present (Flag17) set if LIMITED is present
6389 -- Limited_View_Installed (Flag18-Sem)
6390 -- Unreferenced_In_Spec (Flag7-Sem)
6391 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6392
6393 -- Note: Limited_Present and Limited_View_Installed are used to support
6394 -- the implementation of Ada 2005 (AI-50217).
6395
6396 -- Similarly, Private_Present is used to support the implementation of
6397 -- Ada 2005 (AI-50262).
6398
6399 -- Note: if the WITH clause refers to a standard library unit, then a
6400 -- limited with clause is changed into a normal with clause, because we
6401 -- are not prepared to deal with limited with in the context of Rtsfind.
6402 -- So in this case, the Limited_Present flag will be False in the final
6403 -- tree. However, we do NOT do this transformation in ASIS mode, so for
6404 -- ASIS the flag will remain set in this situation.
6405
6406 ----------------------
6407 -- With_Type clause --
6408 ----------------------
6409
6410 -- This is a GNAT extension, used to implement mutually recursive
6411 -- types declared in different packages.
6412
6413 -- Note: this is now obsolete. The functionality of this construct
6414 -- is now implemented by the Ada 2005 limited_with_clause.
6415
6416 ---------------------
6417 -- 10.2 Body stub --
6418 ---------------------
6419
6420 -- BODY_STUB ::=
6421 -- SUBPROGRAM_BODY_STUB
6422 -- | PACKAGE_BODY_STUB
6423 -- | TASK_BODY_STUB
6424 -- | PROTECTED_BODY_STUB
6425
6426 ----------------------------------
6427 -- 10.1.3 Subprogram Body Stub --
6428 ----------------------------------
6429
6430 -- SUBPROGRAM_BODY_STUB ::=
6431 -- SUBPROGRAM_SPECIFICATION is separate
6432 -- [ASPECT_SPECIFICATION];
6433
6434 -- N_Subprogram_Body_Stub
6435 -- Sloc points to FUNCTION or PROCEDURE
6436 -- Specification (Node1)
6437 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6438 -- Library_Unit (Node4-Sem) points to the subunit
6439 -- Corresponding_Body (Node5-Sem)
6440
6441 -------------------------------
6442 -- 10.1.3 Package Body Stub --
6443 -------------------------------
6444
6445 -- PACKAGE_BODY_STUB ::=
6446 -- package body DEFINING_IDENTIFIER is separate
6447 -- [ASPECT_SPECIFICATION];
6448
6449 -- N_Package_Body_Stub
6450 -- Sloc points to PACKAGE
6451 -- Defining_Identifier (Node1)
6452 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6453 -- Library_Unit (Node4-Sem) points to the subunit
6454 -- Corresponding_Body (Node5-Sem)
6455
6456 ----------------------------
6457 -- 10.1.3 Task Body Stub --
6458 ----------------------------
6459
6460 -- TASK_BODY_STUB ::=
6461 -- task body DEFINING_IDENTIFIER is separate
6462 -- [ASPECT_SPECIFICATION];
6463
6464 -- N_Task_Body_Stub
6465 -- Sloc points to TASK
6466 -- Defining_Identifier (Node1)
6467 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6468 -- Library_Unit (Node4-Sem) points to the subunit
6469 -- Corresponding_Body (Node5-Sem)
6470
6471 ---------------------------------
6472 -- 10.1.3 Protected Body Stub --
6473 ---------------------------------
6474
6475 -- PROTECTED_BODY_STUB ::=
6476 -- protected body DEFINING_IDENTIFIER is separate
6477 -- [ASPECT_SPECIFICATION];
6478
6479 -- Note: protected body stubs are not allowed in Ada 83 mode
6480
6481 -- N_Protected_Body_Stub
6482 -- Sloc points to PROTECTED
6483 -- Defining_Identifier (Node1)
6484 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6485 -- Library_Unit (Node4-Sem) points to the subunit
6486 -- Corresponding_Body (Node5-Sem)
6487
6488 ---------------------
6489 -- 10.1.3 Subunit --
6490 ---------------------
6491
6492 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6493
6494 -- N_Subunit
6495 -- Sloc points to SEPARATE
6496 -- Name (Node2) is the name of the parent unit
6497 -- Proper_Body (Node1) is the subunit body
6498 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6499
6500 ---------------------------------
6501 -- 11.1 Exception Declaration --
6502 ---------------------------------
6503
6504 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6505 -- [ASPECT_SPECIFICATIONS];
6506
6507 -- For consistency with object declarations etc., the parser converts
6508 -- the case of multiple identifiers being declared to a series of
6509 -- declarations in which the expression is copied, using the More_Ids
6510 -- and Prev_Ids flags to remember the source form as described in the
6511 -- section on "Handling of Defining Identifier Lists".
6512
6513 -- N_Exception_Declaration
6514 -- Sloc points to EXCEPTION
6515 -- Defining_Identifier (Node1)
6516 -- Expression (Node3-Sem)
6517 -- Renaming_Exception (Node2-Sem)
6518 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6519 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6520
6521 ------------------------------------------
6522 -- 11.2 Handled Sequence Of Statements --
6523 ------------------------------------------
6524
6525 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6526 -- SEQUENCE_OF_STATEMENTS
6527 -- [exception
6528 -- EXCEPTION_HANDLER
6529 -- {EXCEPTION_HANDLER}]
6530 -- [at end
6531 -- cleanup_procedure_call (param, param, param, ...);]
6532
6533 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6534 -- used only internally currently, but is considered to be syntactic.
6535 -- At the moment, the only cleanup action allowed is a single call to
6536 -- a parameterless procedure, and the Identifier field of the node is
6537 -- the procedure to be called. The cleanup action occurs whenever the
6538 -- sequence of statements is left for any reason. The possible reasons
6539 -- are:
6540 -- 1. reaching the end of the sequence
6541 -- 2. exit, return, or goto
6542 -- 3. exception or abort
6543 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6544 -- entirely in the back end. In this case, a handled sequence of
6545 -- statements with an "at end" cannot also have exception handlers.
6546 -- For other back ends, such as gcc with front-end SJLJ, the
6547 -- implementation is split between the front end and back end; the front
6548 -- end implements 3, and the back end implements 1 and 2. In this case,
6549 -- if there is an "at end", the front end inserts the appropriate
6550 -- exception handler, and this handler takes precedence over "at end"
6551 -- in case of exception.
6552
6553 -- The inserted exception handler is of the form:
6554
6555 -- when all others =>
6556 -- cleanup;
6557 -- raise;
6558
6559 -- where cleanup is the procedure to be called. The reason we do this is
6560 -- so that the front end can handle the necessary entries in the
6561 -- exception tables, and other exception handler actions required as
6562 -- part of the normal handling for exception handlers.
6563
6564 -- The AT END cleanup handler protects only the sequence of statements
6565 -- (not the associated declarations of the parent), just like exception
6566 -- handlers. The big difference is that the cleanup procedure is called
6567 -- on either a normal or an abnormal exit from the statement sequence.
6568
6569 -- Note: the list of Exception_Handlers can contain pragmas as well
6570 -- as actual handlers. In practice these pragmas can only occur at
6571 -- the start of the list, since any pragmas occurring later on will
6572 -- be included in the statement list of the corresponding handler.
6573
6574 -- Note: although in the Ada syntax, the sequence of statements in
6575 -- a handled sequence of statements can only contain statements, we
6576 -- allow free mixing of declarations and statements in the resulting
6577 -- expanded tree. This is for example used to deal with the case of
6578 -- a cleanup procedure that must handle declarations as well as the
6579 -- statements of a block.
6580
6581 -- Note: the cleanup_procedure_call does not go through the common
6582 -- processing for calls, which in particular means that it will not be
6583 -- automatically inlined in all cases, even though the procedure to be
6584 -- called is marked inline. More specifically, if the procedure comes
6585 -- from another unit than the main source unit, for example a run-time
6586 -- unit, then it needs to be manually added to the list of bodies to be
6587 -- inlined by invoking Add_Inlined_Body on it.
6588
6589 -- N_Handled_Sequence_Of_Statements
6590 -- Sloc points to first token of first statement
6591 -- Statements (List3)
6592 -- End_Label (Node4) (set to Empty if expander generated)
6593 -- Exception_Handlers (List5) (set to No_List if none present)
6594 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6595 -- First_Real_Statement (Node2-Sem)
6596
6597 -- Note: the parent always contains a Declarations field which contains
6598 -- declarations associated with the handled sequence of statements. This
6599 -- is true even in the case of an accept statement (see description of
6600 -- the N_Accept_Statement node).
6601
6602 -- End_Label refers to the containing construct
6603
6604 -----------------------------
6605 -- 11.2 Exception Handler --
6606 -----------------------------
6607
6608 -- EXCEPTION_HANDLER ::=
6609 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6610 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6611 -- SEQUENCE_OF_STATEMENTS
6612
6613 -- Note: choice parameter specification is not allowed in Ada 83 mode
6614
6615 -- N_Exception_Handler
6616 -- Sloc points to WHEN
6617 -- Choice_Parameter (Node2) (set to Empty if not present)
6618 -- Exception_Choices (List4)
6619 -- Statements (List3)
6620 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6621 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6622 -- Local_Raise_Not_OK (Flag7-Sem)
6623 -- Has_Local_Raise (Flag8-Sem)
6624
6625 ------------------------------------------
6626 -- 11.2 Choice parameter specification --
6627 ------------------------------------------
6628
6629 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6630
6631 ----------------------------
6632 -- 11.2 Exception Choice --
6633 ----------------------------
6634
6635 -- EXCEPTION_CHOICE ::= exception_NAME | others
6636
6637 -- Except in the case of OTHERS, no explicit node appears in the tree
6638 -- for exception choice. Instead the exception name appears directly.
6639 -- An OTHERS choice is represented by a N_Others_Choice node (see
6640 -- section 3.8.1.
6641
6642 -- Note: for the exception choice created for an at end handler, the
6643 -- exception choice is an N_Others_Choice node with All_Others set.
6644
6645 ---------------------------
6646 -- 11.3 Raise Statement --
6647 ---------------------------
6648
6649 -- RAISE_STATEMENT ::= raise [exception_NAME];
6650
6651 -- In Ada 2005, we have
6652
6653 -- RAISE_STATEMENT ::=
6654 -- raise; | raise exception_NAME [with string_EXPRESSION];
6655
6656 -- N_Raise_Statement
6657 -- Sloc points to RAISE
6658 -- Name (Node2) (set to Empty if no exception name present)
6659 -- Expression (Node3) (set to Empty if no expression present)
6660 -- From_At_End (Flag4-Sem)
6661
6662 ----------------------------
6663 -- 11.3 Raise Expression --
6664 ----------------------------
6665
6666 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6667
6668 -- N_Raise_Expression
6669 -- Sloc points to RAISE
6670 -- Name (Node2) (always present)
6671 -- Expression (Node3) (set to Empty if no expression present)
6672 -- Convert_To_Return_False (Flag13-Sem)
6673 -- plus fields for expression
6674
6675 -------------------------------
6676 -- 12.1 Generic Declaration --
6677 -------------------------------
6678
6679 -- GENERIC_DECLARATION ::=
6680 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6681
6682 ------------------------------------------
6683 -- 12.1 Generic Subprogram Declaration --
6684 ------------------------------------------
6685
6686 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6687 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6688 -- [ASPECT_SPECIFICATIONS];
6689
6690 -- Note: Generic_Formal_Declarations can include pragmas
6691
6692 -- N_Generic_Subprogram_Declaration
6693 -- Sloc points to GENERIC
6694 -- Specification (Node1) subprogram specification
6695 -- Corresponding_Body (Node5-Sem)
6696 -- Generic_Formal_Declarations (List2) from generic formal part
6697 -- Parent_Spec (Node4-Sem)
6698
6699 ---------------------------------------
6700 -- 12.1 Generic Package Declaration --
6701 ---------------------------------------
6702
6703 -- GENERIC_PACKAGE_DECLARATION ::=
6704 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6705 -- [ASPECT_SPECIFICATIONS];
6706
6707 -- Note: when we do generics right, the Activation_Chain_Entity entry
6708 -- for this node can be removed (since the expander won't see generic
6709 -- units any more)???.
6710
6711 -- Note: Generic_Formal_Declarations can include pragmas
6712
6713 -- N_Generic_Package_Declaration
6714 -- Sloc points to GENERIC
6715 -- Specification (Node1) package specification
6716 -- Corresponding_Body (Node5-Sem)
6717 -- Generic_Formal_Declarations (List2) from generic formal part
6718 -- Parent_Spec (Node4-Sem)
6719 -- Activation_Chain_Entity (Node3-Sem)
6720
6721 -------------------------------
6722 -- 12.1 Generic Formal Part --
6723 -------------------------------
6724
6725 -- GENERIC_FORMAL_PART ::=
6726 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6727
6728 ------------------------------------------------
6729 -- 12.1 Generic Formal Parameter Declaration --
6730 ------------------------------------------------
6731
6732 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6733 -- FORMAL_OBJECT_DECLARATION
6734 -- | FORMAL_TYPE_DECLARATION
6735 -- | FORMAL_SUBPROGRAM_DECLARATION
6736 -- | FORMAL_PACKAGE_DECLARATION
6737
6738 ---------------------------------
6739 -- 12.3 Generic Instantiation --
6740 ---------------------------------
6741
6742 -- GENERIC_INSTANTIATION ::=
6743 -- package DEFINING_PROGRAM_UNIT_NAME is
6744 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6745 -- [ASPECT_SPECIFICATIONS];
6746 -- | [[not] overriding]
6747 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6748 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6749 -- [ASPECT_SPECIFICATIONS];
6750 -- | [[not] overriding]
6751 -- function DEFINING_DESIGNATOR is
6752 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6753 -- [ASPECT_SPECIFICATIONS];
6754
6755 -- N_Package_Instantiation
6756 -- Sloc points to PACKAGE
6757 -- Defining_Unit_Name (Node1)
6758 -- Name (Node2)
6759 -- Generic_Associations (List3) (set to No_List if no
6760 -- generic actual part)
6761 -- Parent_Spec (Node4-Sem)
6762 -- Instance_Spec (Node5-Sem)
6763 -- ABE_Is_Certain (Flag18-Sem)
6764
6765 -- N_Procedure_Instantiation
6766 -- Sloc points to PROCEDURE
6767 -- Defining_Unit_Name (Node1)
6768 -- Name (Node2)
6769 -- Parent_Spec (Node4-Sem)
6770 -- Generic_Associations (List3) (set to No_List if no
6771 -- generic actual part)
6772 -- Instance_Spec (Node5-Sem)
6773 -- Must_Override (Flag14) set if overriding indicator present
6774 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6775 -- ABE_Is_Certain (Flag18-Sem)
6776
6777 -- N_Function_Instantiation
6778 -- Sloc points to FUNCTION
6779 -- Defining_Unit_Name (Node1)
6780 -- Name (Node2)
6781 -- Generic_Associations (List3) (set to No_List if no
6782 -- generic actual part)
6783 -- Parent_Spec (Node4-Sem)
6784 -- Instance_Spec (Node5-Sem)
6785 -- Must_Override (Flag14) set if overriding indicator present
6786 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6787 -- ABE_Is_Certain (Flag18-Sem)
6788
6789 -- Note: overriding indicator is an Ada 2005 feature
6790
6791 -------------------------------
6792 -- 12.3 Generic Actual Part --
6793 -------------------------------
6794
6795 -- GENERIC_ACTUAL_PART ::=
6796 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6797
6798 -------------------------------
6799 -- 12.3 Generic Association --
6800 -------------------------------
6801
6802 -- GENERIC_ASSOCIATION ::=
6803 -- [generic_formal_parameter_SELECTOR_NAME =>]
6804
6805 -- Note: unlike the procedure call case, a generic association node
6806 -- is generated for every association, even if no formal parameter
6807 -- selector name is present. In this case the parser will leave the
6808 -- Selector_Name field set to Empty, to be filled in later by the
6809 -- semantic pass.
6810
6811 -- In Ada 2005, a formal may be associated with a box, if the
6812 -- association is part of the list of actuals for a formal package.
6813 -- If the association is given by OTHERS => <>, the association is
6814 -- an N_Others_Choice.
6815
6816 -- N_Generic_Association
6817 -- Sloc points to first token of generic association
6818 -- Selector_Name (Node2) (set to Empty if no formal
6819 -- parameter selector name)
6820 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6821 -- Box_Present (Flag15) (for formal_package associations with a box)
6822
6823 ---------------------------------------------
6824 -- 12.3 Explicit Generic Actual Parameter --
6825 ---------------------------------------------
6826
6827 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6828 -- EXPRESSION | variable_NAME | subprogram_NAME
6829 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6830
6831 -------------------------------------
6832 -- 12.4 Formal Object Declaration --
6833 -------------------------------------
6834
6835 -- FORMAL_OBJECT_DECLARATION ::=
6836 -- DEFINING_IDENTIFIER_LIST :
6837 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6838 -- [ASPECT_SPECIFICATIONS];
6839 -- | DEFINING_IDENTIFIER_LIST :
6840 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6841 -- [ASPECT_SPECIFICATIONS];
6842
6843 -- Although the syntax allows multiple identifiers in the list, the
6844 -- semantics is as though successive declarations were given with
6845 -- identical type definition and expression components. To simplify
6846 -- semantic processing, the parser represents a multiple declaration
6847 -- case as a sequence of single declarations, using the More_Ids and
6848 -- Prev_Ids flags to preserve the original source form as described
6849 -- in the section on "Handling of Defining Identifier Lists".
6850
6851 -- N_Formal_Object_Declaration
6852 -- Sloc points to first identifier
6853 -- Defining_Identifier (Node1)
6854 -- In_Present (Flag15)
6855 -- Out_Present (Flag17)
6856 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6857 -- Subtype_Mark (Node4) (set to Empty if not present)
6858 -- Access_Definition (Node3) (set to Empty if not present)
6859 -- Default_Expression (Node5) (set to Empty if no default expression)
6860 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6861 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6862
6863 -----------------------------------
6864 -- 12.5 Formal Type Declaration --
6865 -----------------------------------
6866
6867 -- FORMAL_TYPE_DECLARATION ::=
6868 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6869 -- is FORMAL_TYPE_DEFINITION
6870 -- [ASPECT_SPECIFICATIONS];
6871 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
6872
6873 -- N_Formal_Type_Declaration
6874 -- Sloc points to TYPE
6875 -- Defining_Identifier (Node1)
6876 -- Formal_Type_Definition (Node3)
6877 -- Discriminant_Specifications (List4) (set to No_List if no
6878 -- discriminant part)
6879 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6880
6881 ----------------------------------
6882 -- 12.5 Formal type definition --
6883 ----------------------------------
6884
6885 -- FORMAL_TYPE_DEFINITION ::=
6886 -- FORMAL_PRIVATE_TYPE_DEFINITION
6887 -- | FORMAL_DERIVED_TYPE_DEFINITION
6888 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6889 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6890 -- | FORMAL_MODULAR_TYPE_DEFINITION
6891 -- | FORMAL_FLOATING_POINT_DEFINITION
6892 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6893 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6894 -- | FORMAL_ARRAY_TYPE_DEFINITION
6895 -- | FORMAL_ACCESS_TYPE_DEFINITION
6896 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6897 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
6898
6899 -- The Ada 2012 syntax introduces two new non-terminals:
6900 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
6901 -- the latter category. Here we introduce an incomplete type definition
6902 -- in order to preserve as much as possible the existing structure.
6903
6904 ---------------------------------------------
6905 -- 12.5.1 Formal Private Type Definition --
6906 ---------------------------------------------
6907
6908 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6909 -- [[abstract] tagged] [limited] private
6910
6911 -- Note: TAGGED is not allowed in Ada 83 mode
6912
6913 -- N_Formal_Private_Type_Definition
6914 -- Sloc points to PRIVATE
6915 -- Uninitialized_Variable (Node3-Sem)
6916 -- Abstract_Present (Flag4)
6917 -- Tagged_Present (Flag15)
6918 -- Limited_Present (Flag17)
6919
6920 --------------------------------------------
6921 -- 12.5.1 Formal Derived Type Definition --
6922 --------------------------------------------
6923
6924 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6925 -- [abstract] [limited | synchronized]
6926 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6927 -- Note: this construct is not allowed in Ada 83 mode
6928
6929 -- N_Formal_Derived_Type_Definition
6930 -- Sloc points to NEW
6931 -- Subtype_Mark (Node4)
6932 -- Private_Present (Flag15)
6933 -- Abstract_Present (Flag4)
6934 -- Limited_Present (Flag17)
6935 -- Synchronized_Present (Flag7)
6936 -- Interface_List (List2) (set to No_List if none)
6937
6938 -----------------------------------------------
6939 -- 12.5.1 Formal Incomplete Type Definition --
6940 -----------------------------------------------
6941
6942 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
6943
6944 -- N_Formal_Incomplete_Type_Definition
6945 -- Sloc points to identifier of parent
6946 -- Tagged_Present (Flag15)
6947
6948 ---------------------------------------------
6949 -- 12.5.2 Formal Discrete Type Definition --
6950 ---------------------------------------------
6951
6952 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6953
6954 -- N_Formal_Discrete_Type_Definition
6955 -- Sloc points to (
6956
6957 ---------------------------------------------------
6958 -- 12.5.2 Formal Signed Integer Type Definition --
6959 ---------------------------------------------------
6960
6961 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6962
6963 -- N_Formal_Signed_Integer_Type_Definition
6964 -- Sloc points to RANGE
6965
6966 --------------------------------------------
6967 -- 12.5.2 Formal Modular Type Definition --
6968 --------------------------------------------
6969
6970 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6971
6972 -- N_Formal_Modular_Type_Definition
6973 -- Sloc points to MOD
6974
6975 ----------------------------------------------
6976 -- 12.5.2 Formal Floating Point Definition --
6977 ----------------------------------------------
6978
6979 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6980
6981 -- N_Formal_Floating_Point_Definition
6982 -- Sloc points to DIGITS
6983
6984 ----------------------------------------------------
6985 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6986 ----------------------------------------------------
6987
6988 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6989
6990 -- N_Formal_Ordinary_Fixed_Point_Definition
6991 -- Sloc points to DELTA
6992
6993 ---------------------------------------------------
6994 -- 12.5.2 Formal Decimal Fixed Point Definition --
6995 ---------------------------------------------------
6996
6997 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6998
6999 -- Note: formal decimal fixed point definition not allowed in Ada 83
7000
7001 -- N_Formal_Decimal_Fixed_Point_Definition
7002 -- Sloc points to DELTA
7003
7004 ------------------------------------------
7005 -- 12.5.3 Formal Array Type Definition --
7006 ------------------------------------------
7007
7008 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
7009
7010 -------------------------------------------
7011 -- 12.5.4 Formal Access Type Definition --
7012 -------------------------------------------
7013
7014 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
7015
7016 ----------------------------------------------
7017 -- 12.5.5 Formal Interface Type Definition --
7018 ----------------------------------------------
7019
7020 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
7021
7022 -----------------------------------------
7023 -- 12.6 Formal Subprogram Declaration --
7024 -----------------------------------------
7025
7026 -- FORMAL_SUBPROGRAM_DECLARATION ::=
7027 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
7028 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
7029
7030 --------------------------------------------------
7031 -- 12.6 Formal Concrete Subprogram Declaration --
7032 --------------------------------------------------
7033
7034 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
7035 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
7036 -- [ASPECT_SPECIFICATIONS];
7037
7038 -- N_Formal_Concrete_Subprogram_Declaration
7039 -- Sloc points to WITH
7040 -- Specification (Node1)
7041 -- Default_Name (Node2) (set to Empty if no subprogram default)
7042 -- Box_Present (Flag15)
7043
7044 -- Note: if no subprogram default is present, then Name is set
7045 -- to Empty, and Box_Present is False.
7046
7047 --------------------------------------------------
7048 -- 12.6 Formal Abstract Subprogram Declaration --
7049 --------------------------------------------------
7050
7051 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
7052 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
7053 -- [ASPECT_SPECIFICATIONS];
7054
7055 -- N_Formal_Abstract_Subprogram_Declaration
7056 -- Sloc points to WITH
7057 -- Specification (Node1)
7058 -- Default_Name (Node2) (set to Empty if no subprogram default)
7059 -- Box_Present (Flag15)
7060
7061 -- Note: if no subprogram default is present, then Name is set
7062 -- to Empty, and Box_Present is False.
7063
7064 ------------------------------
7065 -- 12.6 Subprogram Default --
7066 ------------------------------
7067
7068 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
7069
7070 -- There is no separate node in the tree for a subprogram default.
7071 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
7072 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
7073 -- default name or box indication, as needed.
7074
7075 ------------------------
7076 -- 12.6 Default Name --
7077 ------------------------
7078
7079 -- DEFAULT_NAME ::= NAME
7080
7081 --------------------------------------
7082 -- 12.7 Formal Package Declaration --
7083 --------------------------------------
7084
7085 -- FORMAL_PACKAGE_DECLARATION ::=
7086 -- with package DEFINING_IDENTIFIER
7087 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
7088 -- [ASPECT_SPECIFICATIONS];
7089
7090 -- Note: formal package declarations not allowed in Ada 83 mode
7091
7092 -- N_Formal_Package_Declaration
7093 -- Sloc points to WITH
7094 -- Defining_Identifier (Node1)
7095 -- Name (Node2)
7096 -- Generic_Associations (List3) (set to No_List if (<>) case or
7097 -- empty generic actual part)
7098 -- Box_Present (Flag15)
7099 -- Instance_Spec (Node5-Sem)
7100 -- ABE_Is_Certain (Flag18-Sem)
7101
7102 --------------------------------------
7103 -- 12.7 Formal Package Actual Part --
7104 --------------------------------------
7105
7106 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7107 -- ([OTHERS] => <>)
7108 -- | [GENERIC_ACTUAL_PART]
7109 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7110
7111 -- FORMAL_PACKAGE_ASSOCIATION ::=
7112 -- GENERIC_ASSOCIATION
7113 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7114
7115 -- There is no explicit node in the tree for a formal package actual
7116 -- part. Instead the information appears in the parent node (i.e. the
7117 -- formal package declaration node itself).
7118
7119 -- There is no explicit node for a formal package association. All of
7120 -- them are represented either by a generic association, possibly with
7121 -- Box_Present, or by an N_Others_Choice.
7122
7123 ---------------------------------
7124 -- 13.1 Representation clause --
7125 ---------------------------------
7126
7127 -- REPRESENTATION_CLAUSE ::=
7128 -- ATTRIBUTE_DEFINITION_CLAUSE
7129 -- | ENUMERATION_REPRESENTATION_CLAUSE
7130 -- | RECORD_REPRESENTATION_CLAUSE
7131 -- | AT_CLAUSE
7132
7133 ----------------------
7134 -- 13.1 Local Name --
7135 ----------------------
7136
7137 -- LOCAL_NAME :=
7138 -- DIRECT_NAME
7139 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7140 -- | library_unit_NAME
7141
7142 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7143 -- as an attribute reference, which has essentially the same form.
7144
7145 ---------------------------------------
7146 -- 13.3 Attribute definition clause --
7147 ---------------------------------------
7148
7149 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7150 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7151 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7152
7153 -- In Ada 83, the expression must be a simple expression and the
7154 -- local name must be a direct name.
7155
7156 -- Note: the only attribute definition clause that is processed by
7157 -- gigi is an address clause. For all other cases, the information
7158 -- is extracted by the front end and either results in setting entity
7159 -- information, e.g. Esize for the Size clause, or in appropriate
7160 -- expansion actions (e.g. in the case of Storage_Size).
7161
7162 -- For an address clause, Gigi constructs the appropriate addressing
7163 -- code. It also ensures that no aliasing optimizations are made
7164 -- for the object for which the address clause appears.
7165
7166 -- Note: for an address clause used to achieve an overlay:
7167
7168 -- A : Integer;
7169 -- B : Integer;
7170 -- for B'Address use A'Address;
7171
7172 -- the above rule means that Gigi will ensure that no optimizations
7173 -- will be made for B that would violate the implementation advice
7174 -- of RM 13.3(19). However, this advice applies only to B and not
7175 -- to A, which seems unfortunate. The GNAT front end will mark the
7176 -- object A as volatile to also prevent unwanted optimization
7177 -- assumptions based on no aliasing being made for B.
7178
7179 -- N_Attribute_Definition_Clause
7180 -- Sloc points to FOR
7181 -- Name (Node2) the local name
7182 -- Chars (Name1) the identifier name from the attribute designator
7183 -- Expression (Node3) the expression or name
7184 -- Entity (Node4-Sem)
7185 -- Next_Rep_Item (Node5-Sem)
7186 -- From_At_Mod (Flag4-Sem)
7187 -- Check_Address_Alignment (Flag11-Sem)
7188 -- From_Aspect_Specification (Flag13-Sem)
7189 -- Is_Delayed_Aspect (Flag14-Sem)
7190 -- Address_Warning_Posted (Flag18-Sem)
7191
7192 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7193 -- aspect name, and Entity is resolved already to reference the entity
7194 -- to which the aspect applies.
7195
7196 -----------------------------------
7197 -- 13.3.1 Aspect Specifications --
7198 -----------------------------------
7199
7200 -- We modify the RM grammar here, the RM grammar is:
7201
7202 -- ASPECT_SPECIFICATION ::=
7203 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7204 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7205
7206 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7207
7208 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7209
7210 -- That's inconvenient, since there is no non-terminal name for a single
7211 -- entry in the list of aspects. So we use this grammar instead:
7212
7213 -- ASPECT_SPECIFICATIONS ::=
7214 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7215
7216 -- ASPECT_SPECIFICATION =>
7217 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7218
7219 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7220
7221 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7222
7223 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7224 -- aggregate with the elements of the aggregate corresponding to the
7225 -- successive arguments of the corresponding pragma.
7226
7227 -- See separate package Aspects for details on the incorporation of
7228 -- these nodes into the tree, and how aspect specifications for a given
7229 -- declaration node are associated with that node.
7230
7231 -- N_Aspect_Specification
7232 -- Sloc points to aspect identifier
7233 -- Identifier (Node1) aspect identifier
7234 -- Aspect_Rep_Item (Node2-Sem)
7235 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7236 -- Entity (Node4-Sem) entity to which the aspect applies
7237 -- Next_Rep_Item (Node5-Sem)
7238 -- Class_Present (Flag6) Set if 'Class present
7239 -- Is_Ignored (Flag9-Sem)
7240 -- Is_Checked (Flag11-Sem)
7241 -- Is_Delayed_Aspect (Flag14-Sem)
7242 -- Is_Disabled (Flag15-Sem)
7243 -- Is_Boolean_Aspect (Flag16-Sem)
7244 -- Split_PPC (Flag17) Set if split pre/post attribute
7245
7246 -- Note: Aspect_Specification is an Ada 2012 feature
7247
7248 -- Note: The Identifier serves to identify the aspect involved (it
7249 -- is the aspect whose name corresponds to the Chars field). This
7250 -- means that the other fields of this identifier are unused, and
7251 -- in particular we use the Entity field of this identifier to save
7252 -- a copy of the expression for visibility analysis, see spec of
7253 -- Sem_Ch13 for full details of this usage.
7254
7255 -- In the case of aspects of the form xxx'Class, the aspect identifier
7256 -- is for xxx, and Class_Present is set to True.
7257
7258 -- Note: When a Pre or Post aspect specification is processed, it is
7259 -- broken into AND THEN sections. The left most section has Split_PPC
7260 -- set to False, indicating that it is the original specification (e.g.
7261 -- for posting errors). For the other sections, Split_PPC is set True.
7262
7263 ---------------------------------------------
7264 -- 13.4 Enumeration representation clause --
7265 ---------------------------------------------
7266
7267 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7268 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7269
7270 -- In Ada 83, the name must be a direct name
7271
7272 -- N_Enumeration_Representation_Clause
7273 -- Sloc points to FOR
7274 -- Identifier (Node1) direct name
7275 -- Array_Aggregate (Node3)
7276 -- Next_Rep_Item (Node5-Sem)
7277
7278 ---------------------------------
7279 -- 13.4 Enumeration aggregate --
7280 ---------------------------------
7281
7282 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7283
7284 ------------------------------------------
7285 -- 13.5.1 Record representation clause --
7286 ------------------------------------------
7287
7288 -- RECORD_REPRESENTATION_CLAUSE ::=
7289 -- for first_subtype_LOCAL_NAME use
7290 -- record [MOD_CLAUSE]
7291 -- {COMPONENT_CLAUSE}
7292 -- end record;
7293
7294 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7295 -- replaced by a corresponding Alignment attribute definition clause).
7296
7297 -- Note: Component_Clauses can include pragmas
7298
7299 -- N_Record_Representation_Clause
7300 -- Sloc points to FOR
7301 -- Identifier (Node1) direct name
7302 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7303 -- Component_Clauses (List3)
7304 -- Next_Rep_Item (Node5-Sem)
7305
7306 ------------------------------
7307 -- 13.5.1 Component clause --
7308 ------------------------------
7309
7310 -- COMPONENT_CLAUSE ::=
7311 -- component_LOCAL_NAME at POSITION
7312 -- range FIRST_BIT .. LAST_BIT;
7313
7314 -- N_Component_Clause
7315 -- Sloc points to AT
7316 -- Component_Name (Node1) points to Name or Attribute_Reference
7317 -- Position (Node2)
7318 -- First_Bit (Node3)
7319 -- Last_Bit (Node4)
7320
7321 ----------------------
7322 -- 13.5.1 Position --
7323 ----------------------
7324
7325 -- POSITION ::= static_EXPRESSION
7326
7327 -----------------------
7328 -- 13.5.1 First_Bit --
7329 -----------------------
7330
7331 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7332
7333 ----------------------
7334 -- 13.5.1 Last_Bit --
7335 ----------------------
7336
7337 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7338
7339 --------------------------
7340 -- 13.8 Code statement --
7341 --------------------------
7342
7343 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7344
7345 -- Note: in GNAT, the qualified expression has the form
7346
7347 -- Asm_Insn'(Asm (...));
7348
7349 -- See package System.Machine_Code in file s-maccod.ads for details on
7350 -- the allowed parameters to Asm. There are two ways this node can
7351 -- arise, as a code statement, in which case the expression is the
7352 -- qualified expression, or as a result of the expansion of an intrinsic
7353 -- call to the Asm or Asm_Input procedure.
7354
7355 -- N_Code_Statement
7356 -- Sloc points to first token of the expression
7357 -- Expression (Node3)
7358
7359 -- Note: package Exp_Code contains an abstract functional interface
7360 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7361
7362 ------------------------
7363 -- 13.12 Restriction --
7364 ------------------------
7365
7366 -- RESTRICTION ::=
7367 -- restriction_IDENTIFIER
7368 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7369
7370 -- There is no explicit node for restrictions. Instead the restriction
7371 -- appears in normal pragma syntax as a pragma argument association,
7372 -- which has the same syntactic form.
7373
7374 --------------------------
7375 -- B.2 Shift Operators --
7376 --------------------------
7377
7378 -- Calls to the intrinsic shift functions are converted to one of
7379 -- the following shift nodes, which have the form of normal binary
7380 -- operator names. Note that for a given shift operation, one node
7381 -- covers all possible types, as for normal operators.
7382
7383 -- Note: it is perfectly permissible for the expander to generate
7384 -- shift operation nodes directly, in which case they will be analyzed
7385 -- and parsed in the usual manner.
7386
7387 -- Sprint syntax: shift-function-name!(expr, count)
7388
7389 -- Note: the Left_Opnd field holds the first argument (the value to
7390 -- be shifted). The Right_Opnd field holds the second argument (the
7391 -- shift count). The Chars field is the name of the intrinsic function.
7392
7393 -- N_Op_Rotate_Left
7394 -- Sloc points to the function name
7395 -- plus fields for binary operator
7396 -- plus fields for expression
7397 -- Shift_Count_OK (Flag4-Sem)
7398
7399 -- N_Op_Rotate_Right
7400 -- Sloc points to the function name
7401 -- plus fields for binary operator
7402 -- plus fields for expression
7403 -- Shift_Count_OK (Flag4-Sem)
7404
7405 -- N_Op_Shift_Left
7406 -- Sloc points to the function name
7407 -- plus fields for binary operator
7408 -- plus fields for expression
7409 -- Shift_Count_OK (Flag4-Sem)
7410
7411 -- N_Op_Shift_Right_Arithmetic
7412 -- Sloc points to the function name
7413 -- plus fields for binary operator
7414 -- plus fields for expression
7415 -- Shift_Count_OK (Flag4-Sem)
7416
7417 -- N_Op_Shift_Right
7418 -- Sloc points to the function name
7419 -- plus fields for binary operator
7420 -- plus fields for expression
7421 -- Shift_Count_OK (Flag4-Sem)
7422
7423 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7424 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7425
7426 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7427 -- always less than the word size if Modify_Tree_For_C mode is set.
7428
7429 --------------------------
7430 -- Obsolescent Features --
7431 --------------------------
7432
7433 -- The syntax descriptions and tree nodes for obsolescent features are
7434 -- grouped together, corresponding to their location in appendix I in
7435 -- the RM. However, parsing and semantic analysis for these constructs
7436 -- is located in an appropriate chapter (see individual notes).
7437
7438 ---------------------------
7439 -- J.3 Delta Constraint --
7440 ---------------------------
7441
7442 -- Note: the parse routine for this construct is located in section
7443 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7444 -- where delta constraint logically belongs.
7445
7446 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7447
7448 -- N_Delta_Constraint
7449 -- Sloc points to DELTA
7450 -- Delta_Expression (Node3)
7451 -- Range_Constraint (Node4) (set to Empty if not present)
7452
7453 --------------------
7454 -- J.7 At Clause --
7455 --------------------
7456
7457 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7458
7459 -- Note: the parse routine for this construct is located in Par-Ch13,
7460 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7461 -- belongs if it were not obsolescent.
7462
7463 -- Note: in Ada 83 the expression must be a simple expression
7464
7465 -- Gigi restriction: This node never appears, it is rewritten as an
7466 -- address attribute definition clause.
7467
7468 -- N_At_Clause
7469 -- Sloc points to FOR
7470 -- Identifier (Node1)
7471 -- Expression (Node3)
7472
7473 ---------------------
7474 -- J.8 Mod clause --
7475 ---------------------
7476
7477 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7478
7479 -- Note: the parse routine for this construct is located in Par-Ch13,
7480 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7481 -- belongs if it were not obsolescent.
7482
7483 -- Note: in Ada 83, the expression must be a simple expression
7484
7485 -- Gigi restriction: this node never appears. It is replaced
7486 -- by a corresponding Alignment attribute definition clause.
7487
7488 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7489 -- its name has "clause" in it. This is rather strange, but is quite
7490 -- definitely specified. The pragmas before are collected in the
7491 -- Pragmas_Before field of the mod clause node itself, and pragmas
7492 -- after are simply swallowed up in the list of component clauses.
7493
7494 -- N_Mod_Clause
7495 -- Sloc points to AT
7496 -- Expression (Node3)
7497 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7498
7499 --------------------
7500 -- Semantic Nodes --
7501 --------------------
7502
7503 -- These semantic nodes are used to hold additional semantic information.
7504 -- They are inserted into the tree as a result of semantic processing.
7505 -- Although there are no legitimate source syntax constructions that
7506 -- correspond directly to these nodes, we need a source syntax for the
7507 -- reconstructed tree printed by Sprint, and the node descriptions here
7508 -- show this syntax.
7509
7510 ------------------------
7511 -- Compound Statement --
7512 ------------------------
7513
7514 -- This node is created by the analyzer/expander to handle some
7515 -- expansion cases where a sequence of actions needs to be captured
7516 -- within a single node (which acts as a container and allows the
7517 -- entire list of actions to be moved around as a whole) appearing
7518 -- in a sequence of statements.
7519
7520 -- This is the statement counterpart to the expression node
7521 -- N_Expression_With_Actions.
7522
7523 -- The required semantics is that the set of actions is executed in
7524 -- the order in which it appears, as though they appeared by themselves
7525 -- in the enclosing list of declarations of statements. Unlike what
7526 -- happens when using an N_Block_Statement, no new scope is introduced.
7527
7528 -- Note: for the time being, this is used only as a transient
7529 -- representation during expansion, and all compound statement nodes
7530 -- must be exploded back to their constituent statements before handing
7531 -- the tree to the back end.
7532
7533 -- Sprint syntax: do
7534 -- action;
7535 -- action;
7536 -- ...
7537 -- action;
7538 -- end;
7539
7540 -- N_Compound_Statement
7541 -- Actions (List1)
7542
7543 --------------
7544 -- Contract --
7545 --------------
7546
7547 -- This node is used to hold the various parts of an entry, subprogram
7548 -- [body] or package [body] contract, in particular:
7549 -- Abstract states declared by a package declaration
7550 -- Contract cases that apply to a subprogram
7551 -- Dependency relations of inputs and output of a subprogram
7552 -- Global annotations classifying data as input or output
7553 -- Initialization sequences for a package declaration
7554 -- Pre- and postconditions that apply to a subprogram
7555
7556 -- The node appears in an entry and [generic] subprogram [body] entity.
7557
7558 -- Sprint syntax: <none> as the node should not appear in the tree, but
7559 -- only attached to an entry or [generic] subprogram
7560 -- entity.
7561
7562 -- N_Contract
7563 -- Sloc points to the subprogram's name
7564 -- Pre_Post_Conditions (Node1-Sem) (set to Empty if none)
7565 -- Contract_Test_Cases (Node2-Sem) (set to Empty if none)
7566 -- Classifications (Node3-Sem) (set to Empty if none)
7567
7568 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7569 -- to pre- and postconditions associated with an entry or a subprogram
7570 -- [body or stub]. The pragmas can either come from source or be the
7571 -- byproduct of aspect expansion. Currently the following pragmas appear
7572 -- in this list:
7573 -- Post
7574 -- Postcondition
7575 -- Pre
7576 -- Precondition
7577 -- Refined_Post
7578 -- The ordering in the list is in LIFO fashion.
7579
7580 -- Note that there might be multiple preconditions or postconditions
7581 -- in this list, either because they come from separate pragmas in the
7582 -- source, or because a Pre (resp. Post) aspect specification has been
7583 -- broken into AND THEN sections. See Split_PPC for details.
7584
7585 -- Contract_Test_Cases contains a collection of pragmas that correspond
7586 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
7587 -- list is in LIFO fashion.
7588
7589 -- Classifications contains pragmas that either declare, categorize or
7590 -- establish dependencies between subprogram or package inputs and
7591 -- outputs. Currently the following pragmas appear in this list:
7592 -- Abstract_States
7593 -- Async_Readers
7594 -- Async_Writers
7595 -- Depends
7596 -- Effective_Reads
7597 -- Effective_Writes
7598 -- Global
7599 -- Initial_Condition
7600 -- Initializes
7601 -- Part_Of
7602 -- Refined_Depends
7603 -- Refined_Global
7604 -- Refined_States
7605 -- The ordering is in LIFO fashion.
7606
7607 -------------------
7608 -- Expanded Name --
7609 -------------------
7610
7611 -- The N_Expanded_Name node is used to represent a selected component
7612 -- name that has been resolved to an expanded name. The semantic phase
7613 -- replaces N_Selected_Component nodes that represent names by the use
7614 -- of this node, leaving the N_Selected_Component node used only when
7615 -- the prefix is a record or protected type.
7616
7617 -- The fields of the N_Expanded_Name node are layed out identically
7618 -- to those of the N_Selected_Component node, allowing conversion of
7619 -- an expanded name node to a selected component node to be done
7620 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7621
7622 -- There is no special sprint syntax for an expanded name
7623
7624 -- N_Expanded_Name
7625 -- Sloc points to the period
7626 -- Chars (Name1) copy of Chars field of selector name
7627 -- Prefix (Node3)
7628 -- Selector_Name (Node2)
7629 -- Entity (Node4-Sem)
7630 -- Associated_Node (Node4-Sem)
7631 -- Has_Private_View (Flag11-Sem) set in generic units.
7632 -- Redundant_Use (Flag13-Sem)
7633 -- Atomic_Sync_Required (Flag14-Sem)
7634 -- plus fields for expression
7635
7636 -----------------------------
7637 -- Expression With Actions --
7638 -----------------------------
7639
7640 -- This node is created by the analyzer/expander to handle some
7641 -- expansion cases, notably short circuit forms where there are
7642 -- actions associated with the right-hand side operand.
7643
7644 -- The N_Expression_With_Actions node represents an expression with
7645 -- an associated set of actions (which are executable statements and
7646 -- declarations, as might occur in a handled statement sequence).
7647
7648 -- The required semantics is that the set of actions is executed in
7649 -- the order in which it appears just before the expression is
7650 -- evaluated (and these actions must only be executed if the value
7651 -- of the expression is evaluated). The node is considered to be
7652 -- a subexpression, whose value is the value of the Expression after
7653 -- executing all the actions.
7654
7655 -- If the actions contain declarations, then these declarations may
7656 -- be referenced within the expression. However note that there is
7657 -- no proper scope associated with the expression-with-action, so the
7658 -- back-end will elaborate them in the context of the enclosing scope.
7659
7660 -- Sprint syntax: do
7661 -- action;
7662 -- action;
7663 -- ...
7664 -- action;
7665 -- in expression end
7666
7667 -- N_Expression_With_Actions
7668 -- Actions (List1)
7669 -- Expression (Node3)
7670 -- plus fields for expression
7671
7672 -- Note: In the final generated tree presented to the code generator,
7673 -- the actions list is always non-null, since there is no point in this
7674 -- node if the actions are Empty. During semantic analysis there are
7675 -- cases where it is convenient to temporarily generate an empty actions
7676 -- list. This arises in cases where we create such an empty actions
7677 -- list, and it may or may not end up being a place where additional
7678 -- actions are inserted. The expander removes such empty cases after
7679 -- the expression of the node is fully analyzed and expanded, at which
7680 -- point it is safe to remove it, since no more actions can be inserted.
7681
7682 -- Note: In Modify_Tree_For_C, we never generate any declarations in
7683 -- the action list, which can contain only non-declarative statements.
7684
7685 --------------------
7686 -- Free Statement --
7687 --------------------
7688
7689 -- The N_Free_Statement node is generated as a result of a call to an
7690 -- instantiation of Unchecked_Deallocation. The instantiation of this
7691 -- generic is handled specially and generates this node directly.
7692
7693 -- Sprint syntax: free expression
7694
7695 -- N_Free_Statement
7696 -- Sloc is copied from the unchecked deallocation call
7697 -- Expression (Node3) argument to unchecked deallocation call
7698 -- Storage_Pool (Node1-Sem)
7699 -- Procedure_To_Call (Node2-Sem)
7700 -- Actual_Designated_Subtype (Node4-Sem)
7701
7702 -- Note: in the case where a debug source file is generated, the Sloc
7703 -- for this node points to the FREE keyword in the Sprint file output.
7704
7705 -------------------
7706 -- Freeze Entity --
7707 -------------------
7708
7709 -- This node marks the point in a declarative part at which an entity
7710 -- declared therein becomes frozen. The expander places initialization
7711 -- procedures for types at those points. Gigi uses the freezing point
7712 -- to elaborate entities that may depend on previous private types.
7713
7714 -- See the section in Einfo "Delayed Freezing and Elaboration" for
7715 -- a full description of the use of this node.
7716
7717 -- The Entity field points back to the entity for the type (whose
7718 -- Freeze_Node field points back to this freeze node).
7719
7720 -- The Actions field contains a list of declarations and statements
7721 -- generated by the expander which are associated with the freeze
7722 -- node, and are elaborated as though the freeze node were replaced
7723 -- by this sequence of actions.
7724
7725 -- Note: the Sloc field in the freeze node references a construct
7726 -- associated with the freezing point. This is used for posting
7727 -- messages in some error/warning situations, e.g. the case where
7728 -- a primitive operation of a tagged type is declared too late.
7729
7730 -- Sprint syntax: freeze entity-name [
7731 -- freeze actions
7732 -- ]
7733
7734 -- N_Freeze_Entity
7735 -- Sloc points near freeze point (see above special note)
7736 -- Entity (Node4-Sem)
7737 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7738 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7739 -- Actions (List1) (set to No_List if no freeze actions)
7740 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7741
7742 -- The Actions field holds actions associated with the freeze. These
7743 -- actions are elaborated at the point where the type is frozen.
7744
7745 -- Note: in the case where a debug source file is generated, the Sloc
7746 -- for this node points to the FREEZE keyword in the Sprint file output.
7747
7748 ---------------------------
7749 -- Freeze Generic Entity --
7750 ---------------------------
7751
7752 -- The freeze point of an entity indicates the point at which the
7753 -- information needed to generate code for the entity is complete.
7754 -- The freeze node for an entity triggers expander activities, such as
7755 -- build initialization procedures, and backend activities, such as
7756 -- completing the elaboration of packages.
7757
7758 -- For entities declared within a generic unit, for which no code is
7759 -- generated, the freeze point is not equally meaningful. However, in
7760 -- Ada 2012 several semantic checks on declarations must be delayed to
7761 -- the freeze point, and we need to include such a mark in the tree to
7762 -- trigger these checks. The Freeze_Generic_Entity node plays no other
7763 -- role, and is ignored by the expander and the back-end.
7764
7765 -- Sprint syntax: freeze_generic entity-name
7766
7767 -- N_Freeze_Generic_Entity
7768 -- Sloc points near freeze point
7769 -- Entity (Node4-Sem)
7770
7771 --------------------------------
7772 -- Implicit Label Declaration --
7773 --------------------------------
7774
7775 -- An implicit label declaration is created for every occurrence of a
7776 -- label on a statement or a label on a block or loop. It is chained
7777 -- in the declarations of the innermost enclosing block as specified
7778 -- in RM section 5.1 (3).
7779
7780 -- The Defining_Identifier is the actual identifier for the statement
7781 -- identifier. Note that the occurrence of the label is a reference, NOT
7782 -- the defining occurrence. The defining occurrence occurs at the head
7783 -- of the innermost enclosing block, and is represented by this node.
7784
7785 -- Note: from the grammar, this might better be called an implicit
7786 -- statement identifier declaration, but the term we choose seems
7787 -- friendlier, since at least informally statement identifiers are
7788 -- called labels in both cases (i.e. when used in labels, and when
7789 -- used as the identifiers of blocks and loops).
7790
7791 -- Note: although this is logically a semantic node, since it does not
7792 -- correspond directly to a source syntax construction, these nodes are
7793 -- actually created by the parser in a post pass done just after parsing
7794 -- is complete, before semantic analysis is started (see Par.Labl).
7795
7796 -- Sprint syntax: labelname : label;
7797
7798 -- N_Implicit_Label_Declaration
7799 -- Sloc points to the << token for a statement identifier, or to the
7800 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
7801 -- Defining_Identifier (Node1)
7802 -- Label_Construct (Node2-Sem)
7803
7804 -- Note: in the case where a debug source file is generated, the Sloc
7805 -- for this node points to the label name in the generated declaration.
7806
7807 ---------------------
7808 -- Itype Reference --
7809 ---------------------
7810
7811 -- This node is used to create a reference to an Itype. The only purpose
7812 -- is to make sure the Itype is defined if this is the first reference.
7813
7814 -- A typical use of this node is when an Itype is to be referenced in
7815 -- two branches of an IF statement. In this case it is important that
7816 -- the first use of the Itype not be inside the conditional, since then
7817 -- it might not be defined if the other branch of the IF is taken, in
7818 -- the case where the definition generates elaboration code.
7819
7820 -- The Itype field points to the referenced Itype
7821
7822 -- Sprint syntax: reference itype-name
7823
7824 -- N_Itype_Reference
7825 -- Sloc points to the node generating the reference
7826 -- Itype (Node1-Sem)
7827
7828 -- Note: in the case where a debug source file is generated, the Sloc
7829 -- for this node points to the REFERENCE keyword in the file output.
7830
7831 ---------------------
7832 -- Raise xxx Error --
7833 ---------------------
7834
7835 -- One of these nodes is created during semantic analysis to replace
7836 -- a node for an expression that is determined to definitely raise
7837 -- the corresponding exception.
7838
7839 -- The N_Raise_xxx_Error node may also stand alone in place
7840 -- of a declaration or statement, in which case it simply causes
7841 -- the exception to be raised (i.e. it is equivalent to a raise
7842 -- statement that raises the corresponding exception). This use
7843 -- is distinguished by the fact that the Etype in this case is
7844 -- Standard_Void_Type; in the subexpression case, the Etype is the
7845 -- same as the type of the subexpression which it replaces.
7846
7847 -- If Condition is empty, then the raise is unconditional. If the
7848 -- Condition field is non-empty, it is a boolean expression which
7849 -- is first evaluated, and the exception is raised only if the
7850 -- value of the expression is True. In the unconditional case, the
7851 -- creation of this node is usually accompanied by a warning message
7852 -- error. The creation of this node will usually be accompanied by a
7853 -- message (unless it appears within the right operand of a short
7854 -- circuit form whose left argument is static and decisively
7855 -- eliminates elaboration of the raise operation. The condition field
7856 -- can ONLY be present when the node is used as a statement form, it
7857 -- may NOT be present in the case where the node appears within an
7858 -- expression.
7859
7860 -- The exception is generated with a message that contains the
7861 -- file name and line number, and then appended text. The Reason
7862 -- code shows the text to be added. The Reason code is an element
7863 -- of the type Types.RT_Exception_Code, and indicates both the
7864 -- message to be added, and the exception to be raised (which must
7865 -- match the node type). The value is stored by storing a Uint which
7866 -- is the Pos value of the enumeration element in this type.
7867
7868 -- Gigi restriction: This expander ensures that the type of the
7869 -- Condition field is always Standard.Boolean, even if the type
7870 -- in the source is some non-standard boolean type.
7871
7872 -- Sprint syntax: [xxx_error "msg"]
7873 -- or: [xxx_error when condition "msg"]
7874
7875 -- N_Raise_Constraint_Error
7876 -- Sloc references related construct
7877 -- Condition (Node1) (set to Empty if no condition)
7878 -- Reason (Uint3)
7879 -- plus fields for expression
7880
7881 -- N_Raise_Program_Error
7882 -- Sloc references related construct
7883 -- Condition (Node1) (set to Empty if no condition)
7884 -- Reason (Uint3)
7885 -- plus fields for expression
7886
7887 -- N_Raise_Storage_Error
7888 -- Sloc references related construct
7889 -- Condition (Node1) (set to Empty if no condition)
7890 -- Reason (Uint3)
7891 -- plus fields for expression
7892
7893 -- Note: Sloc is copied from the expression generating the exception.
7894 -- In the case where a debug source file is generated, the Sloc for
7895 -- this node points to the left bracket in the Sprint file output.
7896
7897 -- Note: the back end may be required to translate these nodes into
7898 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7899
7900 ---------------------------------------------
7901 -- Optimization of Exception Raise to Goto --
7902 ---------------------------------------------
7903
7904 -- In some cases, the front end will determine that any exception raised
7905 -- by the back end for a certain exception should be transformed into a
7906 -- goto statement.
7907
7908 -- There are three kinds of exceptions raised by the back end (note that
7909 -- for this purpose we consider gigi to be part of the back end in the
7910 -- gcc case):
7911
7912 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7913 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7914 -- 3. Other cases not specifically marked by the front end
7915
7916 -- Normally all such exceptions are translated into calls to the proper
7917 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7918 -- and the exception message.
7919
7920 -- The front end may determine that for a particular sequence of code,
7921 -- exceptions in any of these three categories for a particular builtin
7922 -- exception should result in a goto, rather than a call to Rcheck_xx.
7923 -- The exact sequence to be generated is:
7924
7925 -- Local_Raise (exception'Identity);
7926 -- goto Label
7927
7928 -- The front end marks such a sequence of code by bracketing it with
7929 -- push and pop nodes:
7930
7931 -- N_Push_xxx_Label (referencing the label)
7932 -- ...
7933 -- (code where transformation is expected for exception xxx)
7934 -- ...
7935 -- N_Pop_xxx_Label
7936
7937 -- The use of push/pop reflects the fact that such regions can properly
7938 -- nest, and one special case is a subregion in which no transformation
7939 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7940 -- Exception_Label field is Empty.
7941
7942 -- N_Push_Constraint_Error_Label
7943 -- Sloc references first statement in region covered
7944 -- Exception_Label (Node5-Sem)
7945
7946 -- N_Push_Program_Error_Label
7947 -- Sloc references first statement in region covered
7948 -- Exception_Label (Node5-Sem)
7949
7950 -- N_Push_Storage_Error_Label
7951 -- Sloc references first statement in region covered
7952 -- Exception_Label (Node5-Sem)
7953
7954 -- N_Pop_Constraint_Error_Label
7955 -- Sloc references last statement in region covered
7956
7957 -- N_Pop_Program_Error_Label
7958 -- Sloc references last statement in region covered
7959
7960 -- N_Pop_Storage_Error_Label
7961 -- Sloc references last statement in region covered
7962
7963 ---------------
7964 -- Reference --
7965 ---------------
7966
7967 -- For a number of purposes, we need to construct references to objects.
7968 -- These references are subsequently treated as normal access values.
7969 -- An example is the construction of the parameter block passed to a
7970 -- task entry. The N_Reference node is provided for this purpose. It is
7971 -- similar in effect to the use of the Unrestricted_Access attribute,
7972 -- and like Unrestricted_Access can be applied to objects which would
7973 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7974 -- objects which are not aliased, and slices). In addition it can be
7975 -- applied to composite type values as well as objects, including string
7976 -- values and aggregates.
7977
7978 -- Note: we use the Prefix field for this expression so that the
7979 -- resulting node can be treated using common code with the attribute
7980 -- nodes for the 'Access and related attributes. Logically it would make
7981 -- more sense to call it an Expression field, but then we would have to
7982 -- special case the treatment of the N_Reference node.
7983
7984 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
7985 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
7986 -- a temporary initialized to a N_Reference node in order to eliminate
7987 -- superfluous access checks.
7988
7989 -- Sprint syntax: prefix'reference
7990
7991 -- N_Reference
7992 -- Sloc is copied from the expression
7993 -- Prefix (Node3)
7994 -- plus fields for expression
7995
7996 -- Note: in the case where a debug source file is generated, the Sloc
7997 -- for this node points to the quote in the Sprint file output.
7998
7999 ----------------
8000 -- SCIL Nodes --
8001 ----------------
8002
8003 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
8004 -- is active. They are only generated if SCIL generation is enabled.
8005 -- A standard tree-walk will not encounter these nodes even if they
8006 -- are present; these nodes are only accessible via the function
8007 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
8008 -- semantics.
8009
8010 -- Sprint syntax: [ <node kind> ]
8011 -- No semantic field values are displayed.
8012
8013 -- N_SCIL_Dispatch_Table_Tag_Init
8014 -- Sloc references a node for a tag initialization
8015 -- SCIL_Entity (Node4-Sem)
8016 --
8017 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
8018 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
8019 -- the declaration of the dispatch table for a tagged type.
8020
8021 -- N_SCIL_Dispatching_Call
8022 -- Sloc references the node of a dispatching call
8023 -- SCIL_Target_Prim (Node2-Sem)
8024 -- SCIL_Entity (Node4-Sem)
8025 -- SCIL_Controlling_Tag (Node5-Sem)
8026 --
8027 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
8028 -- with the N_Procedure_Call_Statement or N_Function_Call node (or a
8029 -- rewriting thereof) corresponding to a dispatching call.
8030
8031 -- N_SCIL_Membership_Test
8032 -- Sloc references the node of a membership test
8033 -- SCIL_Tag_Value (Node5-Sem)
8034 -- SCIL_Entity (Node4-Sem)
8035 --
8036 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
8037 -- with the N_In node (or a rewriting thereof) corresponding to a
8038 -- classwide membership test.
8039
8040 --------------------------
8041 -- Unchecked Expression --
8042 --------------------------
8043
8044 -- An unchecked expression is one that must be analyzed and resolved
8045 -- with all checks off, regardless of the current setting of scope
8046 -- suppress flags.
8047
8048 -- Sprint syntax: `(expression)
8049
8050 -- Note: this node is always removed from the tree (and replaced by
8051 -- its constituent expression) on completion of analysis, so it only
8052 -- appears in intermediate trees, and will never be seen by Gigi.
8053
8054 -- N_Unchecked_Expression
8055 -- Sloc is a copy of the Sloc of the expression
8056 -- Expression (Node3)
8057 -- plus fields for expression
8058
8059 -- Note: in the case where a debug source file is generated, the Sloc
8060 -- for this node points to the back quote in the Sprint file output.
8061
8062 -------------------------------
8063 -- Unchecked Type Conversion --
8064 -------------------------------
8065
8066 -- An unchecked type conversion node represents the semantic action
8067 -- corresponding to a call to an instantiation of Unchecked_Conversion.
8068 -- It is generated as a result of actual use of Unchecked_Conversion
8069 -- and also the expander generates unchecked type conversion nodes
8070 -- directly for expansion of complex semantic actions.
8071
8072 -- Note: an unchecked type conversion is a variable as far as the
8073 -- semantics are concerned, which is convenient for the expander.
8074 -- This does not change what Ada source programs are legal, since
8075 -- clearly a function call to an instantiation of Unchecked_Conversion
8076 -- is not a variable in any case.
8077
8078 -- Sprint syntax: subtype-mark!(expression)
8079
8080 -- N_Unchecked_Type_Conversion
8081 -- Sloc points to related node in source
8082 -- Subtype_Mark (Node4)
8083 -- Expression (Node3)
8084 -- Kill_Range_Check (Flag11-Sem)
8085 -- No_Truncation (Flag17-Sem)
8086 -- plus fields for expression
8087
8088 -- Note: in the case where a debug source file is generated, the Sloc
8089 -- for this node points to the exclamation in the Sprint file output.
8090
8091 -----------------------------------
8092 -- Validate_Unchecked_Conversion --
8093 -----------------------------------
8094
8095 -- The front end does most of the validation of unchecked conversion,
8096 -- including checking sizes (this is done after the back end is called
8097 -- to take advantage of back-annotation of calculated sizes).
8098
8099 -- The front end also deals with specific cases that are not allowed
8100 -- e.g. involving unconstrained array types.
8101
8102 -- For the case of the standard gigi backend, this means that all
8103 -- checks are done in the front end.
8104
8105 -- However, in the case of specialized back-ends, in particular the JVM
8106 -- backend in the past, additional requirements and restrictions may
8107 -- apply to unchecked conversion, and these are most conveniently
8108 -- performed in the specialized back-end.
8109
8110 -- To accommodate this requirement, for such back ends, the following
8111 -- special node is generated recording an unchecked conversion that
8112 -- needs to be validated. The back end should post an appropriate
8113 -- error message if the unchecked conversion is invalid or warrants
8114 -- a special warning message.
8115
8116 -- Source_Type and Target_Type point to the entities for the two
8117 -- types involved in the unchecked conversion instantiation that
8118 -- is to be validated.
8119
8120 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8121
8122 -- N_Validate_Unchecked_Conversion
8123 -- Sloc points to instantiation (location for warning message)
8124 -- Source_Type (Node1-Sem)
8125 -- Target_Type (Node2-Sem)
8126
8127 -- Note: in the case where a debug source file is generated, the Sloc
8128 -- for this node points to the VALIDATE keyword in the file output.
8129
8130 -----------
8131 -- Empty --
8132 -----------
8133
8134 -- Used as the contents of the Nkind field of the dummy Empty node
8135 -- and in some other situations to indicate an uninitialized value.
8136
8137 -- N_Empty
8138 -- Chars (Name1) is set to No_Name
8139
8140 -----------
8141 -- Error --
8142 -----------
8143
8144 -- Used as the contents of the Nkind field of the dummy Error node.
8145 -- Has an Etype field, which gets set to Any_Type later on, to help
8146 -- error recovery (Error_Posted is also set in the Error node).
8147
8148 -- N_Error
8149 -- Chars (Name1) is set to Error_Name
8150 -- Etype (Node5-Sem)
8151
8152 --------------------------
8153 -- Node Type Definition --
8154 --------------------------
8155
8156 -- The following is the definition of the Node_Kind type. As previously
8157 -- discussed, this is separated off to allow rearrangement of the order to
8158 -- facilitate definition of subtype ranges. The comments show the subtype
8159 -- classes which apply to each set of node kinds. The first entry in the
8160 -- comment characterizes the following list of nodes.
8161
8162 type Node_Kind is (
8163 N_Unused_At_Start,
8164
8165 -- N_Representation_Clause
8166
8167 N_At_Clause,
8168 N_Component_Clause,
8169 N_Enumeration_Representation_Clause,
8170 N_Mod_Clause,
8171 N_Record_Representation_Clause,
8172
8173 -- N_Representation_Clause, N_Has_Chars
8174
8175 N_Attribute_Definition_Clause,
8176
8177 -- N_Has_Chars
8178
8179 N_Empty,
8180 N_Pragma_Argument_Association,
8181
8182 -- N_Has_Etype, N_Has_Chars
8183
8184 -- Note: of course N_Error does not really have Etype or Chars fields,
8185 -- and any attempt to access these fields in N_Error will cause an
8186 -- error, but historically this always has been positioned so that an
8187 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8188 -- Most likely this makes coding easier somewhere but still seems
8189 -- undesirable. To be investigated some time ???
8190
8191 N_Error,
8192
8193 -- N_Entity, N_Has_Etype, N_Has_Chars
8194
8195 N_Defining_Character_Literal,
8196 N_Defining_Identifier,
8197 N_Defining_Operator_Symbol,
8198
8199 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8200
8201 N_Expanded_Name,
8202
8203 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8204 -- N_Has_Chars, N_Has_Entity
8205
8206 N_Identifier,
8207 N_Operator_Symbol,
8208
8209 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8210 -- N_Has_Chars, N_Has_Entity
8211
8212 N_Character_Literal,
8213
8214 -- N_Binary_Op, N_Op, N_Subexpr,
8215 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8216
8217 N_Op_Add,
8218 N_Op_Concat,
8219 N_Op_Expon,
8220 N_Op_Subtract,
8221
8222 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
8223 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8224
8225 N_Op_Divide,
8226 N_Op_Mod,
8227 N_Op_Multiply,
8228 N_Op_Rem,
8229
8230 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8231 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8232
8233 N_Op_And,
8234
8235 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8236 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8237
8238 N_Op_Eq,
8239 N_Op_Ge,
8240 N_Op_Gt,
8241 N_Op_Le,
8242 N_Op_Lt,
8243 N_Op_Ne,
8244
8245 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8246 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8247
8248 N_Op_Or,
8249 N_Op_Xor,
8250
8251 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8252 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8253
8254 N_Op_Rotate_Left,
8255 N_Op_Rotate_Right,
8256 N_Op_Shift_Left,
8257 N_Op_Shift_Right,
8258 N_Op_Shift_Right_Arithmetic,
8259
8260 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8261 -- N_Has_Chars, N_Has_Entity
8262
8263 N_Op_Abs,
8264 N_Op_Minus,
8265 N_Op_Not,
8266 N_Op_Plus,
8267
8268 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8269
8270 N_Attribute_Reference,
8271
8272 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8273
8274 N_In,
8275 N_Not_In,
8276
8277 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8278
8279 N_And_Then,
8280 N_Or_Else,
8281
8282 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8283
8284 N_Function_Call,
8285 N_Procedure_Call_Statement,
8286
8287 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8288
8289 N_Raise_Constraint_Error,
8290 N_Raise_Program_Error,
8291 N_Raise_Storage_Error,
8292
8293 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8294
8295 N_Integer_Literal,
8296 N_Real_Literal,
8297 N_String_Literal,
8298
8299 -- N_Subexpr, N_Has_Etype
8300
8301 N_Explicit_Dereference,
8302 N_Expression_With_Actions,
8303 N_If_Expression,
8304 N_Indexed_Component,
8305 N_Null,
8306 N_Qualified_Expression,
8307 N_Quantified_Expression,
8308 N_Aggregate,
8309 N_Allocator,
8310 N_Case_Expression,
8311 N_Extension_Aggregate,
8312 N_Raise_Expression,
8313 N_Range,
8314 N_Reference,
8315 N_Selected_Component,
8316 N_Slice,
8317 N_Type_Conversion,
8318 N_Unchecked_Expression,
8319 N_Unchecked_Type_Conversion,
8320
8321 -- N_Has_Etype
8322
8323 N_Subtype_Indication,
8324
8325 -- N_Declaration
8326
8327 N_Component_Declaration,
8328 N_Entry_Declaration,
8329 N_Expression_Function,
8330 N_Formal_Object_Declaration,
8331 N_Formal_Type_Declaration,
8332 N_Full_Type_Declaration,
8333 N_Incomplete_Type_Declaration,
8334 N_Iterator_Specification,
8335 N_Loop_Parameter_Specification,
8336 N_Object_Declaration,
8337 N_Protected_Type_Declaration,
8338 N_Private_Extension_Declaration,
8339 N_Private_Type_Declaration,
8340 N_Subtype_Declaration,
8341
8342 -- N_Subprogram_Specification, N_Declaration
8343
8344 N_Function_Specification,
8345 N_Procedure_Specification,
8346
8347 -- N_Access_To_Subprogram_Definition
8348
8349 N_Access_Function_Definition,
8350 N_Access_Procedure_Definition,
8351
8352 -- N_Later_Decl_Item
8353
8354 N_Task_Type_Declaration,
8355
8356 -- N_Body_Stub, N_Later_Decl_Item
8357
8358 N_Package_Body_Stub,
8359 N_Protected_Body_Stub,
8360 N_Subprogram_Body_Stub,
8361 N_Task_Body_Stub,
8362
8363 -- N_Generic_Instantiation, N_Later_Decl_Item
8364 -- N_Subprogram_Instantiation
8365
8366 N_Function_Instantiation,
8367 N_Procedure_Instantiation,
8368
8369 -- N_Generic_Instantiation, N_Later_Decl_Item
8370
8371 N_Package_Instantiation,
8372
8373 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8374
8375 N_Package_Body,
8376 N_Subprogram_Body,
8377
8378 -- N_Later_Decl_Item, N_Proper_Body
8379
8380 N_Protected_Body,
8381 N_Task_Body,
8382
8383 -- N_Later_Decl_Item
8384
8385 N_Implicit_Label_Declaration,
8386 N_Package_Declaration,
8387 N_Single_Task_Declaration,
8388 N_Subprogram_Declaration,
8389 N_Use_Package_Clause,
8390
8391 -- N_Generic_Declaration, N_Later_Decl_Item
8392
8393 N_Generic_Package_Declaration,
8394 N_Generic_Subprogram_Declaration,
8395
8396 -- N_Array_Type_Definition
8397
8398 N_Constrained_Array_Definition,
8399 N_Unconstrained_Array_Definition,
8400
8401 -- N_Renaming_Declaration
8402
8403 N_Exception_Renaming_Declaration,
8404 N_Object_Renaming_Declaration,
8405 N_Package_Renaming_Declaration,
8406 N_Subprogram_Renaming_Declaration,
8407
8408 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8409
8410 N_Generic_Function_Renaming_Declaration,
8411 N_Generic_Package_Renaming_Declaration,
8412 N_Generic_Procedure_Renaming_Declaration,
8413
8414 -- N_Statement_Other_Than_Procedure_Call
8415
8416 N_Abort_Statement,
8417 N_Accept_Statement,
8418 N_Assignment_Statement,
8419 N_Asynchronous_Select,
8420 N_Block_Statement,
8421 N_Case_Statement,
8422 N_Code_Statement,
8423 N_Compound_Statement,
8424 N_Conditional_Entry_Call,
8425
8426 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8427
8428 N_Delay_Relative_Statement,
8429 N_Delay_Until_Statement,
8430
8431 -- N_Statement_Other_Than_Procedure_Call
8432
8433 N_Entry_Call_Statement,
8434 N_Free_Statement,
8435 N_Goto_Statement,
8436 N_Loop_Statement,
8437 N_Null_Statement,
8438 N_Raise_Statement,
8439 N_Requeue_Statement,
8440 N_Simple_Return_Statement,
8441 N_Extended_Return_Statement,
8442 N_Selective_Accept,
8443 N_Timed_Entry_Call,
8444
8445 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8446
8447 N_Exit_Statement,
8448 N_If_Statement,
8449
8450 -- N_Has_Condition
8451
8452 N_Accept_Alternative,
8453 N_Delay_Alternative,
8454 N_Elsif_Part,
8455 N_Entry_Body_Formal_Part,
8456 N_Iteration_Scheme,
8457 N_Terminate_Alternative,
8458
8459 -- N_Formal_Subprogram_Declaration
8460
8461 N_Formal_Abstract_Subprogram_Declaration,
8462 N_Formal_Concrete_Subprogram_Declaration,
8463
8464 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8465
8466 N_Push_Constraint_Error_Label,
8467 N_Push_Program_Error_Label,
8468 N_Push_Storage_Error_Label,
8469
8470 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8471
8472 N_Pop_Constraint_Error_Label,
8473 N_Pop_Program_Error_Label,
8474 N_Pop_Storage_Error_Label,
8475
8476 -- SCIL nodes
8477
8478 N_SCIL_Dispatch_Table_Tag_Init,
8479 N_SCIL_Dispatching_Call,
8480 N_SCIL_Membership_Test,
8481
8482 -- Other nodes (not part of any subtype class)
8483
8484 N_Abortable_Part,
8485 N_Abstract_Subprogram_Declaration,
8486 N_Access_Definition,
8487 N_Access_To_Object_Definition,
8488 N_Aspect_Specification,
8489 N_Case_Expression_Alternative,
8490 N_Case_Statement_Alternative,
8491 N_Compilation_Unit,
8492 N_Compilation_Unit_Aux,
8493 N_Component_Association,
8494 N_Component_Definition,
8495 N_Component_List,
8496 N_Contract,
8497 N_Derived_Type_Definition,
8498 N_Decimal_Fixed_Point_Definition,
8499 N_Defining_Program_Unit_Name,
8500 N_Delta_Constraint,
8501 N_Designator,
8502 N_Digits_Constraint,
8503 N_Discriminant_Association,
8504 N_Discriminant_Specification,
8505 N_Enumeration_Type_Definition,
8506 N_Entry_Body,
8507 N_Entry_Call_Alternative,
8508 N_Entry_Index_Specification,
8509 N_Exception_Declaration,
8510 N_Exception_Handler,
8511 N_Floating_Point_Definition,
8512 N_Formal_Decimal_Fixed_Point_Definition,
8513 N_Formal_Derived_Type_Definition,
8514 N_Formal_Discrete_Type_Definition,
8515 N_Formal_Floating_Point_Definition,
8516 N_Formal_Modular_Type_Definition,
8517 N_Formal_Ordinary_Fixed_Point_Definition,
8518 N_Formal_Package_Declaration,
8519 N_Formal_Private_Type_Definition,
8520 N_Formal_Incomplete_Type_Definition,
8521 N_Formal_Signed_Integer_Type_Definition,
8522 N_Freeze_Entity,
8523 N_Freeze_Generic_Entity,
8524 N_Generic_Association,
8525 N_Handled_Sequence_Of_Statements,
8526 N_Index_Or_Discriminant_Constraint,
8527 N_Itype_Reference,
8528 N_Label,
8529 N_Modular_Type_Definition,
8530 N_Number_Declaration,
8531 N_Ordinary_Fixed_Point_Definition,
8532 N_Others_Choice,
8533 N_Package_Specification,
8534 N_Parameter_Association,
8535 N_Parameter_Specification,
8536 N_Pragma,
8537 N_Protected_Definition,
8538 N_Range_Constraint,
8539 N_Real_Range_Specification,
8540 N_Record_Definition,
8541 N_Signed_Integer_Type_Definition,
8542 N_Single_Protected_Declaration,
8543 N_Subunit,
8544 N_Task_Definition,
8545 N_Triggering_Alternative,
8546 N_Use_Type_Clause,
8547 N_Validate_Unchecked_Conversion,
8548 N_Variant,
8549 N_Variant_Part,
8550 N_With_Clause,
8551 N_Unused_At_End);
8552
8553 for Node_Kind'Size use 8;
8554 -- The data structures in Atree assume this
8555
8556 ----------------------------
8557 -- Node Class Definitions --
8558 ----------------------------
8559
8560 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8561 N_Access_Function_Definition ..
8562 N_Access_Procedure_Definition;
8563
8564 subtype N_Array_Type_Definition is Node_Kind range
8565 N_Constrained_Array_Definition ..
8566 N_Unconstrained_Array_Definition;
8567
8568 subtype N_Binary_Op is Node_Kind range
8569 N_Op_Add ..
8570 N_Op_Shift_Right_Arithmetic;
8571
8572 subtype N_Body_Stub is Node_Kind range
8573 N_Package_Body_Stub ..
8574 N_Task_Body_Stub;
8575
8576 subtype N_Declaration is Node_Kind range
8577 N_Component_Declaration ..
8578 N_Procedure_Specification;
8579 -- Note: this includes all constructs normally thought of as declarations
8580 -- except those which are separately grouped as later declarations.
8581
8582 subtype N_Delay_Statement is Node_Kind range
8583 N_Delay_Relative_Statement ..
8584 N_Delay_Until_Statement;
8585
8586 subtype N_Direct_Name is Node_Kind range
8587 N_Identifier ..
8588 N_Character_Literal;
8589
8590 subtype N_Entity is Node_Kind range
8591 N_Defining_Character_Literal ..
8592 N_Defining_Operator_Symbol;
8593
8594 subtype N_Formal_Subprogram_Declaration is Node_Kind range
8595 N_Formal_Abstract_Subprogram_Declaration ..
8596 N_Formal_Concrete_Subprogram_Declaration;
8597
8598 subtype N_Generic_Declaration is Node_Kind range
8599 N_Generic_Package_Declaration ..
8600 N_Generic_Subprogram_Declaration;
8601
8602 subtype N_Generic_Instantiation is Node_Kind range
8603 N_Function_Instantiation ..
8604 N_Package_Instantiation;
8605
8606 subtype N_Generic_Renaming_Declaration is Node_Kind range
8607 N_Generic_Function_Renaming_Declaration ..
8608 N_Generic_Procedure_Renaming_Declaration;
8609
8610 subtype N_Has_Chars is Node_Kind range
8611 N_Attribute_Definition_Clause ..
8612 N_Op_Plus;
8613
8614 subtype N_Has_Entity is Node_Kind range
8615 N_Expanded_Name ..
8616 N_Attribute_Reference;
8617 -- Nodes that have Entity fields
8618 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
8619 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
8620
8621 subtype N_Has_Etype is Node_Kind range
8622 N_Error ..
8623 N_Subtype_Indication;
8624
8625 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
8626 N_Op_Divide ..
8627 N_Op_Rem;
8628
8629 subtype N_Multiplying_Operator is Node_Kind range
8630 N_Op_Divide ..
8631 N_Op_Rem;
8632
8633 subtype N_Later_Decl_Item is Node_Kind range
8634 N_Task_Type_Declaration ..
8635 N_Generic_Subprogram_Declaration;
8636 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
8637 -- only those items which can appear as later declarative items. This also
8638 -- includes N_Implicit_Label_Declaration which is not specifically in the
8639 -- grammar but may appear as a valid later declarative items. It does NOT
8640 -- include N_Pragma which can also appear among later declarative items.
8641 -- It does however include N_Protected_Body, which is a bit peculiar, but
8642 -- harmless since this cannot appear in Ada 83 mode anyway.
8643
8644 subtype N_Membership_Test is Node_Kind range
8645 N_In ..
8646 N_Not_In;
8647
8648 subtype N_Numeric_Or_String_Literal is Node_Kind range
8649 N_Integer_Literal ..
8650 N_String_Literal;
8651
8652 subtype N_Op is Node_Kind range
8653 N_Op_Add ..
8654 N_Op_Plus;
8655
8656 subtype N_Op_Boolean is Node_Kind range
8657 N_Op_And ..
8658 N_Op_Xor;
8659 -- Binary operators which take operands of a boolean type, and yield
8660 -- a result of a boolean type.
8661
8662 subtype N_Op_Compare is Node_Kind range
8663 N_Op_Eq ..
8664 N_Op_Ne;
8665
8666 subtype N_Op_Shift is Node_Kind range
8667 N_Op_Rotate_Left ..
8668 N_Op_Shift_Right_Arithmetic;
8669
8670 subtype N_Proper_Body is Node_Kind range
8671 N_Package_Body ..
8672 N_Task_Body;
8673
8674 subtype N_Push_xxx_Label is Node_Kind range
8675 N_Push_Constraint_Error_Label ..
8676 N_Push_Storage_Error_Label;
8677
8678 subtype N_Pop_xxx_Label is Node_Kind range
8679 N_Pop_Constraint_Error_Label ..
8680 N_Pop_Storage_Error_Label;
8681
8682 subtype N_Push_Pop_xxx_Label is Node_Kind range
8683 N_Push_Constraint_Error_Label ..
8684 N_Pop_Storage_Error_Label;
8685
8686 subtype N_Raise_xxx_Error is Node_Kind range
8687 N_Raise_Constraint_Error ..
8688 N_Raise_Storage_Error;
8689
8690 subtype N_Renaming_Declaration is Node_Kind range
8691 N_Exception_Renaming_Declaration ..
8692 N_Generic_Procedure_Renaming_Declaration;
8693
8694 subtype N_Representation_Clause is Node_Kind range
8695 N_At_Clause ..
8696 N_Attribute_Definition_Clause;
8697
8698 subtype N_Short_Circuit is Node_Kind range
8699 N_And_Then ..
8700 N_Or_Else;
8701
8702 subtype N_SCIL_Node is Node_Kind range
8703 N_SCIL_Dispatch_Table_Tag_Init ..
8704 N_SCIL_Membership_Test;
8705
8706 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
8707 N_Abort_Statement ..
8708 N_If_Statement;
8709 -- Note that this includes all statement types except for the cases of the
8710 -- N_Procedure_Call_Statement which is considered to be a subexpression
8711 -- (since overloading is possible, so it needs to go through the normal
8712 -- overloading resolution for expressions).
8713
8714 subtype N_Subprogram_Call is Node_Kind range
8715 N_Function_Call ..
8716 N_Procedure_Call_Statement;
8717
8718 subtype N_Subprogram_Instantiation is Node_Kind range
8719 N_Function_Instantiation ..
8720 N_Procedure_Instantiation;
8721
8722 subtype N_Has_Condition is Node_Kind range
8723 N_Exit_Statement ..
8724 N_Terminate_Alternative;
8725 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
8726
8727 subtype N_Subexpr is Node_Kind range
8728 N_Expanded_Name ..
8729 N_Unchecked_Type_Conversion;
8730 -- Nodes with expression fields
8731
8732 subtype N_Subprogram_Specification is Node_Kind range
8733 N_Function_Specification ..
8734 N_Procedure_Specification;
8735
8736 subtype N_Unary_Op is Node_Kind range
8737 N_Op_Abs ..
8738 N_Op_Plus;
8739
8740 subtype N_Unit_Body is Node_Kind range
8741 N_Package_Body ..
8742 N_Subprogram_Body;
8743
8744 ---------------------------
8745 -- Node Access Functions --
8746 ---------------------------
8747
8748 -- The following functions return the contents of the indicated field of
8749 -- the node referenced by the argument, which is a Node_Id. They provide
8750 -- logical access to fields in the node which could be accessed using the
8751 -- Atree.Unchecked_Access package, but the idea is always to use these
8752 -- higher level routines which preserve strong typing. In debug mode,
8753 -- these routines check that they are being applied to an appropriate
8754 -- node, as well as checking that the node is in range.
8755
8756 function ABE_Is_Certain
8757 (N : Node_Id) return Boolean; -- Flag18
8758
8759 function Abort_Present
8760 (N : Node_Id) return Boolean; -- Flag15
8761
8762 function Abortable_Part
8763 (N : Node_Id) return Node_Id; -- Node2
8764
8765 function Abstract_Present
8766 (N : Node_Id) return Boolean; -- Flag4
8767
8768 function Accept_Handler_Records
8769 (N : Node_Id) return List_Id; -- List5
8770
8771 function Accept_Statement
8772 (N : Node_Id) return Node_Id; -- Node2
8773
8774 function Access_Definition
8775 (N : Node_Id) return Node_Id; -- Node3
8776
8777 function Access_To_Subprogram_Definition
8778 (N : Node_Id) return Node_Id; -- Node3
8779
8780 function Access_Types_To_Process
8781 (N : Node_Id) return Elist_Id; -- Elist2
8782
8783 function Actions
8784 (N : Node_Id) return List_Id; -- List1
8785
8786 function Activation_Chain_Entity
8787 (N : Node_Id) return Node_Id; -- Node3
8788
8789 function Acts_As_Spec
8790 (N : Node_Id) return Boolean; -- Flag4
8791
8792 function Actual_Designated_Subtype
8793 (N : Node_Id) return Node_Id; -- Node4
8794
8795 function Address_Warning_Posted
8796 (N : Node_Id) return Boolean; -- Flag18
8797
8798 function Aggregate_Bounds
8799 (N : Node_Id) return Node_Id; -- Node3
8800
8801 function Aliased_Present
8802 (N : Node_Id) return Boolean; -- Flag4
8803
8804 function All_Others
8805 (N : Node_Id) return Boolean; -- Flag11
8806
8807 function All_Present
8808 (N : Node_Id) return Boolean; -- Flag15
8809
8810 function Alternatives
8811 (N : Node_Id) return List_Id; -- List4
8812
8813 function Ancestor_Part
8814 (N : Node_Id) return Node_Id; -- Node3
8815
8816 function Atomic_Sync_Required
8817 (N : Node_Id) return Boolean; -- Flag14
8818
8819 function Array_Aggregate
8820 (N : Node_Id) return Node_Id; -- Node3
8821
8822 function Aspect_Rep_Item
8823 (N : Node_Id) return Node_Id; -- Node2
8824
8825 function Assignment_OK
8826 (N : Node_Id) return Boolean; -- Flag15
8827
8828 function Associated_Node
8829 (N : Node_Id) return Node_Id; -- Node4
8830
8831 function At_End_Proc
8832 (N : Node_Id) return Node_Id; -- Node1
8833
8834 function Attribute_Name
8835 (N : Node_Id) return Name_Id; -- Name2
8836
8837 function Aux_Decls_Node
8838 (N : Node_Id) return Node_Id; -- Node5
8839
8840 function Backwards_OK
8841 (N : Node_Id) return Boolean; -- Flag6
8842
8843 function Bad_Is_Detected
8844 (N : Node_Id) return Boolean; -- Flag15
8845
8846 function By_Ref
8847 (N : Node_Id) return Boolean; -- Flag5
8848
8849 function Body_Required
8850 (N : Node_Id) return Boolean; -- Flag13
8851
8852 function Body_To_Inline
8853 (N : Node_Id) return Node_Id; -- Node3
8854
8855 function Box_Present
8856 (N : Node_Id) return Boolean; -- Flag15
8857
8858 function Char_Literal_Value
8859 (N : Node_Id) return Uint; -- Uint2
8860
8861 function Chars
8862 (N : Node_Id) return Name_Id; -- Name1
8863
8864 function Check_Address_Alignment
8865 (N : Node_Id) return Boolean; -- Flag11
8866
8867 function Choice_Parameter
8868 (N : Node_Id) return Node_Id; -- Node2
8869
8870 function Choices
8871 (N : Node_Id) return List_Id; -- List1
8872
8873 function Class_Present
8874 (N : Node_Id) return Boolean; -- Flag6
8875
8876 function Classifications
8877 (N : Node_Id) return Node_Id; -- Node3
8878
8879 function Cleanup_Actions
8880 (N : Node_Id) return List_Id; -- List5
8881
8882 function Comes_From_Extended_Return_Statement
8883 (N : Node_Id) return Boolean; -- Flag18
8884
8885 function Compile_Time_Known_Aggregate
8886 (N : Node_Id) return Boolean; -- Flag18
8887
8888 function Component_Associations
8889 (N : Node_Id) return List_Id; -- List2
8890
8891 function Component_Clauses
8892 (N : Node_Id) return List_Id; -- List3
8893
8894 function Component_Definition
8895 (N : Node_Id) return Node_Id; -- Node4
8896
8897 function Component_Items
8898 (N : Node_Id) return List_Id; -- List3
8899
8900 function Component_List
8901 (N : Node_Id) return Node_Id; -- Node1
8902
8903 function Component_Name
8904 (N : Node_Id) return Node_Id; -- Node1
8905
8906 function Componentwise_Assignment
8907 (N : Node_Id) return Boolean; -- Flag14
8908
8909 function Condition
8910 (N : Node_Id) return Node_Id; -- Node1
8911
8912 function Condition_Actions
8913 (N : Node_Id) return List_Id; -- List3
8914
8915 function Config_Pragmas
8916 (N : Node_Id) return List_Id; -- List4
8917
8918 function Constant_Present
8919 (N : Node_Id) return Boolean; -- Flag17
8920
8921 function Constraint
8922 (N : Node_Id) return Node_Id; -- Node3
8923
8924 function Constraints
8925 (N : Node_Id) return List_Id; -- List1
8926
8927 function Context_Installed
8928 (N : Node_Id) return Boolean; -- Flag13
8929
8930 function Context_Pending
8931 (N : Node_Id) return Boolean; -- Flag16
8932
8933 function Context_Items
8934 (N : Node_Id) return List_Id; -- List1
8935
8936 function Contract_Test_Cases
8937 (N : Node_Id) return Node_Id; -- Node2
8938
8939 function Controlling_Argument
8940 (N : Node_Id) return Node_Id; -- Node1
8941
8942 function Conversion_OK
8943 (N : Node_Id) return Boolean; -- Flag14
8944
8945 function Convert_To_Return_False
8946 (N : Node_Id) return Boolean; -- Flag13
8947
8948 function Corresponding_Aspect
8949 (N : Node_Id) return Node_Id; -- Node3
8950
8951 function Corresponding_Body
8952 (N : Node_Id) return Node_Id; -- Node5
8953
8954 function Corresponding_Formal_Spec
8955 (N : Node_Id) return Node_Id; -- Node3
8956
8957 function Corresponding_Generic_Association
8958 (N : Node_Id) return Node_Id; -- Node5
8959
8960 function Corresponding_Integer_Value
8961 (N : Node_Id) return Uint; -- Uint4
8962
8963 function Corresponding_Spec
8964 (N : Node_Id) return Node_Id; -- Node5
8965
8966 function Corresponding_Spec_Of_Stub
8967 (N : Node_Id) return Node_Id; -- Node2
8968
8969 function Corresponding_Stub
8970 (N : Node_Id) return Node_Id; -- Node3
8971
8972 function Dcheck_Function
8973 (N : Node_Id) return Entity_Id; -- Node5
8974
8975 function Declarations
8976 (N : Node_Id) return List_Id; -- List2
8977
8978 function Default_Expression
8979 (N : Node_Id) return Node_Id; -- Node5
8980
8981 function Default_Storage_Pool
8982 (N : Node_Id) return Node_Id; -- Node3
8983
8984 function Default_Name
8985 (N : Node_Id) return Node_Id; -- Node2
8986
8987 function Defining_Identifier
8988 (N : Node_Id) return Entity_Id; -- Node1
8989
8990 function Defining_Unit_Name
8991 (N : Node_Id) return Node_Id; -- Node1
8992
8993 function Delay_Alternative
8994 (N : Node_Id) return Node_Id; -- Node4
8995
8996 function Delay_Statement
8997 (N : Node_Id) return Node_Id; -- Node2
8998
8999 function Delta_Expression
9000 (N : Node_Id) return Node_Id; -- Node3
9001
9002 function Digits_Expression
9003 (N : Node_Id) return Node_Id; -- Node2
9004
9005 function Discr_Check_Funcs_Built
9006 (N : Node_Id) return Boolean; -- Flag11
9007
9008 function Discrete_Choices
9009 (N : Node_Id) return List_Id; -- List4
9010
9011 function Discrete_Range
9012 (N : Node_Id) return Node_Id; -- Node4
9013
9014 function Discrete_Subtype_Definition
9015 (N : Node_Id) return Node_Id; -- Node4
9016
9017 function Discrete_Subtype_Definitions
9018 (N : Node_Id) return List_Id; -- List2
9019
9020 function Discriminant_Specifications
9021 (N : Node_Id) return List_Id; -- List4
9022
9023 function Discriminant_Type
9024 (N : Node_Id) return Node_Id; -- Node5
9025
9026 function Do_Accessibility_Check
9027 (N : Node_Id) return Boolean; -- Flag13
9028
9029 function Do_Discriminant_Check
9030 (N : Node_Id) return Boolean; -- Flag1
9031
9032 function Do_Division_Check
9033 (N : Node_Id) return Boolean; -- Flag13
9034
9035 function Do_Length_Check
9036 (N : Node_Id) return Boolean; -- Flag4
9037
9038 function Do_Overflow_Check
9039 (N : Node_Id) return Boolean; -- Flag17
9040
9041 function Do_Range_Check
9042 (N : Node_Id) return Boolean; -- Flag9
9043
9044 function Do_Storage_Check
9045 (N : Node_Id) return Boolean; -- Flag17
9046
9047 function Do_Tag_Check
9048 (N : Node_Id) return Boolean; -- Flag13
9049
9050 function Elaborate_All_Desirable
9051 (N : Node_Id) return Boolean; -- Flag9
9052
9053 function Elaborate_All_Present
9054 (N : Node_Id) return Boolean; -- Flag14
9055
9056 function Elaborate_Desirable
9057 (N : Node_Id) return Boolean; -- Flag11
9058
9059 function Elaborate_Present
9060 (N : Node_Id) return Boolean; -- Flag4
9061
9062 function Else_Actions
9063 (N : Node_Id) return List_Id; -- List3
9064
9065 function Else_Statements
9066 (N : Node_Id) return List_Id; -- List4
9067
9068 function Elsif_Parts
9069 (N : Node_Id) return List_Id; -- List3
9070
9071 function Enclosing_Variant
9072 (N : Node_Id) return Node_Id; -- Node2
9073
9074 function End_Label
9075 (N : Node_Id) return Node_Id; -- Node4
9076
9077 function End_Span
9078 (N : Node_Id) return Uint; -- Uint5
9079
9080 function Entity
9081 (N : Node_Id) return Node_Id; -- Node4
9082
9083 function Entity_Or_Associated_Node
9084 (N : Node_Id) return Node_Id; -- Node4
9085
9086 function Entry_Body_Formal_Part
9087 (N : Node_Id) return Node_Id; -- Node5
9088
9089 function Entry_Call_Alternative
9090 (N : Node_Id) return Node_Id; -- Node1
9091
9092 function Entry_Call_Statement
9093 (N : Node_Id) return Node_Id; -- Node1
9094
9095 function Entry_Direct_Name
9096 (N : Node_Id) return Node_Id; -- Node1
9097
9098 function Entry_Index
9099 (N : Node_Id) return Node_Id; -- Node5
9100
9101 function Entry_Index_Specification
9102 (N : Node_Id) return Node_Id; -- Node4
9103
9104 function Etype
9105 (N : Node_Id) return Node_Id; -- Node5
9106
9107 function Exception_Choices
9108 (N : Node_Id) return List_Id; -- List4
9109
9110 function Exception_Handlers
9111 (N : Node_Id) return List_Id; -- List5
9112
9113 function Exception_Junk
9114 (N : Node_Id) return Boolean; -- Flag8
9115
9116 function Exception_Label
9117 (N : Node_Id) return Node_Id; -- Node5
9118
9119 function Explicit_Actual_Parameter
9120 (N : Node_Id) return Node_Id; -- Node3
9121
9122 function Expansion_Delayed
9123 (N : Node_Id) return Boolean; -- Flag11
9124
9125 function Explicit_Generic_Actual_Parameter
9126 (N : Node_Id) return Node_Id; -- Node1
9127
9128 function Expression
9129 (N : Node_Id) return Node_Id; -- Node3
9130
9131 function Expressions
9132 (N : Node_Id) return List_Id; -- List1
9133
9134 function First_Bit
9135 (N : Node_Id) return Node_Id; -- Node3
9136
9137 function First_Inlined_Subprogram
9138 (N : Node_Id) return Entity_Id; -- Node3
9139
9140 function First_Name
9141 (N : Node_Id) return Boolean; -- Flag5
9142
9143 function First_Named_Actual
9144 (N : Node_Id) return Node_Id; -- Node4
9145
9146 function First_Real_Statement
9147 (N : Node_Id) return Node_Id; -- Node2
9148
9149 function First_Subtype_Link
9150 (N : Node_Id) return Entity_Id; -- Node5
9151
9152 function Float_Truncate
9153 (N : Node_Id) return Boolean; -- Flag11
9154
9155 function Formal_Type_Definition
9156 (N : Node_Id) return Node_Id; -- Node3
9157
9158 function Forwards_OK
9159 (N : Node_Id) return Boolean; -- Flag5
9160
9161 function From_Aspect_Specification
9162 (N : Node_Id) return Boolean; -- Flag13
9163
9164 function From_At_End
9165 (N : Node_Id) return Boolean; -- Flag4
9166
9167 function From_At_Mod
9168 (N : Node_Id) return Boolean; -- Flag4
9169
9170 function From_Conditional_Expression
9171 (N : Node_Id) return Boolean; -- Flag1
9172
9173 function From_Default
9174 (N : Node_Id) return Boolean; -- Flag6
9175
9176 function Generalized_Indexing
9177 (N : Node_Id) return Node_Id; -- Node4
9178 function Generic_Associations
9179 (N : Node_Id) return List_Id; -- List3
9180
9181 function Generic_Formal_Declarations
9182 (N : Node_Id) return List_Id; -- List2
9183
9184 function Generic_Parent
9185 (N : Node_Id) return Node_Id; -- Node5
9186
9187 function Generic_Parent_Type
9188 (N : Node_Id) return Node_Id; -- Node4
9189
9190 function Handled_Statement_Sequence
9191 (N : Node_Id) return Node_Id; -- Node4
9192
9193 function Handler_List_Entry
9194 (N : Node_Id) return Node_Id; -- Node2
9195
9196 function Has_Created_Identifier
9197 (N : Node_Id) return Boolean; -- Flag15
9198
9199 function Has_Dereference_Action
9200 (N : Node_Id) return Boolean; -- Flag13
9201
9202 function Has_Dynamic_Length_Check
9203 (N : Node_Id) return Boolean; -- Flag10
9204
9205 function Has_Dynamic_Range_Check
9206 (N : Node_Id) return Boolean; -- Flag12
9207
9208 function Has_Init_Expression
9209 (N : Node_Id) return Boolean; -- Flag14
9210
9211 function Has_Local_Raise
9212 (N : Node_Id) return Boolean; -- Flag8
9213
9214 function Has_No_Elaboration_Code
9215 (N : Node_Id) return Boolean; -- Flag17
9216
9217 function Has_Pragma_Suppress_All
9218 (N : Node_Id) return Boolean; -- Flag14
9219
9220 function Has_Private_View
9221 (N : Node_Id) return Boolean; -- Flag11
9222
9223 function Has_Relative_Deadline_Pragma
9224 (N : Node_Id) return Boolean; -- Flag9
9225
9226 function Has_Self_Reference
9227 (N : Node_Id) return Boolean; -- Flag13
9228
9229 function Has_SP_Choice
9230 (N : Node_Id) return Boolean; -- Flag15
9231
9232 function Has_Storage_Size_Pragma
9233 (N : Node_Id) return Boolean; -- Flag5
9234
9235 function Has_Wide_Character
9236 (N : Node_Id) return Boolean; -- Flag11
9237
9238 function Has_Wide_Wide_Character
9239 (N : Node_Id) return Boolean; -- Flag13
9240
9241 function Header_Size_Added
9242 (N : Node_Id) return Boolean; -- Flag11
9243
9244 function Hidden_By_Use_Clause
9245 (N : Node_Id) return Elist_Id; -- Elist4
9246
9247 function High_Bound
9248 (N : Node_Id) return Node_Id; -- Node2
9249
9250 function Identifier
9251 (N : Node_Id) return Node_Id; -- Node1
9252
9253 function Interface_List
9254 (N : Node_Id) return List_Id; -- List2
9255
9256 function Interface_Present
9257 (N : Node_Id) return Boolean; -- Flag16
9258
9259 function Implicit_With
9260 (N : Node_Id) return Boolean; -- Flag16
9261
9262 function Implicit_With_From_Instantiation
9263 (N : Node_Id) return Boolean; -- Flag12
9264
9265 function Import_Interface_Present
9266 (N : Node_Id) return Boolean; -- Flag16
9267
9268 function In_Present
9269 (N : Node_Id) return Boolean; -- Flag15
9270
9271 function Includes_Infinities
9272 (N : Node_Id) return Boolean; -- Flag11
9273
9274 function Incomplete_View
9275 (N : Node_Id) return Node_Id; -- Node2
9276
9277 function Inherited_Discriminant
9278 (N : Node_Id) return Boolean; -- Flag13
9279
9280 function Instance_Spec
9281 (N : Node_Id) return Node_Id; -- Node5
9282
9283 function Intval
9284 (N : Node_Id) return Uint; -- Uint3
9285
9286 function Is_Accessibility_Actual
9287 (N : Node_Id) return Boolean; -- Flag13
9288
9289 function Is_Asynchronous_Call_Block
9290 (N : Node_Id) return Boolean; -- Flag7
9291
9292 function Is_Boolean_Aspect
9293 (N : Node_Id) return Boolean; -- Flag16
9294
9295 function Is_Checked
9296 (N : Node_Id) return Boolean; -- Flag11
9297
9298 function Is_Component_Left_Opnd
9299 (N : Node_Id) return Boolean; -- Flag13
9300
9301 function Is_Component_Right_Opnd
9302 (N : Node_Id) return Boolean; -- Flag14
9303
9304 function Is_Controlling_Actual
9305 (N : Node_Id) return Boolean; -- Flag16
9306
9307 function Is_Delayed_Aspect
9308 (N : Node_Id) return Boolean; -- Flag14
9309
9310 function Is_Disabled
9311 (N : Node_Id) return Boolean; -- Flag15
9312
9313 function Is_Dynamic_Coextension
9314 (N : Node_Id) return Boolean; -- Flag18
9315
9316 function Is_Elsif
9317 (N : Node_Id) return Boolean; -- Flag13
9318
9319 function Is_Entry_Barrier_Function
9320 (N : Node_Id) return Boolean; -- Flag8
9321
9322 function Is_Expanded_Build_In_Place_Call
9323 (N : Node_Id) return Boolean; -- Flag11
9324
9325 function Is_Finalization_Wrapper
9326 (N : Node_Id) return Boolean; -- Flag9
9327
9328 function Is_Folded_In_Parser
9329 (N : Node_Id) return Boolean; -- Flag4
9330
9331 function Is_Generic_Contract_Pragma
9332 (N : Node_Id) return Boolean; -- Flag2
9333
9334 function Is_Ghost_Pragma
9335 (N : Node_Id) return Boolean; -- Flag3
9336
9337 function Is_Ignored
9338 (N : Node_Id) return Boolean; -- Flag9
9339
9340 function Is_In_Discriminant_Check
9341 (N : Node_Id) return Boolean; -- Flag11
9342
9343 function Is_Inherited
9344 (N : Node_Id) return Boolean; -- Flag4
9345
9346 function Is_Machine_Number
9347 (N : Node_Id) return Boolean; -- Flag11
9348
9349 function Is_Null_Loop
9350 (N : Node_Id) return Boolean; -- Flag16
9351
9352 function Is_Overloaded
9353 (N : Node_Id) return Boolean; -- Flag5
9354
9355 function Is_Power_Of_2_For_Shift
9356 (N : Node_Id) return Boolean; -- Flag13
9357
9358 function Is_Prefixed_Call
9359 (N : Node_Id) return Boolean; -- Flag17
9360
9361 function Is_Protected_Subprogram_Body
9362 (N : Node_Id) return Boolean; -- Flag7
9363
9364 function Is_Static_Coextension
9365 (N : Node_Id) return Boolean; -- Flag14
9366
9367 function Is_Static_Expression
9368 (N : Node_Id) return Boolean; -- Flag6
9369
9370 function Is_Subprogram_Descriptor
9371 (N : Node_Id) return Boolean; -- Flag16
9372
9373 function Is_Task_Allocation_Block
9374 (N : Node_Id) return Boolean; -- Flag6
9375
9376 function Is_Task_Master
9377 (N : Node_Id) return Boolean; -- Flag5
9378
9379 function Iteration_Scheme
9380 (N : Node_Id) return Node_Id; -- Node2
9381
9382 function Iterator_Specification
9383 (N : Node_Id) return Node_Id; -- Node2
9384
9385 function Itype
9386 (N : Node_Id) return Entity_Id; -- Node1
9387
9388 function Kill_Range_Check
9389 (N : Node_Id) return Boolean; -- Flag11
9390
9391 function Label_Construct
9392 (N : Node_Id) return Node_Id; -- Node2
9393
9394 function Left_Opnd
9395 (N : Node_Id) return Node_Id; -- Node2
9396
9397 function Last_Bit
9398 (N : Node_Id) return Node_Id; -- Node4
9399
9400 function Last_Name
9401 (N : Node_Id) return Boolean; -- Flag6
9402
9403 function Library_Unit
9404 (N : Node_Id) return Node_Id; -- Node4
9405
9406 function Limited_View_Installed
9407 (N : Node_Id) return Boolean; -- Flag18
9408
9409 function Limited_Present
9410 (N : Node_Id) return Boolean; -- Flag17
9411
9412 function Literals
9413 (N : Node_Id) return List_Id; -- List1
9414
9415 function Local_Raise_Not_OK
9416 (N : Node_Id) return Boolean; -- Flag7
9417
9418 function Local_Raise_Statements
9419 (N : Node_Id) return Elist_Id; -- Elist1
9420
9421 function Loop_Actions
9422 (N : Node_Id) return List_Id; -- List2
9423
9424 function Loop_Parameter_Specification
9425 (N : Node_Id) return Node_Id; -- Node4
9426
9427 function Low_Bound
9428 (N : Node_Id) return Node_Id; -- Node1
9429
9430 function Mod_Clause
9431 (N : Node_Id) return Node_Id; -- Node2
9432
9433 function More_Ids
9434 (N : Node_Id) return Boolean; -- Flag5
9435
9436 function Must_Be_Byte_Aligned
9437 (N : Node_Id) return Boolean; -- Flag14
9438
9439 function Must_Not_Freeze
9440 (N : Node_Id) return Boolean; -- Flag8
9441
9442 function Must_Not_Override
9443 (N : Node_Id) return Boolean; -- Flag15
9444
9445 function Must_Override
9446 (N : Node_Id) return Boolean; -- Flag14
9447
9448 function Name
9449 (N : Node_Id) return Node_Id; -- Node2
9450
9451 function Names
9452 (N : Node_Id) return List_Id; -- List2
9453
9454 function Next_Entity
9455 (N : Node_Id) return Node_Id; -- Node2
9456
9457 function Next_Exit_Statement
9458 (N : Node_Id) return Node_Id; -- Node3
9459
9460 function Next_Implicit_With
9461 (N : Node_Id) return Node_Id; -- Node3
9462
9463 function Next_Named_Actual
9464 (N : Node_Id) return Node_Id; -- Node4
9465
9466 function Next_Pragma
9467 (N : Node_Id) return Node_Id; -- Node1
9468
9469 function Next_Rep_Item
9470 (N : Node_Id) return Node_Id; -- Node5
9471
9472 function Next_Use_Clause
9473 (N : Node_Id) return Node_Id; -- Node3
9474
9475 function No_Ctrl_Actions
9476 (N : Node_Id) return Boolean; -- Flag7
9477
9478 function No_Elaboration_Check
9479 (N : Node_Id) return Boolean; -- Flag14
9480
9481 function No_Entities_Ref_In_Spec
9482 (N : Node_Id) return Boolean; -- Flag8
9483
9484 function No_Initialization
9485 (N : Node_Id) return Boolean; -- Flag13
9486
9487 function No_Minimize_Eliminate
9488 (N : Node_Id) return Boolean; -- Flag17
9489
9490 function No_Truncation
9491 (N : Node_Id) return Boolean; -- Flag17
9492
9493 function Non_Aliased_Prefix
9494 (N : Node_Id) return Boolean; -- Flag18
9495
9496 function Null_Present
9497 (N : Node_Id) return Boolean; -- Flag13
9498
9499 function Null_Excluding_Subtype
9500 (N : Node_Id) return Boolean; -- Flag16
9501
9502 function Null_Exclusion_Present
9503 (N : Node_Id) return Boolean; -- Flag11
9504
9505 function Null_Exclusion_In_Return_Present
9506 (N : Node_Id) return Boolean; -- Flag14
9507
9508 function Null_Record_Present
9509 (N : Node_Id) return Boolean; -- Flag17
9510
9511 function Object_Definition
9512 (N : Node_Id) return Node_Id; -- Node4
9513
9514 function Of_Present
9515 (N : Node_Id) return Boolean; -- Flag16
9516
9517 function Original_Discriminant
9518 (N : Node_Id) return Node_Id; -- Node2
9519
9520 function Original_Entity
9521 (N : Node_Id) return Entity_Id; -- Node2
9522
9523 function Others_Discrete_Choices
9524 (N : Node_Id) return List_Id; -- List1
9525
9526 function Out_Present
9527 (N : Node_Id) return Boolean; -- Flag17
9528
9529 function Parameter_Associations
9530 (N : Node_Id) return List_Id; -- List3
9531
9532 function Parameter_Specifications
9533 (N : Node_Id) return List_Id; -- List3
9534
9535 function Parameter_Type
9536 (N : Node_Id) return Node_Id; -- Node2
9537
9538 function Parent_Spec
9539 (N : Node_Id) return Node_Id; -- Node4
9540
9541 function Position
9542 (N : Node_Id) return Node_Id; -- Node2
9543
9544 function Pragma_Argument_Associations
9545 (N : Node_Id) return List_Id; -- List2
9546
9547 function Pragma_Identifier
9548 (N : Node_Id) return Node_Id; -- Node4
9549
9550 function Pragmas_After
9551 (N : Node_Id) return List_Id; -- List5
9552
9553 function Pragmas_Before
9554 (N : Node_Id) return List_Id; -- List4
9555
9556 function Pre_Post_Conditions
9557 (N : Node_Id) return Node_Id; -- Node1
9558
9559 function Prefix
9560 (N : Node_Id) return Node_Id; -- Node3
9561
9562 function Premature_Use
9563 (N : Node_Id) return Node_Id; -- Node5
9564
9565 function Present_Expr
9566 (N : Node_Id) return Uint; -- Uint3
9567
9568 function Prev_Ids
9569 (N : Node_Id) return Boolean; -- Flag6
9570
9571 function Print_In_Hex
9572 (N : Node_Id) return Boolean; -- Flag13
9573
9574 function Private_Declarations
9575 (N : Node_Id) return List_Id; -- List3
9576
9577 function Private_Present
9578 (N : Node_Id) return Boolean; -- Flag15
9579
9580 function Procedure_To_Call
9581 (N : Node_Id) return Node_Id; -- Node2
9582
9583 function Proper_Body
9584 (N : Node_Id) return Node_Id; -- Node1
9585
9586 function Protected_Definition
9587 (N : Node_Id) return Node_Id; -- Node3
9588
9589 function Protected_Present
9590 (N : Node_Id) return Boolean; -- Flag6
9591
9592 function Raises_Constraint_Error
9593 (N : Node_Id) return Boolean; -- Flag7
9594
9595 function Range_Constraint
9596 (N : Node_Id) return Node_Id; -- Node4
9597
9598 function Range_Expression
9599 (N : Node_Id) return Node_Id; -- Node4
9600
9601 function Real_Range_Specification
9602 (N : Node_Id) return Node_Id; -- Node4
9603
9604 function Realval
9605 (N : Node_Id) return Ureal; -- Ureal3
9606
9607 function Reason
9608 (N : Node_Id) return Uint; -- Uint3
9609
9610 function Record_Extension_Part
9611 (N : Node_Id) return Node_Id; -- Node3
9612
9613 function Redundant_Use
9614 (N : Node_Id) return Boolean; -- Flag13
9615
9616 function Renaming_Exception
9617 (N : Node_Id) return Node_Id; -- Node2
9618
9619 function Result_Definition
9620 (N : Node_Id) return Node_Id; -- Node4
9621
9622 function Return_Object_Declarations
9623 (N : Node_Id) return List_Id; -- List3
9624
9625 function Return_Statement_Entity
9626 (N : Node_Id) return Node_Id; -- Node5
9627
9628 function Reverse_Present
9629 (N : Node_Id) return Boolean; -- Flag15
9630
9631 function Right_Opnd
9632 (N : Node_Id) return Node_Id; -- Node3
9633
9634 function Rounded_Result
9635 (N : Node_Id) return Boolean; -- Flag18
9636
9637 function SCIL_Controlling_Tag
9638 (N : Node_Id) return Node_Id; -- Node5
9639
9640 function SCIL_Entity
9641 (N : Node_Id) return Node_Id; -- Node4
9642
9643 function SCIL_Tag_Value
9644 (N : Node_Id) return Node_Id; -- Node5
9645
9646 function SCIL_Target_Prim
9647 (N : Node_Id) return Node_Id; -- Node2
9648
9649 function Scope
9650 (N : Node_Id) return Node_Id; -- Node3
9651
9652 function Select_Alternatives
9653 (N : Node_Id) return List_Id; -- List1
9654
9655 function Selector_Name
9656 (N : Node_Id) return Node_Id; -- Node2
9657
9658 function Selector_Names
9659 (N : Node_Id) return List_Id; -- List1
9660
9661 function Shift_Count_OK
9662 (N : Node_Id) return Boolean; -- Flag4
9663
9664 function Source_Type
9665 (N : Node_Id) return Entity_Id; -- Node1
9666
9667 function Specification
9668 (N : Node_Id) return Node_Id; -- Node1
9669
9670 function Split_PPC
9671 (N : Node_Id) return Boolean; -- Flag17
9672
9673 function Statements
9674 (N : Node_Id) return List_Id; -- List3
9675
9676 function Storage_Pool
9677 (N : Node_Id) return Node_Id; -- Node1
9678
9679 function Subpool_Handle_Name
9680 (N : Node_Id) return Node_Id; -- Node4
9681
9682 function Strval
9683 (N : Node_Id) return String_Id; -- Str3
9684
9685 function Subtype_Indication
9686 (N : Node_Id) return Node_Id; -- Node5
9687
9688 function Subtype_Mark
9689 (N : Node_Id) return Node_Id; -- Node4
9690
9691 function Subtype_Marks
9692 (N : Node_Id) return List_Id; -- List2
9693
9694 function Suppress_Assignment_Checks
9695 (N : Node_Id) return Boolean; -- Flag18
9696
9697 function Suppress_Loop_Warnings
9698 (N : Node_Id) return Boolean; -- Flag17
9699
9700 function Synchronized_Present
9701 (N : Node_Id) return Boolean; -- Flag7
9702
9703 function Tagged_Present
9704 (N : Node_Id) return Boolean; -- Flag15
9705
9706 function Target_Type
9707 (N : Node_Id) return Entity_Id; -- Node2
9708
9709 function Task_Definition
9710 (N : Node_Id) return Node_Id; -- Node3
9711
9712 function Task_Present
9713 (N : Node_Id) return Boolean; -- Flag5
9714
9715 function Then_Actions
9716 (N : Node_Id) return List_Id; -- List2
9717
9718 function Then_Statements
9719 (N : Node_Id) return List_Id; -- List2
9720
9721 function Treat_Fixed_As_Integer
9722 (N : Node_Id) return Boolean; -- Flag14
9723
9724 function Triggering_Alternative
9725 (N : Node_Id) return Node_Id; -- Node1
9726
9727 function Triggering_Statement
9728 (N : Node_Id) return Node_Id; -- Node1
9729
9730 function TSS_Elist
9731 (N : Node_Id) return Elist_Id; -- Elist3
9732
9733 function Type_Definition
9734 (N : Node_Id) return Node_Id; -- Node3
9735
9736 function Uneval_Old_Accept
9737 (N : Node_Id) return Boolean; -- Flag7
9738
9739 function Uneval_Old_Warn
9740 (N : Node_Id) return Boolean; -- Flag18
9741
9742 function Unit
9743 (N : Node_Id) return Node_Id; -- Node2
9744
9745 function Unknown_Discriminants_Present
9746 (N : Node_Id) return Boolean; -- Flag13
9747
9748 function Unreferenced_In_Spec
9749 (N : Node_Id) return Boolean; -- Flag7
9750
9751 function Variant_Part
9752 (N : Node_Id) return Node_Id; -- Node4
9753
9754 function Variants
9755 (N : Node_Id) return List_Id; -- List1
9756
9757 function Visible_Declarations
9758 (N : Node_Id) return List_Id; -- List2
9759
9760 function Uninitialized_Variable
9761 (N : Node_Id) return Node_Id; -- Node3
9762
9763 function Used_Operations
9764 (N : Node_Id) return Elist_Id; -- Elist5
9765
9766 function Was_Originally_Stub
9767 (N : Node_Id) return Boolean; -- Flag13
9768
9769 function Withed_Body
9770 (N : Node_Id) return Node_Id; -- Node1
9771
9772 -- End functions (note used by xsinfo utility program to end processing)
9773
9774 ----------------------------
9775 -- Node Update Procedures --
9776 ----------------------------
9777
9778 -- These are the corresponding node update routines, which again provide
9779 -- a high level logical access with type checking. In addition to setting
9780 -- the indicated field of the node N to the given Val, in the case of
9781 -- tree pointers (List1-4), the parent pointer of the Val node is set to
9782 -- point back to node N. This automates the setting of the parent pointer.
9783
9784 procedure Set_ABE_Is_Certain
9785 (N : Node_Id; Val : Boolean := True); -- Flag18
9786
9787 procedure Set_Abort_Present
9788 (N : Node_Id; Val : Boolean := True); -- Flag15
9789
9790 procedure Set_Abortable_Part
9791 (N : Node_Id; Val : Node_Id); -- Node2
9792
9793 procedure Set_Abstract_Present
9794 (N : Node_Id; Val : Boolean := True); -- Flag4
9795
9796 procedure Set_Accept_Handler_Records
9797 (N : Node_Id; Val : List_Id); -- List5
9798
9799 procedure Set_Accept_Statement
9800 (N : Node_Id; Val : Node_Id); -- Node2
9801
9802 procedure Set_Access_Definition
9803 (N : Node_Id; Val : Node_Id); -- Node3
9804
9805 procedure Set_Access_To_Subprogram_Definition
9806 (N : Node_Id; Val : Node_Id); -- Node3
9807
9808 procedure Set_Access_Types_To_Process
9809 (N : Node_Id; Val : Elist_Id); -- Elist2
9810
9811 procedure Set_Actions
9812 (N : Node_Id; Val : List_Id); -- List1
9813
9814 procedure Set_Activation_Chain_Entity
9815 (N : Node_Id; Val : Node_Id); -- Node3
9816
9817 procedure Set_Acts_As_Spec
9818 (N : Node_Id; Val : Boolean := True); -- Flag4
9819
9820 procedure Set_Actual_Designated_Subtype
9821 (N : Node_Id; Val : Node_Id); -- Node4
9822
9823 procedure Set_Address_Warning_Posted
9824 (N : Node_Id; Val : Boolean := True); -- Flag18
9825
9826 procedure Set_Aggregate_Bounds
9827 (N : Node_Id; Val : Node_Id); -- Node3
9828
9829 procedure Set_Aliased_Present
9830 (N : Node_Id; Val : Boolean := True); -- Flag4
9831
9832 procedure Set_All_Others
9833 (N : Node_Id; Val : Boolean := True); -- Flag11
9834
9835 procedure Set_All_Present
9836 (N : Node_Id; Val : Boolean := True); -- Flag15
9837
9838 procedure Set_Alternatives
9839 (N : Node_Id; Val : List_Id); -- List4
9840
9841 procedure Set_Ancestor_Part
9842 (N : Node_Id; Val : Node_Id); -- Node3
9843
9844 procedure Set_Atomic_Sync_Required
9845 (N : Node_Id; Val : Boolean := True); -- Flag14
9846
9847 procedure Set_Array_Aggregate
9848 (N : Node_Id; Val : Node_Id); -- Node3
9849
9850 procedure Set_Aspect_Rep_Item
9851 (N : Node_Id; Val : Node_Id); -- Node2
9852
9853 procedure Set_Assignment_OK
9854 (N : Node_Id; Val : Boolean := True); -- Flag15
9855
9856 procedure Set_Associated_Node
9857 (N : Node_Id; Val : Node_Id); -- Node4
9858
9859 procedure Set_Attribute_Name
9860 (N : Node_Id; Val : Name_Id); -- Name2
9861
9862 procedure Set_At_End_Proc
9863 (N : Node_Id; Val : Node_Id); -- Node1
9864
9865 procedure Set_Aux_Decls_Node
9866 (N : Node_Id; Val : Node_Id); -- Node5
9867
9868 procedure Set_Backwards_OK
9869 (N : Node_Id; Val : Boolean := True); -- Flag6
9870
9871 procedure Set_Bad_Is_Detected
9872 (N : Node_Id; Val : Boolean := True); -- Flag15
9873
9874 procedure Set_Body_Required
9875 (N : Node_Id; Val : Boolean := True); -- Flag13
9876
9877 procedure Set_Body_To_Inline
9878 (N : Node_Id; Val : Node_Id); -- Node3
9879
9880 procedure Set_Box_Present
9881 (N : Node_Id; Val : Boolean := True); -- Flag15
9882
9883 procedure Set_By_Ref
9884 (N : Node_Id; Val : Boolean := True); -- Flag5
9885
9886 procedure Set_Char_Literal_Value
9887 (N : Node_Id; Val : Uint); -- Uint2
9888
9889 procedure Set_Chars
9890 (N : Node_Id; Val : Name_Id); -- Name1
9891
9892 procedure Set_Check_Address_Alignment
9893 (N : Node_Id; Val : Boolean := True); -- Flag11
9894
9895 procedure Set_Choice_Parameter
9896 (N : Node_Id; Val : Node_Id); -- Node2
9897
9898 procedure Set_Choices
9899 (N : Node_Id; Val : List_Id); -- List1
9900
9901 procedure Set_Class_Present
9902 (N : Node_Id; Val : Boolean := True); -- Flag6
9903
9904 procedure Set_Classifications
9905 (N : Node_Id; Val : Node_Id); -- Node3
9906
9907 procedure Set_Cleanup_Actions
9908 (N : Node_Id; Val : List_Id); -- List5
9909
9910 procedure Set_Comes_From_Extended_Return_Statement
9911 (N : Node_Id; Val : Boolean := True); -- Flag18
9912
9913 procedure Set_Compile_Time_Known_Aggregate
9914 (N : Node_Id; Val : Boolean := True); -- Flag18
9915
9916 procedure Set_Component_Associations
9917 (N : Node_Id; Val : List_Id); -- List2
9918
9919 procedure Set_Component_Clauses
9920 (N : Node_Id; Val : List_Id); -- List3
9921
9922 procedure Set_Component_Definition
9923 (N : Node_Id; Val : Node_Id); -- Node4
9924
9925 procedure Set_Component_Items
9926 (N : Node_Id; Val : List_Id); -- List3
9927
9928 procedure Set_Component_List
9929 (N : Node_Id; Val : Node_Id); -- Node1
9930
9931 procedure Set_Component_Name
9932 (N : Node_Id; Val : Node_Id); -- Node1
9933
9934 procedure Set_Componentwise_Assignment
9935 (N : Node_Id; Val : Boolean := True); -- Flag14
9936
9937 procedure Set_Condition
9938 (N : Node_Id; Val : Node_Id); -- Node1
9939
9940 procedure Set_Condition_Actions
9941 (N : Node_Id; Val : List_Id); -- List3
9942
9943 procedure Set_Config_Pragmas
9944 (N : Node_Id; Val : List_Id); -- List4
9945
9946 procedure Set_Constant_Present
9947 (N : Node_Id; Val : Boolean := True); -- Flag17
9948
9949 procedure Set_Constraint
9950 (N : Node_Id; Val : Node_Id); -- Node3
9951
9952 procedure Set_Constraints
9953 (N : Node_Id; Val : List_Id); -- List1
9954
9955 procedure Set_Context_Installed
9956 (N : Node_Id; Val : Boolean := True); -- Flag13
9957
9958 procedure Set_Context_Items
9959 (N : Node_Id; Val : List_Id); -- List1
9960
9961 procedure Set_Context_Pending
9962 (N : Node_Id; Val : Boolean := True); -- Flag16
9963
9964 procedure Set_Contract_Test_Cases
9965 (N : Node_Id; Val : Node_Id); -- Node2
9966
9967 procedure Set_Controlling_Argument
9968 (N : Node_Id; Val : Node_Id); -- Node1
9969
9970 procedure Set_Conversion_OK
9971 (N : Node_Id; Val : Boolean := True); -- Flag14
9972
9973 procedure Set_Convert_To_Return_False
9974 (N : Node_Id; Val : Boolean := True); -- Flag13
9975
9976 procedure Set_Corresponding_Aspect
9977 (N : Node_Id; Val : Node_Id); -- Node3
9978
9979 procedure Set_Corresponding_Body
9980 (N : Node_Id; Val : Node_Id); -- Node5
9981
9982 procedure Set_Corresponding_Formal_Spec
9983 (N : Node_Id; Val : Node_Id); -- Node3
9984
9985 procedure Set_Corresponding_Generic_Association
9986 (N : Node_Id; Val : Node_Id); -- Node5
9987
9988 procedure Set_Corresponding_Integer_Value
9989 (N : Node_Id; Val : Uint); -- Uint4
9990
9991 procedure Set_Corresponding_Spec
9992 (N : Node_Id; Val : Node_Id); -- Node5
9993
9994 procedure Set_Corresponding_Spec_Of_Stub
9995 (N : Node_Id; Val : Node_Id); -- Node2
9996
9997 procedure Set_Corresponding_Stub
9998 (N : Node_Id; Val : Node_Id); -- Node3
9999
10000 procedure Set_Dcheck_Function
10001 (N : Node_Id; Val : Entity_Id); -- Node5
10002
10003 procedure Set_Declarations
10004 (N : Node_Id; Val : List_Id); -- List2
10005
10006 procedure Set_Default_Expression
10007 (N : Node_Id; Val : Node_Id); -- Node5
10008
10009 procedure Set_Default_Storage_Pool
10010 (N : Node_Id; Val : Node_Id); -- Node3
10011
10012 procedure Set_Default_Name
10013 (N : Node_Id; Val : Node_Id); -- Node2
10014
10015 procedure Set_Defining_Identifier
10016 (N : Node_Id; Val : Entity_Id); -- Node1
10017
10018 procedure Set_Defining_Unit_Name
10019 (N : Node_Id; Val : Node_Id); -- Node1
10020
10021 procedure Set_Delay_Alternative
10022 (N : Node_Id; Val : Node_Id); -- Node4
10023
10024 procedure Set_Delay_Statement
10025 (N : Node_Id; Val : Node_Id); -- Node2
10026
10027 procedure Set_Delta_Expression
10028 (N : Node_Id; Val : Node_Id); -- Node3
10029
10030 procedure Set_Digits_Expression
10031 (N : Node_Id; Val : Node_Id); -- Node2
10032
10033 procedure Set_Discr_Check_Funcs_Built
10034 (N : Node_Id; Val : Boolean := True); -- Flag11
10035
10036 procedure Set_Discrete_Choices
10037 (N : Node_Id; Val : List_Id); -- List4
10038
10039 procedure Set_Discrete_Range
10040 (N : Node_Id; Val : Node_Id); -- Node4
10041
10042 procedure Set_Discrete_Subtype_Definition
10043 (N : Node_Id; Val : Node_Id); -- Node4
10044
10045 procedure Set_Discrete_Subtype_Definitions
10046 (N : Node_Id; Val : List_Id); -- List2
10047
10048 procedure Set_Discriminant_Specifications
10049 (N : Node_Id; Val : List_Id); -- List4
10050
10051 procedure Set_Discriminant_Type
10052 (N : Node_Id; Val : Node_Id); -- Node5
10053
10054 procedure Set_Do_Accessibility_Check
10055 (N : Node_Id; Val : Boolean := True); -- Flag13
10056
10057 procedure Set_Do_Discriminant_Check
10058 (N : Node_Id; Val : Boolean := True); -- Flag1
10059
10060 procedure Set_Do_Division_Check
10061 (N : Node_Id; Val : Boolean := True); -- Flag13
10062
10063 procedure Set_Do_Length_Check
10064 (N : Node_Id; Val : Boolean := True); -- Flag4
10065
10066 procedure Set_Do_Overflow_Check
10067 (N : Node_Id; Val : Boolean := True); -- Flag17
10068
10069 procedure Set_Do_Range_Check
10070 (N : Node_Id; Val : Boolean := True); -- Flag9
10071
10072 procedure Set_Do_Storage_Check
10073 (N : Node_Id; Val : Boolean := True); -- Flag17
10074
10075 procedure Set_Do_Tag_Check
10076 (N : Node_Id; Val : Boolean := True); -- Flag13
10077
10078 procedure Set_Elaborate_All_Desirable
10079 (N : Node_Id; Val : Boolean := True); -- Flag9
10080
10081 procedure Set_Elaborate_All_Present
10082 (N : Node_Id; Val : Boolean := True); -- Flag14
10083
10084 procedure Set_Elaborate_Desirable
10085 (N : Node_Id; Val : Boolean := True); -- Flag11
10086
10087 procedure Set_Elaborate_Present
10088 (N : Node_Id; Val : Boolean := True); -- Flag4
10089
10090 procedure Set_Else_Actions
10091 (N : Node_Id; Val : List_Id); -- List3
10092
10093 procedure Set_Else_Statements
10094 (N : Node_Id; Val : List_Id); -- List4
10095
10096 procedure Set_Elsif_Parts
10097 (N : Node_Id; Val : List_Id); -- List3
10098
10099 procedure Set_Enclosing_Variant
10100 (N : Node_Id; Val : Node_Id); -- Node2
10101
10102 procedure Set_End_Label
10103 (N : Node_Id; Val : Node_Id); -- Node4
10104
10105 procedure Set_End_Span
10106 (N : Node_Id; Val : Uint); -- Uint5
10107
10108 procedure Set_Entity
10109 (N : Node_Id; Val : Node_Id); -- Node4
10110
10111 procedure Set_Entry_Body_Formal_Part
10112 (N : Node_Id; Val : Node_Id); -- Node5
10113
10114 procedure Set_Entry_Call_Alternative
10115 (N : Node_Id; Val : Node_Id); -- Node1
10116
10117 procedure Set_Entry_Call_Statement
10118 (N : Node_Id; Val : Node_Id); -- Node1
10119
10120 procedure Set_Entry_Direct_Name
10121 (N : Node_Id; Val : Node_Id); -- Node1
10122
10123 procedure Set_Entry_Index
10124 (N : Node_Id; Val : Node_Id); -- Node5
10125
10126 procedure Set_Entry_Index_Specification
10127 (N : Node_Id; Val : Node_Id); -- Node4
10128
10129 procedure Set_Etype
10130 (N : Node_Id; Val : Node_Id); -- Node5
10131
10132 procedure Set_Exception_Choices
10133 (N : Node_Id; Val : List_Id); -- List4
10134
10135 procedure Set_Exception_Handlers
10136 (N : Node_Id; Val : List_Id); -- List5
10137
10138 procedure Set_Exception_Junk
10139 (N : Node_Id; Val : Boolean := True); -- Flag8
10140
10141 procedure Set_Exception_Label
10142 (N : Node_Id; Val : Node_Id); -- Node5
10143
10144 procedure Set_Expansion_Delayed
10145 (N : Node_Id; Val : Boolean := True); -- Flag11
10146
10147 procedure Set_Explicit_Actual_Parameter
10148 (N : Node_Id; Val : Node_Id); -- Node3
10149
10150 procedure Set_Explicit_Generic_Actual_Parameter
10151 (N : Node_Id; Val : Node_Id); -- Node1
10152
10153 procedure Set_Expression
10154 (N : Node_Id; Val : Node_Id); -- Node3
10155
10156 procedure Set_Expressions
10157 (N : Node_Id; Val : List_Id); -- List1
10158
10159 procedure Set_First_Bit
10160 (N : Node_Id; Val : Node_Id); -- Node3
10161
10162 procedure Set_First_Inlined_Subprogram
10163 (N : Node_Id; Val : Entity_Id); -- Node3
10164
10165 procedure Set_First_Name
10166 (N : Node_Id; Val : Boolean := True); -- Flag5
10167
10168 procedure Set_First_Named_Actual
10169 (N : Node_Id; Val : Node_Id); -- Node4
10170
10171 procedure Set_First_Real_Statement
10172 (N : Node_Id; Val : Node_Id); -- Node2
10173
10174 procedure Set_First_Subtype_Link
10175 (N : Node_Id; Val : Entity_Id); -- Node5
10176
10177 procedure Set_Float_Truncate
10178 (N : Node_Id; Val : Boolean := True); -- Flag11
10179
10180 procedure Set_Formal_Type_Definition
10181 (N : Node_Id; Val : Node_Id); -- Node3
10182
10183 procedure Set_Forwards_OK
10184 (N : Node_Id; Val : Boolean := True); -- Flag5
10185
10186 procedure Set_From_Aspect_Specification
10187 (N : Node_Id; Val : Boolean := True); -- Flag13
10188
10189 procedure Set_From_At_End
10190 (N : Node_Id; Val : Boolean := True); -- Flag4
10191
10192 procedure Set_From_At_Mod
10193 (N : Node_Id; Val : Boolean := True); -- Flag4
10194
10195 procedure Set_From_Conditional_Expression
10196 (N : Node_Id; Val : Boolean := True); -- Flag1
10197
10198 procedure Set_From_Default
10199 (N : Node_Id; Val : Boolean := True); -- Flag6
10200
10201 procedure Set_Generalized_Indexing
10202 (N : Node_Id; Val : Node_Id); -- Node4
10203
10204 procedure Set_Generic_Associations
10205 (N : Node_Id; Val : List_Id); -- List3
10206
10207 procedure Set_Generic_Formal_Declarations
10208 (N : Node_Id; Val : List_Id); -- List2
10209
10210 procedure Set_Generic_Parent
10211 (N : Node_Id; Val : Node_Id); -- Node5
10212
10213 procedure Set_Generic_Parent_Type
10214 (N : Node_Id; Val : Node_Id); -- Node4
10215
10216 procedure Set_Handled_Statement_Sequence
10217 (N : Node_Id; Val : Node_Id); -- Node4
10218
10219 procedure Set_Handler_List_Entry
10220 (N : Node_Id; Val : Node_Id); -- Node2
10221
10222 procedure Set_Has_Created_Identifier
10223 (N : Node_Id; Val : Boolean := True); -- Flag15
10224
10225 procedure Set_Has_Dereference_Action
10226 (N : Node_Id; Val : Boolean := True); -- Flag13
10227
10228 procedure Set_Has_Dynamic_Length_Check
10229 (N : Node_Id; Val : Boolean := True); -- Flag10
10230
10231 procedure Set_Has_Dynamic_Range_Check
10232 (N : Node_Id; Val : Boolean := True); -- Flag12
10233
10234 procedure Set_Has_Init_Expression
10235 (N : Node_Id; Val : Boolean := True); -- Flag14
10236
10237 procedure Set_Has_Local_Raise
10238 (N : Node_Id; Val : Boolean := True); -- Flag8
10239
10240 procedure Set_Has_No_Elaboration_Code
10241 (N : Node_Id; Val : Boolean := True); -- Flag17
10242
10243 procedure Set_Has_Pragma_Suppress_All
10244 (N : Node_Id; Val : Boolean := True); -- Flag14
10245
10246 procedure Set_Has_Private_View
10247 (N : Node_Id; Val : Boolean := True); -- Flag11
10248
10249 procedure Set_Has_Relative_Deadline_Pragma
10250 (N : Node_Id; Val : Boolean := True); -- Flag9
10251
10252 procedure Set_Has_Self_Reference
10253 (N : Node_Id; Val : Boolean := True); -- Flag13
10254
10255 procedure Set_Has_SP_Choice
10256 (N : Node_Id; Val : Boolean := True); -- Flag15
10257
10258 procedure Set_Has_Storage_Size_Pragma
10259 (N : Node_Id; Val : Boolean := True); -- Flag5
10260
10261 procedure Set_Has_Wide_Character
10262 (N : Node_Id; Val : Boolean := True); -- Flag11
10263
10264 procedure Set_Has_Wide_Wide_Character
10265 (N : Node_Id; Val : Boolean := True); -- Flag13
10266
10267 procedure Set_Header_Size_Added
10268 (N : Node_Id; Val : Boolean := True); -- Flag11
10269
10270 procedure Set_Hidden_By_Use_Clause
10271 (N : Node_Id; Val : Elist_Id); -- Elist4
10272
10273 procedure Set_High_Bound
10274 (N : Node_Id; Val : Node_Id); -- Node2
10275
10276 procedure Set_Identifier
10277 (N : Node_Id; Val : Node_Id); -- Node1
10278
10279 procedure Set_Interface_List
10280 (N : Node_Id; Val : List_Id); -- List2
10281
10282 procedure Set_Interface_Present
10283 (N : Node_Id; Val : Boolean := True); -- Flag16
10284
10285 procedure Set_Implicit_With
10286 (N : Node_Id; Val : Boolean := True); -- Flag16
10287
10288 procedure Set_Implicit_With_From_Instantiation
10289 (N : Node_Id; Val : Boolean := True); -- Flag12
10290
10291 procedure Set_Import_Interface_Present
10292 (N : Node_Id; Val : Boolean := True); -- Flag16
10293
10294 procedure Set_In_Present
10295 (N : Node_Id; Val : Boolean := True); -- Flag15
10296
10297 procedure Set_Includes_Infinities
10298 (N : Node_Id; Val : Boolean := True); -- Flag11
10299
10300 procedure Set_Incomplete_View
10301 (N : Node_Id; Val : Node_Id); -- Node2
10302
10303 procedure Set_Inherited_Discriminant
10304 (N : Node_Id; Val : Boolean := True); -- Flag13
10305
10306 procedure Set_Instance_Spec
10307 (N : Node_Id; Val : Node_Id); -- Node5
10308
10309 procedure Set_Intval
10310 (N : Node_Id; Val : Uint); -- Uint3
10311
10312 procedure Set_Is_Accessibility_Actual
10313 (N : Node_Id; Val : Boolean := True); -- Flag13
10314
10315 procedure Set_Is_Asynchronous_Call_Block
10316 (N : Node_Id; Val : Boolean := True); -- Flag7
10317
10318 procedure Set_Is_Boolean_Aspect
10319 (N : Node_Id; Val : Boolean := True); -- Flag16
10320
10321 procedure Set_Is_Checked
10322 (N : Node_Id; Val : Boolean := True); -- Flag11
10323
10324 procedure Set_Is_Component_Left_Opnd
10325 (N : Node_Id; Val : Boolean := True); -- Flag13
10326
10327 procedure Set_Is_Component_Right_Opnd
10328 (N : Node_Id; Val : Boolean := True); -- Flag14
10329
10330 procedure Set_Is_Controlling_Actual
10331 (N : Node_Id; Val : Boolean := True); -- Flag16
10332
10333 procedure Set_Is_Delayed_Aspect
10334 (N : Node_Id; Val : Boolean := True); -- Flag14
10335
10336 procedure Set_Is_Disabled
10337 (N : Node_Id; Val : Boolean := True); -- Flag15
10338
10339 procedure Set_Is_Dynamic_Coextension
10340 (N : Node_Id; Val : Boolean := True); -- Flag18
10341
10342 procedure Set_Is_Elsif
10343 (N : Node_Id; Val : Boolean := True); -- Flag13
10344
10345 procedure Set_Is_Entry_Barrier_Function
10346 (N : Node_Id; Val : Boolean := True); -- Flag8
10347
10348 procedure Set_Is_Expanded_Build_In_Place_Call
10349 (N : Node_Id; Val : Boolean := True); -- Flag11
10350
10351 procedure Set_Is_Finalization_Wrapper
10352 (N : Node_Id; Val : Boolean := True); -- Flag9
10353
10354 procedure Set_Is_Folded_In_Parser
10355 (N : Node_Id; Val : Boolean := True); -- Flag4
10356
10357 procedure Set_Is_Generic_Contract_Pragma
10358 (N : Node_Id; Val : Boolean := True); -- Flag2
10359
10360 procedure Set_Is_Ghost_Pragma
10361 (N : Node_Id; Val : Boolean := True); -- Flag3
10362
10363 procedure Set_Is_Ignored
10364 (N : Node_Id; Val : Boolean := True); -- Flag9
10365
10366 procedure Set_Is_In_Discriminant_Check
10367 (N : Node_Id; Val : Boolean := True); -- Flag11
10368
10369 procedure Set_Is_Inherited
10370 (N : Node_Id; Val : Boolean := True); -- Flag4
10371
10372 procedure Set_Is_Machine_Number
10373 (N : Node_Id; Val : Boolean := True); -- Flag11
10374
10375 procedure Set_Is_Null_Loop
10376 (N : Node_Id; Val : Boolean := True); -- Flag16
10377
10378 procedure Set_Is_Overloaded
10379 (N : Node_Id; Val : Boolean := True); -- Flag5
10380
10381 procedure Set_Is_Power_Of_2_For_Shift
10382 (N : Node_Id; Val : Boolean := True); -- Flag13
10383
10384 procedure Set_Is_Prefixed_Call
10385 (N : Node_Id; Val : Boolean := True); -- Flag17
10386
10387 procedure Set_Is_Protected_Subprogram_Body
10388 (N : Node_Id; Val : Boolean := True); -- Flag7
10389
10390 procedure Set_Is_Static_Coextension
10391 (N : Node_Id; Val : Boolean := True); -- Flag14
10392
10393 procedure Set_Is_Static_Expression
10394 (N : Node_Id; Val : Boolean := True); -- Flag6
10395
10396 procedure Set_Is_Subprogram_Descriptor
10397 (N : Node_Id; Val : Boolean := True); -- Flag16
10398
10399 procedure Set_Is_Task_Allocation_Block
10400 (N : Node_Id; Val : Boolean := True); -- Flag6
10401
10402 procedure Set_Is_Task_Master
10403 (N : Node_Id; Val : Boolean := True); -- Flag5
10404
10405 procedure Set_Iteration_Scheme
10406 (N : Node_Id; Val : Node_Id); -- Node2
10407
10408 procedure Set_Iterator_Specification
10409 (N : Node_Id; Val : Node_Id); -- Node2
10410
10411 procedure Set_Itype
10412 (N : Node_Id; Val : Entity_Id); -- Node1
10413
10414 procedure Set_Kill_Range_Check
10415 (N : Node_Id; Val : Boolean := True); -- Flag11
10416
10417 procedure Set_Last_Bit
10418 (N : Node_Id; Val : Node_Id); -- Node4
10419
10420 procedure Set_Last_Name
10421 (N : Node_Id; Val : Boolean := True); -- Flag6
10422
10423 procedure Set_Library_Unit
10424 (N : Node_Id; Val : Node_Id); -- Node4
10425
10426 procedure Set_Label_Construct
10427 (N : Node_Id; Val : Node_Id); -- Node2
10428
10429 procedure Set_Left_Opnd
10430 (N : Node_Id; Val : Node_Id); -- Node2
10431
10432 procedure Set_Limited_View_Installed
10433 (N : Node_Id; Val : Boolean := True); -- Flag18
10434
10435 procedure Set_Limited_Present
10436 (N : Node_Id; Val : Boolean := True); -- Flag17
10437
10438 procedure Set_Literals
10439 (N : Node_Id; Val : List_Id); -- List1
10440
10441 procedure Set_Local_Raise_Not_OK
10442 (N : Node_Id; Val : Boolean := True); -- Flag7
10443
10444 procedure Set_Local_Raise_Statements
10445 (N : Node_Id; Val : Elist_Id); -- Elist1
10446
10447 procedure Set_Loop_Actions
10448 (N : Node_Id; Val : List_Id); -- List2
10449
10450 procedure Set_Loop_Parameter_Specification
10451 (N : Node_Id; Val : Node_Id); -- Node4
10452
10453 procedure Set_Low_Bound
10454 (N : Node_Id; Val : Node_Id); -- Node1
10455
10456 procedure Set_Mod_Clause
10457 (N : Node_Id; Val : Node_Id); -- Node2
10458
10459 procedure Set_More_Ids
10460 (N : Node_Id; Val : Boolean := True); -- Flag5
10461
10462 procedure Set_Must_Be_Byte_Aligned
10463 (N : Node_Id; Val : Boolean := True); -- Flag14
10464
10465 procedure Set_Must_Not_Freeze
10466 (N : Node_Id; Val : Boolean := True); -- Flag8
10467
10468 procedure Set_Must_Not_Override
10469 (N : Node_Id; Val : Boolean := True); -- Flag15
10470
10471 procedure Set_Must_Override
10472 (N : Node_Id; Val : Boolean := True); -- Flag14
10473
10474 procedure Set_Name
10475 (N : Node_Id; Val : Node_Id); -- Node2
10476
10477 procedure Set_Names
10478 (N : Node_Id; Val : List_Id); -- List2
10479
10480 procedure Set_Next_Entity
10481 (N : Node_Id; Val : Node_Id); -- Node2
10482
10483 procedure Set_Next_Exit_Statement
10484 (N : Node_Id; Val : Node_Id); -- Node3
10485
10486 procedure Set_Next_Implicit_With
10487 (N : Node_Id; Val : Node_Id); -- Node3
10488
10489 procedure Set_Next_Named_Actual
10490 (N : Node_Id; Val : Node_Id); -- Node4
10491
10492 procedure Set_Next_Pragma
10493 (N : Node_Id; Val : Node_Id); -- Node1
10494
10495 procedure Set_Next_Rep_Item
10496 (N : Node_Id; Val : Node_Id); -- Node5
10497
10498 procedure Set_Next_Use_Clause
10499 (N : Node_Id; Val : Node_Id); -- Node3
10500
10501 procedure Set_No_Ctrl_Actions
10502 (N : Node_Id; Val : Boolean := True); -- Flag7
10503
10504 procedure Set_No_Elaboration_Check
10505 (N : Node_Id; Val : Boolean := True); -- Flag14
10506
10507 procedure Set_No_Entities_Ref_In_Spec
10508 (N : Node_Id; Val : Boolean := True); -- Flag8
10509
10510 procedure Set_No_Initialization
10511 (N : Node_Id; Val : Boolean := True); -- Flag13
10512
10513 procedure Set_No_Minimize_Eliminate
10514 (N : Node_Id; Val : Boolean := True); -- Flag17
10515
10516 procedure Set_No_Truncation
10517 (N : Node_Id; Val : Boolean := True); -- Flag17
10518
10519 procedure Set_Non_Aliased_Prefix
10520 (N : Node_Id; Val : Boolean := True); -- Flag18
10521
10522 procedure Set_Null_Present
10523 (N : Node_Id; Val : Boolean := True); -- Flag13
10524
10525 procedure Set_Null_Excluding_Subtype
10526 (N : Node_Id; Val : Boolean := True); -- Flag16
10527
10528 procedure Set_Null_Exclusion_Present
10529 (N : Node_Id; Val : Boolean := True); -- Flag11
10530
10531 procedure Set_Null_Exclusion_In_Return_Present
10532 (N : Node_Id; Val : Boolean := True); -- Flag14
10533
10534 procedure Set_Null_Record_Present
10535 (N : Node_Id; Val : Boolean := True); -- Flag17
10536
10537 procedure Set_Object_Definition
10538 (N : Node_Id; Val : Node_Id); -- Node4
10539
10540 procedure Set_Of_Present
10541 (N : Node_Id; Val : Boolean := True); -- Flag16
10542
10543 procedure Set_Original_Discriminant
10544 (N : Node_Id; Val : Node_Id); -- Node2
10545
10546 procedure Set_Original_Entity
10547 (N : Node_Id; Val : Entity_Id); -- Node2
10548
10549 procedure Set_Others_Discrete_Choices
10550 (N : Node_Id; Val : List_Id); -- List1
10551
10552 procedure Set_Out_Present
10553 (N : Node_Id; Val : Boolean := True); -- Flag17
10554
10555 procedure Set_Parameter_Associations
10556 (N : Node_Id; Val : List_Id); -- List3
10557
10558 procedure Set_Parameter_Specifications
10559 (N : Node_Id; Val : List_Id); -- List3
10560
10561 procedure Set_Parameter_Type
10562 (N : Node_Id; Val : Node_Id); -- Node2
10563
10564 procedure Set_Parent_Spec
10565 (N : Node_Id; Val : Node_Id); -- Node4
10566
10567 procedure Set_Position
10568 (N : Node_Id; Val : Node_Id); -- Node2
10569
10570 procedure Set_Pragma_Argument_Associations
10571 (N : Node_Id; Val : List_Id); -- List2
10572
10573 procedure Set_Pragma_Identifier
10574 (N : Node_Id; Val : Node_Id); -- Node4
10575
10576 procedure Set_Pragmas_After
10577 (N : Node_Id; Val : List_Id); -- List5
10578
10579 procedure Set_Pragmas_Before
10580 (N : Node_Id; Val : List_Id); -- List4
10581
10582 procedure Set_Pre_Post_Conditions
10583 (N : Node_Id; Val : Node_Id); -- Node1
10584
10585 procedure Set_Prefix
10586 (N : Node_Id; Val : Node_Id); -- Node3
10587
10588 procedure Set_Premature_Use
10589 (N : Node_Id; Val : Node_Id); -- Node5
10590
10591 procedure Set_Present_Expr
10592 (N : Node_Id; Val : Uint); -- Uint3
10593
10594 procedure Set_Prev_Ids
10595 (N : Node_Id; Val : Boolean := True); -- Flag6
10596
10597 procedure Set_Print_In_Hex
10598 (N : Node_Id; Val : Boolean := True); -- Flag13
10599
10600 procedure Set_Private_Declarations
10601 (N : Node_Id; Val : List_Id); -- List3
10602
10603 procedure Set_Private_Present
10604 (N : Node_Id; Val : Boolean := True); -- Flag15
10605
10606 procedure Set_Procedure_To_Call
10607 (N : Node_Id; Val : Node_Id); -- Node2
10608
10609 procedure Set_Proper_Body
10610 (N : Node_Id; Val : Node_Id); -- Node1
10611
10612 procedure Set_Protected_Definition
10613 (N : Node_Id; Val : Node_Id); -- Node3
10614
10615 procedure Set_Protected_Present
10616 (N : Node_Id; Val : Boolean := True); -- Flag6
10617
10618 procedure Set_Raises_Constraint_Error
10619 (N : Node_Id; Val : Boolean := True); -- Flag7
10620
10621 procedure Set_Range_Constraint
10622 (N : Node_Id; Val : Node_Id); -- Node4
10623
10624 procedure Set_Range_Expression
10625 (N : Node_Id; Val : Node_Id); -- Node4
10626
10627 procedure Set_Real_Range_Specification
10628 (N : Node_Id; Val : Node_Id); -- Node4
10629
10630 procedure Set_Realval
10631 (N : Node_Id; Val : Ureal); -- Ureal3
10632
10633 procedure Set_Reason
10634 (N : Node_Id; Val : Uint); -- Uint3
10635
10636 procedure Set_Record_Extension_Part
10637 (N : Node_Id; Val : Node_Id); -- Node3
10638
10639 procedure Set_Redundant_Use
10640 (N : Node_Id; Val : Boolean := True); -- Flag13
10641
10642 procedure Set_Renaming_Exception
10643 (N : Node_Id; Val : Node_Id); -- Node2
10644
10645 procedure Set_Result_Definition
10646 (N : Node_Id; Val : Node_Id); -- Node4
10647
10648 procedure Set_Return_Object_Declarations
10649 (N : Node_Id; Val : List_Id); -- List3
10650
10651 procedure Set_Return_Statement_Entity
10652 (N : Node_Id; Val : Node_Id); -- Node5
10653
10654 procedure Set_Reverse_Present
10655 (N : Node_Id; Val : Boolean := True); -- Flag15
10656
10657 procedure Set_Right_Opnd
10658 (N : Node_Id; Val : Node_Id); -- Node3
10659
10660 procedure Set_Rounded_Result
10661 (N : Node_Id; Val : Boolean := True); -- Flag18
10662
10663 procedure Set_SCIL_Controlling_Tag
10664 (N : Node_Id; Val : Node_Id); -- Node5
10665
10666 procedure Set_SCIL_Entity
10667 (N : Node_Id; Val : Node_Id); -- Node4
10668
10669 procedure Set_SCIL_Tag_Value
10670 (N : Node_Id; Val : Node_Id); -- Node5
10671
10672 procedure Set_SCIL_Target_Prim
10673 (N : Node_Id; Val : Node_Id); -- Node2
10674
10675 procedure Set_Scope
10676 (N : Node_Id; Val : Node_Id); -- Node3
10677
10678 procedure Set_Select_Alternatives
10679 (N : Node_Id; Val : List_Id); -- List1
10680
10681 procedure Set_Selector_Name
10682 (N : Node_Id; Val : Node_Id); -- Node2
10683
10684 procedure Set_Selector_Names
10685 (N : Node_Id; Val : List_Id); -- List1
10686
10687 procedure Set_Shift_Count_OK
10688 (N : Node_Id; Val : Boolean := True); -- Flag4
10689
10690 procedure Set_Source_Type
10691 (N : Node_Id; Val : Entity_Id); -- Node1
10692
10693 procedure Set_Specification
10694 (N : Node_Id; Val : Node_Id); -- Node1
10695
10696 procedure Set_Split_PPC
10697 (N : Node_Id; Val : Boolean); -- Flag17
10698
10699 procedure Set_Statements
10700 (N : Node_Id; Val : List_Id); -- List3
10701
10702 procedure Set_Storage_Pool
10703 (N : Node_Id; Val : Node_Id); -- Node1
10704
10705 procedure Set_Subpool_Handle_Name
10706 (N : Node_Id; Val : Node_Id); -- Node4
10707
10708 procedure Set_Strval
10709 (N : Node_Id; Val : String_Id); -- Str3
10710
10711 procedure Set_Subtype_Indication
10712 (N : Node_Id; Val : Node_Id); -- Node5
10713
10714 procedure Set_Subtype_Mark
10715 (N : Node_Id; Val : Node_Id); -- Node4
10716
10717 procedure Set_Subtype_Marks
10718 (N : Node_Id; Val : List_Id); -- List2
10719
10720 procedure Set_Suppress_Assignment_Checks
10721 (N : Node_Id; Val : Boolean := True); -- Flag18
10722
10723 procedure Set_Suppress_Loop_Warnings
10724 (N : Node_Id; Val : Boolean := True); -- Flag17
10725
10726 procedure Set_Synchronized_Present
10727 (N : Node_Id; Val : Boolean := True); -- Flag7
10728
10729 procedure Set_Tagged_Present
10730 (N : Node_Id; Val : Boolean := True); -- Flag15
10731
10732 procedure Set_Target_Type
10733 (N : Node_Id; Val : Entity_Id); -- Node2
10734
10735 procedure Set_Task_Definition
10736 (N : Node_Id; Val : Node_Id); -- Node3
10737
10738 procedure Set_Task_Present
10739 (N : Node_Id; Val : Boolean := True); -- Flag5
10740
10741 procedure Set_Then_Actions
10742 (N : Node_Id; Val : List_Id); -- List2
10743
10744 procedure Set_Then_Statements
10745 (N : Node_Id; Val : List_Id); -- List2
10746
10747 procedure Set_Treat_Fixed_As_Integer
10748 (N : Node_Id; Val : Boolean := True); -- Flag14
10749
10750 procedure Set_Triggering_Alternative
10751 (N : Node_Id; Val : Node_Id); -- Node1
10752
10753 procedure Set_Triggering_Statement
10754 (N : Node_Id; Val : Node_Id); -- Node1
10755
10756 procedure Set_TSS_Elist
10757 (N : Node_Id; Val : Elist_Id); -- Elist3
10758
10759 procedure Set_Type_Definition
10760 (N : Node_Id; Val : Node_Id); -- Node3
10761
10762 procedure Set_Uneval_Old_Accept
10763 (N : Node_Id; Val : Boolean := True); -- Flag7
10764
10765 procedure Set_Uneval_Old_Warn
10766 (N : Node_Id; Val : Boolean := True); -- Flag18
10767
10768 procedure Set_Unit
10769 (N : Node_Id; Val : Node_Id); -- Node2
10770
10771 procedure Set_Unknown_Discriminants_Present
10772 (N : Node_Id; Val : Boolean := True); -- Flag13
10773
10774 procedure Set_Unreferenced_In_Spec
10775 (N : Node_Id; Val : Boolean := True); -- Flag7
10776
10777 procedure Set_Variant_Part
10778 (N : Node_Id; Val : Node_Id); -- Node4
10779
10780 procedure Set_Variants
10781 (N : Node_Id; Val : List_Id); -- List1
10782
10783 procedure Set_Visible_Declarations
10784 (N : Node_Id; Val : List_Id); -- List2
10785
10786 procedure Set_Uninitialized_Variable
10787 (N : Node_Id; Val : Node_Id); -- Node3
10788
10789 procedure Set_Used_Operations
10790 (N : Node_Id; Val : Elist_Id); -- Elist5
10791
10792 procedure Set_Was_Originally_Stub
10793 (N : Node_Id; Val : Boolean := True); -- Flag13
10794
10795 procedure Set_Withed_Body
10796 (N : Node_Id; Val : Node_Id); -- Node1
10797
10798 -------------------------
10799 -- Iterator Procedures --
10800 -------------------------
10801
10802 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
10803
10804 procedure Next_Entity (N : in out Node_Id);
10805 procedure Next_Named_Actual (N : in out Node_Id);
10806 procedure Next_Rep_Item (N : in out Node_Id);
10807 procedure Next_Use_Clause (N : in out Node_Id);
10808
10809 -------------------------------------------
10810 -- Miscellaneous Tree Access Subprograms --
10811 -------------------------------------------
10812
10813 function End_Location (N : Node_Id) return Source_Ptr;
10814 -- N is an N_If_Statement or N_Case_Statement node, and this function
10815 -- returns the location of the IF token in the END IF sequence by
10816 -- translating the value of the End_Span field.
10817
10818 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10819 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
10820 -- the End_Span field to correspond to the given value S. In other words,
10821 -- End_Span is set to the difference between S and Sloc (N), the starting
10822 -- location.
10823
10824 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10825 -- Given an argument to a pragma Arg, this function returns the expression
10826 -- for the argument. This is Arg itself, or, in the case where Arg is a
10827 -- pragma argument association node, the expression from this node.
10828
10829 --------------------------------
10830 -- Node_Kind Membership Tests --
10831 --------------------------------
10832
10833 -- The following functions allow a convenient notation for testing whether
10834 -- a Node_Kind value matches any one of a list of possible values. In each
10835 -- case True is returned if the given T argument is equal to any of the V
10836 -- arguments. Note that there is a similar set of functions defined in
10837 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
10838
10839 function Nkind_In
10840 (T : Node_Kind;
10841 V1 : Node_Kind;
10842 V2 : Node_Kind) return Boolean;
10843
10844 function Nkind_In
10845 (T : Node_Kind;
10846 V1 : Node_Kind;
10847 V2 : Node_Kind;
10848 V3 : Node_Kind) return Boolean;
10849
10850 function Nkind_In
10851 (T : Node_Kind;
10852 V1 : Node_Kind;
10853 V2 : Node_Kind;
10854 V3 : Node_Kind;
10855 V4 : Node_Kind) return Boolean;
10856
10857 function Nkind_In
10858 (T : Node_Kind;
10859 V1 : Node_Kind;
10860 V2 : Node_Kind;
10861 V3 : Node_Kind;
10862 V4 : Node_Kind;
10863 V5 : Node_Kind) return Boolean;
10864
10865 function Nkind_In
10866 (T : Node_Kind;
10867 V1 : Node_Kind;
10868 V2 : Node_Kind;
10869 V3 : Node_Kind;
10870 V4 : Node_Kind;
10871 V5 : Node_Kind;
10872 V6 : Node_Kind) return Boolean;
10873
10874 function Nkind_In
10875 (T : Node_Kind;
10876 V1 : Node_Kind;
10877 V2 : Node_Kind;
10878 V3 : Node_Kind;
10879 V4 : Node_Kind;
10880 V5 : Node_Kind;
10881 V6 : Node_Kind;
10882 V7 : Node_Kind) return Boolean;
10883
10884 function Nkind_In
10885 (T : Node_Kind;
10886 V1 : Node_Kind;
10887 V2 : Node_Kind;
10888 V3 : Node_Kind;
10889 V4 : Node_Kind;
10890 V5 : Node_Kind;
10891 V6 : Node_Kind;
10892 V7 : Node_Kind;
10893 V8 : Node_Kind) return Boolean;
10894
10895 function Nkind_In
10896 (T : Node_Kind;
10897 V1 : Node_Kind;
10898 V2 : Node_Kind;
10899 V3 : Node_Kind;
10900 V4 : Node_Kind;
10901 V5 : Node_Kind;
10902 V6 : Node_Kind;
10903 V7 : Node_Kind;
10904 V8 : Node_Kind;
10905 V9 : Node_Kind) return Boolean;
10906
10907 pragma Inline (Nkind_In);
10908 -- Inline all above functions
10909
10910 -----------------------
10911 -- Utility Functions --
10912 -----------------------
10913
10914 function Pragma_Name (N : Node_Id) return Name_Id;
10915 pragma Inline (Pragma_Name);
10916 -- Convenient function to obtain Chars field of Pragma_Identifier
10917
10918 -----------------------------
10919 -- Syntactic Parent Tables --
10920 -----------------------------
10921
10922 -- These tables show for each node, and for each of the five fields,
10923 -- whether the corresponding field is syntactic (True) or semantic (False).
10924 -- Unused entries are also set to False.
10925
10926 subtype Field_Num is Natural range 1 .. 5;
10927
10928 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10929
10930 -- Following entries can be built automatically from the sinfo sources
10931 -- using the makeisf utility (currently this program is in spitbol).
10932
10933 N_Identifier =>
10934 (1 => True, -- Chars (Name1)
10935 2 => False, -- Original_Discriminant (Node2-Sem)
10936 3 => False, -- unused
10937 4 => False, -- Entity (Node4-Sem)
10938 5 => False), -- Etype (Node5-Sem)
10939
10940 N_Integer_Literal =>
10941 (1 => False, -- unused
10942 2 => False, -- Original_Entity (Node2-Sem)
10943 3 => True, -- Intval (Uint3)
10944 4 => False, -- unused
10945 5 => False), -- Etype (Node5-Sem)
10946
10947 N_Real_Literal =>
10948 (1 => False, -- unused
10949 2 => False, -- Original_Entity (Node2-Sem)
10950 3 => True, -- Realval (Ureal3)
10951 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10952 5 => False), -- Etype (Node5-Sem)
10953
10954 N_Character_Literal =>
10955 (1 => True, -- Chars (Name1)
10956 2 => True, -- Char_Literal_Value (Uint2)
10957 3 => False, -- unused
10958 4 => False, -- Entity (Node4-Sem)
10959 5 => False), -- Etype (Node5-Sem)
10960
10961 N_String_Literal =>
10962 (1 => False, -- unused
10963 2 => False, -- unused
10964 3 => True, -- Strval (Str3)
10965 4 => False, -- unused
10966 5 => False), -- Etype (Node5-Sem)
10967
10968 N_Pragma =>
10969 (1 => False, -- Next_Pragma (Node1-Sem)
10970 2 => True, -- Pragma_Argument_Associations (List2)
10971 3 => False, -- Corresponding_Aspect (Node3-Sem)
10972 4 => True, -- Pragma_Identifier (Node4)
10973 5 => False), -- Next_Rep_Item (Node5-Sem)
10974
10975 N_Pragma_Argument_Association =>
10976 (1 => True, -- Chars (Name1)
10977 2 => False, -- unused
10978 3 => True, -- Expression (Node3)
10979 4 => False, -- unused
10980 5 => False), -- unused
10981
10982 N_Defining_Identifier =>
10983 (1 => True, -- Chars (Name1)
10984 2 => False, -- Next_Entity (Node2-Sem)
10985 3 => False, -- Scope (Node3-Sem)
10986 4 => False, -- unused
10987 5 => False), -- Etype (Node5-Sem)
10988
10989 N_Full_Type_Declaration =>
10990 (1 => True, -- Defining_Identifier (Node1)
10991 2 => False, -- Incomplete_View (Node2-Sem)
10992 3 => True, -- Type_Definition (Node3)
10993 4 => True, -- Discriminant_Specifications (List4)
10994 5 => False), -- unused
10995
10996 N_Subtype_Declaration =>
10997 (1 => True, -- Defining_Identifier (Node1)
10998 2 => False, -- unused
10999 3 => False, -- unused
11000 4 => False, -- Generic_Parent_Type (Node4-Sem)
11001 5 => True), -- Subtype_Indication (Node5)
11002
11003 N_Subtype_Indication =>
11004 (1 => False, -- unused
11005 2 => False, -- unused
11006 3 => True, -- Constraint (Node3)
11007 4 => True, -- Subtype_Mark (Node4)
11008 5 => False), -- Etype (Node5-Sem)
11009
11010 N_Object_Declaration =>
11011 (1 => True, -- Defining_Identifier (Node1)
11012 2 => False, -- Handler_List_Entry (Node2-Sem)
11013 3 => True, -- Expression (Node3)
11014 4 => True, -- Object_Definition (Node4)
11015 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11016
11017 N_Number_Declaration =>
11018 (1 => True, -- Defining_Identifier (Node1)
11019 2 => False, -- unused
11020 3 => True, -- Expression (Node3)
11021 4 => False, -- unused
11022 5 => False), -- unused
11023
11024 N_Derived_Type_Definition =>
11025 (1 => False, -- unused
11026 2 => True, -- Interface_List (List2)
11027 3 => True, -- Record_Extension_Part (Node3)
11028 4 => False, -- unused
11029 5 => True), -- Subtype_Indication (Node5)
11030
11031 N_Range_Constraint =>
11032 (1 => False, -- unused
11033 2 => False, -- unused
11034 3 => False, -- unused
11035 4 => True, -- Range_Expression (Node4)
11036 5 => False), -- unused
11037
11038 N_Range =>
11039 (1 => True, -- Low_Bound (Node1)
11040 2 => True, -- High_Bound (Node2)
11041 3 => False, -- unused
11042 4 => False, -- unused
11043 5 => False), -- Etype (Node5-Sem)
11044
11045 N_Enumeration_Type_Definition =>
11046 (1 => True, -- Literals (List1)
11047 2 => False, -- unused
11048 3 => False, -- unused
11049 4 => True, -- End_Label (Node4)
11050 5 => False), -- unused
11051
11052 N_Defining_Character_Literal =>
11053 (1 => True, -- Chars (Name1)
11054 2 => False, -- Next_Entity (Node2-Sem)
11055 3 => False, -- Scope (Node3-Sem)
11056 4 => False, -- unused
11057 5 => False), -- Etype (Node5-Sem)
11058
11059 N_Signed_Integer_Type_Definition =>
11060 (1 => True, -- Low_Bound (Node1)
11061 2 => True, -- High_Bound (Node2)
11062 3 => False, -- unused
11063 4 => False, -- unused
11064 5 => False), -- unused
11065
11066 N_Modular_Type_Definition =>
11067 (1 => False, -- unused
11068 2 => False, -- unused
11069 3 => True, -- Expression (Node3)
11070 4 => False, -- unused
11071 5 => False), -- unused
11072
11073 N_Floating_Point_Definition =>
11074 (1 => False, -- unused
11075 2 => True, -- Digits_Expression (Node2)
11076 3 => False, -- unused
11077 4 => True, -- Real_Range_Specification (Node4)
11078 5 => False), -- unused
11079
11080 N_Real_Range_Specification =>
11081 (1 => True, -- Low_Bound (Node1)
11082 2 => True, -- High_Bound (Node2)
11083 3 => False, -- unused
11084 4 => False, -- unused
11085 5 => False), -- unused
11086
11087 N_Ordinary_Fixed_Point_Definition =>
11088 (1 => False, -- unused
11089 2 => False, -- unused
11090 3 => True, -- Delta_Expression (Node3)
11091 4 => True, -- Real_Range_Specification (Node4)
11092 5 => False), -- unused
11093
11094 N_Decimal_Fixed_Point_Definition =>
11095 (1 => False, -- unused
11096 2 => True, -- Digits_Expression (Node2)
11097 3 => True, -- Delta_Expression (Node3)
11098 4 => True, -- Real_Range_Specification (Node4)
11099 5 => False), -- unused
11100
11101 N_Digits_Constraint =>
11102 (1 => False, -- unused
11103 2 => True, -- Digits_Expression (Node2)
11104 3 => False, -- unused
11105 4 => True, -- Range_Constraint (Node4)
11106 5 => False), -- unused
11107
11108 N_Unconstrained_Array_Definition =>
11109 (1 => False, -- unused
11110 2 => True, -- Subtype_Marks (List2)
11111 3 => False, -- unused
11112 4 => True, -- Component_Definition (Node4)
11113 5 => False), -- unused
11114
11115 N_Constrained_Array_Definition =>
11116 (1 => False, -- unused
11117 2 => True, -- Discrete_Subtype_Definitions (List2)
11118 3 => False, -- unused
11119 4 => True, -- Component_Definition (Node4)
11120 5 => False), -- unused
11121
11122 N_Component_Definition =>
11123 (1 => False, -- unused
11124 2 => False, -- unused
11125 3 => True, -- Access_Definition (Node3)
11126 4 => False, -- unused
11127 5 => True), -- Subtype_Indication (Node5)
11128
11129 N_Discriminant_Specification =>
11130 (1 => True, -- Defining_Identifier (Node1)
11131 2 => False, -- unused
11132 3 => True, -- Expression (Node3)
11133 4 => False, -- unused
11134 5 => True), -- Discriminant_Type (Node5)
11135
11136 N_Index_Or_Discriminant_Constraint =>
11137 (1 => True, -- Constraints (List1)
11138 2 => False, -- unused
11139 3 => False, -- unused
11140 4 => False, -- unused
11141 5 => False), -- unused
11142
11143 N_Discriminant_Association =>
11144 (1 => True, -- Selector_Names (List1)
11145 2 => False, -- unused
11146 3 => True, -- Expression (Node3)
11147 4 => False, -- unused
11148 5 => False), -- unused
11149
11150 N_Record_Definition =>
11151 (1 => True, -- Component_List (Node1)
11152 2 => True, -- Interface_List (List2)
11153 3 => False, -- unused
11154 4 => True, -- End_Label (Node4)
11155 5 => False), -- unused
11156
11157 N_Component_List =>
11158 (1 => False, -- unused
11159 2 => False, -- unused
11160 3 => True, -- Component_Items (List3)
11161 4 => True, -- Variant_Part (Node4)
11162 5 => False), -- unused
11163
11164 N_Component_Declaration =>
11165 (1 => True, -- Defining_Identifier (Node1)
11166 2 => False, -- unused
11167 3 => True, -- Expression (Node3)
11168 4 => True, -- Component_Definition (Node4)
11169 5 => False), -- unused
11170
11171 N_Variant_Part =>
11172 (1 => True, -- Variants (List1)
11173 2 => True, -- Name (Node2)
11174 3 => False, -- unused
11175 4 => False, -- unused
11176 5 => False), -- unused
11177
11178 N_Variant =>
11179 (1 => True, -- Component_List (Node1)
11180 2 => False, -- Enclosing_Variant (Node2-Sem)
11181 3 => False, -- Present_Expr (Uint3-Sem)
11182 4 => True, -- Discrete_Choices (List4)
11183 5 => False), -- Dcheck_Function (Node5-Sem)
11184
11185 N_Others_Choice =>
11186 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11187 2 => False, -- unused
11188 3 => False, -- unused
11189 4 => False, -- unused
11190 5 => False), -- unused
11191
11192 N_Access_To_Object_Definition =>
11193 (1 => False, -- unused
11194 2 => False, -- unused
11195 3 => False, -- unused
11196 4 => False, -- unused
11197 5 => True), -- Subtype_Indication (Node5)
11198
11199 N_Access_Function_Definition =>
11200 (1 => False, -- unused
11201 2 => False, -- unused
11202 3 => True, -- Parameter_Specifications (List3)
11203 4 => True, -- Result_Definition (Node4)
11204 5 => False), -- unused
11205
11206 N_Access_Procedure_Definition =>
11207 (1 => False, -- unused
11208 2 => False, -- unused
11209 3 => True, -- Parameter_Specifications (List3)
11210 4 => False, -- unused
11211 5 => False), -- unused
11212
11213 N_Access_Definition =>
11214 (1 => False, -- unused
11215 2 => False, -- unused
11216 3 => True, -- Access_To_Subprogram_Definition (Node3)
11217 4 => True, -- Subtype_Mark (Node4)
11218 5 => False), -- unused
11219
11220 N_Incomplete_Type_Declaration =>
11221 (1 => True, -- Defining_Identifier (Node1)
11222 2 => False, -- unused
11223 3 => False, -- unused
11224 4 => True, -- Discriminant_Specifications (List4)
11225 5 => False), -- Premature_Use
11226
11227 N_Explicit_Dereference =>
11228 (1 => False, -- unused
11229 2 => False, -- unused
11230 3 => True, -- Prefix (Node3)
11231 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11232 5 => False), -- Etype (Node5-Sem)
11233
11234 N_Indexed_Component =>
11235 (1 => True, -- Expressions (List1)
11236 2 => False, -- unused
11237 3 => True, -- Prefix (Node3)
11238 4 => False, -- Generalized_Indexing (Node4-Sem)
11239 5 => False), -- Etype (Node5-Sem)
11240
11241 N_Slice =>
11242 (1 => False, -- unused
11243 2 => False, -- unused
11244 3 => True, -- Prefix (Node3)
11245 4 => True, -- Discrete_Range (Node4)
11246 5 => False), -- Etype (Node5-Sem)
11247
11248 N_Selected_Component =>
11249 (1 => False, -- unused
11250 2 => True, -- Selector_Name (Node2)
11251 3 => True, -- Prefix (Node3)
11252 4 => False, -- unused
11253 5 => False), -- Etype (Node5-Sem)
11254
11255 N_Attribute_Reference =>
11256 (1 => True, -- Expressions (List1)
11257 2 => True, -- Attribute_Name (Name2)
11258 3 => True, -- Prefix (Node3)
11259 4 => False, -- Entity (Node4-Sem)
11260 5 => False), -- Etype (Node5-Sem)
11261
11262 N_Aggregate =>
11263 (1 => True, -- Expressions (List1)
11264 2 => True, -- Component_Associations (List2)
11265 3 => False, -- Aggregate_Bounds (Node3-Sem)
11266 4 => False, -- unused
11267 5 => False), -- Etype (Node5-Sem)
11268
11269 N_Component_Association =>
11270 (1 => True, -- Choices (List1)
11271 2 => False, -- Loop_Actions (List2-Sem)
11272 3 => True, -- Expression (Node3)
11273 4 => False, -- unused
11274 5 => False), -- unused
11275
11276 N_Extension_Aggregate =>
11277 (1 => True, -- Expressions (List1)
11278 2 => True, -- Component_Associations (List2)
11279 3 => True, -- Ancestor_Part (Node3)
11280 4 => False, -- unused
11281 5 => False), -- Etype (Node5-Sem)
11282
11283 N_Null =>
11284 (1 => False, -- unused
11285 2 => False, -- unused
11286 3 => False, -- unused
11287 4 => False, -- unused
11288 5 => False), -- Etype (Node5-Sem)
11289
11290 N_And_Then =>
11291 (1 => False, -- Actions (List1-Sem)
11292 2 => True, -- Left_Opnd (Node2)
11293 3 => True, -- Right_Opnd (Node3)
11294 4 => False, -- unused
11295 5 => False), -- Etype (Node5-Sem)
11296
11297 N_Or_Else =>
11298 (1 => False, -- Actions (List1-Sem)
11299 2 => True, -- Left_Opnd (Node2)
11300 3 => True, -- Right_Opnd (Node3)
11301 4 => False, -- unused
11302 5 => False), -- Etype (Node5-Sem)
11303
11304 N_In =>
11305 (1 => False, -- unused
11306 2 => True, -- Left_Opnd (Node2)
11307 3 => True, -- Right_Opnd (Node3)
11308 4 => True, -- Alternatives (List4)
11309 5 => False), -- Etype (Node5-Sem)
11310
11311 N_Not_In =>
11312 (1 => False, -- unused
11313 2 => True, -- Left_Opnd (Node2)
11314 3 => True, -- Right_Opnd (Node3)
11315 4 => True, -- Alternatives (List4)
11316 5 => False), -- Etype (Node5-Sem)
11317
11318 N_Op_And =>
11319 (1 => True, -- Chars (Name1)
11320 2 => True, -- Left_Opnd (Node2)
11321 3 => True, -- Right_Opnd (Node3)
11322 4 => False, -- Entity (Node4-Sem)
11323 5 => False), -- Etype (Node5-Sem)
11324
11325 N_Op_Or =>
11326 (1 => True, -- Chars (Name1)
11327 2 => True, -- Left_Opnd (Node2)
11328 3 => True, -- Right_Opnd (Node3)
11329 4 => False, -- Entity (Node4-Sem)
11330 5 => False), -- Etype (Node5-Sem)
11331
11332 N_Op_Xor =>
11333 (1 => True, -- Chars (Name1)
11334 2 => True, -- Left_Opnd (Node2)
11335 3 => True, -- Right_Opnd (Node3)
11336 4 => False, -- Entity (Node4-Sem)
11337 5 => False), -- Etype (Node5-Sem)
11338
11339 N_Op_Eq =>
11340 (1 => True, -- Chars (Name1)
11341 2 => True, -- Left_Opnd (Node2)
11342 3 => True, -- Right_Opnd (Node3)
11343 4 => False, -- Entity (Node4-Sem)
11344 5 => False), -- Etype (Node5-Sem)
11345
11346 N_Op_Ne =>
11347 (1 => True, -- Chars (Name1)
11348 2 => True, -- Left_Opnd (Node2)
11349 3 => True, -- Right_Opnd (Node3)
11350 4 => False, -- Entity (Node4-Sem)
11351 5 => False), -- Etype (Node5-Sem)
11352
11353 N_Op_Lt =>
11354 (1 => True, -- Chars (Name1)
11355 2 => True, -- Left_Opnd (Node2)
11356 3 => True, -- Right_Opnd (Node3)
11357 4 => False, -- Entity (Node4-Sem)
11358 5 => False), -- Etype (Node5-Sem)
11359
11360 N_Op_Le =>
11361 (1 => True, -- Chars (Name1)
11362 2 => True, -- Left_Opnd (Node2)
11363 3 => True, -- Right_Opnd (Node3)
11364 4 => False, -- Entity (Node4-Sem)
11365 5 => False), -- Etype (Node5-Sem)
11366
11367 N_Op_Gt =>
11368 (1 => True, -- Chars (Name1)
11369 2 => True, -- Left_Opnd (Node2)
11370 3 => True, -- Right_Opnd (Node3)
11371 4 => False, -- Entity (Node4-Sem)
11372 5 => False), -- Etype (Node5-Sem)
11373
11374 N_Op_Ge =>
11375 (1 => True, -- Chars (Name1)
11376 2 => True, -- Left_Opnd (Node2)
11377 3 => True, -- Right_Opnd (Node3)
11378 4 => False, -- Entity (Node4-Sem)
11379 5 => False), -- Etype (Node5-Sem)
11380
11381 N_Op_Add =>
11382 (1 => True, -- Chars (Name1)
11383 2 => True, -- Left_Opnd (Node2)
11384 3 => True, -- Right_Opnd (Node3)
11385 4 => False, -- Entity (Node4-Sem)
11386 5 => False), -- Etype (Node5-Sem)
11387
11388 N_Op_Subtract =>
11389 (1 => True, -- Chars (Name1)
11390 2 => True, -- Left_Opnd (Node2)
11391 3 => True, -- Right_Opnd (Node3)
11392 4 => False, -- Entity (Node4-Sem)
11393 5 => False), -- Etype (Node5-Sem)
11394
11395 N_Op_Concat =>
11396 (1 => True, -- Chars (Name1)
11397 2 => True, -- Left_Opnd (Node2)
11398 3 => True, -- Right_Opnd (Node3)
11399 4 => False, -- Entity (Node4-Sem)
11400 5 => False), -- Etype (Node5-Sem)
11401
11402 N_Op_Multiply =>
11403 (1 => True, -- Chars (Name1)
11404 2 => True, -- Left_Opnd (Node2)
11405 3 => True, -- Right_Opnd (Node3)
11406 4 => False, -- Entity (Node4-Sem)
11407 5 => False), -- Etype (Node5-Sem)
11408
11409 N_Op_Divide =>
11410 (1 => True, -- Chars (Name1)
11411 2 => True, -- Left_Opnd (Node2)
11412 3 => True, -- Right_Opnd (Node3)
11413 4 => False, -- Entity (Node4-Sem)
11414 5 => False), -- Etype (Node5-Sem)
11415
11416 N_Op_Mod =>
11417 (1 => True, -- Chars (Name1)
11418 2 => True, -- Left_Opnd (Node2)
11419 3 => True, -- Right_Opnd (Node3)
11420 4 => False, -- Entity (Node4-Sem)
11421 5 => False), -- Etype (Node5-Sem)
11422
11423 N_Op_Rem =>
11424 (1 => True, -- Chars (Name1)
11425 2 => True, -- Left_Opnd (Node2)
11426 3 => True, -- Right_Opnd (Node3)
11427 4 => False, -- Entity (Node4-Sem)
11428 5 => False), -- Etype (Node5-Sem)
11429
11430 N_Op_Expon =>
11431 (1 => True, -- Chars (Name1)
11432 2 => True, -- Left_Opnd (Node2)
11433 3 => True, -- Right_Opnd (Node3)
11434 4 => False, -- Entity (Node4-Sem)
11435 5 => False), -- Etype (Node5-Sem)
11436
11437 N_Op_Plus =>
11438 (1 => True, -- Chars (Name1)
11439 2 => False, -- unused
11440 3 => True, -- Right_Opnd (Node3)
11441 4 => False, -- Entity (Node4-Sem)
11442 5 => False), -- Etype (Node5-Sem)
11443
11444 N_Op_Minus =>
11445 (1 => True, -- Chars (Name1)
11446 2 => False, -- unused
11447 3 => True, -- Right_Opnd (Node3)
11448 4 => False, -- Entity (Node4-Sem)
11449 5 => False), -- Etype (Node5-Sem)
11450
11451 N_Op_Abs =>
11452 (1 => True, -- Chars (Name1)
11453 2 => False, -- unused
11454 3 => True, -- Right_Opnd (Node3)
11455 4 => False, -- Entity (Node4-Sem)
11456 5 => False), -- Etype (Node5-Sem)
11457
11458 N_Op_Not =>
11459 (1 => True, -- Chars (Name1)
11460 2 => False, -- unused
11461 3 => True, -- Right_Opnd (Node3)
11462 4 => False, -- Entity (Node4-Sem)
11463 5 => False), -- Etype (Node5-Sem)
11464
11465 N_Type_Conversion =>
11466 (1 => False, -- unused
11467 2 => False, -- unused
11468 3 => True, -- Expression (Node3)
11469 4 => True, -- Subtype_Mark (Node4)
11470 5 => False), -- Etype (Node5-Sem)
11471
11472 N_Qualified_Expression =>
11473 (1 => False, -- unused
11474 2 => False, -- unused
11475 3 => True, -- Expression (Node3)
11476 4 => True, -- Subtype_Mark (Node4)
11477 5 => False), -- Etype (Node5-Sem)
11478
11479 N_Quantified_Expression =>
11480 (1 => True, -- Condition (Node1)
11481 2 => True, -- Iterator_Specification
11482 3 => False, -- unused
11483 4 => True, -- Loop_Parameter_Specification (Node4)
11484 5 => False), -- Etype (Node5-Sem)
11485
11486 N_Allocator =>
11487 (1 => False, -- Storage_Pool (Node1-Sem)
11488 2 => False, -- Procedure_To_Call (Node2-Sem)
11489 3 => True, -- Expression (Node3)
11490 4 => True, -- Subpool_Handle_Name (Node4)
11491 5 => False), -- Etype (Node5-Sem)
11492
11493 N_Null_Statement =>
11494 (1 => False, -- unused
11495 2 => False, -- unused
11496 3 => False, -- unused
11497 4 => False, -- unused
11498 5 => False), -- unused
11499
11500 N_Label =>
11501 (1 => True, -- Identifier (Node1)
11502 2 => False, -- unused
11503 3 => False, -- unused
11504 4 => False, -- unused
11505 5 => False), -- unused
11506
11507 N_Assignment_Statement =>
11508 (1 => False, -- unused
11509 2 => True, -- Name (Node2)
11510 3 => True, -- Expression (Node3)
11511 4 => False, -- unused
11512 5 => False), -- unused
11513
11514 N_If_Statement =>
11515 (1 => True, -- Condition (Node1)
11516 2 => True, -- Then_Statements (List2)
11517 3 => True, -- Elsif_Parts (List3)
11518 4 => True, -- Else_Statements (List4)
11519 5 => True), -- End_Span (Uint5)
11520
11521 N_Elsif_Part =>
11522 (1 => True, -- Condition (Node1)
11523 2 => True, -- Then_Statements (List2)
11524 3 => False, -- Condition_Actions (List3-Sem)
11525 4 => False, -- unused
11526 5 => False), -- unused
11527
11528 N_Case_Expression =>
11529 (1 => False, -- unused
11530 2 => False, -- unused
11531 3 => True, -- Expression (Node3)
11532 4 => True, -- Alternatives (List4)
11533 5 => False), -- unused
11534
11535 N_Case_Expression_Alternative =>
11536 (1 => False, -- Actions (List1-Sem)
11537 2 => False, -- unused
11538 3 => True, -- Statements (List3)
11539 4 => True, -- Expression (Node4)
11540 5 => False), -- unused
11541
11542 N_Case_Statement =>
11543 (1 => False, -- unused
11544 2 => False, -- unused
11545 3 => True, -- Expression (Node3)
11546 4 => True, -- Alternatives (List4)
11547 5 => True), -- End_Span (Uint5)
11548
11549 N_Case_Statement_Alternative =>
11550 (1 => False, -- unused
11551 2 => False, -- unused
11552 3 => True, -- Statements (List3)
11553 4 => True, -- Discrete_Choices (List4)
11554 5 => False), -- unused
11555
11556 N_Loop_Statement =>
11557 (1 => True, -- Identifier (Node1)
11558 2 => True, -- Iteration_Scheme (Node2)
11559 3 => True, -- Statements (List3)
11560 4 => True, -- End_Label (Node4)
11561 5 => False), -- unused
11562
11563 N_Iteration_Scheme =>
11564 (1 => True, -- Condition (Node1)
11565 2 => True, -- Iterator_Specification (Node2)
11566 3 => False, -- Condition_Actions (List3-Sem)
11567 4 => True, -- Loop_Parameter_Specification (Node4)
11568 5 => False), -- unused
11569
11570 N_Loop_Parameter_Specification =>
11571 (1 => True, -- Defining_Identifier (Node1)
11572 2 => False, -- unused
11573 3 => False, -- unused
11574 4 => True, -- Discrete_Subtype_Definition (Node4)
11575 5 => False), -- unused
11576
11577 N_Iterator_Specification =>
11578 (1 => True, -- Defining_Identifier (Node1)
11579 2 => True, -- Name (Node2)
11580 3 => False, -- Unused
11581 4 => False, -- Unused
11582 5 => True), -- Subtype_Indication (Node5)
11583
11584 N_Block_Statement =>
11585 (1 => True, -- Identifier (Node1)
11586 2 => True, -- Declarations (List2)
11587 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11588 4 => True, -- Handled_Statement_Sequence (Node4)
11589 5 => False), -- unused
11590
11591 N_Exit_Statement =>
11592 (1 => True, -- Condition (Node1)
11593 2 => True, -- Name (Node2)
11594 3 => False, -- unused
11595 4 => False, -- unused
11596 5 => False), -- unused
11597
11598 N_Goto_Statement =>
11599 (1 => False, -- unused
11600 2 => True, -- Name (Node2)
11601 3 => False, -- unused
11602 4 => False, -- unused
11603 5 => False), -- unused
11604
11605 N_Subprogram_Declaration =>
11606 (1 => True, -- Specification (Node1)
11607 2 => False, -- unused
11608 3 => False, -- Body_To_Inline (Node3-Sem)
11609 4 => False, -- Parent_Spec (Node4-Sem)
11610 5 => False), -- Corresponding_Body (Node5-Sem)
11611
11612 N_Abstract_Subprogram_Declaration =>
11613 (1 => True, -- Specification (Node1)
11614 2 => False, -- unused
11615 3 => False, -- unused
11616 4 => False, -- unused
11617 5 => False), -- unused
11618
11619 N_Function_Specification =>
11620 (1 => True, -- Defining_Unit_Name (Node1)
11621 2 => False, -- unused
11622 3 => True, -- Parameter_Specifications (List3)
11623 4 => True, -- Result_Definition (Node4)
11624 5 => False), -- Generic_Parent (Node5-Sem)
11625
11626 N_Procedure_Specification =>
11627 (1 => True, -- Defining_Unit_Name (Node1)
11628 2 => False, -- unused
11629 3 => True, -- Parameter_Specifications (List3)
11630 4 => False, -- unused
11631 5 => False), -- Generic_Parent (Node5-Sem)
11632
11633 N_Designator =>
11634 (1 => True, -- Identifier (Node1)
11635 2 => True, -- Name (Node2)
11636 3 => False, -- unused
11637 4 => False, -- unused
11638 5 => False), -- unused
11639
11640 N_Defining_Program_Unit_Name =>
11641 (1 => True, -- Defining_Identifier (Node1)
11642 2 => True, -- Name (Node2)
11643 3 => False, -- unused
11644 4 => False, -- unused
11645 5 => False), -- unused
11646
11647 N_Operator_Symbol =>
11648 (1 => True, -- Chars (Name1)
11649 2 => False, -- unused
11650 3 => True, -- Strval (Str3)
11651 4 => False, -- Entity (Node4-Sem)
11652 5 => False), -- Etype (Node5-Sem)
11653
11654 N_Defining_Operator_Symbol =>
11655 (1 => True, -- Chars (Name1)
11656 2 => False, -- Next_Entity (Node2-Sem)
11657 3 => False, -- Scope (Node3-Sem)
11658 4 => False, -- unused
11659 5 => False), -- Etype (Node5-Sem)
11660
11661 N_Parameter_Specification =>
11662 (1 => True, -- Defining_Identifier (Node1)
11663 2 => True, -- Parameter_Type (Node2)
11664 3 => True, -- Expression (Node3)
11665 4 => False, -- unused
11666 5 => False), -- Default_Expression (Node5-Sem)
11667
11668 N_Subprogram_Body =>
11669 (1 => True, -- Specification (Node1)
11670 2 => True, -- Declarations (List2)
11671 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11672 4 => True, -- Handled_Statement_Sequence (Node4)
11673 5 => False), -- Corresponding_Spec (Node5-Sem)
11674
11675 N_Expression_Function =>
11676 (1 => True, -- Specification (Node1)
11677 2 => False, -- unused
11678 3 => True, -- Expression (Node3)
11679 4 => False, -- unused
11680 5 => False), -- unused
11681
11682 N_Procedure_Call_Statement =>
11683 (1 => False, -- Controlling_Argument (Node1-Sem)
11684 2 => True, -- Name (Node2)
11685 3 => True, -- Parameter_Associations (List3)
11686 4 => False, -- First_Named_Actual (Node4-Sem)
11687 5 => False), -- Etype (Node5-Sem)
11688
11689 N_Function_Call =>
11690 (1 => False, -- Controlling_Argument (Node1-Sem)
11691 2 => True, -- Name (Node2)
11692 3 => True, -- Parameter_Associations (List3)
11693 4 => False, -- First_Named_Actual (Node4-Sem)
11694 5 => False), -- Etype (Node5-Sem)
11695
11696 N_Parameter_Association =>
11697 (1 => False, -- unused
11698 2 => True, -- Selector_Name (Node2)
11699 3 => True, -- Explicit_Actual_Parameter (Node3)
11700 4 => False, -- Next_Named_Actual (Node4-Sem)
11701 5 => False), -- unused
11702
11703 N_Simple_Return_Statement =>
11704 (1 => False, -- Storage_Pool (Node1-Sem)
11705 2 => False, -- Procedure_To_Call (Node2-Sem)
11706 3 => True, -- Expression (Node3)
11707 4 => False, -- unused
11708 5 => False), -- Return_Statement_Entity (Node5-Sem)
11709
11710 N_Extended_Return_Statement =>
11711 (1 => False, -- Storage_Pool (Node1-Sem)
11712 2 => False, -- Procedure_To_Call (Node2-Sem)
11713 3 => True, -- Return_Object_Declarations (List3)
11714 4 => True, -- Handled_Statement_Sequence (Node4)
11715 5 => False), -- Return_Statement_Entity (Node5-Sem)
11716
11717 N_Package_Declaration =>
11718 (1 => True, -- Specification (Node1)
11719 2 => False, -- unused
11720 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11721 4 => False, -- Parent_Spec (Node4-Sem)
11722 5 => False), -- Corresponding_Body (Node5-Sem)
11723
11724 N_Package_Specification =>
11725 (1 => True, -- Defining_Unit_Name (Node1)
11726 2 => True, -- Visible_Declarations (List2)
11727 3 => True, -- Private_Declarations (List3)
11728 4 => True, -- End_Label (Node4)
11729 5 => False), -- Generic_Parent (Node5-Sem)
11730
11731 N_Package_Body =>
11732 (1 => True, -- Defining_Unit_Name (Node1)
11733 2 => True, -- Declarations (List2)
11734 3 => False, -- unused
11735 4 => True, -- Handled_Statement_Sequence (Node4)
11736 5 => False), -- Corresponding_Spec (Node5-Sem)
11737
11738 N_Private_Type_Declaration =>
11739 (1 => True, -- Defining_Identifier (Node1)
11740 2 => False, -- unused
11741 3 => False, -- unused
11742 4 => True, -- Discriminant_Specifications (List4)
11743 5 => False), -- unused
11744
11745 N_Private_Extension_Declaration =>
11746 (1 => True, -- Defining_Identifier (Node1)
11747 2 => True, -- Interface_List (List2)
11748 3 => False, -- unused
11749 4 => True, -- Discriminant_Specifications (List4)
11750 5 => True), -- Subtype_Indication (Node5)
11751
11752 N_Use_Package_Clause =>
11753 (1 => False, -- unused
11754 2 => True, -- Names (List2)
11755 3 => False, -- Next_Use_Clause (Node3-Sem)
11756 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11757 5 => False), -- unused
11758
11759 N_Use_Type_Clause =>
11760 (1 => False, -- unused
11761 2 => True, -- Subtype_Marks (List2)
11762 3 => False, -- Next_Use_Clause (Node3-Sem)
11763 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11764 5 => False), -- unused
11765
11766 N_Object_Renaming_Declaration =>
11767 (1 => True, -- Defining_Identifier (Node1)
11768 2 => True, -- Name (Node2)
11769 3 => True, -- Access_Definition (Node3)
11770 4 => True, -- Subtype_Mark (Node4)
11771 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11772
11773 N_Exception_Renaming_Declaration =>
11774 (1 => True, -- Defining_Identifier (Node1)
11775 2 => True, -- Name (Node2)
11776 3 => False, -- unused
11777 4 => False, -- unused
11778 5 => False), -- unused
11779
11780 N_Package_Renaming_Declaration =>
11781 (1 => True, -- Defining_Unit_Name (Node1)
11782 2 => True, -- Name (Node2)
11783 3 => False, -- unused
11784 4 => False, -- Parent_Spec (Node4-Sem)
11785 5 => False), -- unused
11786
11787 N_Subprogram_Renaming_Declaration =>
11788 (1 => True, -- Specification (Node1)
11789 2 => True, -- Name (Node2)
11790 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
11791 4 => False, -- Parent_Spec (Node4-Sem)
11792 5 => False), -- Corresponding_Spec (Node5-Sem)
11793
11794 N_Generic_Package_Renaming_Declaration =>
11795 (1 => True, -- Defining_Unit_Name (Node1)
11796 2 => True, -- Name (Node2)
11797 3 => False, -- unused
11798 4 => False, -- Parent_Spec (Node4-Sem)
11799 5 => False), -- unused
11800
11801 N_Generic_Procedure_Renaming_Declaration =>
11802 (1 => True, -- Defining_Unit_Name (Node1)
11803 2 => True, -- Name (Node2)
11804 3 => False, -- unused
11805 4 => False, -- Parent_Spec (Node4-Sem)
11806 5 => False), -- unused
11807
11808 N_Generic_Function_Renaming_Declaration =>
11809 (1 => True, -- Defining_Unit_Name (Node1)
11810 2 => True, -- Name (Node2)
11811 3 => False, -- unused
11812 4 => False, -- Parent_Spec (Node4-Sem)
11813 5 => False), -- unused
11814
11815 N_Task_Type_Declaration =>
11816 (1 => True, -- Defining_Identifier (Node1)
11817 2 => True, -- Interface_List (List2)
11818 3 => True, -- Task_Definition (Node3)
11819 4 => True, -- Discriminant_Specifications (List4)
11820 5 => False), -- Corresponding_Body (Node5-Sem)
11821
11822 N_Single_Task_Declaration =>
11823 (1 => True, -- Defining_Identifier (Node1)
11824 2 => True, -- Interface_List (List2)
11825 3 => True, -- Task_Definition (Node3)
11826 4 => False, -- unused
11827 5 => False), -- unused
11828
11829 N_Task_Definition =>
11830 (1 => False, -- unused
11831 2 => True, -- Visible_Declarations (List2)
11832 3 => True, -- Private_Declarations (List3)
11833 4 => True, -- End_Label (Node4)
11834 5 => False), -- unused
11835
11836 N_Task_Body =>
11837 (1 => True, -- Defining_Identifier (Node1)
11838 2 => True, -- Declarations (List2)
11839 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11840 4 => True, -- Handled_Statement_Sequence (Node4)
11841 5 => False), -- Corresponding_Spec (Node5-Sem)
11842
11843 N_Protected_Type_Declaration =>
11844 (1 => True, -- Defining_Identifier (Node1)
11845 2 => True, -- Interface_List (List2)
11846 3 => True, -- Protected_Definition (Node3)
11847 4 => True, -- Discriminant_Specifications (List4)
11848 5 => False), -- Corresponding_Body (Node5-Sem)
11849
11850 N_Single_Protected_Declaration =>
11851 (1 => True, -- Defining_Identifier (Node1)
11852 2 => True, -- Interface_List (List2)
11853 3 => True, -- Protected_Definition (Node3)
11854 4 => False, -- unused
11855 5 => False), -- unused
11856
11857 N_Protected_Definition =>
11858 (1 => False, -- unused
11859 2 => True, -- Visible_Declarations (List2)
11860 3 => True, -- Private_Declarations (List3)
11861 4 => True, -- End_Label (Node4)
11862 5 => False), -- unused
11863
11864 N_Protected_Body =>
11865 (1 => True, -- Defining_Identifier (Node1)
11866 2 => True, -- Declarations (List2)
11867 3 => False, -- unused
11868 4 => True, -- End_Label (Node4)
11869 5 => False), -- Corresponding_Spec (Node5-Sem)
11870
11871 N_Entry_Declaration =>
11872 (1 => True, -- Defining_Identifier (Node1)
11873 2 => False, -- unused
11874 3 => True, -- Parameter_Specifications (List3)
11875 4 => True, -- Discrete_Subtype_Definition (Node4)
11876 5 => False), -- Corresponding_Body (Node5-Sem)
11877
11878 N_Accept_Statement =>
11879 (1 => True, -- Entry_Direct_Name (Node1)
11880 2 => True, -- Declarations (List2)
11881 3 => True, -- Parameter_Specifications (List3)
11882 4 => True, -- Handled_Statement_Sequence (Node4)
11883 5 => True), -- Entry_Index (Node5)
11884
11885 N_Entry_Body =>
11886 (1 => True, -- Defining_Identifier (Node1)
11887 2 => True, -- Declarations (List2)
11888 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11889 4 => True, -- Handled_Statement_Sequence (Node4)
11890 5 => True), -- Entry_Body_Formal_Part (Node5)
11891
11892 N_Entry_Body_Formal_Part =>
11893 (1 => True, -- Condition (Node1)
11894 2 => False, -- unused
11895 3 => True, -- Parameter_Specifications (List3)
11896 4 => True, -- Entry_Index_Specification (Node4)
11897 5 => False), -- unused
11898
11899 N_Entry_Index_Specification =>
11900 (1 => True, -- Defining_Identifier (Node1)
11901 2 => False, -- unused
11902 3 => False, -- unused
11903 4 => True, -- Discrete_Subtype_Definition (Node4)
11904 5 => False), -- unused
11905
11906 N_Entry_Call_Statement =>
11907 (1 => False, -- unused
11908 2 => True, -- Name (Node2)
11909 3 => True, -- Parameter_Associations (List3)
11910 4 => False, -- First_Named_Actual (Node4-Sem)
11911 5 => False), -- unused
11912
11913 N_Requeue_Statement =>
11914 (1 => False, -- unused
11915 2 => True, -- Name (Node2)
11916 3 => False, -- unused
11917 4 => False, -- unused
11918 5 => False), -- unused
11919
11920 N_Delay_Until_Statement =>
11921 (1 => False, -- unused
11922 2 => False, -- unused
11923 3 => True, -- Expression (Node3)
11924 4 => False, -- unused
11925 5 => False), -- unused
11926
11927 N_Delay_Relative_Statement =>
11928 (1 => False, -- unused
11929 2 => False, -- unused
11930 3 => True, -- Expression (Node3)
11931 4 => False, -- unused
11932 5 => False), -- unused
11933
11934 N_Selective_Accept =>
11935 (1 => True, -- Select_Alternatives (List1)
11936 2 => False, -- unused
11937 3 => False, -- unused
11938 4 => True, -- Else_Statements (List4)
11939 5 => False), -- unused
11940
11941 N_Accept_Alternative =>
11942 (1 => True, -- Condition (Node1)
11943 2 => True, -- Accept_Statement (Node2)
11944 3 => True, -- Statements (List3)
11945 4 => True, -- Pragmas_Before (List4)
11946 5 => False), -- Accept_Handler_Records (List5-Sem)
11947
11948 N_Delay_Alternative =>
11949 (1 => True, -- Condition (Node1)
11950 2 => True, -- Delay_Statement (Node2)
11951 3 => True, -- Statements (List3)
11952 4 => True, -- Pragmas_Before (List4)
11953 5 => False), -- unused
11954
11955 N_Terminate_Alternative =>
11956 (1 => True, -- Condition (Node1)
11957 2 => False, -- unused
11958 3 => False, -- unused
11959 4 => True, -- Pragmas_Before (List4)
11960 5 => True), -- Pragmas_After (List5)
11961
11962 N_Timed_Entry_Call =>
11963 (1 => True, -- Entry_Call_Alternative (Node1)
11964 2 => False, -- unused
11965 3 => False, -- unused
11966 4 => True, -- Delay_Alternative (Node4)
11967 5 => False), -- unused
11968
11969 N_Entry_Call_Alternative =>
11970 (1 => True, -- Entry_Call_Statement (Node1)
11971 2 => False, -- unused
11972 3 => True, -- Statements (List3)
11973 4 => True, -- Pragmas_Before (List4)
11974 5 => False), -- unused
11975
11976 N_Conditional_Entry_Call =>
11977 (1 => True, -- Entry_Call_Alternative (Node1)
11978 2 => False, -- unused
11979 3 => False, -- unused
11980 4 => True, -- Else_Statements (List4)
11981 5 => False), -- unused
11982
11983 N_Asynchronous_Select =>
11984 (1 => True, -- Triggering_Alternative (Node1)
11985 2 => True, -- Abortable_Part (Node2)
11986 3 => False, -- unused
11987 4 => False, -- unused
11988 5 => False), -- unused
11989
11990 N_Triggering_Alternative =>
11991 (1 => True, -- Triggering_Statement (Node1)
11992 2 => False, -- unused
11993 3 => True, -- Statements (List3)
11994 4 => True, -- Pragmas_Before (List4)
11995 5 => False), -- unused
11996
11997 N_Abortable_Part =>
11998 (1 => False, -- unused
11999 2 => False, -- unused
12000 3 => True, -- Statements (List3)
12001 4 => False, -- unused
12002 5 => False), -- unused
12003
12004 N_Abort_Statement =>
12005 (1 => False, -- unused
12006 2 => True, -- Names (List2)
12007 3 => False, -- unused
12008 4 => False, -- unused
12009 5 => False), -- unused
12010
12011 N_Compilation_Unit =>
12012 (1 => True, -- Context_Items (List1)
12013 2 => True, -- Unit (Node2)
12014 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
12015 4 => False, -- Library_Unit (Node4-Sem)
12016 5 => True), -- Aux_Decls_Node (Node5)
12017
12018 N_Compilation_Unit_Aux =>
12019 (1 => True, -- Actions (List1)
12020 2 => True, -- Declarations (List2)
12021 3 => False, -- Default_Storage_Pool (Node3)
12022 4 => True, -- Config_Pragmas (List4)
12023 5 => True), -- Pragmas_After (List5)
12024
12025 N_With_Clause =>
12026 (1 => False, -- unused
12027 2 => True, -- Name (Node2)
12028 3 => False, -- unused
12029 4 => False, -- Library_Unit (Node4-Sem)
12030 5 => False), -- Corresponding_Spec (Node5-Sem)
12031
12032 N_Subprogram_Body_Stub =>
12033 (1 => True, -- Specification (Node1)
12034 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12035 3 => False, -- unused
12036 4 => False, -- Library_Unit (Node4-Sem)
12037 5 => False), -- Corresponding_Body (Node5-Sem)
12038
12039 N_Package_Body_Stub =>
12040 (1 => True, -- Defining_Identifier (Node1)
12041 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12042 3 => False, -- unused
12043 4 => False, -- Library_Unit (Node4-Sem)
12044 5 => False), -- Corresponding_Body (Node5-Sem)
12045
12046 N_Task_Body_Stub =>
12047 (1 => True, -- Defining_Identifier (Node1)
12048 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12049 3 => False, -- unused
12050 4 => False, -- Library_Unit (Node4-Sem)
12051 5 => False), -- Corresponding_Body (Node5-Sem)
12052
12053 N_Protected_Body_Stub =>
12054 (1 => True, -- Defining_Identifier (Node1)
12055 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
12056 3 => False, -- unused
12057 4 => False, -- Library_Unit (Node4-Sem)
12058 5 => False), -- Corresponding_Body (Node5-Sem)
12059
12060 N_Subunit =>
12061 (1 => True, -- Proper_Body (Node1)
12062 2 => True, -- Name (Node2)
12063 3 => False, -- Corresponding_Stub (Node3-Sem)
12064 4 => False, -- unused
12065 5 => False), -- unused
12066
12067 N_Exception_Declaration =>
12068 (1 => True, -- Defining_Identifier (Node1)
12069 2 => False, -- unused
12070 3 => False, -- Expression (Node3-Sem)
12071 4 => False, -- unused
12072 5 => False), -- unused
12073
12074 N_Handled_Sequence_Of_Statements =>
12075 (1 => True, -- At_End_Proc (Node1)
12076 2 => False, -- First_Real_Statement (Node2-Sem)
12077 3 => True, -- Statements (List3)
12078 4 => True, -- End_Label (Node4)
12079 5 => True), -- Exception_Handlers (List5)
12080
12081 N_Exception_Handler =>
12082 (1 => False, -- Local_Raise_Statements (Elist1)
12083 2 => True, -- Choice_Parameter (Node2)
12084 3 => True, -- Statements (List3)
12085 4 => True, -- Exception_Choices (List4)
12086 5 => False), -- Exception_Label (Node5)
12087
12088 N_Raise_Statement =>
12089 (1 => False, -- unused
12090 2 => True, -- Name (Node2)
12091 3 => True, -- Expression (Node3)
12092 4 => False, -- unused
12093 5 => False), -- unused
12094
12095 N_Raise_Expression =>
12096 (1 => False, -- unused
12097 2 => True, -- Name (Node2)
12098 3 => True, -- Expression (Node3)
12099 4 => False, -- unused
12100 5 => False), -- Etype (Node5-Sem)
12101
12102 N_Generic_Subprogram_Declaration =>
12103 (1 => True, -- Specification (Node1)
12104 2 => True, -- Generic_Formal_Declarations (List2)
12105 3 => False, -- unused
12106 4 => False, -- Parent_Spec (Node4-Sem)
12107 5 => False), -- Corresponding_Body (Node5-Sem)
12108
12109 N_Generic_Package_Declaration =>
12110 (1 => True, -- Specification (Node1)
12111 2 => True, -- Generic_Formal_Declarations (List2)
12112 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12113 4 => False, -- Parent_Spec (Node4-Sem)
12114 5 => False), -- Corresponding_Body (Node5-Sem)
12115
12116 N_Package_Instantiation =>
12117 (1 => True, -- Defining_Unit_Name (Node1)
12118 2 => True, -- Name (Node2)
12119 3 => True, -- Generic_Associations (List3)
12120 4 => False, -- Parent_Spec (Node4-Sem)
12121 5 => False), -- Instance_Spec (Node5-Sem)
12122
12123 N_Procedure_Instantiation =>
12124 (1 => True, -- Defining_Unit_Name (Node1)
12125 2 => True, -- Name (Node2)
12126 3 => True, -- Generic_Associations (List3)
12127 4 => False, -- Parent_Spec (Node4-Sem)
12128 5 => False), -- Instance_Spec (Node5-Sem)
12129
12130 N_Function_Instantiation =>
12131 (1 => True, -- Defining_Unit_Name (Node1)
12132 2 => True, -- Name (Node2)
12133 3 => True, -- Generic_Associations (List3)
12134 4 => False, -- Parent_Spec (Node4-Sem)
12135 5 => False), -- Instance_Spec (Node5-Sem)
12136
12137 N_Generic_Association =>
12138 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12139 2 => True, -- Selector_Name (Node2)
12140 3 => False, -- unused
12141 4 => False, -- unused
12142 5 => False), -- unused
12143
12144 N_Formal_Object_Declaration =>
12145 (1 => True, -- Defining_Identifier (Node1)
12146 2 => False, -- unused
12147 3 => True, -- Access_Definition (Node3)
12148 4 => True, -- Subtype_Mark (Node4)
12149 5 => True), -- Default_Expression (Node5)
12150
12151 N_Formal_Type_Declaration =>
12152 (1 => True, -- Defining_Identifier (Node1)
12153 2 => False, -- unused
12154 3 => True, -- Formal_Type_Definition (Node3)
12155 4 => True, -- Discriminant_Specifications (List4)
12156 5 => False), -- unused
12157
12158 N_Formal_Private_Type_Definition =>
12159 (1 => False, -- unused
12160 2 => False, -- unused
12161 3 => False, -- unused
12162 4 => False, -- unused
12163 5 => False), -- unused
12164
12165 N_Formal_Incomplete_Type_Definition =>
12166 (1 => False, -- unused
12167 2 => False, -- unused
12168 3 => False, -- unused
12169 4 => False, -- unused
12170 5 => False), -- unused
12171
12172 N_Formal_Derived_Type_Definition =>
12173 (1 => False, -- unused
12174 2 => True, -- Interface_List (List2)
12175 3 => False, -- unused
12176 4 => True, -- Subtype_Mark (Node4)
12177 5 => False), -- unused
12178
12179 N_Formal_Discrete_Type_Definition =>
12180 (1 => False, -- unused
12181 2 => False, -- unused
12182 3 => False, -- unused
12183 4 => False, -- unused
12184 5 => False), -- unused
12185
12186 N_Formal_Signed_Integer_Type_Definition =>
12187 (1 => False, -- unused
12188 2 => False, -- unused
12189 3 => False, -- unused
12190 4 => False, -- unused
12191 5 => False), -- unused
12192
12193 N_Formal_Modular_Type_Definition =>
12194 (1 => False, -- unused
12195 2 => False, -- unused
12196 3 => False, -- unused
12197 4 => False, -- unused
12198 5 => False), -- unused
12199
12200 N_Formal_Floating_Point_Definition =>
12201 (1 => False, -- unused
12202 2 => False, -- unused
12203 3 => False, -- unused
12204 4 => False, -- unused
12205 5 => False), -- unused
12206
12207 N_Formal_Ordinary_Fixed_Point_Definition =>
12208 (1 => False, -- unused
12209 2 => False, -- unused
12210 3 => False, -- unused
12211 4 => False, -- unused
12212 5 => False), -- unused
12213
12214 N_Formal_Decimal_Fixed_Point_Definition =>
12215 (1 => False, -- unused
12216 2 => False, -- unused
12217 3 => False, -- unused
12218 4 => False, -- unused
12219 5 => False), -- unused
12220
12221 N_Formal_Concrete_Subprogram_Declaration =>
12222 (1 => True, -- Specification (Node1)
12223 2 => True, -- Default_Name (Node2)
12224 3 => False, -- unused
12225 4 => False, -- unused
12226 5 => False), -- unused
12227
12228 N_Formal_Abstract_Subprogram_Declaration =>
12229 (1 => True, -- Specification (Node1)
12230 2 => True, -- Default_Name (Node2)
12231 3 => False, -- unused
12232 4 => False, -- unused
12233 5 => False), -- unused
12234
12235 N_Formal_Package_Declaration =>
12236 (1 => True, -- Defining_Identifier (Node1)
12237 2 => True, -- Name (Node2)
12238 3 => True, -- Generic_Associations (List3)
12239 4 => False, -- unused
12240 5 => False), -- Instance_Spec (Node5-Sem)
12241
12242 N_Attribute_Definition_Clause =>
12243 (1 => True, -- Chars (Name1)
12244 2 => True, -- Name (Node2)
12245 3 => True, -- Expression (Node3)
12246 4 => False, -- unused
12247 5 => False), -- Next_Rep_Item (Node5-Sem)
12248
12249 N_Aspect_Specification =>
12250 (1 => True, -- Identifier (Node1)
12251 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12252 3 => True, -- Expression (Node3)
12253 4 => False, -- Entity (Node4-Sem)
12254 5 => False), -- Next_Rep_Item (Node5-Sem)
12255
12256 N_Enumeration_Representation_Clause =>
12257 (1 => True, -- Identifier (Node1)
12258 2 => False, -- unused
12259 3 => True, -- Array_Aggregate (Node3)
12260 4 => False, -- unused
12261 5 => False), -- Next_Rep_Item (Node5-Sem)
12262
12263 N_Record_Representation_Clause =>
12264 (1 => True, -- Identifier (Node1)
12265 2 => True, -- Mod_Clause (Node2)
12266 3 => True, -- Component_Clauses (List3)
12267 4 => False, -- unused
12268 5 => False), -- Next_Rep_Item (Node5-Sem)
12269
12270 N_Component_Clause =>
12271 (1 => True, -- Component_Name (Node1)
12272 2 => True, -- Position (Node2)
12273 3 => True, -- First_Bit (Node3)
12274 4 => True, -- Last_Bit (Node4)
12275 5 => False), -- unused
12276
12277 N_Code_Statement =>
12278 (1 => False, -- unused
12279 2 => False, -- unused
12280 3 => True, -- Expression (Node3)
12281 4 => False, -- unused
12282 5 => False), -- unused
12283
12284 N_Op_Rotate_Left =>
12285 (1 => True, -- Chars (Name1)
12286 2 => True, -- Left_Opnd (Node2)
12287 3 => True, -- Right_Opnd (Node3)
12288 4 => False, -- Entity (Node4-Sem)
12289 5 => False), -- Etype (Node5-Sem)
12290
12291 N_Op_Rotate_Right =>
12292 (1 => True, -- Chars (Name1)
12293 2 => True, -- Left_Opnd (Node2)
12294 3 => True, -- Right_Opnd (Node3)
12295 4 => False, -- Entity (Node4-Sem)
12296 5 => False), -- Etype (Node5-Sem)
12297
12298 N_Op_Shift_Left =>
12299 (1 => True, -- Chars (Name1)
12300 2 => True, -- Left_Opnd (Node2)
12301 3 => True, -- Right_Opnd (Node3)
12302 4 => False, -- Entity (Node4-Sem)
12303 5 => False), -- Etype (Node5-Sem)
12304
12305 N_Op_Shift_Right_Arithmetic =>
12306 (1 => True, -- Chars (Name1)
12307 2 => True, -- Left_Opnd (Node2)
12308 3 => True, -- Right_Opnd (Node3)
12309 4 => False, -- Entity (Node4-Sem)
12310 5 => False), -- Etype (Node5-Sem)
12311
12312 N_Op_Shift_Right =>
12313 (1 => True, -- Chars (Name1)
12314 2 => True, -- Left_Opnd (Node2)
12315 3 => True, -- Right_Opnd (Node3)
12316 4 => False, -- Entity (Node4-Sem)
12317 5 => False), -- Etype (Node5-Sem)
12318
12319 N_Delta_Constraint =>
12320 (1 => False, -- unused
12321 2 => False, -- unused
12322 3 => True, -- Delta_Expression (Node3)
12323 4 => True, -- Range_Constraint (Node4)
12324 5 => False), -- unused
12325
12326 N_At_Clause =>
12327 (1 => True, -- Identifier (Node1)
12328 2 => False, -- unused
12329 3 => True, -- Expression (Node3)
12330 4 => False, -- unused
12331 5 => False), -- unused
12332
12333 N_Mod_Clause =>
12334 (1 => False, -- unused
12335 2 => False, -- unused
12336 3 => True, -- Expression (Node3)
12337 4 => True, -- Pragmas_Before (List4)
12338 5 => False), -- unused
12339
12340 N_If_Expression =>
12341 (1 => True, -- Expressions (List1)
12342 2 => False, -- Then_Actions (List2-Sem)
12343 3 => False, -- Else_Actions (List3-Sem)
12344 4 => False, -- unused
12345 5 => False), -- Etype (Node5-Sem)
12346
12347 N_Compound_Statement =>
12348 (1 => True, -- Actions (List1)
12349 2 => False, -- unused
12350 3 => False, -- unused
12351 4 => False, -- unused
12352 5 => False), -- unused
12353
12354 N_Contract =>
12355 (1 => False, -- Pre_Post_Conditions (Node1-Sem)
12356 2 => False, -- Contract_Test_Cases (Node2-Sem)
12357 3 => False, -- Classifications (Node3-Sem)
12358 4 => False, -- unused
12359 5 => False), -- unused
12360
12361 N_Expanded_Name =>
12362 (1 => True, -- Chars (Name1)
12363 2 => True, -- Selector_Name (Node2)
12364 3 => True, -- Prefix (Node3)
12365 4 => False, -- Entity (Node4-Sem)
12366 5 => False), -- Etype (Node5-Sem)
12367
12368 N_Expression_With_Actions =>
12369 (1 => True, -- Actions (List1)
12370 2 => False, -- unused
12371 3 => True, -- Expression (Node3)
12372 4 => False, -- unused
12373 5 => False), -- unused
12374
12375 N_Free_Statement =>
12376 (1 => False, -- Storage_Pool (Node1-Sem)
12377 2 => False, -- Procedure_To_Call (Node2-Sem)
12378 3 => True, -- Expression (Node3)
12379 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12380 5 => False), -- unused
12381
12382 N_Freeze_Entity =>
12383 (1 => True, -- Actions (List1)
12384 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12385 3 => False, -- TSS_Elist (Elist3-Sem)
12386 4 => False, -- Entity (Node4-Sem)
12387 5 => False), -- First_Subtype_Link (Node5-Sem)
12388
12389 N_Freeze_Generic_Entity =>
12390 (1 => False, -- unused
12391 2 => False, -- unused
12392 3 => False, -- unused
12393 4 => False, -- Entity (Node4-Sem)
12394 5 => False), -- unused
12395
12396 N_Implicit_Label_Declaration =>
12397 (1 => True, -- Defining_Identifier (Node1)
12398 2 => False, -- Label_Construct (Node2-Sem)
12399 3 => False, -- unused
12400 4 => False, -- unused
12401 5 => False), -- unused
12402
12403 N_Itype_Reference =>
12404 (1 => False, -- Itype (Node1-Sem)
12405 2 => False, -- unused
12406 3 => False, -- unused
12407 4 => False, -- unused
12408 5 => False), -- unused
12409
12410 N_Raise_Constraint_Error =>
12411 (1 => True, -- Condition (Node1)
12412 2 => False, -- unused
12413 3 => True, -- Reason (Uint3)
12414 4 => False, -- unused
12415 5 => False), -- Etype (Node5-Sem)
12416
12417 N_Raise_Program_Error =>
12418 (1 => True, -- Condition (Node1)
12419 2 => False, -- unused
12420 3 => True, -- Reason (Uint3)
12421 4 => False, -- unused
12422 5 => False), -- Etype (Node5-Sem)
12423
12424 N_Raise_Storage_Error =>
12425 (1 => True, -- Condition (Node1)
12426 2 => False, -- unused
12427 3 => True, -- Reason (Uint3)
12428 4 => False, -- unused
12429 5 => False), -- Etype (Node5-Sem)
12430
12431 N_Push_Constraint_Error_Label =>
12432 (1 => False, -- unused
12433 2 => False, -- unused
12434 3 => False, -- unused
12435 4 => False, -- unused
12436 5 => False), -- unused
12437
12438 N_Push_Program_Error_Label =>
12439 (1 => False, -- Exception_Label
12440 2 => False, -- unused
12441 3 => False, -- unused
12442 4 => False, -- unused
12443 5 => False), -- Exception_Label
12444
12445 N_Push_Storage_Error_Label =>
12446 (1 => False, -- Exception_Label
12447 2 => False, -- unused
12448 3 => False, -- unused
12449 4 => False, -- unused
12450 5 => False), -- Exception_Label
12451
12452 N_Pop_Constraint_Error_Label =>
12453 (1 => False, -- unused
12454 2 => False, -- unused
12455 3 => False, -- unused
12456 4 => False, -- unused
12457 5 => False), -- unused
12458
12459 N_Pop_Program_Error_Label =>
12460 (1 => False, -- unused
12461 2 => False, -- unused
12462 3 => False, -- unused
12463 4 => False, -- unused
12464 5 => False), -- unused
12465
12466 N_Pop_Storage_Error_Label =>
12467 (1 => False, -- unused
12468 2 => False, -- unused
12469 3 => False, -- unused
12470 4 => False, -- unused
12471 5 => False), -- unused
12472
12473 N_Reference =>
12474 (1 => False, -- unused
12475 2 => False, -- unused
12476 3 => True, -- Prefix (Node3)
12477 4 => False, -- unused
12478 5 => False), -- Etype (Node5-Sem)
12479
12480 N_Unchecked_Expression =>
12481 (1 => False, -- unused
12482 2 => False, -- unused
12483 3 => True, -- Expression (Node3)
12484 4 => False, -- unused
12485 5 => False), -- Etype (Node5-Sem)
12486
12487 N_Unchecked_Type_Conversion =>
12488 (1 => False, -- unused
12489 2 => False, -- unused
12490 3 => True, -- Expression (Node3)
12491 4 => True, -- Subtype_Mark (Node4)
12492 5 => False), -- Etype (Node5-Sem)
12493
12494 N_Validate_Unchecked_Conversion =>
12495 (1 => False, -- Source_Type (Node1-Sem)
12496 2 => False, -- Target_Type (Node2-Sem)
12497 3 => False, -- unused
12498 4 => False, -- unused
12499 5 => False), -- unused
12500
12501 -- Entries for SCIL nodes
12502
12503 N_SCIL_Dispatch_Table_Tag_Init =>
12504 (1 => False, -- unused
12505 2 => False, -- unused
12506 3 => False, -- unused
12507 4 => False, -- SCIL_Entity (Node4-Sem)
12508 5 => False), -- unused
12509
12510 N_SCIL_Dispatching_Call =>
12511 (1 => False, -- unused
12512 2 => False, -- SCIL_Target_Prim (Node2-Sem)
12513 3 => False, -- unused
12514 4 => False, -- SCIL_Entity (Node4-Sem)
12515 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
12516
12517 N_SCIL_Membership_Test =>
12518 (1 => False, -- unused
12519 2 => False, -- unused
12520 3 => False, -- unused
12521 4 => False, -- SCIL_Entity (Node4-Sem)
12522 5 => False), -- SCIL_Tag_Value (Node5-Sem)
12523
12524 -- Entries for Empty, Error and Unused. Even thought these have a Chars
12525 -- field for debugging purposes, they are not really syntactic fields, so
12526 -- we mark all fields as unused.
12527
12528 N_Empty =>
12529 (1 => False, -- unused
12530 2 => False, -- unused
12531 3 => False, -- unused
12532 4 => False, -- unused
12533 5 => False), -- unused
12534
12535 N_Error =>
12536 (1 => False, -- unused
12537 2 => False, -- unused
12538 3 => False, -- unused
12539 4 => False, -- unused
12540 5 => False), -- unused
12541
12542 N_Unused_At_Start =>
12543 (1 => False, -- unused
12544 2 => False, -- unused
12545 3 => False, -- unused
12546 4 => False, -- unused
12547 5 => False), -- unused
12548
12549 N_Unused_At_End =>
12550 (1 => False, -- unused
12551 2 => False, -- unused
12552 3 => False, -- unused
12553 4 => False, -- unused
12554 5 => False)); -- unused
12555
12556 --------------------
12557 -- Inline Pragmas --
12558 --------------------
12559
12560 pragma Inline (ABE_Is_Certain);
12561 pragma Inline (Abort_Present);
12562 pragma Inline (Abortable_Part);
12563 pragma Inline (Abstract_Present);
12564 pragma Inline (Accept_Handler_Records);
12565 pragma Inline (Accept_Statement);
12566 pragma Inline (Access_Definition);
12567 pragma Inline (Access_To_Subprogram_Definition);
12568 pragma Inline (Access_Types_To_Process);
12569 pragma Inline (Actions);
12570 pragma Inline (Activation_Chain_Entity);
12571 pragma Inline (Acts_As_Spec);
12572 pragma Inline (Actual_Designated_Subtype);
12573 pragma Inline (Address_Warning_Posted);
12574 pragma Inline (Aggregate_Bounds);
12575 pragma Inline (Aliased_Present);
12576 pragma Inline (All_Others);
12577 pragma Inline (All_Present);
12578 pragma Inline (Alternatives);
12579 pragma Inline (Ancestor_Part);
12580 pragma Inline (Atomic_Sync_Required);
12581 pragma Inline (Array_Aggregate);
12582 pragma Inline (Aspect_Rep_Item);
12583 pragma Inline (Assignment_OK);
12584 pragma Inline (Associated_Node);
12585 pragma Inline (At_End_Proc);
12586 pragma Inline (Attribute_Name);
12587 pragma Inline (Aux_Decls_Node);
12588 pragma Inline (Backwards_OK);
12589 pragma Inline (Bad_Is_Detected);
12590 pragma Inline (Body_To_Inline);
12591 pragma Inline (Body_Required);
12592 pragma Inline (By_Ref);
12593 pragma Inline (Box_Present);
12594 pragma Inline (Char_Literal_Value);
12595 pragma Inline (Chars);
12596 pragma Inline (Check_Address_Alignment);
12597 pragma Inline (Choice_Parameter);
12598 pragma Inline (Choices);
12599 pragma Inline (Class_Present);
12600 pragma Inline (Classifications);
12601 pragma Inline (Cleanup_Actions);
12602 pragma Inline (Comes_From_Extended_Return_Statement);
12603 pragma Inline (Compile_Time_Known_Aggregate);
12604 pragma Inline (Component_Associations);
12605 pragma Inline (Component_Clauses);
12606 pragma Inline (Component_Definition);
12607 pragma Inline (Component_Items);
12608 pragma Inline (Component_List);
12609 pragma Inline (Component_Name);
12610 pragma Inline (Componentwise_Assignment);
12611 pragma Inline (Condition);
12612 pragma Inline (Condition_Actions);
12613 pragma Inline (Config_Pragmas);
12614 pragma Inline (Constant_Present);
12615 pragma Inline (Constraint);
12616 pragma Inline (Constraints);
12617 pragma Inline (Context_Installed);
12618 pragma Inline (Context_Items);
12619 pragma Inline (Context_Pending);
12620 pragma Inline (Contract_Test_Cases);
12621 pragma Inline (Controlling_Argument);
12622 pragma Inline (Convert_To_Return_False);
12623 pragma Inline (Conversion_OK);
12624 pragma Inline (Corresponding_Aspect);
12625 pragma Inline (Corresponding_Body);
12626 pragma Inline (Corresponding_Formal_Spec);
12627 pragma Inline (Corresponding_Generic_Association);
12628 pragma Inline (Corresponding_Integer_Value);
12629 pragma Inline (Corresponding_Spec);
12630 pragma Inline (Corresponding_Spec_Of_Stub);
12631 pragma Inline (Corresponding_Stub);
12632 pragma Inline (Dcheck_Function);
12633 pragma Inline (Declarations);
12634 pragma Inline (Default_Expression);
12635 pragma Inline (Default_Storage_Pool);
12636 pragma Inline (Default_Name);
12637 pragma Inline (Defining_Identifier);
12638 pragma Inline (Defining_Unit_Name);
12639 pragma Inline (Delay_Alternative);
12640 pragma Inline (Delay_Statement);
12641 pragma Inline (Delta_Expression);
12642 pragma Inline (Digits_Expression);
12643 pragma Inline (Discr_Check_Funcs_Built);
12644 pragma Inline (Discrete_Choices);
12645 pragma Inline (Discrete_Range);
12646 pragma Inline (Discrete_Subtype_Definition);
12647 pragma Inline (Discrete_Subtype_Definitions);
12648 pragma Inline (Discriminant_Specifications);
12649 pragma Inline (Discriminant_Type);
12650 pragma Inline (Do_Accessibility_Check);
12651 pragma Inline (Do_Discriminant_Check);
12652 pragma Inline (Do_Length_Check);
12653 pragma Inline (Do_Division_Check);
12654 pragma Inline (Do_Overflow_Check);
12655 pragma Inline (Do_Range_Check);
12656 pragma Inline (Do_Storage_Check);
12657 pragma Inline (Do_Tag_Check);
12658 pragma Inline (Elaborate_Present);
12659 pragma Inline (Elaborate_All_Desirable);
12660 pragma Inline (Elaborate_All_Present);
12661 pragma Inline (Elaborate_Desirable);
12662 pragma Inline (Else_Actions);
12663 pragma Inline (Else_Statements);
12664 pragma Inline (Elsif_Parts);
12665 pragma Inline (Enclosing_Variant);
12666 pragma Inline (End_Label);
12667 pragma Inline (End_Span);
12668 pragma Inline (Entity);
12669 pragma Inline (Entity_Or_Associated_Node);
12670 pragma Inline (Entry_Body_Formal_Part);
12671 pragma Inline (Entry_Call_Alternative);
12672 pragma Inline (Entry_Call_Statement);
12673 pragma Inline (Entry_Direct_Name);
12674 pragma Inline (Entry_Index);
12675 pragma Inline (Entry_Index_Specification);
12676 pragma Inline (Etype);
12677 pragma Inline (Exception_Choices);
12678 pragma Inline (Exception_Handlers);
12679 pragma Inline (Exception_Junk);
12680 pragma Inline (Exception_Label);
12681 pragma Inline (Expansion_Delayed);
12682 pragma Inline (Explicit_Actual_Parameter);
12683 pragma Inline (Explicit_Generic_Actual_Parameter);
12684 pragma Inline (Expression);
12685 pragma Inline (Expressions);
12686 pragma Inline (First_Bit);
12687 pragma Inline (First_Inlined_Subprogram);
12688 pragma Inline (First_Name);
12689 pragma Inline (First_Named_Actual);
12690 pragma Inline (First_Real_Statement);
12691 pragma Inline (First_Subtype_Link);
12692 pragma Inline (Float_Truncate);
12693 pragma Inline (Formal_Type_Definition);
12694 pragma Inline (Forwards_OK);
12695 pragma Inline (From_Aspect_Specification);
12696 pragma Inline (From_At_End);
12697 pragma Inline (From_At_Mod);
12698 pragma Inline (From_Conditional_Expression);
12699 pragma Inline (From_Default);
12700 pragma Inline (Generalized_Indexing);
12701 pragma Inline (Generic_Associations);
12702 pragma Inline (Generic_Formal_Declarations);
12703 pragma Inline (Generic_Parent);
12704 pragma Inline (Generic_Parent_Type);
12705 pragma Inline (Handled_Statement_Sequence);
12706 pragma Inline (Handler_List_Entry);
12707 pragma Inline (Has_Created_Identifier);
12708 pragma Inline (Has_Dereference_Action);
12709 pragma Inline (Has_Dynamic_Length_Check);
12710 pragma Inline (Has_Dynamic_Range_Check);
12711 pragma Inline (Has_Init_Expression);
12712 pragma Inline (Has_Local_Raise);
12713 pragma Inline (Has_Self_Reference);
12714 pragma Inline (Has_SP_Choice);
12715 pragma Inline (Has_No_Elaboration_Code);
12716 pragma Inline (Has_Pragma_Suppress_All);
12717 pragma Inline (Has_Private_View);
12718 pragma Inline (Has_Relative_Deadline_Pragma);
12719 pragma Inline (Has_Storage_Size_Pragma);
12720 pragma Inline (Has_Wide_Character);
12721 pragma Inline (Has_Wide_Wide_Character);
12722 pragma Inline (Header_Size_Added);
12723 pragma Inline (Hidden_By_Use_Clause);
12724 pragma Inline (High_Bound);
12725 pragma Inline (Identifier);
12726 pragma Inline (Implicit_With);
12727 pragma Inline (Implicit_With_From_Instantiation);
12728 pragma Inline (Interface_List);
12729 pragma Inline (Interface_Present);
12730 pragma Inline (Includes_Infinities);
12731 pragma Inline (Import_Interface_Present);
12732 pragma Inline (In_Present);
12733 pragma Inline (Incomplete_View);
12734 pragma Inline (Inherited_Discriminant);
12735 pragma Inline (Instance_Spec);
12736 pragma Inline (Intval);
12737 pragma Inline (Iterator_Specification);
12738 pragma Inline (Is_Accessibility_Actual);
12739 pragma Inline (Is_Asynchronous_Call_Block);
12740 pragma Inline (Is_Boolean_Aspect);
12741 pragma Inline (Is_Checked);
12742 pragma Inline (Is_Component_Left_Opnd);
12743 pragma Inline (Is_Component_Right_Opnd);
12744 pragma Inline (Is_Controlling_Actual);
12745 pragma Inline (Is_Delayed_Aspect);
12746 pragma Inline (Is_Disabled);
12747 pragma Inline (Is_Dynamic_Coextension);
12748 pragma Inline (Is_Elsif);
12749 pragma Inline (Is_Entry_Barrier_Function);
12750 pragma Inline (Is_Expanded_Build_In_Place_Call);
12751 pragma Inline (Is_Finalization_Wrapper);
12752 pragma Inline (Is_Folded_In_Parser);
12753 pragma Inline (Is_Generic_Contract_Pragma);
12754 pragma Inline (Is_Ghost_Pragma);
12755 pragma Inline (Is_Ignored);
12756 pragma Inline (Is_In_Discriminant_Check);
12757 pragma Inline (Is_Inherited);
12758 pragma Inline (Is_Machine_Number);
12759 pragma Inline (Is_Null_Loop);
12760 pragma Inline (Is_Overloaded);
12761 pragma Inline (Is_Power_Of_2_For_Shift);
12762 pragma Inline (Is_Prefixed_Call);
12763 pragma Inline (Is_Protected_Subprogram_Body);
12764 pragma Inline (Is_Static_Coextension);
12765 pragma Inline (Is_Static_Expression);
12766 pragma Inline (Is_Subprogram_Descriptor);
12767 pragma Inline (Is_Task_Allocation_Block);
12768 pragma Inline (Is_Task_Master);
12769 pragma Inline (Iteration_Scheme);
12770 pragma Inline (Itype);
12771 pragma Inline (Kill_Range_Check);
12772 pragma Inline (Last_Bit);
12773 pragma Inline (Last_Name);
12774 pragma Inline (Library_Unit);
12775 pragma Inline (Label_Construct);
12776 pragma Inline (Left_Opnd);
12777 pragma Inline (Limited_View_Installed);
12778 pragma Inline (Limited_Present);
12779 pragma Inline (Literals);
12780 pragma Inline (Local_Raise_Not_OK);
12781 pragma Inline (Local_Raise_Statements);
12782 pragma Inline (Loop_Actions);
12783 pragma Inline (Loop_Parameter_Specification);
12784 pragma Inline (Low_Bound);
12785 pragma Inline (Mod_Clause);
12786 pragma Inline (More_Ids);
12787 pragma Inline (Must_Be_Byte_Aligned);
12788 pragma Inline (Must_Not_Freeze);
12789 pragma Inline (Must_Not_Override);
12790 pragma Inline (Must_Override);
12791 pragma Inline (Name);
12792 pragma Inline (Names);
12793 pragma Inline (Next_Entity);
12794 pragma Inline (Next_Exit_Statement);
12795 pragma Inline (Next_Implicit_With);
12796 pragma Inline (Next_Named_Actual);
12797 pragma Inline (Next_Pragma);
12798 pragma Inline (Next_Rep_Item);
12799 pragma Inline (Next_Use_Clause);
12800 pragma Inline (No_Ctrl_Actions);
12801 pragma Inline (No_Elaboration_Check);
12802 pragma Inline (No_Entities_Ref_In_Spec);
12803 pragma Inline (No_Initialization);
12804 pragma Inline (No_Minimize_Eliminate);
12805 pragma Inline (No_Truncation);
12806 pragma Inline (Non_Aliased_Prefix);
12807 pragma Inline (Null_Present);
12808 pragma Inline (Null_Excluding_Subtype);
12809 pragma Inline (Null_Exclusion_Present);
12810 pragma Inline (Null_Exclusion_In_Return_Present);
12811 pragma Inline (Null_Record_Present);
12812 pragma Inline (Object_Definition);
12813 pragma Inline (Of_Present);
12814 pragma Inline (Original_Discriminant);
12815 pragma Inline (Original_Entity);
12816 pragma Inline (Others_Discrete_Choices);
12817 pragma Inline (Out_Present);
12818 pragma Inline (Parameter_Associations);
12819 pragma Inline (Parameter_Specifications);
12820 pragma Inline (Parameter_Type);
12821 pragma Inline (Parent_Spec);
12822 pragma Inline (Position);
12823 pragma Inline (Pragma_Argument_Associations);
12824 pragma Inline (Pragma_Identifier);
12825 pragma Inline (Pragmas_After);
12826 pragma Inline (Pragmas_Before);
12827 pragma Inline (Pre_Post_Conditions);
12828 pragma Inline (Prefix);
12829 pragma Inline (Premature_Use);
12830 pragma Inline (Present_Expr);
12831 pragma Inline (Prev_Ids);
12832 pragma Inline (Print_In_Hex);
12833 pragma Inline (Private_Declarations);
12834 pragma Inline (Private_Present);
12835 pragma Inline (Procedure_To_Call);
12836 pragma Inline (Proper_Body);
12837 pragma Inline (Protected_Definition);
12838 pragma Inline (Protected_Present);
12839 pragma Inline (Raises_Constraint_Error);
12840 pragma Inline (Range_Constraint);
12841 pragma Inline (Range_Expression);
12842 pragma Inline (Real_Range_Specification);
12843 pragma Inline (Realval);
12844 pragma Inline (Reason);
12845 pragma Inline (Record_Extension_Part);
12846 pragma Inline (Redundant_Use);
12847 pragma Inline (Renaming_Exception);
12848 pragma Inline (Result_Definition);
12849 pragma Inline (Return_Object_Declarations);
12850 pragma Inline (Return_Statement_Entity);
12851 pragma Inline (Reverse_Present);
12852 pragma Inline (Right_Opnd);
12853 pragma Inline (Rounded_Result);
12854 pragma Inline (SCIL_Controlling_Tag);
12855 pragma Inline (SCIL_Entity);
12856 pragma Inline (SCIL_Tag_Value);
12857 pragma Inline (SCIL_Target_Prim);
12858 pragma Inline (Scope);
12859 pragma Inline (Select_Alternatives);
12860 pragma Inline (Selector_Name);
12861 pragma Inline (Selector_Names);
12862 pragma Inline (Shift_Count_OK);
12863 pragma Inline (Source_Type);
12864 pragma Inline (Specification);
12865 pragma Inline (Split_PPC);
12866 pragma Inline (Statements);
12867 pragma Inline (Storage_Pool);
12868 pragma Inline (Subpool_Handle_Name);
12869 pragma Inline (Strval);
12870 pragma Inline (Subtype_Indication);
12871 pragma Inline (Subtype_Mark);
12872 pragma Inline (Subtype_Marks);
12873 pragma Inline (Suppress_Assignment_Checks);
12874 pragma Inline (Suppress_Loop_Warnings);
12875 pragma Inline (Synchronized_Present);
12876 pragma Inline (Tagged_Present);
12877 pragma Inline (Target_Type);
12878 pragma Inline (Task_Definition);
12879 pragma Inline (Task_Present);
12880 pragma Inline (Then_Actions);
12881 pragma Inline (Then_Statements);
12882 pragma Inline (Triggering_Alternative);
12883 pragma Inline (Triggering_Statement);
12884 pragma Inline (Treat_Fixed_As_Integer);
12885 pragma Inline (TSS_Elist);
12886 pragma Inline (Type_Definition);
12887 pragma Inline (Uneval_Old_Accept);
12888 pragma Inline (Uneval_Old_Warn);
12889 pragma Inline (Unit);
12890 pragma Inline (Uninitialized_Variable);
12891 pragma Inline (Unknown_Discriminants_Present);
12892 pragma Inline (Unreferenced_In_Spec);
12893 pragma Inline (Variant_Part);
12894 pragma Inline (Variants);
12895 pragma Inline (Visible_Declarations);
12896 pragma Inline (Used_Operations);
12897 pragma Inline (Was_Originally_Stub);
12898 pragma Inline (Withed_Body);
12899
12900 pragma Inline (Set_ABE_Is_Certain);
12901 pragma Inline (Set_Abort_Present);
12902 pragma Inline (Set_Abortable_Part);
12903 pragma Inline (Set_Abstract_Present);
12904 pragma Inline (Set_Accept_Handler_Records);
12905 pragma Inline (Set_Accept_Statement);
12906 pragma Inline (Set_Access_Definition);
12907 pragma Inline (Set_Access_To_Subprogram_Definition);
12908 pragma Inline (Set_Access_Types_To_Process);
12909 pragma Inline (Set_Actions);
12910 pragma Inline (Set_Activation_Chain_Entity);
12911 pragma Inline (Set_Acts_As_Spec);
12912 pragma Inline (Set_Actual_Designated_Subtype);
12913 pragma Inline (Set_Address_Warning_Posted);
12914 pragma Inline (Set_Aggregate_Bounds);
12915 pragma Inline (Set_Aliased_Present);
12916 pragma Inline (Set_All_Others);
12917 pragma Inline (Set_All_Present);
12918 pragma Inline (Set_Alternatives);
12919 pragma Inline (Set_Ancestor_Part);
12920 pragma Inline (Set_Array_Aggregate);
12921 pragma Inline (Set_Aspect_Rep_Item);
12922 pragma Inline (Set_Assignment_OK);
12923 pragma Inline (Set_Associated_Node);
12924 pragma Inline (Set_At_End_Proc);
12925 pragma Inline (Set_Atomic_Sync_Required);
12926 pragma Inline (Set_Attribute_Name);
12927 pragma Inline (Set_Aux_Decls_Node);
12928 pragma Inline (Set_Backwards_OK);
12929 pragma Inline (Set_Bad_Is_Detected);
12930 pragma Inline (Set_Body_Required);
12931 pragma Inline (Set_Body_To_Inline);
12932 pragma Inline (Set_Box_Present);
12933 pragma Inline (Set_By_Ref);
12934 pragma Inline (Set_Char_Literal_Value);
12935 pragma Inline (Set_Chars);
12936 pragma Inline (Set_Check_Address_Alignment);
12937 pragma Inline (Set_Choice_Parameter);
12938 pragma Inline (Set_Choices);
12939 pragma Inline (Set_Class_Present);
12940 pragma Inline (Set_Classifications);
12941 pragma Inline (Set_Cleanup_Actions);
12942 pragma Inline (Set_Comes_From_Extended_Return_Statement);
12943 pragma Inline (Set_Compile_Time_Known_Aggregate);
12944 pragma Inline (Set_Component_Associations);
12945 pragma Inline (Set_Component_Clauses);
12946 pragma Inline (Set_Component_Definition);
12947 pragma Inline (Set_Component_Items);
12948 pragma Inline (Set_Component_List);
12949 pragma Inline (Set_Component_Name);
12950 pragma Inline (Set_Componentwise_Assignment);
12951 pragma Inline (Set_Condition);
12952 pragma Inline (Set_Condition_Actions);
12953 pragma Inline (Set_Config_Pragmas);
12954 pragma Inline (Set_Constant_Present);
12955 pragma Inline (Set_Constraint);
12956 pragma Inline (Set_Constraints);
12957 pragma Inline (Set_Context_Installed);
12958 pragma Inline (Set_Context_Items);
12959 pragma Inline (Set_Context_Pending);
12960 pragma Inline (Set_Contract_Test_Cases);
12961 pragma Inline (Set_Controlling_Argument);
12962 pragma Inline (Set_Conversion_OK);
12963 pragma Inline (Set_Convert_To_Return_False);
12964 pragma Inline (Set_Corresponding_Aspect);
12965 pragma Inline (Set_Corresponding_Body);
12966 pragma Inline (Set_Corresponding_Formal_Spec);
12967 pragma Inline (Set_Corresponding_Generic_Association);
12968 pragma Inline (Set_Corresponding_Integer_Value);
12969 pragma Inline (Set_Corresponding_Spec);
12970 pragma Inline (Set_Corresponding_Spec_Of_Stub);
12971 pragma Inline (Set_Corresponding_Stub);
12972 pragma Inline (Set_Dcheck_Function);
12973 pragma Inline (Set_Declarations);
12974 pragma Inline (Set_Default_Expression);
12975 pragma Inline (Set_Default_Name);
12976 pragma Inline (Set_Default_Storage_Pool);
12977 pragma Inline (Set_Defining_Identifier);
12978 pragma Inline (Set_Defining_Unit_Name);
12979 pragma Inline (Set_Delay_Alternative);
12980 pragma Inline (Set_Delay_Statement);
12981 pragma Inline (Set_Delta_Expression);
12982 pragma Inline (Set_Digits_Expression);
12983 pragma Inline (Set_Discr_Check_Funcs_Built);
12984 pragma Inline (Set_Discrete_Choices);
12985 pragma Inline (Set_Discrete_Range);
12986 pragma Inline (Set_Discrete_Subtype_Definition);
12987 pragma Inline (Set_Discrete_Subtype_Definitions);
12988 pragma Inline (Set_Discriminant_Specifications);
12989 pragma Inline (Set_Discriminant_Type);
12990 pragma Inline (Set_Do_Accessibility_Check);
12991 pragma Inline (Set_Do_Discriminant_Check);
12992 pragma Inline (Set_Do_Division_Check);
12993 pragma Inline (Set_Do_Length_Check);
12994 pragma Inline (Set_Do_Overflow_Check);
12995 pragma Inline (Set_Do_Range_Check);
12996 pragma Inline (Set_Do_Storage_Check);
12997 pragma Inline (Set_Do_Tag_Check);
12998 pragma Inline (Set_Elaborate_All_Desirable);
12999 pragma Inline (Set_Elaborate_All_Present);
13000 pragma Inline (Set_Elaborate_Desirable);
13001 pragma Inline (Set_Elaborate_Present);
13002 pragma Inline (Set_Else_Actions);
13003 pragma Inline (Set_Else_Statements);
13004 pragma Inline (Set_Elsif_Parts);
13005 pragma Inline (Set_Enclosing_Variant);
13006 pragma Inline (Set_End_Label);
13007 pragma Inline (Set_End_Span);
13008 pragma Inline (Set_Entity);
13009 pragma Inline (Set_Entry_Body_Formal_Part);
13010 pragma Inline (Set_Entry_Call_Alternative);
13011 pragma Inline (Set_Entry_Call_Statement);
13012 pragma Inline (Set_Entry_Direct_Name);
13013 pragma Inline (Set_Entry_Index);
13014 pragma Inline (Set_Entry_Index_Specification);
13015 pragma Inline (Set_Etype);
13016 pragma Inline (Set_Exception_Choices);
13017 pragma Inline (Set_Exception_Handlers);
13018 pragma Inline (Set_Exception_Junk);
13019 pragma Inline (Set_Exception_Label);
13020 pragma Inline (Set_Expansion_Delayed);
13021 pragma Inline (Set_Explicit_Actual_Parameter);
13022 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
13023 pragma Inline (Set_Expression);
13024 pragma Inline (Set_Expressions);
13025 pragma Inline (Set_First_Bit);
13026 pragma Inline (Set_First_Inlined_Subprogram);
13027 pragma Inline (Set_First_Name);
13028 pragma Inline (Set_First_Named_Actual);
13029 pragma Inline (Set_First_Real_Statement);
13030 pragma Inline (Set_First_Subtype_Link);
13031 pragma Inline (Set_Float_Truncate);
13032 pragma Inline (Set_Formal_Type_Definition);
13033 pragma Inline (Set_Forwards_OK);
13034 pragma Inline (Set_From_Aspect_Specification);
13035 pragma Inline (Set_From_At_End);
13036 pragma Inline (Set_From_At_Mod);
13037 pragma Inline (Set_From_Conditional_Expression);
13038 pragma Inline (Set_From_Default);
13039 pragma Inline (Set_Generalized_Indexing);
13040 pragma Inline (Set_Generic_Associations);
13041 pragma Inline (Set_Generic_Formal_Declarations);
13042 pragma Inline (Set_Generic_Parent);
13043 pragma Inline (Set_Generic_Parent_Type);
13044 pragma Inline (Set_Handled_Statement_Sequence);
13045 pragma Inline (Set_Handler_List_Entry);
13046 pragma Inline (Set_Has_Created_Identifier);
13047 pragma Inline (Set_Has_Dereference_Action);
13048 pragma Inline (Set_Has_Dynamic_Length_Check);
13049 pragma Inline (Set_Has_Dynamic_Range_Check);
13050 pragma Inline (Set_Has_Init_Expression);
13051 pragma Inline (Set_Has_Local_Raise);
13052 pragma Inline (Set_Has_No_Elaboration_Code);
13053 pragma Inline (Set_Has_Pragma_Suppress_All);
13054 pragma Inline (Set_Has_Private_View);
13055 pragma Inline (Set_Has_Relative_Deadline_Pragma);
13056 pragma Inline (Set_Has_Self_Reference);
13057 pragma Inline (Set_Has_SP_Choice);
13058 pragma Inline (Set_Has_Storage_Size_Pragma);
13059 pragma Inline (Set_Has_Wide_Character);
13060 pragma Inline (Set_Has_Wide_Wide_Character);
13061 pragma Inline (Set_Header_Size_Added);
13062 pragma Inline (Set_Hidden_By_Use_Clause);
13063 pragma Inline (Set_High_Bound);
13064 pragma Inline (Set_Identifier);
13065 pragma Inline (Set_Implicit_With);
13066 pragma Inline (Set_Import_Interface_Present);
13067 pragma Inline (Set_In_Present);
13068 pragma Inline (Set_Includes_Infinities);
13069 pragma Inline (Set_Incomplete_View);
13070 pragma Inline (Set_Inherited_Discriminant);
13071 pragma Inline (Set_Instance_Spec);
13072 pragma Inline (Set_Interface_List);
13073 pragma Inline (Set_Interface_Present);
13074 pragma Inline (Set_Intval);
13075 pragma Inline (Set_Is_Accessibility_Actual);
13076 pragma Inline (Set_Is_Asynchronous_Call_Block);
13077 pragma Inline (Set_Is_Boolean_Aspect);
13078 pragma Inline (Set_Is_Checked);
13079 pragma Inline (Set_Is_Component_Left_Opnd);
13080 pragma Inline (Set_Is_Component_Right_Opnd);
13081 pragma Inline (Set_Is_Controlling_Actual);
13082 pragma Inline (Set_Is_Delayed_Aspect);
13083 pragma Inline (Set_Is_Disabled);
13084 pragma Inline (Set_Is_Dynamic_Coextension);
13085 pragma Inline (Set_Is_Elsif);
13086 pragma Inline (Set_Is_Entry_Barrier_Function);
13087 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
13088 pragma Inline (Set_Is_Finalization_Wrapper);
13089 pragma Inline (Set_Is_Folded_In_Parser);
13090 pragma Inline (Set_Is_Generic_Contract_Pragma);
13091 pragma Inline (Set_Is_Ghost_Pragma);
13092 pragma Inline (Set_Is_Ignored);
13093 pragma Inline (Set_Is_In_Discriminant_Check);
13094 pragma Inline (Set_Is_Inherited);
13095 pragma Inline (Set_Is_Machine_Number);
13096 pragma Inline (Set_Is_Null_Loop);
13097 pragma Inline (Set_Is_Overloaded);
13098 pragma Inline (Set_Is_Power_Of_2_For_Shift);
13099 pragma Inline (Set_Is_Prefixed_Call);
13100 pragma Inline (Set_Is_Protected_Subprogram_Body);
13101 pragma Inline (Set_Is_Static_Coextension);
13102 pragma Inline (Set_Is_Static_Expression);
13103 pragma Inline (Set_Is_Subprogram_Descriptor);
13104 pragma Inline (Set_Is_Task_Allocation_Block);
13105 pragma Inline (Set_Is_Task_Master);
13106 pragma Inline (Set_Iteration_Scheme);
13107 pragma Inline (Set_Iterator_Specification);
13108 pragma Inline (Set_Itype);
13109 pragma Inline (Set_Kill_Range_Check);
13110 pragma Inline (Set_Label_Construct);
13111 pragma Inline (Set_Last_Bit);
13112 pragma Inline (Set_Last_Name);
13113 pragma Inline (Set_Left_Opnd);
13114 pragma Inline (Set_Library_Unit);
13115 pragma Inline (Set_Limited_Present);
13116 pragma Inline (Set_Limited_View_Installed);
13117 pragma Inline (Set_Literals);
13118 pragma Inline (Set_Local_Raise_Not_OK);
13119 pragma Inline (Set_Local_Raise_Statements);
13120 pragma Inline (Set_Loop_Actions);
13121 pragma Inline (Set_Loop_Parameter_Specification);
13122 pragma Inline (Set_Low_Bound);
13123 pragma Inline (Set_Mod_Clause);
13124 pragma Inline (Set_More_Ids);
13125 pragma Inline (Set_Must_Be_Byte_Aligned);
13126 pragma Inline (Set_Must_Not_Freeze);
13127 pragma Inline (Set_Must_Not_Override);
13128 pragma Inline (Set_Must_Override);
13129 pragma Inline (Set_Name);
13130 pragma Inline (Set_Names);
13131 pragma Inline (Set_Next_Entity);
13132 pragma Inline (Set_Next_Exit_Statement);
13133 pragma Inline (Set_Next_Implicit_With);
13134 pragma Inline (Set_Next_Named_Actual);
13135 pragma Inline (Set_Next_Pragma);
13136 pragma Inline (Set_Next_Rep_Item);
13137 pragma Inline (Set_Next_Use_Clause);
13138 pragma Inline (Set_No_Ctrl_Actions);
13139 pragma Inline (Set_No_Elaboration_Check);
13140 pragma Inline (Set_No_Entities_Ref_In_Spec);
13141 pragma Inline (Set_No_Initialization);
13142 pragma Inline (Set_No_Minimize_Eliminate);
13143 pragma Inline (Set_No_Truncation);
13144 pragma Inline (Set_Non_Aliased_Prefix);
13145 pragma Inline (Set_Null_Excluding_Subtype);
13146 pragma Inline (Set_Null_Exclusion_Present);
13147 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13148 pragma Inline (Set_Null_Present);
13149 pragma Inline (Set_Null_Record_Present);
13150 pragma Inline (Set_Object_Definition);
13151 pragma Inline (Set_Of_Present);
13152 pragma Inline (Set_Original_Discriminant);
13153 pragma Inline (Set_Original_Entity);
13154 pragma Inline (Set_Others_Discrete_Choices);
13155 pragma Inline (Set_Out_Present);
13156 pragma Inline (Set_Parameter_Associations);
13157 pragma Inline (Set_Parameter_Specifications);
13158 pragma Inline (Set_Parameter_Type);
13159 pragma Inline (Set_Parent_Spec);
13160 pragma Inline (Set_Position);
13161 pragma Inline (Set_Pragma_Argument_Associations);
13162 pragma Inline (Set_Pragma_Identifier);
13163 pragma Inline (Set_Pragmas_After);
13164 pragma Inline (Set_Pragmas_Before);
13165 pragma Inline (Set_Pre_Post_Conditions);
13166 pragma Inline (Set_Prefix);
13167 pragma Inline (Set_Premature_Use);
13168 pragma Inline (Set_Present_Expr);
13169 pragma Inline (Set_Prev_Ids);
13170 pragma Inline (Set_Print_In_Hex);
13171 pragma Inline (Set_Private_Declarations);
13172 pragma Inline (Set_Private_Present);
13173 pragma Inline (Set_Procedure_To_Call);
13174 pragma Inline (Set_Proper_Body);
13175 pragma Inline (Set_Protected_Definition);
13176 pragma Inline (Set_Protected_Present);
13177 pragma Inline (Set_Raises_Constraint_Error);
13178 pragma Inline (Set_Range_Constraint);
13179 pragma Inline (Set_Range_Expression);
13180 pragma Inline (Set_Real_Range_Specification);
13181 pragma Inline (Set_Realval);
13182 pragma Inline (Set_Reason);
13183 pragma Inline (Set_Record_Extension_Part);
13184 pragma Inline (Set_Redundant_Use);
13185 pragma Inline (Set_Renaming_Exception);
13186 pragma Inline (Set_Result_Definition);
13187 pragma Inline (Set_Return_Object_Declarations);
13188 pragma Inline (Set_Reverse_Present);
13189 pragma Inline (Set_Right_Opnd);
13190 pragma Inline (Set_Rounded_Result);
13191 pragma Inline (Set_SCIL_Controlling_Tag);
13192 pragma Inline (Set_SCIL_Entity);
13193 pragma Inline (Set_SCIL_Tag_Value);
13194 pragma Inline (Set_SCIL_Target_Prim);
13195 pragma Inline (Set_Scope);
13196 pragma Inline (Set_Select_Alternatives);
13197 pragma Inline (Set_Selector_Name);
13198 pragma Inline (Set_Selector_Names);
13199 pragma Inline (Set_Shift_Count_OK);
13200 pragma Inline (Set_Source_Type);
13201 pragma Inline (Set_Split_PPC);
13202 pragma Inline (Set_Statements);
13203 pragma Inline (Set_Storage_Pool);
13204 pragma Inline (Set_Strval);
13205 pragma Inline (Set_Subpool_Handle_Name);
13206 pragma Inline (Set_Subtype_Indication);
13207 pragma Inline (Set_Subtype_Mark);
13208 pragma Inline (Set_Subtype_Marks);
13209 pragma Inline (Set_Suppress_Assignment_Checks);
13210 pragma Inline (Set_Suppress_Loop_Warnings);
13211 pragma Inline (Set_Synchronized_Present);
13212 pragma Inline (Set_TSS_Elist);
13213 pragma Inline (Set_Tagged_Present);
13214 pragma Inline (Set_Target_Type);
13215 pragma Inline (Set_Task_Definition);
13216 pragma Inline (Set_Task_Present);
13217 pragma Inline (Set_Then_Actions);
13218 pragma Inline (Set_Then_Statements);
13219 pragma Inline (Set_Treat_Fixed_As_Integer);
13220 pragma Inline (Set_Triggering_Alternative);
13221 pragma Inline (Set_Triggering_Statement);
13222 pragma Inline (Set_Type_Definition);
13223 pragma Inline (Set_Uneval_Old_Accept);
13224 pragma Inline (Set_Uneval_Old_Warn);
13225 pragma Inline (Set_Unit);
13226 pragma Inline (Set_Uninitialized_Variable);
13227 pragma Inline (Set_Unknown_Discriminants_Present);
13228 pragma Inline (Set_Unreferenced_In_Spec);
13229 pragma Inline (Set_Used_Operations);
13230 pragma Inline (Set_Variant_Part);
13231 pragma Inline (Set_Variants);
13232 pragma Inline (Set_Visible_Declarations);
13233 pragma Inline (Set_Was_Originally_Stub);
13234 pragma Inline (Set_Withed_Body);
13235
13236 end Sinfo;