]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/sinfo.ads
c++: Handle multiple aggregate overloads [PR95319].
[thirdparty/gcc.git] / gcc / ada / sinfo.ads
CommitLineData
996ae0b0
RK
1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
4-- --
5-- S I N F O --
6-- --
7-- S p e c --
8-- --
1d005acc 9-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
996ae0b0
RK
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- --
748086b7 13-- ware Foundation; either version 3, or (at your option) any later ver- --
996ae0b0
RK
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 --
748086b7
JJ
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/>. --
996ae0b0
RK
26-- --
27-- GNAT was originally developed by the GNAT team at New York University. --
71ff80dc 28-- Extensive contributions were provided by Ada Core Technologies Inc. --
996ae0b0
RK
29-- --
30------------------------------------------------------------------------------
31
32-- This package defines the structure of the abstract syntax tree. The Tree
653da906
RD
33-- package provides a basic tree structure. Sinfo describes how this structure
34-- is used to represent the syntax of an Ada program.
996ae0b0 35
1cb46af0
RD
36-- The grammar in the RM is followed very closely in the tree design, and is
37-- repeated as part of this source file.
996ae0b0
RK
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
d63199d8 41-- nodes for defining identifiers, defining character literals, and defining
996ae0b0 42-- operator symbols, collectively referred to as entities, represent what
653da906
RD
43-- would normally be regarded as the symbol table information. In addition a
44-- number of the tree nodes contain semantic information.
996ae0b0 45
e3da30b2
RD
46-- WARNING: Several files are automatically generated from this package.
47-- See below for details.
996ae0b0 48
0712790c 49with Namet; use Namet;
996ae0b0
RK
50with Types; use Types;
51with Uintp; use Uintp;
52with Urealp; use Urealp;
53
54package 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
653da906 61 -- carried out to ensure consistency. First, if a field access function is
fab2daeb
AC
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
996ae0b0 75
653da906
RD
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.
996ae0b0
RK
79
80 -- In addition, if any of the standard expression fields is changed, then
e3da30b2 81 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
996ae0b0
RK
82 -- must be updated appropriately, since it special cases expression fields.
83
9dc30a5f 84 -- If a new tree node is added, then the following changes are made:
996ae0b0
RK
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
2ffcbaa5 89 -- Add an entry in Is_Syntactic_Field
fbf5a39b
AC
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.
996ae0b0
RK
93 -- Add an appropriate section to the case statement in sprint.adb
94 -- Add an appropriate section to the case statement in sem.adb
bde33286 95 -- Add an appropriate section to the case statement in exp_util.adb
996ae0b0 96 -- (Insert_Actions procedure)
bde33286 97 -- For a subexpression, add an appropriate section to the case
996ae0b0 98 -- statement in sem_eval.adb
bde33286 99 -- For a subexpression, add an appropriate section to the case
996ae0b0
RK
100 -- statement in sem_res.adb
101
2ffcbaa5
AC
102 -- All back ends must be made aware of the new node kind.
103
996ae0b0
RK
104 -- Finally, four utility programs must be run:
105
d347f572
AC
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.
996ae0b0 110
e3da30b2
RD
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
653da906
RD
113 -- not need to read sinfo.adb, since the contents of the body are
114 -- algorithmically determinable from the spec.
996ae0b0 115
653da906
RD
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.
996ae0b0 121
653da906
RD
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.
996ae0b0 125
d347f572
AC
126 -- The above steps are done automatically by the build scripts when you do
127 -- a full bootstrap.
e3da30b2 128
653da906
RD
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.
996ae0b0
RK
132
133 --------------------------------
134 -- Implicit Nodes in the Tree --
135 --------------------------------
136
653da906
RD
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:
996ae0b0
RK
141
142 -- If the only possibilities for a non-terminal are one or more other
653da906 143 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
996ae0b0 144 -- corresponding node is omitted from the tree, and the target construct
653da906
RD
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.
996ae0b0
RK
149
150 -- If a non-terminal corresponds to a list of some other non-terminal
653da906
RD
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.
996ae0b0
RK
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
653da906
RD
165 -- identifiers appear (object declarations, component declarations, number
166 -- declarations etc.)
996ae0b0 167
653da906
RD
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).
996ae0b0
RK
171
172 -- To simplify semantic processing, the parser breaks down such multiple
173 -- declaration cases into sequences of single declarations, duplicating
653da906
RD
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.
996ae0b0
RK
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}
653da906
RD
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.
996ae0b0 197
653da906
RD
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.
996ae0b0
RK
201
202 -- The following example shows how a traversal of a list is written. We
653da906
RD
203 -- suppose here that Stmt points to a N_Case_Statement node which has a
204 -- list field called Alternatives:
996ae0b0
RK
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
653da906
RD
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.
d63199d8 216 -- Present is defined in Atree; First and Next are defined in Nlists.
996ae0b0
RK
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
653da906
RD
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.
996ae0b0 231
653da906
RD
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
996ae0b0
RK
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.
653da906
RD
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.
996ae0b0
RK
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,
653da906
RD
245 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
246 -- ignoring all pragmas.
996ae0b0
RK
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 -- ...
a9f4e3d2 253 -- Variant := Next (Variant);
996ae0b0
RK
254 -- end loop;
255
256 -- or
257
258 -- Variant := First_Non_Pragma (Variants (N));
259 -- while Present (Variant) loop
260 -- ...
a9f4e3d2 261 -- Variant := Next_Non_Pragma (Variant);
996ae0b0
RK
262 -- end loop;
263
653da906
RD
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.
996ae0b0
RK
267
268 ---------------------
269 -- Optional Fields --
270 ---------------------
271
272 -- Fields which correspond to a section of the syntax enclosed in square
653da906
RD
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.
996ae0b0
RK
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
653da906
RD
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
996ae0b0
RK
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
653da906
RD
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.
996ae0b0
RK
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
653da906
RD
349 -- These are Node_Kind settings used in the internal implementation which
350 -- are not logically part of the specification.
996ae0b0
RK
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
653da906
RD
361 -- Treepr, where the extra entry provides the limit value when dealing with
362 -- the last used entry in the array).
996ae0b0
RK
363
364 -----------------------------------------
365 -- Note on the settings of Sloc fields --
366 -----------------------------------------
367
653da906
RD
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.
996ae0b0 375
653da906
RD
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.
996ae0b0
RK
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
d63199d8 392 -- (defining identifiers, character literals, and operator symbols), where
653da906
RD
393 -- the usage of the fields depends on the entity kind. Entity fields are
394 -- fully documented in the separate package Einfo.
996ae0b0 395
653da906
RD
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
996ae0b0
RK
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
9596236a 402 -- xtreeprs.adb) knows about the special fields here, so it must be
996ae0b0
RK
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
3e542a58 410 -- Associated_Node (Node4-Sem) for generic processing
996ae0b0
RK
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
3e542a58 418 -- Associated_Node (Node4-Sem) for generic processing
996ae0b0
RK
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
052e0603
AC
430 -- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
431 -- Has_Dynamic_Range_Check (Flag12-Sem) set if range check inserted
996ae0b0
RK
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
653da906
RD
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.
996ae0b0
RK
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
f2c0ca66
RD
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
9dc30a5f
AC
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
d2d8b2a7 495 -- for the moment???) list of such exceptions:
9dc30a5f 496 --
d2d8b2a7
AC
497 -- Generic specifications and generic bodies
498 -- Function calls that use prefixed notation (Operand.Operation [(...)])
9dc30a5f 499
f2c0ca66
RD
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
598a56c0
ES
524 -- Some other ASIS-specific issues are covered in specific comments in
525 -- sections for particular nodes or flags.
526
8636f52f
HK
527 ----------------
528 -- Ghost Mode --
529 ----------------
530
d65a80fd
HK
531 -- The SPARK RM 6.9 defines two classes of constructs - Ghost entities and
532 -- Ghost statements. The intent of the feature is to treat Ghost constructs
533 -- as non-existent when Ghost assertion policy Ignore is in effect.
9057bd6a 534 --
d65a80fd 535 -- The corresponding nodes which map to Ghost constructs are:
9057bd6a 536 --
d65a80fd
HK
537 -- Ghost entities
538 -- Declaration nodes
539 -- N_Package_Body
540 -- N_Subprogram_Body
9057bd6a 541 --
d65a80fd
HK
542 -- Ghost statements
543 -- N_Assignment_Statement
544 -- N_Procedure_Call_Statement
545 -- N_Pragma
9057bd6a 546 --
d65a80fd 547 -- In addition, the compiler treats instantiations as Ghost entities
9057bd6a 548 --
d65a80fd 549 -- To achieve the removal of ignored Ghost constructs, the compiler relies
9057bd6a
HK
550 -- on global variables Ghost_Mode and Ignored_Ghost_Region, which comprise
551 -- a mechanism called "Ghost regions".
552 --
553 -- The values of Ghost_Mode are as follows:
554 --
8636f52f 555 -- 1. Check - All static semantics as defined in SPARK RM 6.9 are in
d65a80fd 556 -- effect. The Ghost region has mode Check.
9057bd6a 557 --
8636f52f 558 -- 2. Ignore - Same as Check, ignored Ghost code is not present in ALI
d65a80fd
HK
559 -- files, object files, and the final executable. The Ghost region
560 -- has mode Ignore.
9057bd6a 561 --
d65a80fd 562 -- 3. None - No Ghost region is in effect
9057bd6a
HK
563 --
564 -- The value of Ignored_Ghost_Region captures the node which initiates an
565 -- ignored Ghost region.
566 --
d65a80fd
HK
567 -- A Ghost region is a compiler operating mode, similar to Check_Syntax,
568 -- however a region is much more finely grained and depends on the policy
569 -- in effect. The region starts prior to the analysis of a Ghost construct
570 -- and ends immediately after its expansion. The region is established as
571 -- follows:
9057bd6a 572 --
d65a80fd
HK
573 -- 1. Declarations - Prior to analysis, if the declaration is subject to
574 -- pragma Ghost.
9057bd6a 575 --
d65a80fd
HK
576 -- 2. Renaming declarations - Same as 1) or when the renamed entity is
577 -- Ghost.
9057bd6a 578 --
d65a80fd
HK
579 -- 3. Completing declarations - Same as 1) or when the declaration is
580 -- partially analyzed and the declaration completes a Ghost entity.
9057bd6a 581 --
d65a80fd
HK
582 -- 4. N_Package_Body, N_Subprogram_Body - Same as 1) or when the body is
583 -- partially analyzed and completes a Ghost entity.
9057bd6a 584 --
d65a80fd
HK
585 -- 5. N_Assignment_Statement - After the left hand side is analyzed and
586 -- references a Ghost entity.
9057bd6a 587 --
d65a80fd
HK
588 -- 6. N_Procedure_Call_Statement - After the name is analyzed and denotes
589 -- a Ghost procedure.
9057bd6a 590 --
d65a80fd
HK
591 -- 7. N_Pragma - During analysis, when the related entity is Ghost or the
592 -- pragma encloses a Ghost entity.
9057bd6a 593 --
d65a80fd
HK
594 -- 8. Instantiations - Save as 1) or when the instantiation is partially
595 -- analyzed and the generic template is Ghost.
9057bd6a
HK
596 --
597 -- The following routines install a new Ghost region:
598 --
599 -- Install_Ghost_Region
600 -- Mark_And_Set_Ghost_xxx
601 -- Set_Ghost_Mode
602 --
603 -- The following routine ends a Ghost region:
604 --
605 -- Restore_Ghost_Region
606 --
607 -- A region may be reinstalled similarly to scopes for decoupled expansion
608 -- such as the generation of dispatch tables or the creation of a predicate
609 -- function.
610 --
d65a80fd
HK
611 -- If the mode of a Ghost region is Ignore, any newly created nodes as well
612 -- as source entities are marked as ignored Ghost. In additon, the marking
613 -- process signals all enclosing scopes that an ignored Ghost node resides
614 -- within. The compilation unit where the node resides is also added to an
615 -- auxiliary table for post processing.
9057bd6a 616 --
8636f52f
HK
617 -- After the analysis and expansion of all compilation units takes place
618 -- as well as the instantiation of all inlined [generic] bodies, the GNAT
d65a80fd 619 -- driver initiates a separate pass which removes all ignored Ghost nodes
8636f52f
HK
620 -- from all units stored in the auxiliary table.
621
4460a9bc
YM
622 --------------------
623 -- GNATprove Mode --
624 --------------------
5114f3ff 625
4460a9bc
YM
626 -- When a file is compiled in GNATprove mode (-gnatd.F), a very light
627 -- expansion is performed and the analysis must generate a tree in a
628 -- form that meets additional requirements.
5114f3ff 629
979b94ea 630 -- This light expansion does two transformations of the tree that cannot
ab986406 631 -- be postponed till after semantic analysis:
5114f3ff 632
1f0b1e48 633 -- 1. Replace object renamings by renamed object. This requires the
979b94ea
AC
634 -- introduction of temporaries at the point of the renaming, which
635 -- must be properly analyzed.
5114f3ff
AC
636
637 -- 2. Fully qualify entity names. This is needed to generate suitable
1f0b1e48 638 -- local effects and call-graphs in ALI files, with the completely
5114f3ff
AC
639 -- qualified names (in particular the suffix to distinguish homonyms).
640
4460a9bc
YM
641 -- The tree after this light expansion should be fully analyzed
642 -- semantically, which sometimes requires the insertion of semantic
812e6118 643 -- preanalysis, for example for subprogram contracts and pragma
4460a9bc
YM
644 -- check/assert. In particular, all expression must have their proper type,
645 -- and semantic links should be set between tree nodes (partial to full
646 -- view, etc.) Some kinds of nodes should be either absent, or can be
647 -- ignored by the formal verification backend:
5114f3ff
AC
648
649 -- N_Object_Renaming_Declaration: can be ignored safely
4460a9bc 650 -- N_Expression_Function: absent (rewritten)
5114f3ff
AC
651 -- N_Expression_With_Actions: absent (not generated)
652
653 -- SPARK cross-references are generated from the regular cross-references
654 -- (used for browsing and code understanding) and additional references
655 -- collected during semantic analysis, in particular on all dereferences.
656 -- These SPARK cross-references are output in a separate section of ALI
657 -- files, as described in spark_xrefs.adb. They are the basis for the
4460a9bc
YM
658 -- computation of data dependences in GNATprove. This implies that all
659 -- cross-references should be generated in this mode, even those that would
660 -- not make sense from a user point-of-view, and that cross-references that
661 -- do not lead to data dependences for subprograms can be safely ignored.
5114f3ff 662
697b781a 663 -- GNATprove relies on the following front end behaviors:
aa9b151a 664
09d67391
AC
665 -- 1. The first declarations in the list of visible declarations of
666 -- a package declaration for a generic instance, up to the first
667 -- declaration which comes from source, should correspond to
668 -- the "mappings nodes" between formal and actual generic parameters.
669
670 -- 2. In addition pragma Debug statements are removed from the tree
671 -- (rewritten to NULL stmt), since they should be ignored in formal
672 -- verification.
673
674 -- 3. An error is also issued for missing subunits, similar to the
675 -- warning issued when generating code, to avoid formal verification
676 -- of a partial unit.
ddd2bec5 677
24d4b3d5
AC
678 -- 4. Unconstrained types are not replaced by constrained types whose
679 -- bounds are generated from an expression: Expand_Subtype_From_Expr
697b781a 680 -- should be a no-op.
24d4b3d5 681
697b781a
AC
682 -- 5. Errors (instead of warnings) are issued on compile-time-known
683 -- constraint errors even though such cases do not correspond to
684 -- illegalities in the Ada RM (this is simply another case where
685 -- GNATprove implements a subset of the full language).
686 --
687 -- However, there are a few exceptions to this rule for cases where
688 -- we want to allow the GNATprove analysis to proceed (e.g. range
689 -- checks on empty ranges, which typically appear in deactivated
690 -- code in a particular configuration).
39f0fa29 691
d3ef4bd6
AC
692 -- 6. Subtypes should match in the AST, even after a generic is
693 -- instantiated. In particular, GNATprove relies on the fact that,
694 -- on a selected component, the type of the selected component is
695 -- the type of the corresponding component in the prefix of the
696 -- selected component.
697 --
698 -- Note that, in some cases, we know that this rule is broken by the
699 -- frontend. In particular, if the selected component is a packed
700 -- array depending on a discriminant of a unconstrained formal object
701 -- parameter of a generic.
702
f32eb591
AC
703 ----------------
704 -- SPARK Mode --
705 ----------------
706
707 -- The SPARK RM 1.6.5 defines a mode of operation called "SPARK mode" which
708 -- starts a scope where the SPARK language semantics are either On, Off, or
709 -- Auto, where Auto leaves the choice to the tools. A SPARK mode may be
710 -- specified by means of an aspect or a pragma.
711
712 -- The following entities may be subject to a SPARK mode. Entities marked
713 -- with * may possess two differente SPARK modes.
714
715 -- E_Entry
716 -- E_Entry_Family
717 -- E_Function
718 -- E_Generic_Function
719 -- E_Generic_Package *
720 -- E_Generic_Procedure
721 -- E_Operator
722 -- E_Package *
723 -- E_Package_Body *
724 -- E_Procedure
725 -- E_Protected_Body
726 -- E_Protected_Subtype
727 -- E_Protected_Type *
728 -- E_Subprogram_Body
729 -- E_Task_Body
730 -- E_Task_Subtype
731 -- E_Task_Type *
732 -- E_Variable
733
734 -- In order to manage SPARK scopes, the compiler relies on global variables
735 -- SPARK_Mode and SPARK_Mode_Pragma and a mechanism called "SPARK regions."
736 -- Routines Install_SPARK_Mode and Set_SPARK_Mode create a new SPARK region
737 -- and routine Restore_SPARK_Mode ends a SPARK region. A region may be
738 -- reinstalled similarly to scopes.
739
979b94ea
AC
740 -----------------------
741 -- Check Flag Fields --
742 -----------------------
743
744 -- The following flag fields appear in expression nodes:
745
ab986406
AC
746 -- Do_Division_Check
747 -- Do_Overflow_Check
748 -- Do_Range_Check
979b94ea
AC
749
750 -- These three flags are always set by the front end during semantic
751 -- analysis, on expression nodes that may trigger the corresponding
ab986406
AC
752 -- check. The front end then inserts or not the check during expansion. In
753 -- particular, these flags should also be correctly set in ASIS mode and
49779c98
AC
754 -- GNATprove mode. As a special case, the front end does not insert a
755 -- Do_Division_Check flag on float exponentiation expressions, for the case
756 -- where the value is 0.0 and the exponent is negative, although this case
ff606db0 757 -- does lead to a division check failure. As another special case,
ae3f6530 758 -- the front end does not insert a Do_Range_Check on an allocator where
ff606db0
YM
759 -- the designated type is scalar, and the designated type is more
760 -- constrained than the type of the initialized allocator value or the type
761 -- of the default value for an uninitialized allocator.
979b94ea 762
ae3f6530
EB
763 -- Note that the expander always takes care of the Do_Range_Check case, so
764 -- this flag will never be set in the expanded tree passed to the back end.
765 -- For the other two flags, the check can be generated either by the back
766 -- end or by the front end, depending on the setting of a target parameter.
6e32b1ab 767
979b94ea
AC
768 -- Note that this accounts for all nodes that trigger the corresponding
769 -- checks, except for range checks on subtype_indications, which may be
770 -- required to check that a range_constraint is compatible with the given
771 -- subtype (RM 3.2.2(11)).
772
773 -- The following flag fields appear in various nodes:
774
ab986406
AC
775 -- Do_Accessibility_Check
776 -- Do_Discriminant_Check
777 -- Do_Length_Check
778 -- Do_Storage_Check
779 -- Do_Tag_Check
979b94ea
AC
780
781 -- These flags are used in some specific cases by the front end, either
782 -- during semantic analysis or during expansion, and cannot be expected
783 -- to be set on all nodes that trigger the corresponding check.
784
996ae0b0
RK
785 ------------------------
786 -- Common Flag Fields --
787 ------------------------
788
1f0b1e48 789 -- The following flag fields appear in all nodes:
996ae0b0 790
0f1a6a0b 791 -- Analyzed
8ce62196 792 -- This flag is used to indicate that a node (and all its children) have
653da906
RD
793 -- been analyzed. It is used to avoid reanalysis of a node that has
794 -- already been analyzed, both for efficiency and functional correctness
795 -- reasons.
996ae0b0 796
0f1a6a0b 797 -- Comes_From_Source
96867674
AC
798 -- This flag is set if the node comes directly from an explicit construct
799 -- in the source. It is normally on for any nodes built by the scanner or
800 -- parser from the source program, with the exception that in a few cases
801 -- the parser adds nodes to normalize the representation (in particular
802 -- a null statement is added to a package body if there is no begin/end
803 -- initialization section.
804 --
805 -- Most nodes inserted by the analyzer or expander are not considered
806 -- as coming from source, so the flag is off for such nodes. In a few
807 -- cases, the expander constructs nodes closely equivalent to nodes
808 -- from the source program (e.g. the allocator built for build-in-place
809 -- case), and the Comes_From_Source flag is deliberately set.
bde33286 810
0f1a6a0b 811 -- Error_Posted
653da906
RD
812 -- This flag is used to avoid multiple error messages being posted on or
813 -- referring to the same node. This flag is set if an error message
814 -- refers to a node or is posted on its source location, and has the
815 -- effect of inhibiting further messages involving this same node.
996ae0b0 816
e09a5598
AC
817 -----------------------
818 -- Modify_Tree_For_C --
819 -----------------------
820
821 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
822 -- in ways that help match the semantics better with C, easing the task of
823 -- interfacing to C code generators (other than GCC, where the work is done
824 -- in gigi, and there is no point in changing that), and also making life
825 -- easier for Cprint in generating C source code.
826
827 -- The current modifications implemented are as follows:
828
829 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
830 -- are eliminated from the tree (since these operations do not exist in
831 -- C), and the operations are rewritten in terms of logical shifts and
832 -- other logical operations that do exist in C. See Exp_Ch4 expansion
833 -- routines for these operators for details of the transformations made.
834
835 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
836 -- less than the word size (since other values are not well-defined in
837 -- C). This is done using an explicit test if necessary.
838
aa9b151a
AC
839 -- Min and Max attributes are expanded into equivalent if expressions,
840 -- dealing properly with side effect issues.
841
e0f63680
AC
842 -- Mod for signed integer types is expanded into equivalent expressions
843 -- using Rem (which is % in C) and other C-available operators.
844
6031f544
AC
845 -- Functions returning bounded arrays are transformed into procedures
846 -- with an extra out parameter, and the calls updated accordingly.
847
848 -- Aggregates are only kept unexpanded for object declarations, otherwise
849 -- they are systematically expanded into loops (for arrays) and
850 -- individual assignments (for records).
e0f63680 851
c63a2ad6
AC
852 -- Unconstrained array types are handled by means of fat pointers.
853
854 -- Postconditions are inlined by the frontend since their body may have
855 -- references to itypes defined in the enclosing subprogram.
856
996ae0b0
RK
857 ------------------------------------
858 -- Description of Semantic Fields --
859 ------------------------------------
860
653da906
RD
861 -- The meaning of the syntactic fields is generally clear from their names
862 -- without any further description, since the names are chosen to
863 -- correspond very closely to the syntax in the reference manual. This
864 -- section describes the usage of the semantic fields, which are used to
865 -- contain additional information determined during semantic analysis.
996ae0b0 866
996ae0b0 867 -- Accept_Handler_Records (List5-Sem)
653da906
RD
868 -- This field is present only in an N_Accept_Alternative node. It is used
869 -- to temporarily hold the exception handler records from an accept
870 -- statement in a selective accept. These exception handlers will
871 -- eventually be placed in the Handler_Records list of the procedure
872 -- built for this accept (see Expand_N_Selective_Accept procedure in
873 -- Exp_Ch9 for further details).
996ae0b0
RK
874
875 -- Access_Types_To_Process (Elist2-Sem)
876 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
653da906
RD
877 -- Contains the list of access types which may require specific treatment
878 -- when the nature of the type completion is completely known. An example
3354f96d 879 -- of such treatment is the generation of the associated_final_chain.
996ae0b0
RK
880
881 -- Actions (List1-Sem)
653da906
RD
882 -- This field contains a sequence of actions that are associated with the
883 -- node holding the field. See the individual node types for details of
884 -- how this field is used, as well as the description of the specific use
885 -- for a particular node type.
996ae0b0
RK
886
887 -- Activation_Chain_Entity (Node3-Sem)
888 -- This is used in tree nodes representing task activators (blocks,
889 -- subprogram bodies, package declarations, and task bodies). It is
890 -- initially Empty, and then gets set to point to the entity for the
891 -- declared Activation_Chain variable when the first task is declared.
653da906
RD
892 -- When tasks are declared in the corresponding declarative region this
893 -- entity is located by name (its name is always _Chain) and the declared
f28573f4
ES
894 -- tasks are added to the chain. Note that N_Extended_Return_Statement
895 -- does not have this attribute, although it does have an activation
896 -- chain. This chain is used to store the tasks temporarily, and is not
897 -- used for activating them. On successful completion of the return
898 -- statement, the tasks are moved to the caller's chain, and the caller
899 -- activates them.
996ae0b0
RK
900
901 -- Acts_As_Spec (Flag4-Sem)
653da906 902 -- A flag set in the N_Subprogram_Body node for a subprogram body which
bff469f7
AC
903 -- is acting as its own spec. In the case of a library-level subprogram
904 -- the flag is set as well on the parent compilation unit node.
996ae0b0 905
e3da30b2 906 -- Actual_Designated_Subtype (Node4-Sem)
653da906
RD
907 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
908 -- needs to known the dynamic constrained subtype of the designated
bde33286
RD
909 -- object, this attribute is set to that type. This is done for
910 -- N_Free_Statements for access-to-classwide types and access to
653da906
RD
911 -- unconstrained packed array types, and for N_Explicit_Dereference when
912 -- the designated type is an unconstrained packed array and the
bde33286
RD
913 -- dereference is the prefix of a 'Size attribute reference.
914
fdce4bb7
JM
915 -- Address_Warning_Posted (Flag18-Sem)
916 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
917 -- posted a warning for the address clause regarding size or alignment
918 -- issues. Used to inhibit multiple redundant messages.
919
996ae0b0 920 -- Aggregate_Bounds (Node3-Sem)
d610088d
AC
921 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
922 -- known at compile time, this field points to an N_Range node with those
923 -- bounds. Otherwise Empty.
996ae0b0 924
3a248f7c
BD
925 -- Alloc_For_BIP_Return (Flag1-Sem)
926 -- Present in N_Allocator nodes. True if the allocator is one of those
927 -- generated for a build-in-place return statement.
928
996ae0b0 929 -- All_Others (Flag11-Sem)
21d27997
RD
930 -- Present in an N_Others_Choice node. This flag is set for an others
931 -- exception where all exceptions are to be caught, even those that are
932 -- not normally handled (in particular the tasking abort signal). This
933 -- is used for translation of the at end handler into a normal exception
934 -- handler.
996ae0b0 935
b622076c
ES
936 -- Aspect_On_Partial_View (Flag18)
937 -- Present on an N_Aspect_Specification node. For an aspect that applies
938 -- to a type entity, indicates whether the specification appears on the
939 -- partial view of a private type or extension. Undefined for aspects
940 -- that apply to other entities.
941
c159409f
AC
942 -- Aspect_Rep_Item (Node2-Sem)
943 -- Present in N_Aspect_Specification nodes. Points to the corresponding
944 -- pragma/attribute definition node used to process the aspect.
945
996ae0b0
RK
946 -- Assignment_OK (Flag15-Sem)
947 -- This flag is set in a subexpression node for an object, indicating
948 -- that the associated object can be modified, even if this would not
949 -- normally be permissible (either by direct assignment, or by being
950 -- passed as an out or in-out parameter). This is used by the expander
3354f96d 951 -- for a number of purposes, including initialization of constants and
996ae0b0
RK
952 -- limited type objects (such as tasks), setting discriminant fields,
953 -- setting tag values, etc. N_Object_Declaration nodes also have this
954 -- flag defined. Here it is used to indicate that an initialization
21d27997 955 -- expression is valid, even where it would normally not be allowed
eaed2a2c
AC
956 -- (e.g. where the type involved is limited). It is also used to stop
957 -- a Force_Evaluation call for an unchecked conversion, but this usage
958 -- is unclear and not documented ???
996ae0b0 959
3e542a58
RD
960 -- Associated_Node (Node4-Sem)
961 -- Present in nodes that can denote an entity: identifiers, character
9596236a 962 -- literals, operator symbols, expanded names, operator nodes, and
21d27997
RD
963 -- attribute reference nodes (all these nodes have an Entity field).
964 -- This field is also present in N_Aggregate, N_Selected_Component, and
653da906 965 -- N_Extension_Aggregate nodes. This field is used in generic processing
21d27997
RD
966 -- to create links between the generic template and the generic copy.
967 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
968 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
969 -- the normal function of Entity is not required at the point where the
653da906
RD
970 -- Associated_Node is set. Note also, that in generic templates, this
971 -- means that the Entity field does not necessarily point to an Entity.
972 -- Since the back end is expected to ignore generic templates, this is
973 -- harmless.
3e542a58 974
12b4d338 975 -- Atomic_Sync_Required (Flag14-Sem)
4c318253
AC
976 -- This flag is set on a node for which atomic synchronization is
977 -- required for the corresponding reference or modification.
12b4d338 978
996ae0b0 979 -- At_End_Proc (Node1)
21d27997
RD
980 -- This field is present in an N_Handled_Sequence_Of_Statements node.
981 -- It contains an identifier reference for the cleanup procedure to be
653da906 982 -- called. See description of this node for further details.
996ae0b0
RK
983
984 -- Backwards_OK (Flag6-Sem)
21d27997
RD
985 -- A flag present in the N_Assignment_Statement node. It is used only
986 -- if the type being assigned is an array type, and is set if analysis
996ae0b0 987 -- determines that it is definitely safe to do the copy backwards, i.e.
b4763f5c
AC
988 -- starting at the highest addressed element. This is the case if either
989 -- the operands do not overlap, or they may overlap, but if they do,
990 -- then the left operand is at a higher address than the right operand.
991 --
992 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
993 -- means that the front end could not determine that either direction is
994 -- definitely safe, and a runtime check may be required if the backend
995 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
996 -- set, it means that the front end can assure no overlap of operands.
996ae0b0
RK
997
998 -- Body_To_Inline (Node3-Sem)
2d180af1 999 -- Present in subprogram declarations. Denotes analyzed but unexpanded
996ae0b0
RK
1000 -- body of subprogram, to be used when inlining calls. Present when the
1001 -- subprogram has an Inline pragma and inlining is enabled. If the
88438c0e
AC
1002 -- declaration is completed by a renaming_as_body, and the renamed entity
1003 -- is a subprogram, the Body_To_Inline is the name of that entity, which
1004 -- is used directly in later calls to the original subprogram.
996ae0b0
RK
1005
1006 -- Body_Required (Flag13-Sem)
21d27997
RD
1007 -- A flag that appears in the N_Compilation_Unit node indicating that
1008 -- the corresponding unit requires a body. For the package case, this
653da906
RD
1009 -- indicates that a completion is required. In Ada 95, if the flag is not
1010 -- set for the package case, then a body may not be present. In Ada 83,
1011 -- if the flag is not set for the package case, then body is optional.
1012 -- For a subprogram declaration, the flag is set except in the case where
1013 -- a pragma Import or Interface applies, in which case no body is
1014 -- permitted (in Ada 83 or Ada 95).
996ae0b0
RK
1015
1016 -- By_Ref (Flag5-Sem)
21d27997
RD
1017 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
1018 -- this flag is set when the returned expression is already allocated on
1019 -- the secondary stack and thus the result is passed by reference rather
e3da30b2 1020 -- than copied another time.
996ae0b0 1021
36295779
AC
1022 -- Cleanup_Actions (List5-Sem)
1023 -- Present in block statements created for transient blocks, contains
1024 -- additional cleanup actions carried over from the transient scope.
1025
fbf5a39b
AC
1026 -- Check_Address_Alignment (Flag11-Sem)
1027 -- A flag present in N_Attribute_Definition clause for a 'Address
653da906
RD
1028 -- attribute definition. This flag is set if a dynamic check should be
1029 -- generated at the freeze point for the entity to which this address
1030 -- clause applies. The reason that we need this flag is that we want to
1031 -- check for range checks being suppressed at the point where the
1032 -- attribute definition clause is given, rather than testing this at the
1033 -- freeze point.
fbf5a39b 1034
e3da30b2 1035 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
33c423c8 1036 -- Present in N_Simple_Return_Statement nodes. True if this node was
21d27997 1037 -- constructed as part of the N_Extended_Return_Statement expansion.
e3da30b2 1038
996ae0b0 1039 -- Compile_Time_Known_Aggregate (Flag18-Sem)
653da906
RD
1040 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
1041 -- evaluated at compile time without raising constraint error. Such
be3416c6 1042 -- aggregates can be passed as is to the back end without any expansion.
2791be24 1043 -- See Exp_Aggr for specific conditions under which this flag gets set.
996ae0b0 1044
6fb4cdde
AC
1045 -- Componentwise_Assignment (Flag14-Sem)
1046 -- Present in N_Assignment_Statement nodes. Set for a record assignment
1047 -- where all that needs doing is to expand it into component-by-component
1048 -- assignments. This is used internally for the case of tagged types with
1049 -- rep clauses, where we need to avoid recursion (we don't want to try to
1050 -- generate a call to the primitive operation, because this is the case
1051 -- where we are compiling the primitive operation). Note that when we are
1052 -- expanding component assignments in this case, we never assign the _tag
1053 -- field, but we recursively assign components of the parent type.
1054
996ae0b0 1055 -- Condition_Actions (List3-Sem)
653da906
RD
1056 -- This field appears in else-if nodes and in the iteration scheme node
1057 -- for while loops. This field is only used during semantic processing to
21d27997
RD
1058 -- temporarily hold actions inserted into the tree. In the tree passed
1059 -- to gigi, the condition actions field is always set to No_List. For
653da906
RD
1060 -- details on how this field is used, see the routine Insert_Actions in
1061 -- package Exp_Util, and also the expansion routines for the relevant
1062 -- nodes.
996ae0b0 1063
f6256631
AC
1064 -- Context_Pending (Flag16-Sem)
1065 -- This field appears in Compilation_Unit nodes, to indicate that the
1066 -- context of the unit is being compiled. Used to detect circularities
1067 -- that are not otherwise detected by the loading mechanism. Such
1068 -- circularities can occur in the presence of limited and non-limited
1069 -- with_clauses that mention the same units.
1070
996ae0b0 1071 -- Controlling_Argument (Node1-Sem)
21d27997
RD
1072 -- This field is set in procedure and function call nodes if the call
1073 -- is a dispatching call (it is Empty for a non-dispatching call). It
653da906
RD
1074 -- indicates the source of the call's controlling tag. For procedure
1075 -- calls, the Controlling_Argument is one of the actuals. For function
1076 -- that has a dispatching result, it is an entity in the context of the
21d27997
RD
1077 -- call that can provide a tag, or else it is the tag of the root type
1078 -- of the class. It can also specify a tag directly rather than being a
653da906
RD
1079 -- tagged object. The latter is needed by the implementations of AI-239
1080 -- and AI-260.
996ae0b0
RK
1081
1082 -- Conversion_OK (Flag14-Sem)
21d27997
RD
1083 -- A flag set on type conversion nodes to indicate that the conversion
1084 -- is to be considered as being valid, even though it is the case that
1085 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
1086 -- Fixed_Value and Integer_Value, for internal conversions done for
653da906
RD
1087 -- fixed-point operations, and for certain conversions for calls to
1088 -- initialization procedures. If Conversion_OK is set, then Etype must be
1089 -- set (the analyzer assumes that Etype has been set). For the case of
1090 -- fixed-point operands, it also indicates that the conversion is to be
1091 -- direct conversion of the underlying integer result, with no regard to
1092 -- the small operand.
996ae0b0 1093
fc142f63
AC
1094 -- Convert_To_Return_False (Flag13-Sem)
1095 -- Present in N_Raise_Expression nodes that appear in the body of the
1096 -- special predicateM function used to test a predicate in the context
1097 -- of a membership test, where raise expression results in returning a
1098 -- value of False rather than raising an exception.
1099
ba759acd
AC
1100 -- Corresponding_Aspect (Node3-Sem)
1101 -- Present in N_Pragma node. Used to point back to the source aspect from
1102 -- the corresponding pragma. This field is Empty for source pragmas.
1103
996ae0b0 1104 -- Corresponding_Body (Node5-Sem)
fbf5a39b 1105 -- This field is set in subprogram declarations, package declarations,
4fdebd93
AC
1106 -- entry declarations of protected types, and in generic units. It points
1107 -- to the defining entity for the corresponding body (NOT the node for
1108 -- the body itself).
996ae0b0 1109
82c80734 1110 -- Corresponding_Formal_Spec (Node3-Sem)
e3da30b2
RD
1111 -- This field is set in subprogram renaming declarations, where it points
1112 -- to the defining entity for a formal subprogram in the case where the
1113 -- renaming corresponds to a generic formal subprogram association in an
1114 -- instantiation. The field is Empty if the renaming does not correspond
1115 -- to such a formal association.
82c80734 1116
996ae0b0
RK
1117 -- Corresponding_Generic_Association (Node5-Sem)
1118 -- This field is defined for object declarations and object renaming
1119 -- declarations. It is set for the declarations within an instance that
cff7b62c
PT
1120 -- map generic formals to their actuals. If set, the field points either
1121 -- to a copy of a default expression for an actual of mode IN or to a
1122 -- generic_association which is the original parent of the expression or
1123 -- name appearing in the declaration. This simplifies ASIS and GNATprove
1124 -- queries.
996ae0b0
RK
1125
1126 -- Corresponding_Integer_Value (Uint4-Sem)
1127 -- This field is set in real literals of fixed-point types (it is not
1128 -- used for floating-point types). It contains the integer value used
1129 -- to represent the fixed-point value. It is also set on the universal
1130 -- real literals used to represent bounds of fixed-point base types
1131 -- and their first named subtypes.
1132
1133 -- Corresponding_Spec (Node5-Sem)
1134 -- This field is set in subprogram, package, task, and protected body
1135 -- nodes, where it points to the defining entity in the corresponding
21d27997
RD
1136 -- spec. The attribute is also set in N_With_Clause nodes where it points
1137 -- to the defining entity for the with'ed spec, and in a subprogram
1138 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
1139 -- if there is no corresponding spec, as in the case of a subprogram body
1140 -- that serves as its own spec.
8a06151a 1141 --
5328a91d 1142 -- In Ada 2012, Corresponding_Spec is set on expression functions that
d2d4b355 1143 -- complete a subprogram declaration.
996ae0b0 1144
e28072cd 1145 -- Corresponding_Spec_Of_Stub (Node2-Sem)
d63199d8 1146 -- This field is present in subprogram, package, task, and protected body
e28072cd
AC
1147 -- stubs where it points to the corresponding spec of the stub. Due to
1148 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
1149
996ae0b0
RK
1150 -- Corresponding_Stub (Node3-Sem)
1151 -- This field is present in an N_Subunit node. It holds the node in
3354f96d 1152 -- the parent unit that is the stub declaration for the subunit. It is
996ae0b0
RK
1153 -- set when analysis of the stub forces loading of the proper body. If
1154 -- expansion of the proper body creates new declarative nodes, they are
1155 -- inserted at the point of the corresponding_stub.
1156
1157 -- Dcheck_Function (Node5-Sem)
1158 -- This field is present in an N_Variant node, It references the entity
1159 -- for the discriminant checking function for the variant.
1160
996ae0b0 1161 -- Default_Expression (Node5-Sem)
653da906
RD
1162 -- This field is Empty if there is no default expression. If there is a
1163 -- simple default expression (one with no side effects), then this field
1164 -- simply contains a copy of the Expression field (both point to the tree
1165 -- for the default expression). Default_Expression is used for
1166 -- conformance checking.
996ae0b0 1167
fab2daeb
AC
1168 -- Default_Storage_Pool (Node3-Sem)
1169 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
1170 -- copy of Opt.Default_Pool at the end of the compilation unit. See
1171 -- package Opt for details. This is used for inheriting the
1172 -- Default_Storage_Pool in child units.
1173
996ae0b0
RK
1174 -- Discr_Check_Funcs_Built (Flag11-Sem)
1175 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
1176 -- discriminant checking functions are constructed. The purpose is to
1177 -- avoid attempting to set these functions more than once.
1178
996ae0b0
RK
1179 -- Do_Accessibility_Check (Flag13-Sem)
1180 -- This flag is set on N_Parameter_Specification nodes to indicate
1181 -- that an accessibility check is required for the parameter. It is
1182 -- not yet decided who takes care of this check (TBD ???).
1183
90e491a7 1184 -- Do_Discriminant_Check (Flag3-Sem)
996ae0b0
RK
1185 -- This flag is set on N_Selected_Component nodes to indicate that a
1186 -- discriminant check is required using the discriminant check routine
fbf5a39b 1187 -- associated with the selector. The actual check is generated by the
03eb6036
AC
1188 -- expander when processing selected components. In the case of
1189 -- Unchecked_Union, the flag is also set, but no discriminant check
1190 -- routine is associated with the selector, and the expander does not
8d81fb4e
AC
1191 -- generate a check. This flag is also present in assignment statements
1192 -- (and set if the assignment requires a discriminant check), and in type
1193 -- conversion nodes (and set if the conversion requires a check).
996ae0b0
RK
1194
1195 -- Do_Division_Check (Flag13-Sem)
ae3f6530
EB
1196 -- This flag is set on a division operator (/ mod rem) to indicate that
1197 -- a zero divide check is required. The actual check is either dealt with
1198 -- by the back end if Backend_Divide_Checks is set to true, or by the
1199 -- front end itself if it is set to false.
996ae0b0
RK
1200
1201 -- Do_Length_Check (Flag4-Sem)
1202 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1203 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1204 -- is required. It is not determined who deals with this flag (???).
1205
1206 -- Do_Overflow_Check (Flag17-Sem)
653da906 1207 -- This flag is set on an operator where an overflow check is required on
ae3f6530
EB
1208 -- the operation. The actual check is either dealt with by the back end
1209 -- if Backend_Overflow_Checks is set to true, or by the front end itself
1210 -- if it is set to false. The other cases where this flag is used is on a
1211 -- Type_Conversion node as well on if and case expression nodes.
653da906
RD
1212 -- For a type conversion, it means that the conversion is from one base
1213 -- type to another, and the value may not fit in the target base type.
ae3f6530 1214 -- See also the description of Do_Range_Check for this case. This flag is
9b16cb57 1215 -- also set on if and case expression nodes if we are operating in either
4b1c4f20
RD
1216 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1217 -- properly process overflow checking for dependent expressions).
996ae0b0
RK
1218
1219 -- Do_Range_Check (Flag9-Sem)
21d27997
RD
1220 -- This flag is set on an expression which appears in a context where a
1221 -- range check is required. The target type is clear from the context.
1222 -- The contexts in which this flag can appear are the following:
996ae0b0 1223
ae3f6530
EB
1224 -- Right side of an assignment. In this case the target type is taken
1225 -- from the left side of the assignment, which is referenced by the
1226 -- Name of the N_Assignment_Statement node.
996ae0b0
RK
1227
1228 -- Subscript expressions in an indexed component. In this case the
1229 -- target type is determined from the type of the array, which is
1230 -- referenced by the Prefix of the N_Indexed_Component node.
1231
653da906
RD
1232 -- Argument expression for a parameter, appearing either directly in
1233 -- the Parameter_Associations list of a call or as the Expression of an
1234 -- N_Parameter_Association node that appears in this list. In either
1235 -- case, the check is against the type of the formal. Note that the
1236 -- flag is relevant only in IN and IN OUT parameters, and will be
1237 -- ignored for OUT parameters, where no check is required in the call,
1238 -- and if a check is required on the return, it is generated explicitly
1239 -- with a type conversion.
996ae0b0
RK
1240
1241 -- Initialization expression for the initial value in an object
1242 -- declaration. In this case the Do_Range_Check flag is set on
1243 -- the initialization expression, and the check is against the
7b536495
AC
1244 -- range of the type of the object being declared. This includes the
1245 -- cases of expressions providing default discriminant values, and
1246 -- expressions used to initialize record components.
996ae0b0 1247
653da906
RD
1248 -- The expression of a type conversion. In this case the range check is
1249 -- against the target type of the conversion. See also the use of
1250 -- Do_Overflow_Check on a type conversion. The distinction is that the
1251 -- overflow check protects against a value that is outside the range of
1252 -- the target base type, whereas a range check checks that the
1253 -- resulting value (which is a value of the base type of the target
1254 -- type), satisfies the range constraint of the target type.
996ae0b0
RK
1255
1256 -- Note: when a range check is required in contexts other than those
1257 -- listed above (e.g. in a return statement), an additional type
1258 -- conversion node is introduced to represent the required check.
1259
1260 -- Do_Storage_Check (Flag17-Sem)
1261 -- This flag is set in an N_Allocator node to indicate that a storage
653da906 1262 -- check is required for the allocation, or in an N_Subprogram_Body node
d6cd5d34 1263 -- to indicate that a stack check is required in the subprogram prologue.
653da906
RD
1264 -- The N_Allocator case is handled by the routine that expands the call
1265 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1266 -- backend, and all the semantics does is set the flag.
996ae0b0
RK
1267
1268 -- Do_Tag_Check (Flag13-Sem)
1269 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
e3da30b2 1270 -- N_Procedure_Call_Statement, N_Type_Conversion,
33c423c8 1271 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
996ae0b0
RK
1272 -- node to indicate that the tag check can be suppressed. It is not
1273 -- yet decided how this flag is used (TBD ???).
1274
1275 -- Elaborate_Present (Flag4-Sem)
bde33286
RD
1276 -- This flag is set in the N_With_Clause node to indicate that pragma
1277 -- Elaborate pragma appears for the with'ed units.
1278
1279 -- Elaborate_All_Desirable (Flag9-Sem)
1280 -- This flag is set in the N_With_Clause mode to indicate that the static
1281 -- elaboration processing has determined that an Elaborate_All pragma is
1282 -- desirable for correct elaboration for this unit.
996ae0b0 1283
555360a5 1284 -- Elaborate_All_Present (Flag14-Sem)
996ae0b0
RK
1285 -- This flag is set in the N_With_Clause node to indicate that a
1286 -- pragma Elaborate_All pragma appears for the with'ed units.
1287
bde33286
RD
1288 -- Elaborate_Desirable (Flag11-Sem)
1289 -- This flag is set in the N_With_Clause mode to indicate that the static
1290 -- elaboration processing has determined that an Elaborate pragma is
1291 -- desirable for correct elaboration for this unit.
1292
996ae0b0 1293 -- Else_Actions (List3-Sem)
9b16cb57 1294 -- This field is present in if expression nodes. During code
996ae0b0
RK
1295 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1296 -- actions at an appropriate place in the tree to get elaborated at the
9b16cb57
RD
1297 -- right time. For if expressions, we have to be sure that the actions
1298 -- for the Else branch are only elaborated if the condition is False.
1299 -- The Else_Actions field is used as a temporary parking place for
653da906
RD
1300 -- these actions. The final tree is always rewritten to eliminate the
1301 -- need for this field, so in the tree passed to Gigi, this field is
1302 -- always set to No_List.
996ae0b0
RK
1303
1304 -- Enclosing_Variant (Node2-Sem)
21d27997
RD
1305 -- This field is present in the N_Variant node and identifies the Node_Id
1306 -- corresponding to the immediately enclosing variant when the variant is
1307 -- nested, and N_Empty otherwise. Set during semantic processing of the
1308 -- variant part of a record type.
996ae0b0
RK
1309
1310 -- Entity (Node4-Sem)
ac4d6407
RD
1311 -- Appears in all direct names (identifiers, character literals, and
1312 -- operator symbols), as well as expanded names, and attributes that
1313 -- denote entities, such as 'Class. Points to entity for corresponding
1314 -- defining occurrence. Set after name resolution. For identifiers in a
1315 -- WITH list, the corresponding defining occurrence is in a separately
1316 -- compiled file, and Entity must be set by the library Load procedure.
1317 --
1318 -- Note: During name resolution, the value in Entity may be temporarily
1319 -- incorrect (e.g. during overload resolution, Entity is initially set to
1320 -- the first possible correct interpretation, and then later modified if
1321 -- necessary to contain the correct value after resolution).
1322 --
1323 -- Note: This field overlaps Associated_Node, which is used during
1324 -- generic processing (see Sem_Ch12 for details). Note also that in
1325 -- generic templates, this means that the Entity field does not always
1326 -- point to an Entity. Since the back end is expected to ignore generic
1327 -- templates, this is harmless.
1328 --
1329 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1330 -- It is used only for stream attributes definition clauses. In this
1331 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1332 -- conceptually at the point of the clause. Thus the visibility of the
1333 -- attribute definition clause (in the sense of 8.3(23) as amended by
1334 -- AI-195) can be checked by testing the visibility of that subprogram.
1335 --
1336 -- Note: Normally the Entity field of an identifier points to the entity
1337 -- for the corresponding defining identifier, and hence the Chars field
1338 -- of an identifier will match the Chars field of the entity. However,
1339 -- there is no requirement that these match, and there are obscure cases
1340 -- of generated code where they do not match.
9596236a 1341
646e2823
AC
1342 -- Note: Ada 2012 aspect specifications require additional links between
1343 -- identifiers and various attributes. These attributes can be of
1344 -- arbitrary types, and the entity field of identifiers that denote
1345 -- aspects must be used to store arbitrary expressions for later semantic
1346 -- checks. See section on aspect specifications for details.
822868aa 1347
9596236a 1348 -- Entity_Or_Associated_Node (Node4-Sem)
653da906
RD
1349 -- A synonym for both Entity and Associated_Node. Used by convention in
1350 -- the code when referencing this field in cases where it is not known
1351 -- whether the field contains an Entity or an Associated_Node.
996ae0b0
RK
1352
1353 -- Etype (Node5-Sem)
653da906
RD
1354 -- Appears in all expression nodes, all direct names, and all entities.
1355 -- Points to the entity for the related type. Set after type resolution.
1356 -- Normally this is the actual subtype of the expression. However, in
1357 -- certain contexts such as the right side of an assignment, subscripts,
1358 -- arguments to calls, returned value in a function, initial value etc.
1359 -- it is the desired target type. In the event that this is different
1360 -- from the actual type, the Do_Range_Check flag will be set if a range
1361 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1362 -- points to an essentially arbitrary choice from the possible set of
1363 -- types.
996ae0b0 1364
0712790c 1365 -- Exception_Junk (Flag8-Sem)
653da906
RD
1366 -- This flag is set in a various nodes appearing in a statement sequence
1367 -- to indicate that the corresponding node is an artifact of the
1368 -- generated code for exception handling, and should be ignored when
1369 -- analyzing the control flow of the relevant sequence of statements
1370 -- (e.g. to check that it does not end with a bad return statement).
996ae0b0 1371
f28573f4
ES
1372 -- Exception_Label (Node5-Sem)
1373 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1374 -- to be used for transforming the corresponding exception into a goto,
1375 -- or contains Empty, if this exception is not to be transformed. Also
1376 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1377 -- that there may be a local raise for the handler, so that expansion
1378 -- to allow a goto is required (and this field contains the label for
1379 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1380
996ae0b0 1381 -- Expansion_Delayed (Flag11-Sem)
653da906 1382 -- Set on aggregates and extension aggregates that need a top-down rather
36c73552 1383 -- than bottom-up expansion. Typically aggregate expansion happens bottom
653da906
RD
1384 -- up. For nested aggregates the expansion is delayed until the enclosing
1385 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1386 -- delay it we set this flag. This is done to avoid creating a temporary
d4dfb005 1387 -- for each level of a nested aggregate, and also to prevent the
653da906 1388 -- premature generation of constraint checks. This is also a requirement
d4dfb005 1389 -- if we want to generate the proper attachment to the internal????
653da906
RD
1390 -- finalization lists (for record with controlled components). Top down
1391 -- expansion of aggregates is also used for in-place array aggregate
1392 -- assignment or initialization. When the full context is known, the
1393 -- target of the assignment or initialization is used to generate the
1394 -- left-hand side of individual assignment to each sub-component.
996ae0b0 1395
f63d601b
HK
1396 -- Expression_Copy (Node2-Sem)
1397 -- Present in N_Pragma_Argument_Association nodes. Contains a copy of the
1398 -- original expression. This field is best used to store pragma-dependent
1399 -- modifications performed on the original expression such as replacement
1400 -- of the current type instance or substitutions of primitives.
1401
996ae0b0 1402 -- First_Inlined_Subprogram (Node3-Sem)
21d27997
RD
1403 -- Present in the N_Compilation_Unit node for the main program. Points
1404 -- to a chain of entities for subprograms that are to be inlined. The
996ae0b0 1405 -- Next_Inlined_Subprogram field of these entities is used as a link
21d27997
RD
1406 -- pointer with Empty marking the end of the list. This field is Empty
1407 -- if there are no inlined subprograms or inlining is not active.
996ae0b0
RK
1408
1409 -- First_Named_Actual (Node4-Sem)
653da906
RD
1410 -- Present in procedure call statement and function call nodes, and also
1411 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1412 -- named parameter where parameters are ordered by declaration order (as
1413 -- opposed to the actual order in the call which may be different due to
1414 -- named associations). Note: this field points to the explicit actual
1415 -- parameter itself, not the N_Parameter_Association node (its parent).
996ae0b0
RK
1416
1417 -- First_Real_Statement (Node2-Sem)
1418 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
653da906
RD
1419 -- Empty. Used only when declarations are moved into the statement part
1420 -- of a construct as a result of wrapping an AT END handler that is
1421 -- required to cover the declarations. In this case, this field is used
1422 -- to remember the location in the statements list of the first real
1423 -- statement, i.e. the statement that used to be first in the statement
1424 -- list before the declarations were prepended.
996ae0b0
RK
1425
1426 -- First_Subtype_Link (Node5-Sem)
653da906 1427 -- Present in N_Freeze_Entity node for an anonymous base type that is
21d27997
RD
1428 -- implicitly created by the declaration of a first subtype. It points
1429 -- to the entity for the first subtype.
996ae0b0
RK
1430
1431 -- Float_Truncate (Flag11-Sem)
653da906
RD
1432 -- A flag present in type conversion nodes. This is used for float to
1433 -- integer conversions where truncation is required rather than rounding.
996ae0b0
RK
1434
1435 -- Forwards_OK (Flag5-Sem)
21d27997
RD
1436 -- A flag present in the N_Assignment_Statement node. It is used only
1437 -- if the type being assigned is an array type, and is set if analysis
996ae0b0 1438 -- determines that it is definitely safe to do the copy forwards, i.e.
b4763f5c
AC
1439 -- starting at the lowest addressed element. This is the case if either
1440 -- the operands do not overlap, or they may overlap, but if they do,
1441 -- then the left operand is at a lower address than the right operand.
1442 --
1443 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1444 -- means that the front end could not determine that either direction is
1445 -- definitely safe, and a runtime check may be required if the backend
1446 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1447 -- set, it means that the front end can assure no overlap of operands.
996ae0b0 1448
0f1a6a0b
AC
1449 -- From_Aspect_Specification (Flag13-Sem)
1450 -- Processing of aspect specifications typically results in insertion in
1451 -- the tree of corresponding pragma or attribute definition clause nodes.
1452 -- These generated nodes have the From_Aspect_Specification flag set to
1453 -- indicate that they came from aspect specifications originally.
1454
d9f86c0c
RD
1455 -- From_At_End (Flag4-Sem)
1456 -- This flag is set on an N_Raise_Statement node if it corresponds to
1457 -- the reraise statement generated as the last statement of an AT END
1458 -- handler when SJLJ exception handling is active. It is used to stop
1459 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1460 -- because if the restriction is set, the reraise is not generated.
1461
996ae0b0
RK
1462 -- From_At_Mod (Flag4-Sem)
1463 -- This flag is set on the attribute definition clause node that is
1464 -- generated by a transformation of an at mod phrase in a record
653da906
RD
1465 -- representation clause. This is used to give slightly different (Ada 83
1466 -- compatible) semantics to such a clause, namely it is used to specify a
1467 -- minimum acceptable alignment for the base type and all subtypes. In
1468 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1469 -- must be a multiple of the given value, and the representation clause
1470 -- is considered to be type specific instead of subtype specific.
996ae0b0 1471
414c6563
AC
1472 -- From_Conditional_Expression (Flag1-Sem)
1473 -- This flag is set on if and case statements generated by the expansion
1474 -- of if and case expressions respectively. The flag is used to suppress
1475 -- any finalization of controlled objects found within these statements.
1476
6d11af89 1477 -- From_Default (Flag6-Sem)
653da906
RD
1478 -- This flag is set on the subprogram renaming declaration created in an
1479 -- instance for a formal subprogram, when the formal is declared with a
1480 -- box, and there is no explicit actual. If the flag is present, the
1481 -- declaration is treated as an implicit reference to the formal in the
1482 -- ali file.
6d11af89 1483
5f50020a 1484 -- Generalized_Indexing (Node4-Sem)
32bba3c9
AC
1485 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1486 -- that are Ada 2012 container indexing operations. The value of the
1487 -- attribute is a function call (possibly dereferenced) that corresponds
1488 -- to the proper expansion of the source indexing operation. Before
1489 -- expansion, the source node is rewritten as the resolved generalized
1490 -- indexing. In ASIS mode, the expansion does not take place, so that
1491 -- the source is preserved and properly annotated with types.
5f50020a 1492
996ae0b0 1493 -- Generic_Parent (Node5-Sem)
e3da30b2 1494 -- Generic_Parent is defined on declaration nodes that are instances. The
653da906 1495 -- value of Generic_Parent is the generic entity from which the instance
bad0a3df 1496 -- is obtained.
996ae0b0
RK
1497
1498 -- Generic_Parent_Type (Node4-Sem)
653da906
RD
1499 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1500 -- actuals of formal private and derived types. Within the instance, the
1501 -- operations on the actual are those inherited from the parent. For a
1502 -- formal private type, the parent type is the generic type itself. The
1503 -- Generic_Parent_Type is also used in an instance to determine whether a
1504 -- private operation overrides an inherited one.
996ae0b0
RK
1505
1506 -- Handler_List_Entry (Node2-Sem)
1507 -- This field is present in N_Object_Declaration nodes. It is set only
1508 -- for the Handler_Record entry generated for an exception in zero cost
1509 -- exception handling mode. It references the corresponding item in the
1510 -- handler list, and is used to delete this entry if the corresponding
1511 -- handler is deleted during optimization. For further details on why
1512 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1513
b0d71355
HK
1514 -- Has_Dereference_Action (Flag13-Sem)
1515 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1516 -- indicate that the expansion has aready produced a call to primitive
1517 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1518 -- Such dereference actions are produced for debugging purposes.
1519
052e0603 1520 -- Has_Dynamic_Length_Check (Flag10-Sem)
0580d807 1521 -- This flag is present in all expression nodes. It is set to indicate
052e0603
AC
1522 -- that one of the routines in unit Checks has generated a length check
1523 -- action which has been inserted at the flagged node. This is used to
1524 -- avoid the generation of duplicate checks.
1525
1526 -- Has_Dynamic_Range_Check (Flag12-Sem)
1527 -- This flag is present in N_Subtype_Declaration nodes and on all
1528 -- expression nodes. It is set to indicate that one of the routines in
1529 -- unit Checks has generated a range check action which has been inserted
1530 -- at the flagged node. This is used to avoid the generation of duplicate
0580d807
AC
1531 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1532 -- it mean in that context???
052e0603 1533
f1c952af
RD
1534 -- Has_Local_Raise (Flag8-Sem)
1535 -- Present in exception handler nodes. Set if the handler can be entered
1536 -- via a local raise that gets transformed to a goto statement. This will
1537 -- always be set if Local_Raise_Statements is non-empty, but can also be
1538 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1539 -- nodes requiring generation of back end checks.
1540
996ae0b0 1541 -- Has_No_Elaboration_Code (Flag17-Sem)
653da906
RD
1542 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1543 -- or not elaboration code is present for this unit. It is initially set
1544 -- true for subprogram specs and bodies and for all generic units and
1545 -- false for non-generic package specs and bodies. Gigi may set the flag
1546 -- in the non-generic package case if it determines that no elaboration
1547 -- code is generated. Note that this flag is not related to the
1548 -- Is_Preelaborated status, there can be preelaborated packages that
ac4d6407 1549 -- generate elaboration code, and non-preelaborated packages which do
653da906 1550 -- not generate elaboration code.
996ae0b0 1551
c775c209
AC
1552 -- Has_Pragma_Suppress_All (Flag14-Sem)
1553 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
308e6f3a 1554 -- pragma appears anywhere in the unit. This accommodates the rather
c775c209
AC
1555 -- strange placement rules of other compilers (DEC permits it at the
1556 -- end of a unit, and Rational allows it as a program unit pragma). We
1557 -- allow it anywhere at all, and consider it equivalent to a pragma
1558 -- Suppress (All_Checks) appearing at the start of the configuration
1559 -- pragmas for the unit.
1560
996ae0b0 1561 -- Has_Private_View (Flag11-Sem)
653da906
RD
1562 -- A flag present in generic nodes that have an entity, to indicate that
1563 -- the node has a private type. Used to exchange private and full
1564 -- declarations if the visibility at instantiation is different from the
1565 -- visibility at generic definition.
996ae0b0 1566
21d27997
RD
1567 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1568 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1569 -- flag the presence of a pragma Relative_Deadline.
1570
e3da30b2
RD
1571 -- Has_Self_Reference (Flag13-Sem)
1572 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1573 -- of the expressions contains an access attribute reference to the
1574 -- enclosing type. Such a self-reference can only appear in default-
1575 -- initialized aggregate for a record type.
1576
15918371
AC
1577 -- Has_SP_Choice (Flag15-Sem)
1578 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1579 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1580 -- True if the Discrete_Choices list has at least one occurrence of a
1581 -- statically predicated subtype.
1582
996ae0b0 1583 -- Has_Storage_Size_Pragma (Flag5-Sem)
653da906
RD
1584 -- A flag present in an N_Task_Definition node to flag the presence of a
1585 -- Storage_Size pragma.
996ae0b0 1586
d43584ca
AC
1587 -- Has_Target_Names (Flag8-Sem)
1588 -- Present in assignment statements. Indicates that the RHS contains
1589 -- target names (see AI12-0125-3) and must be expanded accordingly.
1590
996ae0b0 1591 -- Has_Wide_Character (Flag11-Sem)
653da906 1592 -- Present in string literals, set if any wide character (i.e. character
fd22cd21
RD
1593 -- code outside the Character range but within Wide_Character range)
1594 -- appears in the string. Used to implement pragma preference rules.
1595
1596 -- Has_Wide_Wide_Character (Flag13-Sem)
1597 -- Present in string literals, set if any wide character (i.e. character
1598 -- code outside the Wide_Character range) appears in the string. Used to
1599 -- implement pragma preference rules.
996ae0b0 1600
ca20a08e
AC
1601 -- Header_Size_Added (Flag11-Sem)
1602 -- Present in N_Attribute_Reference nodes, set only for attribute
1603 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1604 -- hidden list header used by the runtime finalization support has been
1605 -- added to the size of the prefix. The flag also prevents the infinite
1606 -- expansion of the same attribute in the said context.
1607
851e9f19 1608 -- Hidden_By_Use_Clause (Elist5-Sem)
94ce4941
HK
1609 -- An entity list present in use clauses that appear within
1610 -- instantiations. For the resolution of local entities, entities
1611 -- introduced by these use clauses have priority over global ones,
1612 -- and outer entities must be explicitly hidden/restored on exit.
996ae0b0 1613
fbf5a39b 1614 -- Implicit_With (Flag16-Sem)
94ce4941
HK
1615 -- Present in N_With_Clause nodes. The flag indicates that the clause
1616 -- does not comes from source and introduces an implicit dependency on
1617 -- a particular unit. Such implicit with clauses are generated by:
1618 --
1619 -- * ABE mechanism - The static elaboration model of both the default
1620 -- and the legacy ABE mechanism use with clauses to encode implicit
1621 -- Elaborate[_All] pragmas.
1622 --
1623 -- * Analysis - A with clause for child unit A.B.C is equivalent to
1624 -- a series of clauses that with A, A.B, and A.B.C. Manipulation of
1625 -- contexts utilizes implicit with clauses to emulate the visibility
1626 -- of a particular unit.
1627 --
1628 -- * RTSfind - The compiler generates code which references entities
1629 -- from the runtime.
cf5ba8a8 1630
c28408b7 1631 -- Import_Interface_Present (Flag16-Sem)
94ce4941
HK
1632 -- This flag is set in an Interface or Import pragma if a matching
1633 -- pragma of the other kind is also present. This is used to avoid
1634 -- generating some unwanted error messages.
c28408b7 1635
996ae0b0 1636 -- Includes_Infinities (Flag11-Sem)
653da906
RD
1637 -- This flag is present in N_Range nodes. It is set for the range of
1638 -- unconstrained float types defined in Standard, which include not only
3354f96d 1639 -- the given range of values, but also legitimately can include infinite
653da906
RD
1640 -- values. This flag is false for any float type for which an explicit
1641 -- range is given by the programmer, even if that range is identical to
1642 -- the range for Float.
996ae0b0 1643
daff5ab7
AC
1644 -- Incomplete_View (Node2-Sem)
1645 -- Present in full type declarations that are completions of incomplete
1646 -- type declarations. Denotes the corresponding incomplete type
1647 -- declaration. Used to simplify the retrieval of primitive operations
1648 -- that may be declared between the partial and the full view of an
1649 -- untagged type.
1650
f104fca1
AC
1651 -- Inherited_Discriminant (Flag13-Sem)
1652 -- This flag is present in N_Component_Association nodes. It indicates
1653 -- that a given component association in an extension aggregate is the
1654 -- value obtained from a constraint on an ancestor. Used to prevent
1655 -- double expansion when the aggregate has expansion delayed.
1656
996ae0b0
RK
1657 -- Instance_Spec (Node5-Sem)
1658 -- This field is present in generic instantiation nodes, and also in
1659 -- formal package declaration nodes (formal package declarations are
653da906
RD
1660 -- treated in a manner very similar to package instantiations). It points
1661 -- to the node for the spec of the instance, inserted as part of the
1662 -- semantic processing for instantiations in Sem_Ch12.
996ae0b0 1663
bb072d1c
AC
1664 -- Is_Abort_Block (Flag4-Sem)
1665 -- Present in N_Block_Statement nodes. True if the block protects a list
1666 -- of statements with an Abort_Defer / Abort_Undefer_Direct pair.
1667
36504e5f 1668 -- Is_Accessibility_Actual (Flag13-Sem)
75a64833
AC
1669 -- Present in N_Parameter_Association nodes. True if the parameter is
1670 -- an extra actual that carries the accessibility level of the actual
1671 -- for an access parameter, in a function that dispatches on result and
1672 -- is called in a dispatching context. Used to prevent a formal/actual
1673 -- mismatch when the call is rewritten as a dispatching call.
1674
2ba4f1fb
AC
1675 -- Is_Analyzed_Pragma (Flag5-Sem)
1676 -- Present in N_Pragma nodes. Set for delayed pragmas that require a two
1677 -- step analysis. The initial step is peformed by routine Analyze_Pragma
1678 -- and verifies the overall legality of the pragma. The second step takes
1679 -- place in the various Analyze_xxx_In_Decl_Part routines which perform
1680 -- full analysis. The flag prevents the reanalysis of a delayed pragma.
1681
996ae0b0
RK
1682 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1683 -- A flag set in a Block_Statement node to indicate that it is the
653da906
RD
1684 -- expansion of an asynchronous entry call. Such a block needs cleanup
1685 -- handler to assure that the call is cancelled.
996ae0b0 1686
6bb88533
AC
1687 -- Is_Boolean_Aspect (Flag16-Sem)
1688 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1689 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1690
7fe6c026
RD
1691 -- Is_Checked (Flag11-Sem)
1692 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1693 -- assertion aspect or pragma, or check pragma for an assertion, that
3699edc4 1694 -- is to be checked at run time. If either Is_Checked or Is_Ignored
7fe6c026
RD
1695 -- is set (they cannot both be set), then this means that the status of
1696 -- the pragma has been checked at the appropriate point and should not
1697 -- be further modified (in some cases these flags are copied when a
1698 -- pragma is rewritten).
1699
d65a80fd
HK
1700 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
1701 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1702 -- related to a checked Ghost entity or encloses a checked Ghost entity.
1703 -- This flag has no relation to Is_Checked.
1704
996ae0b0
RK
1705 -- Is_Component_Left_Opnd (Flag13-Sem)
1706 -- Is_Component_Right_Opnd (Flag14-Sem)
1707 -- Present in concatenation nodes, to indicate that the corresponding
1708 -- operand is of the component type of the result. Used in resolving
1709 -- concatenation nodes in instances.
1710
caf07df9 1711 -- Is_Controlling_Actual (Flag16-Sem)
877a5a12 1712 -- This flag is set on an expression that is a controlling argument in
caf07df9
AC
1713 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1714 -- details of its use.
1715
90e491a7
PMR
1716 -- Is_Declaration_Level_Node (Flag5-Sem)
1717 -- Present in call marker and instantiation nodes. Set when the constuct
1718 -- appears within the declarations of a block statement, an entry body,
1719 -- a subprogram body, or a task body. The flag aids the ABE Processing
1720 -- phase to catch certain forms of guaranteed ABEs.
1721
c159409f
AC
1722 -- Is_Delayed_Aspect (Flag14-Sem)
1723 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1724 -- come from aspect specifications, where the evaluation of the aspect
47e11d08
AC
1725 -- must be delayed to the freeze point. This flag is also set True in
1726 -- the corresponding N_Aspect_Specification node.
c159409f 1727
aab45d22
AC
1728 -- Is_Disabled (Flag15-Sem)
1729 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1730 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1731 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1732 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1733 -- If this flag is set, the aspect or policy is not analyzed for semantic
1734 -- correctness, so any expressions etc will not be marked as analyzed.
1735
7fb62ca1 1736 -- Is_Dispatching_Call (Flag6-Sem)
90e491a7
PMR
1737 -- Present in call marker nodes. Set when the related call which prompted
1738 -- the creation of the marker is dispatching.
1739
33c423c8
AC
1740 -- Is_Dynamic_Coextension (Flag18-Sem)
1741 -- Present in allocator nodes, to indicate that this is an allocator
1742 -- for an access discriminant of a dynamically allocated object. The
1743 -- coextension must be deallocated and finalized at the same time as
7ffe26fc
JM
1744 -- the enclosing object. The partner flag Is_Static_Coextension must
1745 -- be cleared before setting this flag to True.
33c423c8 1746
851e9f19
PMR
1747 -- Is_Effective_Use_Clause (Flag1-Sem)
1748 -- Present in both N_Use_Type_Clause and N_Use_Package_Clause to indicate
1749 -- a use clause is "used" in the current source.
1750
90e491a7 1751 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7fb62ca1
HK
1752 -- Present in the following nodes:
1753 --
1754 -- assignment statement
1755 -- attribute reference
1756 -- call marker
1757 -- entry call statement
1758 -- expanded name
1759 -- function call
1760 -- function instantiation
1761 -- identifier
1762 -- package instantiation
1763 -- procedure call statement
1764 -- procedure instantiation
1765 -- requeue statement
69e6ee2f 1766 -- variable reference marker
7fb62ca1
HK
1767 --
1768 -- Set when the node appears within a context which allows the generation
1769 -- of run-time ABE checks. This flag detemines whether the ABE Processing
90e491a7
PMR
1770 -- phase generates conditional ABE checks and guaranteed ABE failures.
1771
8dce7371
PMR
1772 -- Is_Elaboration_Code (Flag9-Sem)
1773 -- Present in assignment statements. Set for an assignment which updates
1774 -- the elaboration flag of a package or subprogram when the corresponding
1775 -- body is successfully elaborated.
1776
7fb62ca1
HK
1777 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
1778 -- Present in the following nodes:
1779 --
162ed06f 1780 -- attribute reference
7fb62ca1
HK
1781 -- call marker
1782 -- entry call statement
69e6ee2f 1783 -- expanded name
7fb62ca1
HK
1784 -- function call
1785 -- function instantiation
69e6ee2f 1786 -- identifier
7fb62ca1
HK
1787 -- package instantiation
1788 -- procedure call statement
1789 -- procedure instantiation
1790 -- requeue statement
69e6ee2f 1791 -- variable reference marker
7fb62ca1
HK
1792 --
1793 -- Set when the node appears within a context where elaboration warnings
1794 -- are enabled. This flag determines whether the ABE processing phase
1795 -- generates diagnostics on various elaboration issues.
1796
e3da30b2 1797 -- Is_Entry_Barrier_Function (Flag8-Sem)
877a5a12
AC
1798 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
1799 -- nodes which emulate the barrier function of a protected entry body.
1800 -- The flag is used when checking for incorrect use of Current_Task.
e3da30b2 1801
fdce4bb7
JM
1802 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1803 -- This flag is set in an N_Function_Call node to indicate that the extra
1804 -- actuals to support a build-in-place style of call have been added to
1805 -- the call.
1806
90e491a7
PMR
1807 -- Is_Expanded_Contract (Flag1-Sem)
1808 -- Present in N_Contract nodes. Set if the contract has already undergone
1809 -- expansion activities.
1810
ce06d641 1811 -- Is_Finalization_Wrapper (Flag9-Sem)
e98668b1
AC
1812 -- This flag is present in N_Block_Statement nodes. It is set when the
1813 -- block acts as a wrapper of a handled construct which has controlled
1814 -- objects. The wrapper prevents interference between exception handlers
1815 -- and At_End handlers.
1816
caf07df9
AC
1817 -- Is_Generic_Contract_Pragma (Flag2-Sem)
1818 -- This flag is present in N_Pragma nodes. It is set when the pragma is
d63199d8 1819 -- a source construct, applies to a generic unit or its body, and denotes
caf07df9
AC
1820 -- one of the following contract-related annotations:
1821 -- Abstract_State
1822 -- Contract_Cases
1823 -- Depends
1824 -- Extensions_Visible
1825 -- Global
1826 -- Initial_Condition
1827 -- Initializes
1828 -- Post
1829 -- Post_Class
1830 -- Postcondition
1831 -- Pre
1832 -- Pre_Class
1833 -- Precondition
1834 -- Refined_Depends
1835 -- Refined_Global
1836 -- Refined_Post
1837 -- Refined_State
1838 -- Test_Case
1839
3c08de34
ES
1840 -- Is_Homogeneous_Aggregate (Flag14)
1841 -- A flag set on an Ada2020 aggregate that uses square brackets as
1842 -- delimiters, and thus denotes an array or container aggregate, or
1843 -- the prefix of a reduction attribute.
1844
aab45d22
AC
1845 -- Is_Ignored (Flag9-Sem)
1846 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1847 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1848 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1849 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1850 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1851 -- gives a policy for the aspect or pragma, then there are two cases. For
1852 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1853 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
b2c3b537
AC
1854 -- ignored because of the absence of a -gnata switch. For any other
1855 -- aspects or pragmas, the flag is off. If this flag is set, the
a532f98b
AC
1856 -- aspect/pragma is fully analyzed and checked for other syntactic
1857 -- and semantic errors, but it does not have any semantic effect.
aab45d22 1858
d65a80fd
HK
1859 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
1860 -- This flag is present in N_Pragma nodes. It is set when the pragma is
1861 -- related to an ignored Ghost entity or encloses ignored Ghost entity.
1862 -- This flag has no relation to Is_Ignored.
1863
fbf5a39b 1864 -- Is_In_Discriminant_Check (Flag11-Sem)
653da906
RD
1865 -- This flag is present in a selected component, and is used to indicate
1866 -- that the reference occurs within a discriminant check. The
1867 -- significance is that optimizations based on assuming that the
1868 -- discriminant check has a correct value cannot be performed in this
a90bd866 1869 -- case (or the discriminant check may be optimized away).
fbf5a39b 1870
2ba4f1fb 1871 -- Is_Inherited_Pragma (Flag4-Sem)
039538bc
AC
1872 -- This flag is set in an N_Pragma node that appears in a N_Contract node
1873 -- to indicate that the pragma has been inherited from a parent context.
1874
90e491a7
PMR
1875 -- Is_Initialization_Block (Flag1-Sem)
1876 -- Defined in block nodes. Set when the block statement was created by
1877 -- the finalization machinery to wrap initialization statements. This
1878 -- flag aids the ABE Processing phase to suppress the diagnostics of
1879 -- finalization actions in initialization contexts.
1880
1881 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
967947ed
PMR
1882 -- NOTE: this flag is shared between the legacy ABE mechanism and the
1883 -- default ABE mechanism.
1884 --
1885 -- Present in the following nodes:
1886 --
1887 -- call marker
1888 -- formal package declaration
1889 -- function call
1890 -- function instantiation
1891 -- package instantiation
1892 -- procedure call statement
1893 -- procedure instantiation
1894 --
1895 -- Set when the elaboration or evaluation of the scenario results in
1896 -- a guaranteed ABE. The flag is used to suppress the instantiation of
1897 -- generic bodies because gigi cannot handle certain forms of premature
1898 -- instantiation, as well as to prevent the reexamination of the node by
1899 -- the ABE Processing phase.
90e491a7 1900
996ae0b0 1901 -- Is_Machine_Number (Flag11-Sem)
653da906
RD
1902 -- This flag is set in an N_Real_Literal node to indicate that the value
1903 -- is a machine number. This avoids some unnecessary cases of converting
1904 -- real literals to machine numbers.
996ae0b0 1905
fbf5a39b 1906 -- Is_Null_Loop (Flag16-Sem)
653da906 1907 -- This flag is set in an N_Loop_Statement node if the corresponding loop
c800f862
RD
1908 -- can be determined to be null at compile time. This is used to remove
1909 -- the loop entirely at expansion time.
fbf5a39b 1910
95f2be29
OH
1911 -- Is_OpenAcc_Environment (Flag13-Sem)
1912 -- This flag is set in an N_Loop_Statement node if it contains an
1913 -- Acc_Data, Acc_Parallel or Add_Kernels pragma.
1914
1915 -- Is_OpenAcc_Loop (Flag14-Sem)
1916 -- This flag is set in an N_Loop_Statement node if it contains an
1917 -- OpenAcc_Loop pragma.
1918
244480db
GD
1919 -- Is_Overloaded (Flag5-Sem)
1920 -- A flag present in all expression nodes. Used temporarily during
653da906
RD
1921 -- overloading determination. The setting of this flag is not relevant
1922 -- once overloading analysis is complete.
244480db 1923
996ae0b0
RK
1924 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1925 -- A flag present only in N_Op_Expon nodes. It is set when the
3354f96d 1926 -- exponentiation is of the form 2 ** N, where the type of N is an
653da906
RD
1927 -- unsigned integral subtype whose size does not exceed the size of
1928 -- Standard_Integer (i.e. a type that can be safely converted to
1929 -- Natural), and the exponentiation appears as the right operand of an
1930 -- integer multiplication or an integer division where the dividend is
1931 -- unsigned. It is also required that overflow checking is off for both
1932 -- the exponentiation and the multiply/divide node. If this set of
1933 -- conditions holds, and the flag is set, then the division or
996ae0b0
RK
1934 -- multiplication can be (and is) converted to a shift.
1935
4913e24c
AC
1936 -- Is_Prefixed_Call (Flag17-Sem)
1937 -- This flag is set in a selected component within a generic unit, if
1938 -- it resolves to a prefixed call to a primitive operation. The flag
1939 -- is used to prevent accidental overloadings in an instance, when a
1940 -- primitive operation and a private record component may be homographs.
1941
996ae0b0
RK
1942 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1943 -- A flag set in a Subprogram_Body block to indicate that it is the
3354f96d 1944 -- implementation of a protected subprogram. Such a body needs cleanup
653da906
RD
1945 -- handler to make sure that the associated protected object is unlocked
1946 -- when the subprogram completes.
996ae0b0 1947
06f6c43f
AC
1948 -- Is_Qualified_Universal_Literal (Flag4-Sem)
1949 -- Present in N_Qualified_Expression nodes. Set when the qualification is
1950 -- converting a universal literal to a specific type. Such qualifiers aid
1951 -- the resolution of accidental overloading of binary or unary operators
1952 -- which may occur in instances.
1953
69e6ee2f 1954 -- Is_Read (Flag4-Sem)
daf82dd8
HK
1955 -- Present in variable reference markers. Set when the original variable
1956 -- reference constitues a read of the variable.
1957
90e491a7
PMR
1958 -- Is_Source_Call (Flag4-Sem)
1959 -- Present in call marker nodes. Set when the related call came from
1960 -- source.
1961
1962 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
69e6ee2f
HK
1963 -- Present in the following nodes:
1964 --
1965 -- assignment statement
1966 -- attribute reference
1967 -- call marker
1968 -- entry call statement
1969 -- expanded name
1970 -- function call
1971 -- function instantiation
1972 -- identifier
1973 -- package instantiation
1974 -- procedure call statement
1975 -- procedure instantiation
1976 -- requeue statement
1977 -- variable reference marker
1978 --
1979 -- Set when the node appears within a context subject to SPARK_Mode On.
1980 -- This flag determines when the SPARK model of elaboration be activated
1981 -- by the ABE Processing phase.
90e491a7 1982
0712790c
ES
1983 -- Is_Static_Coextension (Flag14-Sem)
1984 -- Present in N_Allocator nodes. Set if the allocator is a coextension
7ffe26fc
JM
1985 -- of an object allocated on the stack rather than the heap. The partner
1986 -- flag Is_Dynamic_Coextension must be cleared before setting this flag
1987 -- to True.
0712790c 1988
996ae0b0 1989 -- Is_Static_Expression (Flag6-Sem)
edab6088 1990 -- Indicates that an expression is a static expression according to the
1e3c434f 1991 -- rules in RM-4.9. See Sem_Eval for details.
996ae0b0
RK
1992
1993 -- Is_Subprogram_Descriptor (Flag16-Sem)
1994 -- Present in N_Object_Declaration, and set only for the object
1995 -- declaration generated for a subprogram descriptor in fast exception
1996 -- mode. See Exp_Ch11 for details of use.
1997
1998 -- Is_Task_Allocation_Block (Flag6-Sem)
1999 -- A flag set in a Block_Statement node to indicate that it is the
2000 -- expansion of a task allocator, or the allocator of an object
2001 -- containing tasks. Such a block requires a cleanup handler to call
3354f96d 2002 -- Expunge_Unactivated_Tasks to complete any tasks that have been
996ae0b0
RK
2003 -- allocated but not activated when the allocator completes abnormally.
2004
877a5a12
AC
2005 -- Is_Task_Body_Procedure (Flag1-Sem)
2006 -- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
2007 -- nodes which emulate the body of a task unit.
2008
996ae0b0 2009 -- Is_Task_Master (Flag5-Sem)
d63199d8 2010 -- A flag set in a Subprogram_Body, Block_Statement, or Task_Body node to
653da906
RD
2011 -- indicate that the construct is a task master (i.e. has declared tasks
2012 -- or declares an access to a task type).
996ae0b0 2013
69e6ee2f 2014 -- Is_Write (Flag5-Sem)
daf82dd8
HK
2015 -- Present in variable reference markers. Set when the original variable
2016 -- reference constitues a write of the variable.
2017
996ae0b0 2018 -- Itype (Node1-Sem)
653da906
RD
2019 -- Used in N_Itype_Reference node to reference an itype for which it is
2020 -- important to ensure that it is defined. See description of this node
2021 -- for further details.
996ae0b0
RK
2022
2023 -- Kill_Range_Check (Flag11-Sem)
2024 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
653da906
RD
2025 -- result should not be subjected to range checks. This is used for the
2026 -- implementation of Normalize_Scalars.
996ae0b0
RK
2027
2028 -- Label_Construct (Node2-Sem)
2029 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
2030 -- N_Block_Statement or N_Loop_Statement node to which the label
9f6aaa5c
AC
2031 -- declaration applies. This attribute is used both in the compiler and
2032 -- in the implementation of ASIS queries. The field is left empty for the
2033 -- special labels generated as part of expanding raise statements with a
2034 -- local exception handler.
996ae0b0
RK
2035
2036 -- Library_Unit (Node4-Sem)
653da906
RD
2037 -- In a stub node, Library_Unit points to the compilation unit node of
2038 -- the corresponding subunit.
996ae0b0 2039 --
653da906
RD
2040 -- In a with clause node, Library_Unit points to the spec of the with'ed
2041 -- unit.
996ae0b0 2042 --
653da906 2043 -- In a compilation unit node, the usage depends on the unit type:
996ae0b0 2044 --
218e53ff
BD
2045 -- For a library unit body, Library_Unit points to the compilation unit
2046 -- node of the corresponding spec, unless it's a subprogram body with
2047 -- Acts_As_Spec set, in which case it points to itself.
996ae0b0 2048 --
218e53ff
BD
2049 -- For a spec, Library_Unit points to the compilation unit node of the
2050 -- corresponding body, if present. The body will be present if the spec
2051 -- is or contains generics that we needed to instantiate. Similarly, the
2052 -- body will be present if we needed it for inlining purposes. Thus, if
2053 -- we have a spec/body pair, both of which are present, they point to
2054 -- each other via Library_Unit.
996ae0b0 2055 --
653da906
RD
2056 -- For a subunit, Library_Unit points to the compilation unit node of
2057 -- the parent body.
9e5a6ee7
TQ
2058 -- ??? not (always) true, in (at least some, maybe all?) cases it points
2059 -- to the corresponding spec for the parent body.
996ae0b0 2060 --
653da906
RD
2061 -- Note that this field is not used to hold the parent pointer for child
2062 -- unit (which might in any case need to use it for some other purpose as
2063 -- described above). Instead for a child unit, implicit with's are
2064 -- generated for all parents.
996ae0b0 2065
fdce4bb7
JM
2066 -- Local_Raise_Statements (Elist1)
2067 -- This field is present in exception handler nodes. It is set to
2068 -- No_Elist in the normal case. If there is at least one raise statement
2069 -- which can potentially be handled as a local raise, then this field
2070 -- points to a list of raise nodes, which are calls to a routine to raise
2071 -- an exception. These are raise nodes which can be optimized into gotos
2072 -- if the handler turns out to meet the conditions which permit this
2073 -- transformation. Note that this does NOT include instances of the
2074 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
2075 -- handled by the back end (using the N_Push/N_Pop mechanism).
2076
996ae0b0
RK
2077 -- Loop_Actions (List2-Sem)
2078 -- A list present in Component_Association nodes in array aggregates.
2079 -- Used to collect actions that must be executed within the loop because
2080 -- they may need to be evaluated anew each time through.
2081
fbf5a39b 2082 -- Limited_View_Installed (Flag18-Sem)
653da906 2083 -- Present in With_Clauses and in package specifications. If set on
fbf5a39b 2084 -- with_clause, it indicates that this clause has created the current
653da906
RD
2085 -- limited view of the designated package. On a package specification, it
2086 -- indicates that the limited view has already been created because the
2087 -- package is mentioned in a limited_with_clause in the closure of the
2088 -- unit being compiled.
fbf5a39b 2089
f28573f4
ES
2090 -- Local_Raise_Not_OK (Flag7-Sem)
2091 -- Present in N_Exception_Handler nodes. Set if the handler contains
2092 -- a construct (reraise statement, or call to subprogram in package
2093 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
2094 -- for a local raise (one that could otherwise be converted to a goto).
2095
07fc65c4
GB
2096 -- Must_Be_Byte_Aligned (Flag14-Sem)
2097 -- This flag is present in N_Attribute_Reference nodes. It can be set
2098 -- only for the Address and Unrestricted_Access attributes. If set it
653da906
RD
2099 -- means that the object for which the address/access is given must be on
2100 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
2101 -- of the object is to be made before taking the address (this copy is in
2102 -- the current scope on the stack frame). This is used for certain cases
2103 -- of code generated by the expander that passes parameters by address.
fbf5a39b 2104 --
653da906
RD
2105 -- The reason the copy is not made by the front end is that the back end
2106 -- has more information about type layout and may be able to (but is not
2107 -- guaranteed to) prevent making unnecessary copies.
07fc65c4 2108
996ae0b0
RK
2109 -- Must_Not_Freeze (Flag8-Sem)
2110 -- A flag present in all expression nodes. Normally expressions cause
653da906
RD
2111 -- freezing as described in the RM. If this flag is set, then this is
2112 -- inhibited. This is used by the analyzer and expander to label nodes
2113 -- that are created by semantic analysis or expansion and which must not
2114 -- cause freezing even though they normally would. This flag is also
2115 -- present in an N_Subtype_Indication node, since we also use these in
2116 -- calls to Freeze_Expression.
996ae0b0
RK
2117
2118 -- Next_Entity (Node2-Sem)
d63199d8 2119 -- Present in defining identifiers, defining character literals, and
653da906
RD
2120 -- defining operator symbols (i.e. in all entities). The entities of a
2121 -- scope are chained, and this field is used as the forward pointer for
2122 -- this list. See Einfo for further details.
996ae0b0 2123
51bf9bdf
AC
2124 -- Next_Exit_Statement (Node3-Sem)
2125 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
308e6f3a 2126 -- chained (in reverse order of appearance) from the First_Exit_Statement
51bf9bdf
AC
2127 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
2128 -- the next entry on this chain (Empty = end of list).
2129
9af094a1
ES
2130 -- Next_Implicit_With (Node3-Sem)
2131 -- Present in N_With_Clause. Part of a chain of with_clauses generated
2132 -- in rtsfind to indicate implicit dependencies on predefined units. Used
2133 -- to prevent multiple with_clauses for the same unit in a given context.
2134 -- A postorder traversal of the tree whose nodes are units and whose
2cbac6c6 2135 -- links are with_clauses defines the order in which CodePeer must
9af094a1 2136 -- examine a compiled unit and its full context. This ordering ensures
308e6f3a 2137 -- that any subprogram call is examined after the subprogram declaration
9af094a1
ES
2138 -- has been seen.
2139
996ae0b0 2140 -- Next_Named_Actual (Node4-Sem)
2cbac6c6
AC
2141 -- Present in parameter association nodes. Set during semantic analysis
2142 -- to point to the next named parameter, where parameters are ordered by
653da906
RD
2143 -- declaration order (as opposed to the actual order in the call, which
2144 -- may be different due to named associations). Not that this field
2145 -- points to the explicit actual parameter itself, not to the
2146 -- N_Parameter_Association node (its parent).
996ae0b0 2147
21d27997
RD
2148 -- Next_Pragma (Node1-Sem)
2149 -- Present in N_Pragma nodes. Used to create a linked list of pragma
f3d0f304 2150 -- nodes. Currently used for two purposes:
21d27997
RD
2151 --
2152 -- Create a list of linked Check_Policy pragmas. The head of this list
2153 -- is stored in Opt.Check_Policy_List (which has further details).
2154 --
2155 -- Used by processing for Pre/Postcondition pragmas to store a list of
2156 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
2157 -- details).
1c6269d3
HK
2158 --
2159 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
2160 -- the apply to the same construct. These are visible/private mode for
2161 -- a package spec and declarative/statement mode for package body.
21d27997 2162
e3da30b2 2163 -- Next_Rep_Item (Node5-Sem)
c159409f
AC
2164 -- Present in pragma nodes, attribute definition nodes, enumeration rep
2165 -- clauses, record rep clauses, aspect specification nodes. Used to link
2166 -- representation items that apply to an entity. See full description of
2167 -- First_Rep_Item field in Einfo for further details.
996ae0b0
RK
2168
2169 -- Next_Use_Clause (Node3-Sem)
653da906
RD
2170 -- While use clauses are active during semantic processing, they are
2171 -- chained from the scope stack entry, using Next_Use_Clause as a link
2172 -- pointer, with Empty marking the end of the list. The head pointer is
2173 -- in the scope stack entry (First_Use_Clause). At the end of semantic
2174 -- processing (i.e. when Gigi sees the tree, the contents of this field
2175 -- is undefined and should not be read).
996ae0b0
RK
2176
2177 -- No_Ctrl_Actions (Flag7-Sem)
8d81fb4e
AC
2178 -- Present in N_Assignment_Statement to indicate that no Finalize nor
2179 -- Adjust should take place on this assignment even though the RHS is
376e7d14
AC
2180 -- controlled. Also indicates that the primitive _assign should not be
2181 -- used for a tagged assignment. This is used in init procs and aggregate
2182 -- expansions where the generated assignments are initializations, not
2183 -- real assignments.
996ae0b0 2184
967947ed
PMR
2185 -- No_Elaboration_Check (Flag4-Sem)
2186 -- NOTE: this flag is relevant only for the legacy ABE mechanism and
2187 -- should not be used outside of that context.
2188 --
2189 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
2190 -- that no elaboration check is needed on the call, because it appears in
2191 -- the context of a local Suppress pragma. This is used on calls within
2192 -- task bodies, where the actual elaboration checks are applied after
2193 -- analysis, when the local scope stack is not present
2194
996ae0b0
RK
2195 -- No_Entities_Ref_In_Spec (Flag8-Sem)
2196 -- Present in N_With_Clause nodes. Set if the with clause is on the
2197 -- package or subprogram spec where the main unit is the corresponding
2198 -- body, and no entities of the with'ed unit are referenced by the spec
2199 -- (an entity may still be referenced in the body, so this flag is used
2200 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
4ef36ac7 2201 -- full details).
996ae0b0
RK
2202
2203 -- No_Initialization (Flag13-Sem)
41def521 2204 -- Present in N_Object_Declaration and N_Allocator to indicate that the
653da906
RD
2205 -- object must not be initialized (by Initialize or call to an init
2206 -- proc). This is needed for controlled aggregates. When the Object
2207 -- declaration has an expression, this flag means that this expression
2208 -- should not be taken into account (needed for in place initialization
cf6956bb
AC
2209 -- with aggregates, and for object with an address clause, which are
2210 -- initialized with an assignment at freeze time).
996ae0b0 2211
f6194278
RD
2212 -- No_Minimize_Eliminate (Flag17-Sem)
2213 -- This flag is present in membership operator nodes (N_In/N_Not_In).
2214 -- It is used to indicate that processing for extended overflow checking
2215 -- modes is not required (this is used to prevent infinite recursion).
2216
90e491a7 2217 -- No_Side_Effect_Removal (Flag17-Sem)
10edebe7
AC
2218 -- Present in N_Function_Call nodes. Set when a function call does not
2219 -- require side effect removal. This attribute suppresses the generation
2220 -- of a temporary to capture the result of the function which eventually
2221 -- replaces the function call.
2222
fbf5a39b
AC
2223 -- No_Truncation (Flag17-Sem)
2224 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
2225 -- only if the RM_Size of the source is greater than the RM_Size of the
2226 -- target for scalar operands. Normally in such a case we truncate some
2227 -- higher order bits of the source, and then sign/zero extend the result
2228 -- to form the output value. But if this flag is set, then we do not do
653da906
RD
2229 -- any truncation, so for example, if an 8 bit input is converted to 5
2230 -- bit result which is in fact stored in 8 bits, then the high order
fbf5a39b
AC
2231 -- three bits of the target result will be copied from the source. This
2232 -- is used for properly setting out of range values for use by pragmas
2233 -- Initialize_Scalars and Normalize_Scalars.
2234
a8b346d2 2235 -- Null_Excluding_Subtype (Flag16)
3f80a182
AC
2236 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
2237 -- indication carries a null-exclusion indicator, which is distinct from
2238 -- the null-exclusion indicator that may precede the access keyword.
a8b346d2 2239
996ae0b0
RK
2240 -- Original_Discriminant (Node2-Sem)
2241 -- Present in identifiers. Used in references to discriminants that
653da906
RD
2242 -- appear in generic units. Because the names of the discriminants may be
2243 -- different in an instance, we use this field to recover the position of
2244 -- the discriminant in the original type, and replace it with the
2245 -- discriminant at the same position in the instantiated type.
996ae0b0 2246
fbf5a39b 2247 -- Original_Entity (Node2-Sem)
653da906
RD
2248 -- Present in numeric literals. Used to denote the named number that has
2249 -- been constant-folded into the given literal. If literal is from
fbf5a39b
AC
2250 -- source, or the result of some other constant-folding operation, then
2251 -- Original_Entity is empty. This field is needed to handle properly
2252 -- named numbers in generic units, where the Associated_Node field
653da906
RD
2253 -- interferes with the Entity field, making it impossible to preserve the
2254 -- original entity at the point of instantiation (ASIS problem).
fbf5a39b 2255
996ae0b0
RK
2256 -- Others_Discrete_Choices (List1-Sem)
2257 -- When a case statement or variant is analyzed, the semantic checks
2258 -- determine the actual list of choices that correspond to an others
653da906
RD
2259 -- choice. This list is materialized for later use by the expander and
2260 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
2261 -- this materialized list of choices, which is in standard format for a
2262 -- list of discrete choices, except that of course it cannot contain an
2263 -- N_Others_Choice entry.
996ae0b0 2264
996ae0b0
RK
2265 -- Parent_Spec (Node4-Sem)
2266 -- For a library unit that is a child unit spec (package or subprogram
2267 -- declaration, generic declaration or instantiation, or library level
60aa5228 2268 -- rename) this field points to the compilation unit node for the parent
996ae0b0
RK
2269 -- package specification. This field is Empty for library bodies (the
2270 -- parent spec in this case can be found from the corresponding spec).
2271
94ce4941
HK
2272 -- Parent_With (Flag1-Sem)
2273 -- Present in N_With_Clause nodes. The flag indicates that the clause
2274 -- was generated for an ancestor unit to provide proper visibility. A
2275 -- with clause for child unit A.B.C produces two implicit parent with
2276 -- clauses for A and A.B.
2277
99d520ad
ES
2278 -- Premature_Use (Node5-Sem)
2279 -- Present in N_Incomplete_Type_Declaration node. Used for improved
2280 -- error diagnostics: if there is a premature usage of an incomplete
2281 -- type, a subsequently generated error message indicates the position
2282 -- of its full declaration.
2283
996ae0b0
RK
2284 -- Present_Expr (Uint3-Sem)
2285 -- Present in an N_Variant node. This has a meaningful value only after
653da906
RD
2286 -- Gigi has back annotated the tree with representation information. At
2287 -- this point, it contains a reference to a gcc expression that depends
2288 -- on the values of one or more discriminants. Give a set of discriminant
2289 -- values, this expression evaluates to False (zero) if variant is not
2290 -- present, and True (non-zero) if it is present. See unit Repinfo for
2291 -- further details on gigi back annotation. This field is used during
2292 -- ASIS processing (data decomposition annex) to determine if a field is
2293 -- present or not.
996ae0b0 2294
851e9f19
PMR
2295 -- Prev_Use_Clause (Node1-Sem)
2296 -- Present in both N_Use_Package_Clause and N_Use_Type_Clause. Used in
2297 -- detection of ineffective use clauses by allowing a chain of related
2298 -- clauses together to avoid traversing the current scope stack.
2299
996ae0b0 2300 -- Print_In_Hex (Flag13-Sem)
653da906
RD
2301 -- Set on an N_Integer_Literal node to indicate that the value should be
2302 -- printed in hexadecimal in the sprint listing. Has no effect on
2303 -- legality or semantics of program, only on the displayed output. This
2304 -- is used to clarify output from the packed array cases.
996ae0b0 2305
e3da30b2 2306 -- Procedure_To_Call (Node2-Sem)
33c423c8 2307 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
e3da30b2
RD
2308 -- and N_Extended_Return_Statement nodes. References the entity for the
2309 -- declaration of the procedure to be called to accomplish the required
2310 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
33c423c8 2311 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
653da906
RD
2312 -- allocating the return value), and for the Deallocate procedure in the
2313 -- case of N_Free_Statement.
996ae0b0
RK
2314
2315 -- Raises_Constraint_Error (Flag7-Sem)
653da906 2316 -- Set on an expression whose evaluation will definitely fail constraint
1e3c434f 2317 -- error check. See Sem_Eval for details.
996ae0b0
RK
2318
2319 -- Redundant_Use (Flag13-Sem)
653da906
RD
2320 -- Present in nodes that can appear as an operand in a use clause or use
2321 -- type clause (identifiers, expanded names, attribute references). Set
2322 -- to indicate that a use is redundant (and therefore need not be undone
2323 -- on scope exit).
996ae0b0 2324
0712790c
ES
2325 -- Renaming_Exception (Node2-Sem)
2326 -- Present in N_Exception_Declaration node. Used to point back to the
2327 -- exception renaming for an exception declared within a subprogram.
2328 -- What happens is that an exception declared in a subprogram is moved
2329 -- to the library level with a unique name, and the original exception
2330 -- becomes a renaming. This link from the library level exception to the
2331 -- renaming declaration allows registering of the proper exception name.
2332
e3da30b2 2333 -- Return_Statement_Entity (Node5-Sem)
33c423c8 2334 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
e3da30b2
RD
2335 -- Points to an E_Return_Statement representing the return statement.
2336
2337 -- Return_Object_Declarations (List3)
df3e68b1
HK
2338 -- Present in N_Extended_Return_Statement. Points to a list initially
2339 -- containing a single N_Object_Declaration representing the return
2340 -- object. We use a list (instead of just a pointer to the object decl)
31fde973
GD
2341 -- because Analyze wants to insert extra actions on this list, before the
2342 -- N_Object_Declaration, which always remains last on the list.
996ae0b0
RK
2343
2344 -- Rounded_Result (Flag18-Sem)
d63199d8 2345 -- Present in N_Type_Conversion, N_Op_Divide, and N_Op_Multiply nodes.
996ae0b0 2346 -- Used in the fixed-point cases to indicate that the result must be
653da906
RD
2347 -- rounded as a result of the use of the 'Round attribute. Also used for
2348 -- integer N_Op_Divide nodes to indicate that the result should be
2349 -- rounded to the nearest integer (breaking ties away from zero), rather
2350 -- than truncated towards zero as usual. These rounded integer operations
2351 -- are the result of expansion of rounded fixed-point divide, conversion
2352 -- and multiplication operations.
996ae0b0 2353
69e6ee2f
HK
2354 -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
2355 -- Present in compilation unit nodes. Set when the elaboration mechanism
2356 -- must record all invocation constructs and invocation relations within
2357 -- the body of the compilation unit.
2358 --
1c5c721a 2359 -- SCIL_Entity (Node4-Sem)
b16ffa33
AC
2360 -- Present in SCIL nodes. References the specific tagged type associated
2361 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
2362 -- the controlling type of the call; for an N_SCIL_Membership_Test node
2363 -- generated as part of testing membership in T'Class, this is T; for an
2364 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
a50790d1 2365
327503f1 2366 -- SCIL_Controlling_Tag (Node5-Sem)
52d9ba4d
AC
2367 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
2368 -- tag of a dispatching call. This is usually an N_Selected_Component
2369 -- node (for a _tag component), but may be an N_Object_Declaration or
2370 -- N_Parameter_Specification node in some cases (e.g., for a call to
2371 -- a classwide streaming operation or a call to an instance of
2372 -- Ada.Tags.Generic_Dispatching_Constructor).
a50790d1 2373
82878151
AC
2374 -- SCIL_Tag_Value (Node5-Sem)
2375 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
b16ffa33 2376 -- of the value that is being tested.
82878151 2377
1c5c721a 2378 -- SCIL_Target_Prim (Node2-Sem)
b16ffa33
AC
2379 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2380 -- operation named (statically) in a dispatching call.
a50790d1 2381
996ae0b0 2382 -- Scope (Node3-Sem)
d63199d8 2383 -- Present in defining identifiers, defining character literals, and
653da906
RD
2384 -- defining operator symbols (i.e. in all entities). The entities of a
2385 -- scope all use this field to reference the corresponding scope entity.
2386 -- See Einfo for further details.
996ae0b0
RK
2387
2388 -- Shift_Count_OK (Flag4-Sem)
2389 -- A flag present in shift nodes to indicate that the shift count is
2390 -- known to be in range, i.e. is in the range from zero to word length
2391 -- minus one. If this flag is not set, then the shift count may be
2392 -- outside this range, i.e. larger than the word length, and the code
2393 -- must ensure that such shift counts give the appropriate result.
2394
2395 -- Source_Type (Node1-Sem)
2396 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2397 -- source type entity for the unchecked conversion instantiation
2398 -- which gigi must do size validation for.
2399
beacce02 2400 -- Split_PPC (Flag17)
dac3bede 2401 -- When a Pre or Post aspect specification is processed, it is broken
6778c2ca 2402 -- into AND THEN sections. The leftmost section has Split_PPC set to
dac3bede
YM
2403 -- False, indicating that it is the original specification (e.g. for
2404 -- posting errors). For other sections, Split_PPC is set to True.
2405 -- This flag is set in both the N_Aspect_Specification node itself,
2406 -- and in the pragma which is generated from this node.
beacce02 2407
996ae0b0 2408 -- Storage_Pool (Node1-Sem)
33c423c8
AC
2409 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2410 -- and N_Extended_Return_Statement nodes. References the entity for the
f28573f4
ES
2411 -- storage pool to be used for the allocate or free call or for the
2412 -- allocation of the returned value from function. Empty indicates that
16b05213 2413 -- the global default pool is to be used. Note that in the case
f28573f4
ES
2414 -- of a return statement, this field is set only if the function returns
2415 -- value of a type whose size is not known at compile time on the
2416 -- secondary stack.
996ae0b0 2417
c7532b2d 2418 -- Suppress_Assignment_Checks (Flag18-Sem)
308e6f3a 2419 -- Used in generated N_Assignment_Statement nodes to suppress predicate
c7532b2d 2420 -- and range checks in cases where the generated code knows that the
308e6f3a 2421 -- value being assigned is in range and satisfies any predicate. Also
c7532b2d 2422 -- can be set in N_Object_Declaration nodes, to similarly suppress any
a2cc9797
AC
2423 -- checks on the initializing value. In assignment statements it also
2424 -- suppresses access checks in the generated code for out- and in-out
2425 -- parameters in entry calls.
c7532b2d 2426
c800f862
RD
2427 -- Suppress_Loop_Warnings (Flag17-Sem)
2428 -- Used in N_Loop_Statement node to indicate that warnings within the
2429 -- body of the loop should be suppressed. This is set when the range
2430 -- of a FOR loop is known to be null, or is probably null (loop would
2431 -- only execute if invalid values are present).
2432
90e491a7 2433 -- Target (Node1-Sem)
daf82dd8
HK
2434 -- Present in call and variable reference marker nodes. References the
2435 -- entity of the original entity, operator, or subprogram being invoked,
2436 -- or the original variable being read or written.
90e491a7 2437
996ae0b0 2438 -- Target_Type (Node2-Sem)
653da906
RD
2439 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2440 -- type entity for the unchecked conversion instantiation which gigi must
2441 -- do size validation for.
996ae0b0 2442
996ae0b0 2443 -- Then_Actions (List3-Sem)
9b16cb57
RD
2444 -- This field is present in if expression nodes. During code expansion
2445 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2446 -- at an appropriate place in the tree to get elaborated at the right
2447 -- time. For if expressions, we have to be sure that the actions for
2448 -- for the Then branch are only elaborated if the condition is True.
2449 -- The Then_Actions field is used as a temporary parking place for
653da906
RD
2450 -- these actions. The final tree is always rewritten to eliminate the
2451 -- need for this field, so in the tree passed to Gigi, this field is
2452 -- always set to No_List.
996ae0b0
RK
2453
2454 -- Treat_Fixed_As_Integer (Flag14-Sem)
d63199d8 2455 -- This flag appears in operator nodes for divide, multiply, mod, and rem
653da906
RD
2456 -- on fixed-point operands. It indicates that the operands are to be
2457 -- treated as integer values, ignoring small values. This flag is only
2458 -- set as a result of expansion of fixed-point operations. Typically a
3354f96d 2459 -- fixed-point multiplication in the source generates subsidiary
653da906
RD
2460 -- multiplication and division operations that work with the underlying
2461 -- integer values and have this flag set. Note that this flag is not
3354f96d 2462 -- needed on other arithmetic operations (add, neg, subtract etc.) since
653da906
RD
2463 -- in these cases it is always the case that fixed is treated as integer.
2464 -- The Etype field MUST be set if this flag is set. The analyzer knows to
2465 -- leave such nodes alone, and whoever makes them must set the correct
2466 -- Etype value.
996ae0b0
RK
2467
2468 -- TSS_Elist (Elist3-Sem)
2469 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2470 -- entries for each TSS (type support subprogram) associated with the
2471 -- frozen type. The elements of the list are the entities for the
653da906
RD
2472 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2473 -- if there are no type support subprograms for the type or if the freeze
2474 -- node is not for a type.
996ae0b0 2475
effdbb7d
AC
2476 -- Uneval_Old_Accept (Flag7-Sem)
2477 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
2478 -- (accept) at the point where the pragma is encountered (including the
2479 -- case of a pragma generated from an aspect specification). It is this
2480 -- setting that is relevant, rather than the setting at the point where
2481 -- a contract is finally analyzed after the delay till the freeze point.
1773d80b
AC
2482
2483 -- Uneval_Old_Warn (Flag18-Sem)
effdbb7d
AC
2484 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
2485 -- (warn) at the point where the pragma is encountered (including the
2486 -- case of a pragma generated from an aspect specification). It is this
2487 -- setting that is relevant, rather than the setting at the point where
2488 -- a contract is finally analyzed after the delay till the freeze point.
1773d80b 2489
996ae0b0
RK
2490 -- Unreferenced_In_Spec (Flag7-Sem)
2491 -- Present in N_With_Clause nodes. Set if the with clause is on the
2492 -- package or subprogram spec where the main unit is the corresponding
653da906
RD
2493 -- body, and is not referenced by the spec (it may still be referenced by
2494 -- the body, so this flag is used to generate the proper message (see
2495 -- Sem_Util.Check_Unused_Withs for details)
996ae0b0 2496
2c8d828a
AC
2497 -- Uninitialized_Variable (Node3-Sem)
2498 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2499 -- Extension_Declarations. Indicates that a variable in a generic unit
2500 -- whose type is a formal private or derived type is read without being
2501 -- initialized. Used to warn if the corresponding actual type is not
2502 -- a fully initialized type.
2503
851e9f19 2504 -- Used_Operations (Elist2-Sem)
29efbb8c
ES
2505 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2506 -- are made potentially use-visible by the clause. Simplifies processing
2507 -- on exit from the scope of the use_type_clause, in particular in the
2508 -- case of Use_All_Type, when those operations several scopes.
2509
90e491a7
PMR
2510 -- Was_Attribute_Reference (Flag2-Sem)
2511 -- Present in N_Subprogram_Body. Set to True if the original source is an
2512 -- attribute reference which is an actual in a generic instantiation. The
2513 -- instantiation prologue renames these attributes, and expansion later
2514 -- converts them into subprogram bodies.
2515
549cc9c2
AC
2516 -- Was_Expression_Function (Flag18-Sem)
2517 -- Present in N_Subprogram_Body. True if the original source had an
2518 -- N_Expression_Function, which was converted to the N_Subprogram_Body
2519 -- by Analyze_Expression_Function. This is needed by ASIS to correctly
2520 -- recreate the expression function (for the instance body) when the
2521 -- completion of a generic function declaration is an expression
2522 -- function.
2523
996ae0b0 2524 -- Was_Originally_Stub (Flag13-Sem)
653da906
RD
2525 -- This flag is set in the node for a proper body that replaces stub.
2526 -- During the analysis procedure, stubs in some situations get rewritten
2527 -- by the corresponding bodies, and we set this flag to remember that
2528 -- this happened. Note that it is not good enough to rely on the use of
2529 -- Original_Node here because of the case of nested instantiations where
2530 -- the substituted node can be copied.
996ae0b0 2531
996ae0b0
RK
2532 --------------------------------------------------
2533 -- Note on Use of End_Label and End_Span Fields --
2534 --------------------------------------------------
2535
2536 -- Several constructs have end lines:
2537
2538 -- Loop Statement end loop [loop_IDENTIFIER];
2539 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2540 -- Task Definition end [task_IDENTIFIER]
2541 -- Protected Definition end [protected_IDENTIFIER]
2542 -- Protected Body end [protected_IDENTIFIER]
2543
2544 -- Block Statement end [block_IDENTIFIER];
2545 -- Subprogram Body end [DESIGNATOR];
2546 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2547 -- Task Body end [task_IDENTIFIER];
2548 -- Accept Statement end [entry_IDENTIFIER]];
2549 -- Entry Body end [entry_IDENTIFIER];
2550
2551 -- If Statement end if;
2552 -- Case Statement end case;
2553
2554 -- Record Definition end record;
07fc65c4 2555 -- Enumeration Definition );
996ae0b0 2556
653da906
RD
2557 -- The End_Label and End_Span fields are used to mark the locations of
2558 -- these lines, and also keep track of the label in the case where a label
2559 -- is present.
2560
2561 -- For the first group above, the End_Label field of the corresponding node
2562 -- is used to point to the label identifier. In the case where there is no
2563 -- label in the source, the parser supplies a dummy identifier (with
2564 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2565 -- marks the location of the token following the END token.
2566
2567 -- For the second group, the use of End_Label is similar, but the End_Label
2568 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2569 -- simply because in some cases there is no room in the parent node.
2570
2571 -- For the third group, there is never any label, and instead of using
2572 -- End_Label, we use the End_Span field which gives the location of the
2573 -- token following END, relative to the starting Sloc of the construct,
2574 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2575 -- following the End_Label.
2576
2577 -- The record definition case is handled specially, we treat it as though
2578 -- it required an optional label which is never present, and so the parser
2579 -- always builds a dummy identifier with Comes From Source set False. The
2580 -- reason we do this, rather than using End_Span in this case, is that we
2581 -- want to generate a cross-ref entry for the end of a record, since it
2582 -- represents a scope for name declaration purposes.
2583
2584 -- The enumeration definition case is handled in an exactly similar manner,
2585 -- building a dummy identifier to get a cross-reference.
2586
2587 -- Note: the reason we store the difference as a Uint, instead of storing
2588 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2589 -- distinguished from other types of values, and we count on all general
2590 -- use fields being self describing. To make things easier for clients,
2591 -- note that we provide function End_Location, and procedure
2592 -- Set_End_Location to allow access to the logical value (which is the
2593 -- Source_Ptr value for the end token).
996ae0b0
RK
2594
2595 ---------------------
2596 -- Syntactic Nodes --
2597 ---------------------
2598
2599 ---------------------
2600 -- 2.3 Identifier --
2601 ---------------------
2602
2603 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2604 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2605
2606 -- An IDENTIFIER shall not be a reserved word
2607
653da906
RD
2608 -- In the Ada grammar identifiers are the bottom level tokens which have
2609 -- very few semantics. Actual program identifiers are direct names. If
2610 -- we were being 100% honest with the grammar, then we would have a node
2611 -- called N_Direct_Name which would point to an identifier. However,
2612 -- that's too many extra nodes, so we just use the N_Identifier node
2613 -- directly as a direct name, and it contains the expression fields and
2614 -- Entity field that correspond to its use as a direct name. In those
2615 -- few cases where identifiers appear in contexts where they are not
2616 -- direct names (pragmas, pragma argument associations, attribute
996ae0b0
RK
2617 -- references and attribute definition clauses), the Chars field of the
2618 -- node contains the Name_Id for the identifier name.
2619
653da906
RD
2620 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2621 -- cases. First, an incorrect use of a reserved word as an identifier is
2622 -- diagnosed and then treated as a normal identifier. Second, an
2623 -- attribute designator of the form of a reserved word (access, delta,
2624 -- digits, range) is treated as an identifier.
996ae0b0
RK
2625
2626 -- Note: The set of letters that is permitted in an identifier depends
2627 -- on the character set in use. See package Csets for full details.
2628
2629 -- N_Identifier
2630 -- Sloc points to identifier
2631 -- Chars (Name1) contains the Name_Id for the identifier
2632 -- Entity (Node4-Sem)
3e542a58 2633 -- Associated_Node (Node4-Sem)
996ae0b0 2634 -- Original_Discriminant (Node2-Sem)
90e491a7
PMR
2635 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
2636 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
69e6ee2f 2637 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7 2638 -- Has_Private_View (Flag11-Sem) (set in generic units)
996ae0b0 2639 -- Redundant_Use (Flag13-Sem)
12b4d338 2640 -- Atomic_Sync_Required (Flag14-Sem)
996ae0b0
RK
2641 -- plus fields for expression
2642
2643 --------------------------
2644 -- 2.4 Numeric Literal --
2645 --------------------------
2646
2647 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2648
2649 ----------------------------
2650 -- 2.4.1 Decimal Literal --
2651 ----------------------------
2652
2653 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2654
2655 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2656
2657 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2658
2659 -- Decimal literals appear in the tree as either integer literal nodes
2660 -- or real literal nodes, depending on whether a period is present.
2661
2662 -- Note: literal nodes appear as a result of direct use of literals
2663 -- in the source program, and also as the result of evaluating
2664 -- expressions at compile time. In the latter case, it is possible
2665 -- to construct real literals that have no syntactic representation
2666 -- using the standard literal format. Such literals are listed by
2667 -- Sprint using the notation [numerator / denominator].
2668
82c80734
RD
2669 -- Note: the value of an integer literal node created by the front end
2670 -- is never outside the range of values of the base type. However, it
45010db9 2671 -- can be the case that the created value is outside the range of the
82c80734
RD
2672 -- particular subtype. This happens in the case of integer overflows
2673 -- with checks suppressed.
2674
996ae0b0
RK
2675 -- N_Integer_Literal
2676 -- Sloc points to literal
fbf5a39b
AC
2677 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2678 -- has been constant-folded into its literal value.
996ae0b0 2679 -- Intval (Uint3) contains integer value of literal
996ae0b0 2680 -- Print_In_Hex (Flag13-Sem)
ce06d641 2681 -- plus fields for expression
996ae0b0
RK
2682
2683 -- N_Real_Literal
2684 -- Sloc points to literal
fbf5a39b
AC
2685 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2686 -- has been constant-folded into its literal value.
996ae0b0
RK
2687 -- Realval (Ureal3) contains real value of literal
2688 -- Corresponding_Integer_Value (Uint4-Sem)
2689 -- Is_Machine_Number (Flag11-Sem)
2690 -- plus fields for expression
2691
2692 --------------------------
2693 -- 2.4.2 Based Literal --
2694 --------------------------
2695
2696 -- BASED_LITERAL ::=
2697 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2698
2699 -- BASE ::= NUMERAL
2700
2701 -- BASED_NUMERAL ::=
2702 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2703
2704 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2705
2706 -- Based literals appear in the tree as either integer literal nodes
2707 -- or real literal nodes, depending on whether a period is present.
2708
2709 ----------------------------
2710 -- 2.5 Character Literal --
2711 ----------------------------
2712
2713 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2714
2715 -- N_Character_Literal
2716 -- Sloc points to literal
2717 -- Chars (Name1) contains the Name_Id for the identifier
82c80734 2718 -- Char_Literal_Value (Uint2) contains the literal value
996ae0b0 2719 -- Entity (Node4-Sem)
3e542a58 2720 -- Associated_Node (Node4-Sem)
996ae0b0
RK
2721 -- Has_Private_View (Flag11-Sem) set in generic units.
2722 -- plus fields for expression
2723
653da906
RD
2724 -- Note: the Entity field will be missing (set to Empty) for character
2725 -- literals whose type is Standard.Wide_Character or Standard.Character
2726 -- or a type derived from one of these two. In this case the character
2727 -- literal stands for its own coding. The reason we take this irregular
2728 -- short cut is to avoid the need to build lots of junk defining
2729 -- character literal nodes.
996ae0b0
RK
2730
2731 -------------------------
2732 -- 2.6 String Literal --
2733 -------------------------
2734
2735 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2736
2737 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2738 -- single GRAPHIC_CHARACTER other than a quotation mark.
dae2b8ea
HK
2739 --
2740 -- Is_Folded_In_Parser is True if the parser created this literal by
2741 -- folding a sequence of "&" operators. For example, if the source code
a2c20cfa
AC
2742 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2743 -- is set. This flag is needed because the parser doesn't know about
dae2b8ea
HK
2744 -- visibility, so the folded result might be wrong, and semantic
2745 -- analysis needs to check for that.
996ae0b0
RK
2746
2747 -- N_String_Literal
2748 -- Sloc points to literal
2749 -- Strval (Str3) contains Id of string value
2750 -- Has_Wide_Character (Flag11-Sem)
fd22cd21 2751 -- Has_Wide_Wide_Character (Flag13-Sem)
dae2b8ea 2752 -- Is_Folded_In_Parser (Flag4)
996ae0b0
RK
2753 -- plus fields for expression
2754
2755 ------------------
2756 -- 2.7 Comment --
2757 ------------------
2758
2759 -- A COMMENT starts with two adjacent hyphens and extends up to the
2760 -- end of the line. A COMMENT may appear on any line of a program.
2761
2762 -- Comments are skipped by the scanner and do not appear in the tree.
2763 -- It is possible to reconstruct the position of comments with respect
2764 -- to the elements of the tree by using the source position (Sloc)
2765 -- pointers that appear in every tree node.
2766
2767 -----------------
2768 -- 2.8 Pragma --
2769 -----------------
2770
2771 -- PRAGMA ::= pragma IDENTIFIER
2772 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2773
2774 -- Note that a pragma may appear in the tree anywhere a declaration
2775 -- or a statement may appear, as well as in some other situations
2776 -- which are explicitly documented.
2777
2778 -- N_Pragma
51bf9bdf 2779 -- Sloc points to PRAGMA
21d27997 2780 -- Next_Pragma (Node1-Sem)
996ae0b0 2781 -- Pragma_Argument_Associations (List2) (set to No_List if none)
ba759acd 2782 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
ac4d6407 2783 -- Pragma_Identifier (Node4)
e3da30b2 2784 -- Next_Rep_Item (Node5-Sem)
90e491a7
PMR
2785 -- Is_Generic_Contract_Pragma (Flag2-Sem)
2786 -- Is_Checked_Ghost_Pragma (Flag3-Sem)
2787 -- Is_Inherited_Pragma (Flag4-Sem)
2ba4f1fb 2788 -- Is_Analyzed_Pragma (Flag5-Sem)
90e491a7
PMR
2789 -- Class_Present (Flag6) set if from Aspect with 'Class
2790 -- Uneval_Old_Accept (Flag7-Sem)
2791 -- Is_Ignored_Ghost_Pragma (Flag8-Sem)
2792 -- Is_Ignored (Flag9-Sem)
039538bc 2793 -- Is_Checked (Flag11-Sem)
90e491a7 2794 -- From_Aspect_Specification (Flag13-Sem)
c159409f 2795 -- Is_Delayed_Aspect (Flag14-Sem)
aab45d22 2796 -- Is_Disabled (Flag15-Sem)
90e491a7 2797 -- Import_Interface_Present (Flag16-Sem)
beacce02 2798 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
effdbb7d 2799 -- Uneval_Old_Warn (Flag18-Sem)
996ae0b0 2800
80298b89
AC
2801 -- Note: we should have a section on what pragmas are passed on to
2802 -- the back end to be processed. This section should note that pragma
2803 -- Psect_Object is always converted to Common_Object, but there are
2804 -- undoubtedly many other similar notes required ???
2805
6e759c2a
BD
2806 -- Note: utility functions Pragma_Name_Unmapped and Pragma_Name may be
2807 -- applied to pragma nodes to obtain the Chars or its mapped version.
ac4d6407 2808
0f1a6a0b
AC
2809 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2810 -- aspect name, as does the Pragma_Identifier. In this case if the
2811 -- pragma has a local name argument (such as pragma Inline), it is
2812 -- resolved to point to the specific entity affected by the pragma.
2813
f5afb270 2814 --------------------------------------
996ae0b0
RK
2815 -- 2.8 Pragma Argument Association --
2816 --------------------------------------
2817
2818 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2819 -- [pragma_argument_IDENTIFIER =>] NAME
2820 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2821
aab45d22
AC
2822 -- In Ada 2012, there are two more possibilities:
2823
2824 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2825 -- [pragma_argument_ASPECT_MARK =>] NAME
2826 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2827
2828 -- where the interesting allowed cases (which do not fit the syntax of
2829 -- the first alternative above) are
2830
a532f98b
AC
2831 -- ASPECT_MARK => Pre'Class |
2832 -- Post'Class |
2833 -- Type_Invariant'Class |
2834 -- Invariant'Class
aab45d22
AC
2835
2836 -- We allow this special usage in all Ada modes, but it would be a
2837 -- pain to allow these aspects to pervade the pragma syntax, and the
2838 -- representation of pragma nodes internally. So what we do is to
2839 -- replace these ASPECT_MARK forms with identifiers whose name is one
d63199d8 2840 -- of the special internal names _Pre, _Post, or _Type_Invariant.
aab45d22
AC
2841
2842 -- We do a similar replacement of these Aspect_Mark forms in the
2843 -- Expression of a pragma argument association for the cases of
2844 -- the first arguments of any Check pragmas and Check_Policy pragmas
2845
996ae0b0
RK
2846 -- N_Pragma_Argument_Association
2847 -- Sloc points to first token in association
2848 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
f63d601b 2849 -- Expression_Copy (Node2-Sem)
996ae0b0
RK
2850 -- Expression (Node3)
2851
2852 ------------------------
2853 -- 2.9 Reserved Word --
2854 ------------------------
2855
2856 -- Reserved words are parsed by the scanner, and returned as the
2857 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2858
2859 ----------------------------
2860 -- 3.1 Basic Declaration --
2861 ----------------------------
2862
2863 -- BASIC_DECLARATION ::=
2864 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2865 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2866 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2867 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2868 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2869 -- | GENERIC_INSTANTIATION
2870
2871 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2872 -- see further description in section on semantic nodes.
2873
2874 -- Also, in the tree that is constructed, a pragma may appear
2875 -- anywhere that a declaration may appear.
2876
2877 ------------------------------
2878 -- 3.1 Defining Identifier --
2879 ------------------------------
2880
2881 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2882
2883 -- A defining identifier is an entity, which has additional fields
2884 -- depending on the setting of the Ekind field. These additional
2885 -- fields are defined (and access subprograms declared) in package
2886 -- Einfo.
2887
2888 -- Note: N_Defining_Identifier is an extended node whose fields are
1f159b86 2889 -- deliberately laid out to match the layout of fields in an ordinary
996ae0b0
RK
2890 -- N_Identifier node allowing for easy alteration of an identifier
2891 -- node into a defining identifier node. For details, see procedure
2892 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2893
2894 -- N_Defining_Identifier
2895 -- Sloc points to identifier
2896 -- Chars (Name1) contains the Name_Id for the identifier
2897 -- Next_Entity (Node2-Sem)
2898 -- Scope (Node3-Sem)
2899 -- Etype (Node5-Sem)
2900
2901 -----------------------------
2902 -- 3.2.1 Type Declaration --
2903 -----------------------------
2904
2905 -- TYPE_DECLARATION ::=
2906 -- FULL_TYPE_DECLARATION
2907 -- | INCOMPLETE_TYPE_DECLARATION
2908 -- | PRIVATE_TYPE_DECLARATION
2909 -- | PRIVATE_EXTENSION_DECLARATION
2910
2911 ----------------------------------
2912 -- 3.2.1 Full Type Declaration --
2913 ----------------------------------
2914
2915 -- FULL_TYPE_DECLARATION ::=
2916 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
718deaf1
AC
2917 -- is TYPE_DEFINITION
2918 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
2919 -- | TASK_TYPE_DECLARATION
2920 -- | PROTECTED_TYPE_DECLARATION
2921
2922 -- The full type declaration node is used only for the first case. The
2923 -- second case (concurrent type declaration), is represented directly
2924 -- by a task type declaration or a protected type declaration.
2925
2926 -- N_Full_Type_Declaration
2927 -- Sloc points to TYPE
2928 -- Defining_Identifier (Node1)
daff5ab7 2929 -- Incomplete_View (Node2-Sem)
996ae0b0
RK
2930 -- Discriminant_Specifications (List4) (set to No_List if none)
2931 -- Type_Definition (Node3)
2932 -- Discr_Check_Funcs_Built (Flag11-Sem)
2933
2934 ----------------------------
2935 -- 3.2.1 Type Definition --
2936 ----------------------------
2937
2938 -- TYPE_DEFINITION ::=
2939 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2940 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2941 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
a9d8907c 2942 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
996ae0b0
RK
2943
2944 --------------------------------
2945 -- 3.2.2 Subtype Declaration --
2946 --------------------------------
2947
2948 -- SUBTYPE_DECLARATION ::=
65e78a74
AC
2949 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2950 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
2951
2952 -- The subtype indication field is set to Empty for subtypes
2953 -- declared in package Standard (Positive, Natural).
2954
2955 -- N_Subtype_Declaration
2956 -- Sloc points to SUBTYPE
2957 -- Defining_Identifier (Node1)
a9d8907c 2958 -- Null_Exclusion_Present (Flag11)
996ae0b0
RK
2959 -- Subtype_Indication (Node5)
2960 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
0712790c 2961 -- Exception_Junk (Flag8-Sem)
052e0603 2962 -- Has_Dynamic_Range_Check (Flag12-Sem)
996ae0b0
RK
2963
2964 -------------------------------
2965 -- 3.2.2 Subtype Indication --
2966 -------------------------------
2967
2968 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2969
2970 -- Note: if no constraint is present, the subtype indication appears
2971 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2972 -- node is used only if a constraint is present.
2973
0ab80019
AC
2974 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2975 -- with the null-exclusion part (see AI-231), we had to introduce a new
6b6fcd3e
AC
2976 -- attribute in all the parents of subtype_indication nodes to indicate
2977 -- if the null-exclusion is present.
2978
996ae0b0
RK
2979 -- Note: the reason that this node has expression fields is that a
2980 -- subtype indication can appear as an operand of a membership test.
2981
2982 -- N_Subtype_Indication
2983 -- Sloc points to first token of subtype mark
2984 -- Subtype_Mark (Node4)
2985 -- Constraint (Node3)
2986 -- Etype (Node5-Sem)
2987 -- Must_Not_Freeze (Flag8-Sem)
2988
979b94ea
AC
2989 -- Note: Depending on context, the Etype is either the entity of the
2990 -- Subtype_Mark field, or it is an itype constructed to reify the
2991 -- subtype indication. In particular, such itypes are created for a
2992 -- subtype indication that appears in an array type declaration. This
2993 -- simplifies constraint checking in indexed components.
2994
2995 -- For subtype indications that appear in scalar type and subtype
2996 -- declarations, the Etype is the entity of the subtype mark.
996ae0b0
RK
2997
2998 -------------------------
2999 -- 3.2.2 Subtype Mark --
3000 -------------------------
3001
3002 -- SUBTYPE_MARK ::= subtype_NAME
3003
3004 -----------------------
3005 -- 3.2.2 Constraint --
3006 -----------------------
3007
3008 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
3009
3010 ------------------------------
3011 -- 3.2.2 Scalar Constraint --
3012 ------------------------------
3013
3014 -- SCALAR_CONSTRAINT ::=
3015 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
3016
3017 ---------------------------------
3018 -- 3.2.2 Composite Constraint --
3019 ---------------------------------
3020
3021 -- COMPOSITE_CONSTRAINT ::=
3022 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
3023
3024 -------------------------------
3025 -- 3.3.1 Object Declaration --
3026 -------------------------------
3027
3028 -- OBJECT_DECLARATION ::=
3029 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
718deaf1
AC
3030 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
3031 -- [ASPECT_SPECIFICATIONS];
996ae0b0 3032 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
718deaf1
AC
3033 -- ACCESS_DEFINITION [:= EXPRESSION]
3034 -- [ASPECT_SPECIFICATIONS];
edd63e9b 3035 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
718deaf1
AC
3036 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
3037 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
3038 -- | SINGLE_TASK_DECLARATION
3039 -- | SINGLE_PROTECTED_DECLARATION
3040
3041 -- Note: aliased is not permitted in Ada 83 mode
3042
2a253c5b 3043 -- The N_Object_Declaration node is only for the first three cases.
996ae0b0
RK
3044 -- Single task declaration is handled by P_Task (9.1)
3045 -- Single protected declaration is handled by P_protected (9.5)
3046
3047 -- Although the syntax allows multiple identifiers in the list, the
3048 -- semantics is as though successive declarations were given with
3049 -- identical type definition and expression components. To simplify
3050 -- semantic processing, the parser represents a multiple declaration
3051 -- case as a sequence of single declarations, using the More_Ids and
3052 -- Prev_Ids flags to preserve the original source form as described
3053 -- in the section on "Handling of Defining Identifier Lists".
3054
0712790c
ES
3055 -- The flag Has_Init_Expression is set if an initializing expression
3056 -- is present. Normally it is set if and only if Expression contains
3057 -- a non-empty value, but there is an exception to this. When the
3058 -- initializing expression is an aggregate which requires explicit
3059 -- assignments, the Expression field gets set to Empty, but this flag
3060 -- is still set, so we don't forget we had an initializing expression.
3061
996ae0b0
RK
3062 -- Note: if a range check is required for the initialization
3063 -- expression then the Do_Range_Check flag is set in the Expression,
3064 -- with the check being done against the type given by the object
3065 -- definition, which is also the Etype of the defining identifier.
3066
3067 -- Note: the contents of the Expression field must be ignored (i.e.
3068 -- treated as though it were Empty) if No_Initialization is set True.
3069
fbf5a39b
AC
3070 -- Note: the back end places some restrictions on the form of the
3071 -- Expression field. If the object being declared is Atomic, then
3072 -- the Expression may not have the form of an aggregate (since this
bbaba73f
EB
3073 -- might cause the back end to generate separate assignments). In this
3074 -- case the front end must generate an extra temporary and initialize
fbf5a39b
AC
3075 -- this temporary as required (the temporary itself is not atomic).
3076
d4dfb005 3077 -- Note: there is no node kind for object definition. Instead, the
edd63e9b
ES
3078 -- corresponding field holds a subtype indication, an array type
3079 -- definition, or (Ada 2005, AI-406) an access definition.
3080
996ae0b0
RK
3081 -- N_Object_Declaration
3082 -- Sloc points to first identifier
3083 -- Defining_Identifier (Node1)
fecbd779 3084 -- Aliased_Present (Flag4)
996ae0b0 3085 -- Constant_Present (Flag17) set if CONSTANT appears
a9d8907c 3086 -- Null_Exclusion_Present (Flag11)
3a336262 3087 -- Object_Definition (Node4) subtype indic./array type def./access def.
996ae0b0
RK
3088 -- Expression (Node3) (set to Empty if not present)
3089 -- Handler_List_Entry (Node2-Sem)
3090 -- Corresponding_Generic_Association (Node5-Sem)
3091 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3092 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3093 -- No_Initialization (Flag13-Sem)
3094 -- Assignment_OK (Flag15-Sem)
0712790c 3095 -- Exception_Junk (Flag8-Sem)
996ae0b0 3096 -- Is_Subprogram_Descriptor (Flag16-Sem)
0712790c 3097 -- Has_Init_Expression (Flag14)
c7532b2d 3098 -- Suppress_Assignment_Checks (Flag18-Sem)
996ae0b0
RK
3099
3100 -------------------------------------
3101 -- 3.3.1 Defining Identifier List --
3102 -------------------------------------
3103
3104 -- DEFINING_IDENTIFIER_LIST ::=
3105 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
3106
3107 -------------------------------
3108 -- 3.3.2 Number Declaration --
3109 -------------------------------
3110
3111 -- NUMBER_DECLARATION ::=
3112 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
3113
3114 -- Although the syntax allows multiple identifiers in the list, the
3115 -- semantics is as though successive declarations were given with
3116 -- identical expressions. To simplify semantic processing, the parser
3117 -- represents a multiple declaration case as a sequence of single
3118 -- declarations, using the More_Ids and Prev_Ids flags to preserve
3119 -- the original source form as described in the section on "Handling
3120 -- of Defining Identifier Lists".
3121
3122 -- N_Number_Declaration
3123 -- Sloc points to first identifier
3124 -- Defining_Identifier (Node1)
3125 -- Expression (Node3)
3126 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3127 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3128
3129 ----------------------------------
3130 -- 3.4 Derived Type Definition --
3131 ----------------------------------
3132
3133 -- DERIVED_TYPE_DEFINITION ::=
244480db 3134 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
a9d8907c 3135 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
996ae0b0 3136
d63199d8
PMR
3137 -- Note: ABSTRACT, LIMITED, and record extension part are not permitted
3138 -- in Ada 83 mode.
996ae0b0
RK
3139
3140 -- Note: a record extension part is required if ABSTRACT is present
3141
3142 -- N_Derived_Type_Definition
3143 -- Sloc points to NEW
3144 -- Abstract_Present (Flag4)
a9d8907c 3145 -- Null_Exclusion_Present (Flag11) (set to False if not present)
996ae0b0
RK
3146 -- Subtype_Indication (Node5)
3147 -- Record_Extension_Part (Node3) (set to Empty if not present)
244480db 3148 -- Limited_Present (Flag17)
a9d8907c
JM
3149 -- Task_Present (Flag5) set in task interfaces
3150 -- Protected_Present (Flag6) set in protected interfaces
3151 -- Synchronized_Present (Flag7) set in interfaces
3152 -- Interface_List (List2) (set to No_List if none)
3153 -- Interface_Present (Flag16) set in abstract interfaces
3154
e3da30b2
RD
3155 -- Note: Task_Present, Protected_Present, Synchronized_Present,
3156 -- Interface_List, and Interface_Present are used for abstract
3157 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
996ae0b0
RK
3158
3159 ---------------------------
3160 -- 3.5 Range Constraint --
3161 ---------------------------
3162
3163 -- RANGE_CONSTRAINT ::= range RANGE
3164
3165 -- N_Range_Constraint
3166 -- Sloc points to RANGE
3167 -- Range_Expression (Node4)
3168
3169 ----------------
3170 -- 3.5 Range --
3171 ----------------
3172
3173 -- RANGE ::=
3174 -- RANGE_ATTRIBUTE_REFERENCE
3175 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
3176
3177 -- Note: the case of a range given as a range attribute reference
3178 -- appears directly in the tree as an attribute reference.
3179
3180 -- Note: the field name for a reference to a range is Range_Expression
a90bd866 3181 -- rather than Range, because range is a reserved keyword in Ada.
996ae0b0
RK
3182
3183 -- Note: the reason that this node has expression fields is that a
3184 -- range can appear as an operand of a membership test. The Etype
3185 -- field is the type of the range (we do NOT construct an implicit
3186 -- subtype to represent the range exactly).
3187
3188 -- N_Range
3189 -- Sloc points to ..
3190 -- Low_Bound (Node1)
3191 -- High_Bound (Node2)
3192 -- Includes_Infinities (Flag11)
3193 -- plus fields for expression
3194
3195 -- Note: if the range appears in a context, such as a subtype
3196 -- declaration, where range checks are required on one or both of
3197 -- the expression fields, then type conversion nodes are inserted
3198 -- to represent the required checks.
3199
3200 ----------------------------------------
3201 -- 3.5.1 Enumeration Type Definition --
3202 ----------------------------------------
3203
3204 -- ENUMERATION_TYPE_DEFINITION ::=
3205 -- (ENUMERATION_LITERAL_SPECIFICATION
3206 -- {, ENUMERATION_LITERAL_SPECIFICATION})
3207
3208 -- Note: the Literals field in the node described below is null for
3209 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
3210 -- which special processing handles these types as special cases.
3211
3212 -- N_Enumeration_Type_Definition
3213 -- Sloc points to left parenthesis
3214 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
07fc65c4 3215 -- End_Label (Node4) (set to Empty if internally generated record)
996ae0b0
RK
3216
3217 ----------------------------------------------
3218 -- 3.5.1 Enumeration Literal Specification --
3219 ----------------------------------------------
3220
3221 -- ENUMERATION_LITERAL_SPECIFICATION ::=
3222 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
3223
3224 ---------------------------------------
3225 -- 3.5.1 Defining Character Literal --
3226 ---------------------------------------
3227
3228 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
3229
3230 -- A defining character literal is an entity, which has additional
3231 -- fields depending on the setting of the Ekind field. These
3232 -- additional fields are defined (and access subprograms declared)
3233 -- in package Einfo.
3234
3235 -- Note: N_Defining_Character_Literal is an extended node whose fields
866000e7
GD
3236 -- are deliberately laid out to match layout of fields in an ordinary
3237 -- N_Character_Literal node, allowing for easy alteration of a character
996ae0b0
RK
3238 -- literal node into a defining character literal node. For details, see
3239 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
3240
3241 -- N_Defining_Character_Literal
3242 -- Sloc points to literal
3243 -- Chars (Name1) contains the Name_Id for the identifier
3244 -- Next_Entity (Node2-Sem)
3245 -- Scope (Node3-Sem)
3246 -- Etype (Node5-Sem)
3247
3248 ------------------------------------
3249 -- 3.5.4 Integer Type Definition --
3250 ------------------------------------
3251
3252 -- Note: there is an error in this rule in the latest version of the
3253 -- grammar, so we have retained the old rule pending clarification.
3254
3255 -- INTEGER_TYPE_DEFINITION ::=
3256 -- SIGNED_INTEGER_TYPE_DEFINITION
a5b62485 3257 -- | MODULAR_TYPE_DEFINITION
996ae0b0
RK
3258
3259 -------------------------------------------
3260 -- 3.5.4 Signed Integer Type Definition --
3261 -------------------------------------------
3262
3263 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
3264 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3265
a5b62485
AC
3266 -- Note: the Low_Bound and High_Bound fields are set to Empty
3267 -- for integer types defined in package Standard.
996ae0b0
RK
3268
3269 -- N_Signed_Integer_Type_Definition
3270 -- Sloc points to RANGE
3271 -- Low_Bound (Node1)
3272 -- High_Bound (Node2)
3273
a5b62485
AC
3274 ------------------------------------
3275 -- 3.5.4 Modular Type Definition --
3276 ------------------------------------
996ae0b0
RK
3277
3278 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
3279
3280 -- N_Modular_Type_Definition
3281 -- Sloc points to MOD
3282 -- Expression (Node3)
3283
3284 ---------------------------------
3285 -- 3.5.6 Real Type Definition --
3286 ---------------------------------
3287
3288 -- REAL_TYPE_DEFINITION ::=
3289 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
3290
3291 --------------------------------------
3292 -- 3.5.7 Floating Point Definition --
3293 --------------------------------------
3294
3295 -- FLOATING_POINT_DEFINITION ::=
3296 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
3297
3298 -- Note: The Digits_Expression and Real_Range_Specifications fields
3299 -- are set to Empty for floating-point types declared in Standard.
3300
3301 -- N_Floating_Point_Definition
3302 -- Sloc points to DIGITS
3303 -- Digits_Expression (Node2)
3304 -- Real_Range_Specification (Node4) (set to Empty if not present)
3305
3306 -------------------------------------
3307 -- 3.5.7 Real Range Specification --
3308 -------------------------------------
3309
3310 -- REAL_RANGE_SPECIFICATION ::=
3311 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
3312
3313 -- N_Real_Range_Specification
3314 -- Sloc points to RANGE
3315 -- Low_Bound (Node1)
3316 -- High_Bound (Node2)
3317
3318 -----------------------------------
3319 -- 3.5.9 Fixed Point Definition --
3320 -----------------------------------
3321
3322 -- FIXED_POINT_DEFINITION ::=
3323 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
3324
3325 --------------------------------------------
3326 -- 3.5.9 Ordinary Fixed Point Definition --
3327 --------------------------------------------
3328
3329 -- ORDINARY_FIXED_POINT_DEFINITION ::=
3330 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
3331
3332 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3333
996ae0b0
RK
3334 -- N_Ordinary_Fixed_Point_Definition
3335 -- Sloc points to DELTA
3336 -- Delta_Expression (Node3)
3337 -- Real_Range_Specification (Node4)
3338
3339 -------------------------------------------
3340 -- 3.5.9 Decimal Fixed Point Definition --
3341 -------------------------------------------
3342
3343 -- DECIMAL_FIXED_POINT_DEFINITION ::=
3344 -- delta static_EXPRESSION
3345 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
3346
3347 -- Note: decimal types are not permitted in Ada 83 mode
3348
3349 -- N_Decimal_Fixed_Point_Definition
3350 -- Sloc points to DELTA
3351 -- Delta_Expression (Node3)
3352 -- Digits_Expression (Node2)
3353 -- Real_Range_Specification (Node4) (set to Empty if not present)
3354
3355 ------------------------------
3356 -- 3.5.9 Digits Constraint --
3357 ------------------------------
3358
3359 -- DIGITS_CONSTRAINT ::=
3360 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
3361
3362 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
3363 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
3364
3365 -- N_Digits_Constraint
3366 -- Sloc points to DIGITS
3367 -- Digits_Expression (Node2)
3368 -- Range_Constraint (Node4) (set to Empty if not present)
3369
3370 --------------------------------
3371 -- 3.6 Array Type Definition --
3372 --------------------------------
3373
3374 -- ARRAY_TYPE_DEFINITION ::=
3375 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
3376
3377 -----------------------------------------
3378 -- 3.6 Unconstrained Array Definition --
3379 -----------------------------------------
3380
3381 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
3382 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
3383 -- COMPONENT_DEFINITION
3384
3385 -- Note: dimensionality of array is indicated by number of entries in
3386 -- the Subtype_Marks list, which has one entry for each dimension.
3387
3388 -- N_Unconstrained_Array_Definition
3389 -- Sloc points to ARRAY
3390 -- Subtype_Marks (List2)
a397db96 3391 -- Component_Definition (Node4)
996ae0b0
RK
3392
3393 -----------------------------------
3394 -- 3.6 Index Subtype Definition --
3395 -----------------------------------
3396
3397 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3398
3399 -- There is no explicit node in the tree for an index subtype
3400 -- definition since the N_Unconstrained_Array_Definition node
3401 -- incorporates the type marks which appear in this context.
3402
3403 ---------------------------------------
3404 -- 3.6 Constrained Array Definition --
3405 ---------------------------------------
3406
3407 -- CONSTRAINED_ARRAY_DEFINITION ::=
3408 -- array (DISCRETE_SUBTYPE_DEFINITION
3409 -- {, DISCRETE_SUBTYPE_DEFINITION})
3410 -- of COMPONENT_DEFINITION
3411
3412 -- Note: dimensionality of array is indicated by number of entries
3413 -- in the Discrete_Subtype_Definitions list, which has one entry
3414 -- for each dimension.
3415
3416 -- N_Constrained_Array_Definition
3417 -- Sloc points to ARRAY
3418 -- Discrete_Subtype_Definitions (List2)
a397db96 3419 -- Component_Definition (Node4)
996ae0b0 3420
3a845e07
RD
3421 -- Note: although the language allows the full syntax for discrete
3422 -- subtype definitions (i.e. a discrete subtype indication or a range),
3423 -- in the generated tree, we always rewrite these as N_Range nodes.
3424
996ae0b0
RK
3425 --------------------------------------
3426 -- 3.6 Discrete Subtype Definition --
3427 --------------------------------------
3428
3429 -- DISCRETE_SUBTYPE_DEFINITION ::=
3430 -- discrete_SUBTYPE_INDICATION | RANGE
3431
3432 -------------------------------
3433 -- 3.6 Component Definition --
3434 -------------------------------
3435
6e937c1c 3436 -- COMPONENT_DEFINITION ::=
6b6fcd3e 3437 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
996ae0b0 3438
996ae0b0
RK
3439 -- Note: although the syntax does not permit a component definition to
3440 -- be an anonymous array (and the parser will diagnose such an attempt
3441 -- with an appropriate message), it is possible for anonymous arrays
3442 -- to appear as component definitions. The semantics and back end handle
3443 -- this case properly, and the expander in fact generates such cases.
0ab80019
AC
3444 -- Access_Definition is an optional field that gives support to
3445 -- Ada 2005 (AI-230). The parser generates nodes that have either the
6e937c1c 3446 -- Subtype_Indication field or else the Access_Definition field.
996ae0b0 3447
a397db96 3448 -- N_Component_Definition
d63199d8 3449 -- Sloc points to ALIASED, ACCESS, or to first token of subtype mark
a397db96 3450 -- Aliased_Present (Flag4)
a9d8907c 3451 -- Null_Exclusion_Present (Flag11)
6e937c1c
AC
3452 -- Subtype_Indication (Node5) (set to Empty if not present)
3453 -- Access_Definition (Node3) (set to Empty if not present)
a397db96 3454
996ae0b0
RK
3455 -----------------------------
3456 -- 3.6.1 Index Constraint --
3457 -----------------------------
3458
3459 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3460
3461 -- It is not in general possible to distinguish between discriminant
3462 -- constraints and index constraints at parse time, since a simple
3463 -- name could be either the subtype mark of a discrete range, or an
3464 -- expression in a discriminant association with no name. Either
3465 -- entry appears simply as the name, and the semantic parse must
3466 -- distinguish between the two cases. Thus we use a common tree
3467 -- node format for both of these constraint types.
3468
3469 -- See Discriminant_Constraint for format of node
3470
3471 ---------------------------
3472 -- 3.6.1 Discrete Range --
3473 ---------------------------
3474
3475 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3476
3477 ----------------------------
3478 -- 3.7 Discriminant Part --
3479 ----------------------------
3480
3481 -- DISCRIMINANT_PART ::=
3482 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3483
3484 ------------------------------------
3485 -- 3.7 Unknown Discriminant Part --
3486 ------------------------------------
3487
3488 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3489
3490 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3491
3492 -- There is no explicit node in the tree for an unknown discriminant
3493 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3494 -- parent node.
3495
3496 ----------------------------------
3497 -- 3.7 Known Discriminant Part --
3498 ----------------------------------
3499
3500 -- KNOWN_DISCRIMINANT_PART ::=
3501 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3502
3503 -------------------------------------
3504 -- 3.7 Discriminant Specification --
3505 -------------------------------------
3506
3507 -- DISCRIMINANT_SPECIFICATION ::=
6b6fcd3e 3508 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
996ae0b0
RK
3509 -- [:= DEFAULT_EXPRESSION]
3510 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3511 -- [:= DEFAULT_EXPRESSION]
3512
3513 -- Although the syntax allows multiple identifiers in the list, the
3514 -- semantics is as though successive specifications were given with
3515 -- identical type definition and expression components. To simplify
3516 -- semantic processing, the parser represents a multiple declaration
3517 -- case as a sequence of single specifications, using the More_Ids and
3518 -- Prev_Ids flags to preserve the original source form as described
3519 -- in the section on "Handling of Defining Identifier Lists".
3520
3521 -- N_Discriminant_Specification
3522 -- Sloc points to first identifier
3523 -- Defining_Identifier (Node1)
a9d8907c
JM
3524 -- Null_Exclusion_Present (Flag11)
3525 -- Discriminant_Type (Node5) subtype mark or access parameter definition
996ae0b0
RK
3526 -- Expression (Node3) (set to Empty if no default expression)
3527 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3528 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3529
3530 -----------------------------
3531 -- 3.7 Default Expression --
3532 -----------------------------
3533
3534 -- DEFAULT_EXPRESSION ::= EXPRESSION
3535
3536 ------------------------------------
3537 -- 3.7.1 Discriminant Constraint --
3538 ------------------------------------
3539
3540 -- DISCRIMINANT_CONSTRAINT ::=
3541 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3542
3543 -- It is not in general possible to distinguish between discriminant
3544 -- constraints and index constraints at parse time, since a simple
3545 -- name could be either the subtype mark of a discrete range, or an
3546 -- expression in a discriminant association with no name. Either
3547 -- entry appears simply as the name, and the semantic parse must
3548 -- distinguish between the two cases. Thus we use a common tree
3549 -- node format for both of these constraint types.
3550
3551 -- N_Index_Or_Discriminant_Constraint
3552 -- Sloc points to left paren
3553 -- Constraints (List1) points to list of discrete ranges or
3554 -- discriminant associations
3555
3556 -------------------------------------
3557 -- 3.7.1 Discriminant Association --
3558 -------------------------------------
3559
3560 -- DISCRIMINANT_ASSOCIATION ::=
3561 -- [discriminant_SELECTOR_NAME
3562 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3563
3564 -- Note: a discriminant association that has no selector name list
3565 -- appears directly as an expression in the tree.
3566
3567 -- N_Discriminant_Association
3568 -- Sloc points to first token of discriminant association
3569 -- Selector_Names (List1) (always non-empty, since if no selector
ce06d641 3570 -- names are present, this node is not used, see comment above)
996ae0b0
RK
3571 -- Expression (Node3)
3572
3573 ---------------------------------
3574 -- 3.8 Record Type Definition --
3575 ---------------------------------
3576
3577 -- RECORD_TYPE_DEFINITION ::=
3578 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3579
3580 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3581
3582 -- There is no explicit node in the tree for a record type definition.
3583 -- Instead the flags for Tagged_Present and Limited_Present appear in
3584 -- the N_Record_Definition node for a record definition appearing in
3585 -- the context of a record type definition.
3586
3587 ----------------------------
3588 -- 3.8 Record Definition --
3589 ----------------------------
3590
3591 -- RECORD_DEFINITION ::=
3592 -- record
3593 -- COMPONENT_LIST
3594 -- end record
3595 -- | null record
3596
d63199d8 3597 -- Note: the Abstract_Present, Tagged_Present, and Limited_Present
996ae0b0
RK
3598 -- flags appear only for a record definition appearing in a record
3599 -- type definition.
3600
3601 -- Note: the NULL RECORD case is not permitted in Ada 83
3602
3603 -- N_Record_Definition
3604 -- Sloc points to RECORD or NULL
3605 -- End_Label (Node4) (set to Empty if internally generated record)
3606 -- Abstract_Present (Flag4)
3607 -- Tagged_Present (Flag15)
3608 -- Limited_Present (Flag17)
3609 -- Component_List (Node1) empty in null record case
3610 -- Null_Present (Flag13) set in null record case
a9d8907c
JM
3611 -- Task_Present (Flag5) set in task interfaces
3612 -- Protected_Present (Flag6) set in protected interfaces
3613 -- Synchronized_Present (Flag7) set in interfaces
3614 -- Interface_Present (Flag16) set in abstract interfaces
3615 -- Interface_List (List2) (set to No_List if none)
3616
244480db
GD
3617 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3618 -- Interface_List and Interface_Present are used for abstract
3619 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
996ae0b0
RK
3620
3621 -------------------------
3622 -- 3.8 Component List --
3623 -------------------------
3624
3625 -- COMPONENT_LIST ::=
3626 -- COMPONENT_ITEM {COMPONENT_ITEM}
3627 -- | {COMPONENT_ITEM} VARIANT_PART
3628 -- | null;
3629
3630 -- N_Component_List
3631 -- Sloc points to first token of component list
3632 -- Component_Items (List3)
3633 -- Variant_Part (Node4) (set to Empty if no variant part)
3634 -- Null_Present (Flag13)
3635
3636 -------------------------
3637 -- 3.8 Component Item --
3638 -------------------------
3639
3640 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3641
3642 -- Note: A component item can also be a pragma, and in the tree
3643 -- that is obtained after semantic processing, a component item
3644 -- can be an N_Null node resulting from a non-recognized pragma.
3645
3646 --------------------------------
3647 -- 3.8 Component Declaration --
3648 --------------------------------
3649
3650 -- COMPONENT_DECLARATION ::=
3651 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
718deaf1
AC
3652 -- [:= DEFAULT_EXPRESSION]
3653 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
3654
3655 -- Note: although the syntax does not permit a component definition to
3656 -- be an anonymous array (and the parser will diagnose such an attempt
3657 -- with an appropriate message), it is possible for anonymous arrays
3658 -- to appear as component definitions. The semantics and back end handle
3659 -- this case properly, and the expander in fact generates such cases.
3660
3661 -- Although the syntax allows multiple identifiers in the list, the
3662 -- semantics is as though successive declarations were given with the
3663 -- same component definition and expression components. To simplify
3664 -- semantic processing, the parser represents a multiple declaration
3665 -- case as a sequence of single declarations, using the More_Ids and
3666 -- Prev_Ids flags to preserve the original source form as described
3667 -- in the section on "Handling of Defining Identifier Lists".
3668
3669 -- N_Component_Declaration
3670 -- Sloc points to first identifier
3671 -- Defining_Identifier (Node1)
a397db96 3672 -- Component_Definition (Node4)
996ae0b0
RK
3673 -- Expression (Node3) (set to Empty if no default expression)
3674 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3675 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3676
3677 -------------------------
3678 -- 3.8.1 Variant Part --
3679 -------------------------
3680
3681 -- VARIANT_PART ::=
3682 -- case discriminant_DIRECT_NAME is
15918371 3683 -- VARIANT {VARIANT}
996ae0b0
RK
3684 -- end case;
3685
3686 -- Note: the variants list can contain pragmas as well as variants.
3687 -- In a properly formed program there is at least one variant.
3688
3689 -- N_Variant_Part
3690 -- Sloc points to CASE
3691 -- Name (Node2)
3692 -- Variants (List1)
3693
3694 --------------------
3695 -- 3.8.1 Variant --
3696 --------------------
3697
3698 -- VARIANT ::=
3699 -- when DISCRETE_CHOICE_LIST =>
3700 -- COMPONENT_LIST
3701
3702 -- N_Variant
3703 -- Sloc points to WHEN
3704 -- Discrete_Choices (List4)
3705 -- Component_List (Node1)
3706 -- Enclosing_Variant (Node2-Sem)
3707 -- Present_Expr (Uint3-Sem)
3708 -- Dcheck_Function (Node5-Sem)
15918371 3709 -- Has_SP_Choice (Flag15-Sem)
996ae0b0 3710
9e92ad49
AC
3711 -- Note: in the list of Discrete_Choices, the tree passed to the back
3712 -- end does not have choice entries corresponding to names of statically
3713 -- predicated subtypes. Such entries are always expanded out to the list
3714 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
15918371
AC
3715 -- mode also has this expansion, but done with a proper Rewrite call on
3716 -- the N_Variant node so that ASIS can properly retrieve the original.
9e92ad49 3717
996ae0b0
RK
3718 ---------------------------------
3719 -- 3.8.1 Discrete Choice List --
3720 ---------------------------------
3721
3722 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3723
3724 ----------------------------
3725 -- 3.8.1 Discrete Choice --
3726 ----------------------------
3727
3728 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3729
3730 -- Note: in Ada 83 mode, the expression must be a simple expression
3731
3732 -- The only choice that appears explicitly is the OTHERS choice, as
3733 -- defined here. Other cases of discrete choice (expression and
3734 -- discrete range) appear directly. This production is also used
3735 -- for the OTHERS possibility of an exception choice.
3736
3737 -- Note: in accordance with the syntax, the parser does not check that
3738 -- OTHERS appears at the end on its own in a choice list context. This
3739 -- is a semantic check.
3740
3741 -- N_Others_Choice
3742 -- Sloc points to OTHERS
3743 -- Others_Discrete_Choices (List1-Sem)
3744 -- All_Others (Flag11-Sem)
3745
3746 ----------------------------------
3747 -- 3.9.1 Record Extension Part --
3748 ----------------------------------
3749
3750 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3751
3752 -- Note: record extension parts are not permitted in Ada 83 mode
3753
a9d8907c
JM
3754 --------------------------------------
3755 -- 3.9.4 Interface Type Definition --
3756 --------------------------------------
3757
3758 -- INTERFACE_TYPE_DEFINITION ::=
3759 -- [limited | task | protected | synchronized]
3760 -- interface [interface_list]
3761
3762 -- Note: Interfaces are implemented with N_Record_Definition and
3763 -- N_Derived_Type_Definition nodes because most of the support
3764 -- for the analysis of abstract types has been reused to
3765 -- analyze abstract interfaces.
3766
996ae0b0
RK
3767 ----------------------------------
3768 -- 3.10 Access Type Definition --
3769 ----------------------------------
3770
3771 -- ACCESS_TYPE_DEFINITION ::=
3772 -- ACCESS_TO_OBJECT_DEFINITION
3773 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3774
6b6fcd3e
AC
3775 --------------------------
3776 -- 3.10 Null Exclusion --
3777 --------------------------
3778
3779 -- NULL_EXCLUSION ::= not null
3780
996ae0b0
RK
3781 ---------------------------------------
3782 -- 3.10 Access To Object Definition --
3783 ---------------------------------------
3784
3785 -- ACCESS_TO_OBJECT_DEFINITION ::=
6b6fcd3e
AC
3786 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3787 -- SUBTYPE_INDICATION
996ae0b0
RK
3788
3789 -- N_Access_To_Object_Definition
3790 -- Sloc points to ACCESS
3791 -- All_Present (Flag15)
a9d8907c 3792 -- Null_Exclusion_Present (Flag11)
7a2c2277 3793 -- Null_Excluding_Subtype (Flag16)
996ae0b0
RK
3794 -- Subtype_Indication (Node5)
3795 -- Constant_Present (Flag17)
3796
3797 -----------------------------------
3798 -- 3.10 General Access Modifier --
3799 -----------------------------------
3800
3801 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3802
3803 -- Note: general access modifiers are not permitted in Ada 83 mode
3804
3805 -- There is no explicit node in the tree for general access modifier.
3806 -- Instead the All_Present or Constant_Present flags are set in the
3807 -- parent node.
3808
3809 -------------------------------------------
3810 -- 3.10 Access To Subprogram Definition --
3811 -------------------------------------------
3812
3813 -- ACCESS_TO_SUBPROGRAM_DEFINITION
6b6fcd3e
AC
3814 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3815 -- | [NULL_EXCLUSION] access [protected] function
3816 -- PARAMETER_AND_RESULT_PROFILE
996ae0b0
RK
3817
3818 -- Note: access to subprograms are not permitted in Ada 83 mode
3819
3820 -- N_Access_Function_Definition
3821 -- Sloc points to ACCESS
a9d8907c 3822 -- Null_Exclusion_Present (Flag11)
b66c3ff4 3823 -- Null_Exclusion_In_Return_Present (Flag14)
a9d8907c 3824 -- Protected_Present (Flag6)
996ae0b0 3825 -- Parameter_Specifications (List3) (set to No_List if no formal part)
244480db 3826 -- Result_Definition (Node4) result subtype (subtype mark or access def)
996ae0b0
RK
3827
3828 -- N_Access_Procedure_Definition
3829 -- Sloc points to ACCESS
a9d8907c
JM
3830 -- Null_Exclusion_Present (Flag11)
3831 -- Protected_Present (Flag6)
996ae0b0
RK
3832 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3833
3834 -----------------------------
3835 -- 3.10 Access Definition --
3836 -----------------------------
3837
6b6fcd3e
AC
3838 -- ACCESS_DEFINITION ::=
3839 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
7324bf49
AC
3840 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3841
0ab80019 3842 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
996ae0b0
RK
3843
3844 -- N_Access_Definition
3845 -- Sloc points to ACCESS
a9d8907c 3846 -- Null_Exclusion_Present (Flag11)
2820d220
AC
3847 -- All_Present (Flag15)
3848 -- Constant_Present (Flag17)
996ae0b0 3849 -- Subtype_Mark (Node4)
7324bf49 3850 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
996ae0b0
RK
3851
3852 -----------------------------------------
3853 -- 3.10.1 Incomplete Type Declaration --
3854 -----------------------------------------
3855
3856 -- INCOMPLETE_TYPE_DECLARATION ::=
d8db0bca 3857 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
996ae0b0
RK
3858
3859 -- N_Incomplete_Type_Declaration
3860 -- Sloc points to TYPE
3861 -- Defining_Identifier (Node1)
3862 -- Discriminant_Specifications (List4) (set to No_List if no
3863 -- discriminant part, or if the discriminant part is an
3864 -- unknown discriminant part)
99d520ad 3865 -- Premature_Use (Node5-Sem) used for improved diagnostics.
996ae0b0 3866 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
d8db0bca 3867 -- Tagged_Present (Flag15)
996ae0b0
RK
3868
3869 ----------------------------
3870 -- 3.11 Declarative Part --
3871 ----------------------------
3872
3873 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3874
3875 -- Note: although the parser enforces the syntactic requirement that
3876 -- a declarative part can contain only declarations, the semantic
3877 -- processing may add statements to the list of actions in a
3878 -- declarative part, so the code generator should be prepared
3879 -- to accept a statement in this position.
3880
3881 ----------------------------
3882 -- 3.11 Declarative Item --
3883 ----------------------------
3884
3885 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3886
3887 ----------------------------------
3888 -- 3.11 Basic Declarative Item --
3889 ----------------------------------
3890
3891 -- BASIC_DECLARATIVE_ITEM ::=
3892 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3893
3894 ----------------
3895 -- 3.11 Body --
3896 ----------------
3897
3898 -- BODY ::= PROPER_BODY | BODY_STUB
3899
3900 -----------------------
3901 -- 3.11 Proper Body --
3902 -----------------------
3903
3904 -- PROPER_BODY ::=
3905 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3906
3907 ---------------
3908 -- 4.1 Name --
3909 ---------------
3910
3911 -- NAME ::=
3912 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3913 -- | INDEXED_COMPONENT | SLICE
3914 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3915 -- | TYPE_CONVERSION | FUNCTION_CALL
3916 -- | CHARACTER_LITERAL
3917
3918 ----------------------
3919 -- 4.1 Direct Name --
3920 ----------------------
3921
3922 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3923
3924 -----------------
3925 -- 4.1 Prefix --
3926 -----------------
3927
3928 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3929
3930 -------------------------------
3931 -- 4.1 Explicit Dereference --
3932 -------------------------------
3933
3934 -- EXPLICIT_DEREFERENCE ::= NAME . all
3935
3936 -- N_Explicit_Dereference
3937 -- Sloc points to ALL
3938 -- Prefix (Node3)
e3da30b2 3939 -- Actual_Designated_Subtype (Node4-Sem)
b0d71355 3940 -- Has_Dereference_Action (Flag13-Sem)
90e491a7 3941 -- Atomic_Sync_Required (Flag14-Sem)
996ae0b0
RK
3942 -- plus fields for expression
3943
3944 -------------------------------
3945 -- 4.1 Implicit Dereference --
3946 -------------------------------
3947
3948 -- IMPLICIT_DEREFERENCE ::= NAME
3949
3950 ------------------------------
3951 -- 4.1.1 Indexed Component --
3952 ------------------------------
3953
3954 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3955
3956 -- Note: the parser may generate this node in some situations where it
4ef36ac7 3957 -- should be a function call. The semantic pass must correct this
996ae0b0
RK
3958 -- misidentification (which is inevitable at the parser level).
3959
3960 -- N_Indexed_Component
3961 -- Sloc contains a copy of the Sloc value of the Prefix
3962 -- Prefix (Node3)
3963 -- Expressions (List1)
5f50020a 3964 -- Generalized_Indexing (Node4-Sem)
5972791c 3965 -- Atomic_Sync_Required (Flag14-Sem)
996ae0b0
RK
3966 -- plus fields for expression
3967
3968 -- Note: if any of the subscripts requires a range check, then the
3969 -- Do_Range_Check flag is set on the corresponding expression, with
3970 -- the index type being determined from the type of the Prefix, which
3971 -- references the array being indexed.
3972
3973 -- Note: in a fully analyzed and expanded indexed component node, and
3974 -- hence in any such node that gigi sees, if the prefix is an access
3975 -- type, then an explicit dereference operation has been inserted.
3976
3977 ------------------
3978 -- 4.1.2 Slice --
3979 ------------------
3980
3981 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3982
3983 -- Note: an implicit subtype is created to describe the resulting
3984 -- type, so that the bounds of this type are the bounds of the slice.
3985
3986 -- N_Slice
3987 -- Sloc points to first token of prefix
3988 -- Prefix (Node3)
3989 -- Discrete_Range (Node4)
996ae0b0
RK
3990 -- plus fields for expression
3991
3992 -------------------------------
3993 -- 4.1.3 Selected Component --
3994 -------------------------------
3995
3996 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3997
3998 -- Note: selected components that are semantically expanded names get
3999 -- changed during semantic processing into the separate N_Expanded_Name
4000 -- node. See description of this node in the section on semantic nodes.
4001
4002 -- N_Selected_Component
aafc151a 4003 -- Sloc points to the period
996ae0b0
RK
4004 -- Prefix (Node3)
4005 -- Selector_Name (Node2)
3e542a58 4006 -- Associated_Node (Node4-Sem)
90e491a7 4007 -- Do_Discriminant_Check (Flag3-Sem)
fbf5a39b 4008 -- Is_In_Discriminant_Check (Flag11-Sem)
4c318253 4009 -- Atomic_Sync_Required (Flag14-Sem)
90e491a7 4010 -- Is_Prefixed_Call (Flag17-Sem)
996ae0b0
RK
4011 -- plus fields for expression
4012
4013 --------------------------
4014 -- 4.1.3 Selector Name --
4015 --------------------------
4016
4017 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
4018
4019 --------------------------------
4020 -- 4.1.4 Attribute Reference --
4021 --------------------------------
4022
4023 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
4024
4025 -- Note: the syntax is quite ambiguous at this point. Consider:
4026
4027 -- A'Length (X) X is part of the attribute designator
4028 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
4029 -- A'Class (X) X is the expression of a type conversion
4030
4031 -- It would be possible for the parser to distinguish these cases
4032 -- by looking at the attribute identifier. However, that would mean
4033 -- more work in introducing new implementation defined attributes,
4034 -- and also it would mean that special processing for attributes
4035 -- would be scattered around, instead of being centralized in the
4036 -- semantic routine that handles an N_Attribute_Reference node.
4037 -- Consequently, the parser in all the above cases stores the
4038 -- expression (X in these examples) as a single element list in
4039 -- in the Expressions field of the N_Attribute_Reference node.
4040
4041 -- Similarly, for attributes like Max which take two arguments,
4042 -- we store the two arguments as a two element list in the
4043 -- Expressions field. Of course it is clear at parse time that
4044 -- this case is really a function call with an attribute as the
4045 -- prefix, but it turns out to be convenient to handle the two
4046 -- argument case in a similar manner to the one argument case,
4047 -- and indeed in general the parser will accept any number of
4048 -- expressions in this position and store them as a list in the
4049 -- attribute reference node. This allows for future addition of
4050 -- attributes that take more than two arguments.
4051
4052 -- Note: named associates are not permitted in function calls where
4053 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
4054 -- to skip the normal subprogram argument processing.
4055
4056 -- Note: for the attributes whose designators are technically keywords,
4057 -- i.e. digits, access, delta, range, the Attribute_Name field contains
4058 -- the corresponding name, even though no identifier is involved.
4059
a9d8907c
JM
4060 -- Note: the generated code may contain stream attributes applied to
4061 -- limited types for which no stream routines exist officially. In such
4062 -- case, the result is to use the stream attribute for the underlying
4063 -- full type, or in the case of a protected type, the components
3354f96d 4064 -- (including any discriminants) are merely streamed in order.
996ae0b0
RK
4065
4066 -- See Exp_Attr for a complete description of which attributes are
4067 -- passed onto Gigi, and which are handled entirely by the front end.
4068
4069 -- Gigi restriction: For the Pos attribute, the prefix cannot be
4070 -- a non-standard enumeration type or a nonzero/zero semantics
4071 -- boolean type, so the value is simply the stored representation.
4072
80d4224f
RD
4073 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
4074 -- references a subprogram that is a renaming, then the front end must
4075 -- rewrite the attribute to refer directly to the renamed entity.
4076
ee10c0ec
RD
4077 -- Note: syntactically the prefix of an attribute reference must be a
4078 -- name, and this (somewhat artificial) requirement is enforced by the
4079 -- parser. However, for many attributes, such as 'Valid, it is quite
4080 -- reasonable to apply the attribute to any value, and hence to any
4081 -- expression. Internally in the tree, the prefix is an expression which
4082 -- does not have to be a name, and this is handled fine by the semantic
4083 -- analysis and expansion, and back ends. This arises for the case of
4084 -- attribute references built by the expander (e.g. 'Valid for the case
4085 -- of an implicit validity check).
4086
07fc65c4
GB
4087 -- Note: In generated code, the Address and Unrestricted_Access
4088 -- attributes can be applied to any expression, and the meaning is
4089 -- to create an object containing the value (the object is in the
4090 -- current stack frame), and pass the address of this value. If the
4091 -- Must_Be_Byte_Aligned flag is set, then the object whose address
4092 -- is taken must be on a byte (storage unit) boundary, and if it is
4093 -- not (or may not be), then the generated code must create a copy
4094 -- that is byte aligned, and pass the address of this copy.
4095
996ae0b0
RK
4096 -- N_Attribute_Reference
4097 -- Sloc points to apostrophe
ee10c0ec 4098 -- Prefix (Node3) (general expression, see note above)
996ae0b0
RK
4099 -- Attribute_Name (Name2) identifier name from attribute designator
4100 -- Expressions (List1) (set to No_List if no associated expressions)
4101 -- Entity (Node4-Sem) used if the attribute yields a type
3e542a58 4102 -- Associated_Node (Node4-Sem)
90e491a7
PMR
4103 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
4104 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
162ed06f 4105 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
ca20a08e 4106 -- Header_Size_Added (Flag11-Sem)
996ae0b0 4107 -- Redundant_Use (Flag13-Sem)
90e491a7 4108 -- Must_Be_Byte_Aligned (Flag14-Sem)
996ae0b0
RK
4109 -- plus fields for expression
4110
aa9b151a
AC
4111 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
4112 -- into equivalent if expressions, properly taking care of side effects.
4113
996ae0b0
RK
4114 ---------------------------------
4115 -- 4.1.4 Attribute Designator --
4116 ---------------------------------
4117
4118 -- ATTRIBUTE_DESIGNATOR ::=
4119 -- IDENTIFIER [(static_EXPRESSION)]
4120 -- | access | delta | digits
4121
4122 -- There is no explicit node in the tree for an attribute designator.
4123 -- Instead the Attribute_Name and Expressions fields of the parent
4124 -- node (N_Attribute_Reference node) hold the information.
4125
d63199d8 4126 -- Note: if ACCESS, DELTA, or DIGITS appears in an attribute
996ae0b0
RK
4127 -- designator, then they are treated as identifiers internally
4128 -- rather than the keywords of the same name.
4129
4130 --------------------------------------
4131 -- 4.1.4 Range Attribute Reference --
4132 --------------------------------------
4133
4134 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
4135
4136 -- A range attribute reference is represented in the tree using the
4137 -- normal N_Attribute_Reference node.
4138
4139 ---------------------------------------
4140 -- 4.1.4 Range Attribute Designator --
4141 ---------------------------------------
4142
4143 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
4144
4145 -- A range attribute designator is represented in the tree using the
4146 -- normal N_Attribute_Reference node.
4147
4148 --------------------
4149 -- 4.3 Aggregate --
4150 --------------------
4151
4152 -- AGGREGATE ::=
4153 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
4154
4155 -----------------------------
4156 -- 4.3.1 Record Aggregate --
4157 -----------------------------
4158
4159 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
4160
4161 -- N_Aggregate
4162 -- Sloc points to left parenthesis
4163 -- Expressions (List1) (set to No_List if none or null record case)
4164 -- Component_Associations (List2) (set to No_List if none)
4165 -- Null_Record_Present (Flag17)
4166 -- Aggregate_Bounds (Node3-Sem)
3e542a58 4167 -- Associated_Node (Node4-Sem)
996ae0b0
RK
4168 -- Compile_Time_Known_Aggregate (Flag18-Sem)
4169 -- Expansion_Delayed (Flag11-Sem)
e3da30b2 4170 -- Has_Self_Reference (Flag13-Sem)
3c08de34 4171 -- Is_Homogeneous_Aggregate (Flag14)
996ae0b0
RK
4172 -- plus fields for expression
4173
4174 -- Note: this structure is used for both record and array aggregates
4175 -- since the two cases are not separable by the parser. The parser
4176 -- makes no attempt to enforce consistency here, so it is up to the
4177 -- semantic phase to make sure that the aggregate is consistent (i.e.
4178 -- that it is not a "half-and-half" case that mixes record and array
95872381 4179 -- syntax). In particular, for a record aggregate, the expressions
996ae0b0
RK
4180 -- field will be set if there are positional associations.
4181
e3da30b2
RD
4182 -- Note: N_Aggregate is not used for all aggregates; in particular,
4183 -- there is a separate node kind for extension aggregates.
4184
996ae0b0
RK
4185 -- Note: gigi/gcc can handle array aggregates correctly providing that
4186 -- they are entirely positional, and the array subtype involved has a
4187 -- known at compile time length and is not bit packed, or a convention
4188 -- Fortran array with more than one dimension. If these conditions
4189 -- are not met, then the front end must translate the aggregate into
e3da30b2 4190 -- an appropriate set of assignments into a temporary.
996ae0b0 4191
ee10c0ec
RD
4192 -- Note: for the record aggregate case, gigi/gcc can handle most cases
4193 -- of record aggregates, including those for packed, and rep-claused
996ae0b0 4194 -- records, and also variant records, providing that there are no
ee10c0ec
RD
4195 -- variable length fields whose size is not known at compile time,
4196 -- and providing that the aggregate is presented in fully named form.
4197
4198 -- The other situation in which array aggregates and record aggregates
4199 -- cannot be passed to the back end is if assignment to one or more
4200 -- components itself needs expansion, e.g. in the case of an assignment
4201 -- of an object of a controlled type. In such cases, the front end
4202 -- must expand the aggregate to a series of assignments, and apply
4203 -- the required expansion to the individual assignment statements.
996ae0b0
RK
4204
4205 ----------------------------------------------
4206 -- 4.3.1 Record Component Association List --
4207 ----------------------------------------------
4208
4209 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
4210 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
4211 -- | null record
4212
4213 -- There is no explicit node in the tree for a record component
4214 -- association list. Instead the Null_Record_Present flag is set in
4215 -- the parent node for the NULL RECORD case.
4216
4217 ------------------------------------------------------
4218 -- 4.3.1 Record Component Association (also 4.3.3) --
4219 ------------------------------------------------------
4220
4221 -- RECORD_COMPONENT_ASSOCIATION ::=
4222 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
4223
4224 -- N_Component_Association
4225 -- Sloc points to first selector name
4226 -- Choices (List1)
4227 -- Loop_Actions (List2-Sem)
688a9b51 4228 -- Expression (Node3) (empty if Box_Present)
65356e64 4229 -- Box_Present (Flag15)
f104fca1 4230 -- Inherited_Discriminant (Flag13)
996ae0b0
RK
4231
4232 -- Note: this structure is used for both record component associations
4233 -- and array component associations, since the two cases aren't always
4234 -- separable by the parser. The choices list may represent either a
4235 -- list of selector names in the record aggregate case, or a list of
4236 -- discrete choices in the array aggregate case or an N_Others_Choice
19f0526a 4237 -- node (which appears as a singleton list). Box_Present gives support
0ab80019 4238 -- to Ada 2005 (AI-287).
996ae0b0 4239
3354f96d 4240 ----------------------------------
30783513 4241 -- 4.3.1 Component Choice List --
3354f96d 4242 ----------------------------------
996ae0b0
RK
4243
4244 -- COMPONENT_CHOICE_LIST ::=
4245 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
4246 -- | others
4247
ac4d6407
RD
4248 -- The entries of a component choice list appear in the Choices list of
4249 -- the associated N_Component_Association, as either selector names, or
4250 -- as an N_Others_Choice node.
996ae0b0
RK
4251
4252 --------------------------------
4253 -- 4.3.2 Extension Aggregate --
4254 --------------------------------
4255
4256 -- EXTENSION_AGGREGATE ::=
4257 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
4258
4259 -- Note: extension aggregates are not permitted in Ada 83 mode
4260
4261 -- N_Extension_Aggregate
4262 -- Sloc points to left parenthesis
4263 -- Ancestor_Part (Node3)
3e542a58 4264 -- Associated_Node (Node4-Sem)
996ae0b0
RK
4265 -- Expressions (List1) (set to No_List if none or null record case)
4266 -- Component_Associations (List2) (set to No_List if none)
4267 -- Null_Record_Present (Flag17)
4268 -- Expansion_Delayed (Flag11-Sem)
e3da30b2 4269 -- Has_Self_Reference (Flag13-Sem)
996ae0b0
RK
4270 -- plus fields for expression
4271
4272 --------------------------
4273 -- 4.3.2 Ancestor Part --
4274 --------------------------
4275
4276 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
4277
4278 ----------------------------
4279 -- 4.3.3 Array Aggregate --
4280 ----------------------------
4281
4282 -- ARRAY_AGGREGATE ::=
4283 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
4284
4285 ---------------------------------------
4286 -- 4.3.3 Positional Array Aggregate --
4287 ---------------------------------------
4288
4289 -- POSITIONAL_ARRAY_AGGREGATE ::=
4290 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
4291 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
4292
4293 -- See Record_Aggregate (4.3.1) for node structure
4294
4295 ----------------------------------
4296 -- 4.3.3 Named Array Aggregate --
4297 ----------------------------------
4298
4299 -- NAMED_ARRAY_AGGREGATE ::=
90e491a7 4300 -- (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
996ae0b0
RK
4301
4302 -- See Record_Aggregate (4.3.1) for node structure
4303
4304 ----------------------------------------
4305 -- 4.3.3 Array Component Association --
4306 ----------------------------------------
4307
4308 -- ARRAY_COMPONENT_ASSOCIATION ::=
4309 -- DISCRETE_CHOICE_LIST => EXPRESSION
a702c9b9 4310 -- | ITERATED_COMPONENT_ASSOCIATION
996ae0b0
RK
4311
4312 -- See Record_Component_Association (4.3.1) for node structure
a702c9b9
ES
4313 -- The iterated_component_association is introduced into the
4314 -- Corrigendum of Ada_2012 by AI12-061.
4315
4316 ------------------------------------------
4317 -- 4.3.3 Iterated component Association --
4318 ------------------------------------------
4319
4320 -- ITERATED_COMPONENT_ASSOCIATION ::=
4321 -- for DEFINING_IDENTIFIER in DISCRETE_CHOICE_LIST => EXPRESSION
4322
4323 -- N_Iterated_Component_Association
4324 -- Sloc points to FOR
4325 -- Defining_Identifier (Node1)
ef74daea 4326 -- Loop_Actions (List2-Sem)
a702c9b9
ES
4327 -- Expression (Node3)
4328 -- Discrete_Choices (List4)
ef74daea
AC
4329 -- Box_Present (Flag15)
4330
4331 -- Note that Box_Present is always False, but it is intentionally added
4332 -- for completeness.
996ae0b0 4333
9eb8d5b4
AC
4334 ----------------------------
4335 -- 4.3.4 Delta Aggregate --
4336 ----------------------------
4337
4338 -- N_Delta_Aggregate
4339 -- Sloc points to left parenthesis
4340 -- Expression (Node3)
4341 -- Component_Associations (List2)
4342
996ae0b0
RK
4343 --------------------------------------------------
4344 -- 4.4 Expression/Relation/Term/Factor/Primary --
4345 --------------------------------------------------
4346
4347 -- EXPRESSION ::=
26df19ce 4348 -- RELATION {LOGICAL_OPERATOR RELATION}
996ae0b0 4349
26df19ce
AC
4350 -- CHOICE_EXPRESSION ::=
4351 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
4352
4353 -- CHOICE_RELATION ::=
996ae0b0 4354 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
26df19ce
AC
4355
4356 -- RELATION ::=
4357 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
c8d63650 4358 -- | RAISE_EXPRESSION
26df19ce
AC
4359
4360 -- MEMBERSHIP_CHOICE_LIST ::=
4361 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4362
4363 -- MEMBERSHIP_CHOICE ::=
4364 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4365
4366 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
996ae0b0
RK
4367
4368 -- SIMPLE_EXPRESSION ::=
4369 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
4370
4371 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
4372
4373 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
4374
4375 -- No nodes are generated for any of these constructs. Instead, the
4376 -- node for the operator appears directly. When we refer to an
4377 -- expression in this description, we mean any of the possible
3354f96d 4378 -- constituent components of an expression (e.g. identifier is
996ae0b0
RK
4379 -- an example of an expression).
4380
26df19ce
AC
4381 -- Note: the above syntax is that Ada 2012 syntax which restricts
4382 -- choice relations to simple expressions to avoid ambiguities in
4383 -- some contexts with set membership notation. It has been decided
4384 -- that in retrospect, the Ada 95 change allowing general expressions
4385 -- in this context was a mistake, so we have reverted to the above
4386 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
4387 -- expressions was there in Ada 83 from the start).
4388
996ae0b0
RK
4389 ------------------
4390 -- 4.4 Primary --
4391 ------------------
4392
4393 -- PRIMARY ::=
4394 -- NUMERIC_LITERAL | null
4395 -- | STRING_LITERAL | AGGREGATE
4396 -- | NAME | QUALIFIED_EXPRESSION
4397 -- | ALLOCATOR | (EXPRESSION)
4398
4399 -- Usually there is no explicit node in the tree for primary. Instead
4400 -- the constituent (e.g. AGGREGATE) appears directly. There are two
4401 -- exceptions. First, there is an explicit node for a null primary.
4402
4403 -- N_Null
4404 -- Sloc points to NULL
4405 -- plus fields for expression
4406
4407 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
4408 -- that the parser keep track of which subexpressions are enclosed
4409 -- in parentheses, and how many levels of parentheses are used. This
4410 -- information is required for optimization purposes, and also for
4411 -- some semantic checks (e.g. (((1))) in a procedure spec does not
4412 -- conform with ((((1)))) in the body).
4413
4414 -- The parentheses are recorded by keeping a Paren_Count field in every
4415 -- subexpression node (it is actually present in all nodes, but only
4416 -- used in subexpression nodes). This count records the number of
4417 -- levels of parentheses. If the number of levels in the source exceeds
3354f96d
RW
4418 -- the maximum accommodated by this count, then the count is simply left
4419 -- at the maximum value. This means that there are some pathological
996ae0b0
RK
4420 -- cases of failure to detect conformance failures (e.g. an expression
4421 -- with 500 levels of parens will conform with one with 501 levels),
4422 -- but we do not need to lose sleep over this.
4423
4424 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4425 -- type N_Parenthesized_Expression used to accurately record unlimited
4426 -- numbers of levels of parentheses. However, it turned out to be a
4427 -- real nuisance to have to take into account the possible presence of
4428 -- this node during semantic analysis, since basically parentheses have
4429 -- zero relevance to semantic analysis.
4430
4431 -- Note: the level of parentheses always present in things like
4432 -- aggregates does not count, only the parentheses in the primary
4433 -- (EXPRESSION) affect the setting of the Paren_Count field.
4434
4435 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4436 -- treated as though it were Empty) if No_Initialization is set True.
4437
4438 --------------------------------------
5a527952 4439 -- 4.5 Short-Circuit Control Forms --
996ae0b0
RK
4440 --------------------------------------
4441
4442 -- EXPRESSION ::=
4443 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4444
4445 -- Gigi restriction: For both these control forms, the operand and
4446 -- result types are always Standard.Boolean. The expander inserts the
4447 -- required conversion operations where needed to ensure this is the
4448 -- case.
4449
4450 -- N_And_Then
4451 -- Sloc points to AND of AND THEN
4452 -- Left_Opnd (Node2)
4453 -- Right_Opnd (Node3)
4454 -- Actions (List1-Sem)
4455 -- plus fields for expression
4456
4457 -- N_Or_Else
4458 -- Sloc points to OR of OR ELSE
4459 -- Left_Opnd (Node2)
4460 -- Right_Opnd (Node3)
4461 -- Actions (List1-Sem)
4462 -- plus fields for expression
4463
4464 -- Note: The Actions field is used to hold actions associated with
4465 -- the right hand operand. These have to be treated specially since
4466 -- they are not unconditionally executed. See Insert_Actions for a
4467 -- more detailed description of how these actions are handled.
4468
4469 ---------------------------
4470 -- 4.5 Membership Tests --
4471 ---------------------------
4472
4473 -- RELATION ::=
45010db9
RD
4474 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4475
4476 -- MEMBERSHIP_CHOICE_LIST ::=
4477 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4478
4479 -- MEMBERSHIP_CHOICE ::=
4480 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
996ae0b0 4481
1629f700
RD
4482 -- Note: although the grammar above allows only a range or a subtype
4483 -- mark, the parser in fact will accept any simple expression in place
4484 -- of a subtype mark. This means that the semantic analyzer must be able
4485 -- to deal with, and diagnose a simple expression other than a name for
4486 -- the right operand. This simplifies error recovery in the parser.
4487
ee4eee0a
AC
4488 -- The Alternatives field below is present only if there is more than
4489 -- one Membership_Choice present (which is legitimate only in Ada 2012
4490 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4491 -- the list of choices. In the tree passed to the back end, Alternatives
4492 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4493 -- expands out the complex set membership case using simple membership
4494 -- and equality operations).
1629f700 4495
45010db9 4496 -- Should we rename Alternatives here to Membership_Choices ???
996ae0b0
RK
4497
4498 -- N_In
4499 -- Sloc points to IN
4500 -- Left_Opnd (Node2)
4501 -- Right_Opnd (Node3)
1629f700 4502 -- Alternatives (List4) (set to No_List if only one set alternative)
f6194278 4503 -- No_Minimize_Eliminate (Flag17)
996ae0b0
RK
4504 -- plus fields for expression
4505
4506 -- N_Not_In
4507 -- Sloc points to NOT of NOT IN
4508 -- Left_Opnd (Node2)
4509 -- Right_Opnd (Node3)
1629f700 4510 -- Alternatives (List4) (set to No_List if only one set alternative)
f6194278 4511 -- No_Minimize_Eliminate (Flag17)
996ae0b0
RK
4512 -- plus fields for expression
4513
4514 --------------------
4515 -- 4.5 Operators --
4516 --------------------
4517
4518 -- LOGICAL_OPERATOR ::= and | or | xor
4519
4520 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4521
4522 -- BINARY_ADDING_OPERATOR ::= + | - | &
4523
4524 -- UNARY_ADDING_OPERATOR ::= + | -
4525
4526 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4527
4528 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4529
4530 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4531
4532 -- x #* y
4533 -- x #/ y
4534 -- x #mod y
4535 -- x #rem y
4536
4537 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4538 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4539 -- All handling of smalls for multiplication and division is handled
4540 -- by the front end (mod and rem result only from expansion). Gigi
4541 -- thus never needs to worry about small values (for other operators
4542 -- operating on fixed-point, e.g. addition, the small value does not
4543 -- have any semantic effect anyway, these are always integer operations.
4544
4545 -- Gigi restriction: For all operators taking Boolean operands, the
4546 -- type is always Standard.Boolean. The expander inserts the required
4547 -- conversion operations where needed to ensure this is the case.
4548
4549 -- N_Op_And
4550 -- Sloc points to AND
4551 -- Do_Length_Check (Flag4-Sem)
4552 -- plus fields for binary operator
4553 -- plus fields for expression
4554
4555 -- N_Op_Or
4556 -- Sloc points to OR
4557 -- Do_Length_Check (Flag4-Sem)
4558 -- plus fields for binary operator
4559 -- plus fields for expression
4560
4561 -- N_Op_Xor
4562 -- Sloc points to XOR
4563 -- Do_Length_Check (Flag4-Sem)
4564 -- plus fields for binary operator
4565 -- plus fields for expression
4566
4567 -- N_Op_Eq
4568 -- Sloc points to =
4569 -- plus fields for binary operator
4570 -- plus fields for expression
4571
4572 -- N_Op_Ne
4573 -- Sloc points to /=
4574 -- plus fields for binary operator
4575 -- plus fields for expression
4576
4577 -- N_Op_Lt
4578 -- Sloc points to <
4579 -- plus fields for binary operator
4580 -- plus fields for expression
4581
4582 -- N_Op_Le
4583 -- Sloc points to <=
4584 -- plus fields for binary operator
4585 -- plus fields for expression
4586
4587 -- N_Op_Gt
4588 -- Sloc points to >
4589 -- plus fields for binary operator
4590 -- plus fields for expression
4591
4592 -- N_Op_Ge
4593 -- Sloc points to >=
4594 -- plus fields for binary operator
4595 -- plus fields for expression
4596
4597 -- N_Op_Add
4598 -- Sloc points to + (binary)
4599 -- plus fields for binary operator
4600 -- plus fields for expression
4601
4602 -- N_Op_Subtract
4603 -- Sloc points to - (binary)
4604 -- plus fields for binary operator
4605 -- plus fields for expression
4606
4607 -- N_Op_Concat
4608 -- Sloc points to &
4609 -- Is_Component_Left_Opnd (Flag13-Sem)
4610 -- Is_Component_Right_Opnd (Flag14-Sem)
4611 -- plus fields for binary operator
4612 -- plus fields for expression
4613
4614 -- N_Op_Multiply
4615 -- Sloc points to *
4616 -- Treat_Fixed_As_Integer (Flag14-Sem)
4617 -- Rounded_Result (Flag18-Sem)
4618 -- plus fields for binary operator
4619 -- plus fields for expression
4620
4621 -- N_Op_Divide
4622 -- Sloc points to /
4623 -- Treat_Fixed_As_Integer (Flag14-Sem)
4624 -- Do_Division_Check (Flag13-Sem)
4625 -- Rounded_Result (Flag18-Sem)
4626 -- plus fields for binary operator
4627 -- plus fields for expression
4628
4629 -- N_Op_Mod
4630 -- Sloc points to MOD
4631 -- Treat_Fixed_As_Integer (Flag14-Sem)
4632 -- Do_Division_Check (Flag13-Sem)
4633 -- plus fields for binary operator
4634 -- plus fields for expression
4635
4636 -- N_Op_Rem
4637 -- Sloc points to REM
4638 -- Treat_Fixed_As_Integer (Flag14-Sem)
4639 -- Do_Division_Check (Flag13-Sem)
4640 -- plus fields for binary operator
4641 -- plus fields for expression
4642
4643 -- N_Op_Expon
996ae0b0 4644 -- Sloc points to **
ce06d641 4645 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
996ae0b0
RK
4646 -- plus fields for binary operator
4647 -- plus fields for expression
4648
4649 -- N_Op_Plus
4650 -- Sloc points to + (unary)
4651 -- plus fields for unary operator
4652 -- plus fields for expression
4653
4654 -- N_Op_Minus
4655 -- Sloc points to - (unary)
4656 -- plus fields for unary operator
4657 -- plus fields for expression
4658
4659 -- N_Op_Abs
4660 -- Sloc points to ABS
4661 -- plus fields for unary operator
4662 -- plus fields for expression
4663
4664 -- N_Op_Not
4665 -- Sloc points to NOT
4666 -- plus fields for unary operator
4667 -- plus fields for expression
4668
4669 -- See also shift operators in section B.2
4670
4671 -- Note on fixed-point operations passed to Gigi: For adding operators,
4672 -- the semantics is to treat these simply as integer operations, with
4673 -- the small values being ignored (the bounds are already stored in
4674 -- units of small, so that constraint checking works as usual). For the
4675 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4676 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4677 -- thus treat these nodes in identical manner, ignoring small values.
4678
a92230c5
AC
4679 -- Note on equality/inequality tests for records. In the expanded tree,
4680 -- record comparisons are always expanded to be a series of component
4681 -- comparisons, so the back end will never see an equality or inequality
4682 -- operation with operands of a record type.
4683
acad3c0a
AC
4684 -- Note on overflow handling: When the overflow checking mode is set to
4685 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4686 -- be modified to use a larger type for the operands and result. In
4b1c4f20
RD
4687 -- the case where the computed range exceeds that of Long_Long_Integer,
4688 -- and we are running in ELIMINATED mode, the operator node will be
4689 -- changed to be a call to the appropriate routine in System.Bignums.
4690
e0f63680
AC
4691 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4692 -- for signed integer types (since there is no equivalent operator in
4693 -- C). Instead we rewrite such an operation in terms of REM (which is
4694 -- % in C) and other C-available operators.
4695
4b1c4f20
RD
4696 ------------------------------------
4697 -- 4.5.7 Conditional Expressions --
4698 ------------------------------------
4699
4700 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4701
4702 --------------------------
4703 -- 4.5.7 If Expression --
92a68a04 4704 --------------------------
4b1c4f20
RD
4705
4706 -- IF_EXPRESSION ::=
4707 -- if CONDITION then DEPENDENT_EXPRESSION
4708 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4709 -- [else DEPENDENT_EXPRESSION]
4710
4711 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4712
4713 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4714 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
9b16cb57 4715 -- the Is_Elsif flag is set on the inner if expression.
4b1c4f20 4716
9b16cb57 4717 -- N_If_Expression
4b1c4f20
RD
4718 -- Sloc points to IF or ELSIF keyword
4719 -- Expressions (List1)
4720 -- Then_Actions (List2-Sem)
4721 -- Else_Actions (List3-Sem)
4722 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4723 -- Do_Overflow_Check (Flag17-Sem)
4724 -- plus fields for expression
4725
4726 -- Expressions here is a three-element list, whose first element is the
4727 -- condition, the second element is the dependent expression after THEN
4728 -- and the third element is the dependent expression after the ELSE
4729 -- (explicitly set to True if missing).
4730
4731 -- Note: the Then_Actions and Else_Actions fields are always set to
87e69720 4732 -- No_List in the tree passed to the back end. These are used only
0382062b
AC
4733 -- for temporary processing purposes in the expander. Even though they
4734 -- are semantic fields, their parent pointers are set because analysis
4735 -- of actions nodes in those lists may generate additional actions that
4736 -- need to know their insertion point (for example for the creation of
4737 -- transient scopes).
4b1c4f20 4738
87e69720
AC
4739 -- Note: in the tree passed to the back end, if the result type is
4740 -- an unconstrained array, the if expression can only appears in the
4741 -- initializing expression of an object declaration (this avoids the
4742 -- back end having to create a variable length temporary on the fly).
4743
4b1c4f20
RD
4744 ----------------------------
4745 -- 4.5.7 Case Expression --
4746 ----------------------------
4747
4748 -- CASE_EXPRESSION ::=
4749 -- case SELECTING_EXPRESSION is
4750 -- CASE_EXPRESSION_ALTERNATIVE
ee4eee0a 4751 -- {,CASE_EXPRESSION_ALTERNATIVE}
4b1c4f20
RD
4752
4753 -- Note that the Alternatives cannot include pragmas (this contrasts
4754 -- with the situation of case statements where pragmas are allowed).
4755
4756 -- N_Case_Expression
4757 -- Sloc points to CASE
4758 -- Expression (Node3) (the selecting expression)
4759 -- Alternatives (List4) (the case expression alternatives)
4760 -- Do_Overflow_Check (Flag17-Sem)
4761
4762 ----------------------------------------
4763 -- 4.5.7 Case Expression Alternative --
4764 ----------------------------------------
4765
4766 -- CASE_EXPRESSION_ALTERNATIVE ::=
4767 -- when DISCRETE_CHOICE_LIST =>
4768 -- DEPENDENT_EXPRESSION
4769
4770 -- N_Case_Expression_Alternative
4771 -- Sloc points to WHEN
4772 -- Actions (List1)
4773 -- Discrete_Choices (List4)
4774 -- Expression (Node3)
15918371 4775 -- Has_SP_Choice (Flag15-Sem)
4b1c4f20
RD
4776
4777 -- Note: The Actions field temporarily holds any actions associated with
4778 -- evaluation of the Expression. During expansion of the case expression
4779 -- these actions are wrapped into an N_Expressions_With_Actions node
4780 -- replacing the original expression.
acad3c0a 4781
15918371
AC
4782 -- Note: this node never appears in the tree passed to the back end,
4783 -- since the expander converts case expressions into case statements.
4784
a961aa79 4785 ---------------------------------
fc47ef60 4786 -- 4.5.8 Quantified Expression --
a961aa79
AC
4787 ---------------------------------
4788
4789 -- QUANTIFIED_EXPRESSION ::=
c56a9ba4
AC
4790 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4791 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
a961aa79 4792 --
90c63b09 4793 -- QUANTIFIER ::= all | some
a961aa79 4794
c56a9ba4
AC
4795 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4796 -- is present at a time, in which case the other one is empty.
4797
a961aa79 4798 -- N_Quantified_Expression
90c63b09 4799 -- Sloc points to FOR
c56a9ba4 4800 -- Iterator_Specification (Node2)
a961aa79
AC
4801 -- Loop_Parameter_Specification (Node4)
4802 -- Condition (Node1)
4803 -- All_Present (Flag15)
4804
996ae0b0
RK
4805 --------------------------
4806 -- 4.6 Type Conversion --
4807 --------------------------
4808
4809 -- TYPE_CONVERSION ::=
4810 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4811
4812 -- In the (NAME) case, the name is stored as the expression
4813
4814 -- Note: the parser never generates a type conversion node, since it
4815 -- looks like an indexed component which is generated by preference.
4816 -- The semantic pass must correct this misidentification.
4817
4818 -- Gigi handles conversions that involve no change in the root type,
4819 -- and also all conversions from integer to floating-point types.
4820 -- Conversions from floating-point to integer are only handled in
4821 -- the case where Float_Truncate flag set. Other conversions from
4822 -- floating-point to integer (involving rounding) and all conversions
4823 -- involving fixed-point types are handled by the expander.
4824
4825 -- Sprint syntax if Float_Truncate set: X^(Y)
4826 -- Sprint syntax if Conversion_OK set X?(Y)
4827 -- Sprint syntax if both flags set X?^(Y)
4828
4829 -- Note: If either the operand or result type is fixed-point, Gigi will
4830 -- only see a type conversion node with Conversion_OK set. The front end
4831 -- takes care of all handling of small's for fixed-point conversions.
4832
4833 -- N_Type_Conversion
4834 -- Sloc points to first token of subtype mark
4835 -- Subtype_Mark (Node4)
4836 -- Expression (Node3)
90e491a7 4837 -- Do_Discriminant_Check (Flag3-Sem)
996ae0b0
RK
4838 -- Do_Length_Check (Flag4-Sem)
4839 -- Float_Truncate (Flag11-Sem)
8d81fb4e 4840 -- Do_Tag_Check (Flag13-Sem)
996ae0b0 4841 -- Conversion_OK (Flag14-Sem)
8d81fb4e
AC
4842 -- Do_Overflow_Check (Flag17-Sem)
4843 -- Rounded_Result (Flag18-Sem)
996ae0b0
RK
4844 -- plus fields for expression
4845
4846 -- Note: if a range check is required, then the Do_Range_Check flag
4847 -- is set in the Expression with the check being done against the
4848 -- target type range (after the base type conversion, if any).
4849
4850 -------------------------------
4851 -- 4.7 Qualified Expression --
4852 -------------------------------
4853
4854 -- QUALIFIED_EXPRESSION ::=
4855 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4856
4857 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4858 -- the expression, so the Expression field of this node always points
4859 -- to a parenthesized expression in this case (i.e. Paren_Count will
4860 -- always be non-zero for the referenced expression if it is not an
4861 -- aggregate).
4862
4863 -- N_Qualified_Expression
4864 -- Sloc points to apostrophe
4865 -- Subtype_Mark (Node4)
4866 -- Expression (Node3) expression or aggregate
06f6c43f 4867 -- Is_Qualified_Universal_Literal (Flag4-Sem)
ce06d641 4868 -- plus fields for expression
996ae0b0
RK
4869
4870 --------------------
4871 -- 4.8 Allocator --
4872 --------------------
4873
4874 -- ALLOCATOR ::=
d50f4827
AC
4875 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4876 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4877 --
4878 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
996ae0b0
RK
4879
4880 -- Sprint syntax (when storage pool present)
4881 -- new xxx (storage_pool = pool)
d50f4827
AC
4882 -- or
4883 -- new (subpool) xxx (storage_pool = pool)
996ae0b0
RK
4884
4885 -- N_Allocator
4886 -- Sloc points to NEW
4887 -- Expression (Node3) subtype indication or qualified expression
d50f4827 4888 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
996ae0b0 4889 -- Storage_Pool (Node1-Sem)
e3da30b2 4890 -- Procedure_To_Call (Node2-Sem)
3a248f7c 4891 -- Alloc_For_BIP_Return (Flag1-Sem)
67ce0d7e 4892 -- Null_Exclusion_Present (Flag11)
996ae0b0 4893 -- No_Initialization (Flag13-Sem)
0712790c 4894 -- Is_Static_Coextension (Flag14-Sem)
996ae0b0 4895 -- Do_Storage_Check (Flag17-Sem)
33c423c8 4896 -- Is_Dynamic_Coextension (Flag18-Sem)
996ae0b0
RK
4897 -- plus fields for expression
4898
fad0600d
AC
4899 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4900 -- This flag has a special function in conjunction with the restriction
4901 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4902 -- is not set. This means that if a source allocator is replaced with
4903 -- a constructed allocator, the Comes_From_Source flag should be copied
4904 -- to the newly created allocator.
4905
996ae0b0
RK
4906 ---------------------------------
4907 -- 5.1 Sequence Of Statements --
4908 ---------------------------------
4909
4910 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4911
4912 -- Note: Although the parser will not accept a declaration as a
4913 -- statement, the semantic analyzer may insert declarations (e.g.
4914 -- declarations of implicit types needed for execution of other
3354f96d 4915 -- statements) into a sequence of statements, so the code generator
996ae0b0
RK
4916 -- should be prepared to accept a declaration where a statement is
4917 -- expected. Note also that pragmas can appear as statements.
4918
4919 --------------------
4920 -- 5.1 Statement --
4921 --------------------
4922
4923 -- STATEMENT ::=
4924 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4925
4926 -- There is no explicit node in the tree for a statement. Instead, the
4ef36ac7 4927 -- individual statement appears directly. Labels are treated as a
996ae0b0
RK
4928 -- kind of statement, i.e. they are linked into a statement list at
4929 -- the point they appear, so the labeled statement appears following
4930 -- the label or labels in the statement list.
4931
4932 ---------------------------
4933 -- 5.1 Simple Statement --
4934 ---------------------------
4935
e3da30b2
RD
4936 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4937 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4938 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4939 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4940 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4941 -- | ABORT_STATEMENT | RAISE_STATEMENT
996ae0b0
RK
4942 -- | CODE_STATEMENT
4943
4944 -----------------------------
4945 -- 5.1 Compound Statement --
4946 -----------------------------
4947
4948 -- COMPOUND_STATEMENT ::=
e3da30b2
RD
4949 -- IF_STATEMENT | CASE_STATEMENT
4950 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4951 -- | EXTENDED_RETURN_STATEMENT
4952 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
996ae0b0
RK
4953
4954 -------------------------
4955 -- 5.1 Null Statement --
4956 -------------------------
4957
4958 -- NULL_STATEMENT ::= null;
4959
4960 -- N_Null_Statement
4961 -- Sloc points to NULL
97cb64f0 4962
996ae0b0
RK
4963 ----------------
4964 -- 5.1 Label --
4965 ----------------
4966
4967 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4968
4969 -- Note that the occurrence of a label is not a defining identifier,
4970 -- but rather a referencing occurrence. The defining occurrence is
4971 -- in the implicit label declaration which occurs in the innermost
4972 -- enclosing block.
4973
4974 -- N_Label
4975 -- Sloc points to <<
4976 -- Identifier (Node1) direct name of statement identifier
0712790c 4977 -- Exception_Junk (Flag8-Sem)
996ae0b0 4978
821b8ef4
RD
4979 -- Note: Before Ada 2012, a label is always followed by a statement,
4980 -- and this is true in the tree even in Ada 2012 mode (the parser
4981 -- inserts a null statement marked with Comes_From_Source False).
4982
996ae0b0
RK
4983 -------------------------------
4984 -- 5.1 Statement Identifier --
4985 -------------------------------
4986
3354f96d 4987 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
996ae0b0
RK
4988
4989 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4990 -- (not an OPERATOR_SYMBOL)
4991
4992 -------------------------------
4993 -- 5.2 Assignment Statement --
4994 -------------------------------
4995
4996 -- ASSIGNMENT_STATEMENT ::=
4997 -- variable_NAME := EXPRESSION;
4998
4999 -- N_Assignment_Statement
5000 -- Sloc points to :=
5001 -- Name (Node2)
5002 -- Expression (Node3)
90e491a7
PMR
5003 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5004 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
5005 -- Do_Discriminant_Check (Flag3-Sem)
996ae0b0
RK
5006 -- Do_Length_Check (Flag4-Sem)
5007 -- Forwards_OK (Flag5-Sem)
5008 -- Backwards_OK (Flag6-Sem)
5009 -- No_Ctrl_Actions (Flag7-Sem)
ae33543c 5010 -- Has_Target_Names (Flag8-Sem)
8dce7371 5011 -- Is_Elaboration_Code (Flag9-Sem)
90e491a7 5012 -- Do_Tag_Check (Flag13-Sem)
6fb4cdde 5013 -- Componentwise_Assignment (Flag14-Sem)
c7532b2d 5014 -- Suppress_Assignment_Checks (Flag18-Sem)
996ae0b0
RK
5015
5016 -- Note: if a range check is required, then the Do_Range_Check flag
308e6f3a 5017 -- is set in the Expression (right hand side), with the check being
996ae0b0
RK
5018 -- done against the type of the Name (left hand side).
5019
fbf5a39b
AC
5020 -- Note: the back end places some restrictions on the form of the
5021 -- Expression field. If the object being assigned to is Atomic, then
5022 -- the Expression may not have the form of an aggregate (since this
bbaba73f
EB
5023 -- might cause the back end to generate separate assignments). In this
5024 -- case the front end must generate an extra temporary and initialize
fbf5a39b
AC
5025 -- this temporary as required (the temporary itself is not atomic).
5026
ae33543c
ES
5027 ------------------
5028 -- Target_Name --
5029 ------------------
5030
5031 -- N_Target_Name
5032 -- Sloc points to @
5033 -- Etype (Node5-Sem)
5034
5035 -- Note (Ada 2020): node is used during analysis as a placeholder for
5036 -- the value of the LHS of the enclosing assignment statement. Node is
5037 -- eventually rewritten together with enclosing assignment, and backends
5038 -- are not aware of it.
5039
996ae0b0
RK
5040 -----------------------
5041 -- 5.3 If Statement --
5042 -----------------------
5043
5044 -- IF_STATEMENT ::=
5045 -- if CONDITION then
5046 -- SEQUENCE_OF_STATEMENTS
5047 -- {elsif CONDITION then
5048 -- SEQUENCE_OF_STATEMENTS}
5049 -- [else
5050 -- SEQUENCE_OF_STATEMENTS]
5051 -- end if;
5052
5053 -- Gigi restriction: This expander ensures that the type of the
5054 -- Condition fields is always Standard.Boolean, even if the type
5055 -- in the source is some non-standard boolean type.
5056
5057 -- N_If_Statement
5058 -- Sloc points to IF
5059 -- Condition (Node1)
5060 -- Then_Statements (List2)
5061 -- Elsif_Parts (List3) (set to No_List if none present)
5062 -- Else_Statements (List4) (set to No_List if no else part present)
2aca76d6 5063 -- End_Span (Uint5) (set to Uint_0 if expander generated)
414c6563 5064 -- From_Conditional_Expression (Flag1-Sem)
996ae0b0
RK
5065
5066 -- N_Elsif_Part
5067 -- Sloc points to ELSIF
5068 -- Condition (Node1)
5069 -- Then_Statements (List2)
5070 -- Condition_Actions (List3-Sem)
5071
5072 --------------------
5073 -- 5.3 Condition --
5074 --------------------
5075
5076 -- CONDITION ::= boolean_EXPRESSION
5077
5078 -------------------------
5079 -- 5.4 Case Statement --
5080 -------------------------
5081
5082 -- CASE_STATEMENT ::=
5083 -- case EXPRESSION is
5084 -- CASE_STATEMENT_ALTERNATIVE
5085 -- {CASE_STATEMENT_ALTERNATIVE}
5086 -- end case;
5087
5088 -- Note: the Alternatives can contain pragmas. These only occur at
5089 -- the start of the list, since any pragmas occurring after the first
5090 -- alternative are absorbed into the corresponding statement sequence.
5091
5092 -- N_Case_Statement
5093 -- Sloc points to CASE
5094 -- Expression (Node3)
5095 -- Alternatives (List4)
2aca76d6 5096 -- End_Span (Uint5) (set to Uint_0 if expander generated)
414c6563 5097 -- From_Conditional_Expression (Flag1-Sem)
996ae0b0 5098
821b8ef4
RD
5099 -- Note: Before Ada 2012, a pragma in a statement sequence is always
5100 -- followed by a statement, and this is true in the tree even in Ada
5101 -- 2012 mode (the parser inserts a null statement marked with the flag
5102 -- Comes_From_Source False).
5103
996ae0b0
RK
5104 -------------------------------------
5105 -- 5.4 Case Statement Alternative --
5106 -------------------------------------
5107
5108 -- CASE_STATEMENT_ALTERNATIVE ::=
5109 -- when DISCRETE_CHOICE_LIST =>
5110 -- SEQUENCE_OF_STATEMENTS
5111
5112 -- N_Case_Statement_Alternative
5113 -- Sloc points to WHEN
5114 -- Discrete_Choices (List4)
5115 -- Statements (List3)
15918371 5116 -- Has_SP_Choice (Flag15-Sem)
996ae0b0 5117
9e92ad49
AC
5118 -- Note: in the list of Discrete_Choices, the tree passed to the back
5119 -- end does not have choice entries corresponding to names of statically
5120 -- predicated subtypes. Such entries are always expanded out to the list
5121 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
5122 -- mode does not have this expansion, and has the original choices.
5123
996ae0b0
RK
5124 -------------------------
5125 -- 5.5 Loop Statement --
5126 -------------------------
5127
5128 -- LOOP_STATEMENT ::=
5129 -- [loop_STATEMENT_IDENTIFIER :]
5130 -- [ITERATION_SCHEME] loop
5131 -- SEQUENCE_OF_STATEMENTS
5132 -- end loop [loop_IDENTIFIER];
5133
5134 -- Note: The occurrence of a loop label is not a defining identifier
5135 -- but rather a referencing occurrence. The defining occurrence is in
5136 -- the implicit label declaration which occurs in the innermost
5137 -- enclosing block.
5138
bbe9779c
AC
5139 -- Note: there is always a loop statement identifier present in the
5140 -- tree, even if none was given in the source. In the case where no loop
5141 -- identifier is given in the source, the parser creates a name of the
5142 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
5143 -- that the loop names created in this manner do not conflict with any
5144 -- user defined identifiers), and the flag Has_Created_Identifier is set
5145 -- to True. The only exception to the rule that all loop statement nodes
5146 -- have identifiers occurs for loops constructed by the expander, and
5147 -- the semantic analyzer will create and supply dummy loop identifiers
5148 -- in these cases.
996ae0b0
RK
5149
5150 -- N_Loop_Statement
5151 -- Sloc points to LOOP
5152 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
5153 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
5154 -- Statements (List3)
5155 -- End_Label (Node4)
dd81163f
HK
5156 -- Is_OpenAcc_Environment (Flag13-Sem)
5157 -- Is_OpenAcc_Loop (Flag14-Sem)
996ae0b0 5158 -- Has_Created_Identifier (Flag15)
fbf5a39b 5159 -- Is_Null_Loop (Flag16)
c800f862 5160 -- Suppress_Loop_Warnings (Flag17)
996ae0b0 5161
51bf9bdf
AC
5162 -- Note: the parser fills in the Identifier field if there is an
5163 -- explicit loop identifier. Otherwise the parser leaves this field
5164 -- set to Empty, and then the semantic processing for a loop statement
5165 -- creates an identifier, setting the Has_Created_Identifier flag to
308e6f3a 5166 -- True. So after semantic analysis, the Identifier is always set,
51bf9bdf
AC
5167 -- referencing an identifier whose entity has an Ekind of E_Loop.
5168
f5afb270
AC
5169 ---------------------------
5170 -- 5.5 Iteration Scheme --
5171 ---------------------------
996ae0b0
RK
5172
5173 -- ITERATION_SCHEME ::=
c56a9ba4
AC
5174 -- while CONDITION
5175 -- | for LOOP_PARAMETER_SPECIFICATION
5176 -- | for ITERATOR_SPECIFICATION
57d62f0c 5177
c56a9ba4
AC
5178 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
5179 -- is present at a time, in which case the other one is empty. Both are
5180 -- empty in the case of a WHILE loop.
996ae0b0 5181
bbe9779c
AC
5182 -- Gigi restriction: The expander ensures that the type of the Condition
5183 -- field is always Standard.Boolean, even if the type in the source is
5184 -- some non-standard boolean type.
996ae0b0
RK
5185
5186 -- N_Iteration_Scheme
5187 -- Sloc points to WHILE or FOR
5188 -- Condition (Node1) (set to Empty if FOR case)
5189 -- Condition_Actions (List3-Sem)
c56a9ba4 5190 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
996ae0b0
RK
5191 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
5192
5193 ---------------------------------------
f5afb270 5194 -- 5.5 Loop Parameter Specification --
996ae0b0
RK
5195 ---------------------------------------
5196
5197 -- LOOP_PARAMETER_SPECIFICATION ::=
5198 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
5199
5200 -- N_Loop_Parameter_Specification
5201 -- Sloc points to first identifier
5202 -- Defining_Identifier (Node1)
5203 -- Reverse_Present (Flag15)
5204 -- Discrete_Subtype_Definition (Node4)
5205
f5afb270
AC
5206 -----------------------------------
5207 -- 5.5.1 Iterator Specification --
5208 -----------------------------------
57d62f0c
AC
5209
5210 -- ITERATOR_SPECIFICATION ::=
5211 -- DEFINING_IDENTIFIER in [reverse] NAME
c56a9ba4 5212 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
57d62f0c
AC
5213
5214 -- N_Iterator_Specification
5215 -- Sloc points to defining identifier
5216 -- Defining_Identifier (Node1)
5217 -- Name (Node2)
5218 -- Reverse_Present (Flag15)
5219 -- Of_Present (Flag16)
5220 -- Subtype_Indication (Node5)
5221
00c7151c
RD
5222 -- Note: The Of_Present flag distinguishes the two forms
5223
996ae0b0
RK
5224 --------------------------
5225 -- 5.6 Block Statement --
5226 --------------------------
5227
5228 -- BLOCK_STATEMENT ::=
5229 -- [block_STATEMENT_IDENTIFIER:]
5230 -- [declare
5231 -- DECLARATIVE_PART]
5232 -- begin
5233 -- HANDLED_SEQUENCE_OF_STATEMENTS
5234 -- end [block_IDENTIFIER];
5235
5236 -- Note that the occurrence of a block identifier is not a defining
5237 -- identifier, but rather a referencing occurrence. The defining
f28573f4
ES
5238 -- occurrence is an E_Block entity declared by the implicit label
5239 -- declaration which occurs in the innermost enclosing block statement
5240 -- or body; the block identifier denotes that E_Block.
5241
5242 -- For block statements that come from source code, there is always a
bbe9779c
AC
5243 -- block statement identifier present in the tree, denoting an E_Block.
5244 -- In the case where no block identifier is given in the source,
5245 -- the parser creates a name of the form B_n, where n is a decimal
5246 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
5247 -- constructed by the expander usually have no identifier, and no
5248 -- corresponding entity.
f28573f4 5249
0712790c
ES
5250 -- Note: the block statement created for an extended return statement
5251 -- has an entity, and this entity is an E_Return_Statement, rather than
5252 -- the usual E_Block.
5253
5254 -- Note: Exception_Junk is set for the wrapping blocks created during
5255 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
996ae0b0 5256
05b34c18
AC
5257 -- Note: from a control flow viewpoint, a block statement defines an
5258 -- extended basic block, i.e. the entry of the block dominates every
5259 -- statement in the sequence. When generating new statements with
5260 -- exception handlers in the expander at the end of a sequence that
5261 -- comes from source code, it can be necessary to wrap them all in a
5262 -- block statement in order to expose the implicit control flow to
5263 -- gigi and thus prevent it from issuing bogus control flow warnings.
5264
996ae0b0
RK
5265 -- N_Block_Statement
5266 -- Sloc points to DECLARE or BEGIN
5267 -- Identifier (Node1) block direct name (set to Empty if not present)
5268 -- Declarations (List2) (set to No_List if no DECLARE part)
5269 -- Handled_Statement_Sequence (Node4)
996ae0b0 5270 -- Activation_Chain_Entity (Node3-Sem)
90e491a7 5271 -- Cleanup_Actions (List5-Sem)
996ae0b0 5272 -- Has_Created_Identifier (Flag15)
996ae0b0 5273 -- Is_Asynchronous_Call_Block (Flag7)
90e491a7 5274 -- Is_Task_Allocation_Block (Flag6)
0712790c 5275 -- Exception_Junk (Flag8-Sem)
90e491a7 5276 -- Is_Abort_Block (Flag4-Sem)
e98668b1 5277 -- Is_Finalization_Wrapper (Flag9-Sem)
90e491a7
PMR
5278 -- Is_Initialization_Block (Flag1-Sem)
5279 -- Is_Task_Master (Flag5-Sem)
996ae0b0
RK
5280
5281 -------------------------
5282 -- 5.7 Exit Statement --
5283 -------------------------
5284
5285 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
5286
bbe9779c
AC
5287 -- Gigi restriction: The expander ensures that the type of the Condition
5288 -- field is always Standard.Boolean, even if the type in the source is
5289 -- some non-standard boolean type.
996ae0b0
RK
5290
5291 -- N_Exit_Statement
5292 -- Sloc points to EXIT
5293 -- Name (Node2) (set to Empty if no loop name present)
51bf9bdf
AC
5294 -- Condition (Node1) (set to Empty if no WHEN part present)
5295 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
996ae0b0
RK
5296
5297 -------------------------
5298 -- 5.9 Goto Statement --
5299 -------------------------
5300
5301 -- GOTO_STATEMENT ::= goto label_NAME;
5302
5303 -- N_Goto_Statement
5304 -- Sloc points to GOTO
5305 -- Name (Node2)
0712790c 5306 -- Exception_Junk (Flag8-Sem)
996ae0b0
RK
5307
5308 ---------------------------------
5309 -- 6.1 Subprogram Declaration --
5310 ---------------------------------
5311
718deaf1
AC
5312 -- SUBPROGRAM_DECLARATION ::=
5313 -- SUBPROGRAM_SPECIFICATION
5314 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5315
5316 -- N_Subprogram_Declaration
5317 -- Sloc points to FUNCTION or PROCEDURE
5318 -- Specification (Node1)
5319 -- Body_To_Inline (Node3-Sem)
5320 -- Corresponding_Body (Node5-Sem)
5321 -- Parent_Spec (Node4-Sem)
877a5a12
AC
5322 -- Is_Entry_Barrier_Function (Flag8-Sem)
5323 -- Is_Task_Body_Procedure (Flag1-Sem)
996ae0b0
RK
5324
5325 ------------------------------------------
5326 -- 6.1 Abstract Subprogram Declaration --
5327 ------------------------------------------
5328
5329 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
718deaf1
AC
5330 -- SUBPROGRAM_SPECIFICATION is abstract
5331 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5332
5333 -- N_Abstract_Subprogram_Declaration
5334 -- Sloc points to ABSTRACT
5335 -- Specification (Node1)
5336
5337 -----------------------------------
5338 -- 6.1 Subprogram Specification --
5339 -----------------------------------
5340
5341 -- SUBPROGRAM_SPECIFICATION ::=
edd63e9b 5342 -- [[not] overriding]
996ae0b0 5343 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
edd63e9b
ES
5344 -- | [[not] overriding]
5345 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
996ae0b0
RK
5346
5347 -- Note: there are no separate nodes for the profiles, instead the
5348 -- information appears directly in the following nodes.
5349
5350 -- N_Function_Specification
5351 -- Sloc points to FUNCTION
5352 -- Defining_Unit_Name (Node1) (the designator)
996ae0b0 5353 -- Parameter_Specifications (List3) (set to No_List if no formal part)
244480db
GD
5354 -- Null_Exclusion_Present (Flag11)
5355 -- Result_Definition (Node4) for result subtype
996ae0b0 5356 -- Generic_Parent (Node5-Sem)
edd63e9b
ES
5357 -- Must_Override (Flag14) set if overriding indicator present
5358 -- Must_Not_Override (Flag15) set if not_overriding indicator present
996ae0b0
RK
5359
5360 -- N_Procedure_Specification
5361 -- Sloc points to PROCEDURE
5362 -- Defining_Unit_Name (Node1)
b912db16 5363 -- Null_Statement (Node2-Sem) NULL statement for body, if Null_Present
996ae0b0
RK
5364 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5365 -- Generic_Parent (Node5-Sem)
edd63e9b
ES
5366 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
5367 -- Must_Override (Flag14) set if overriding indicator present
5368 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5369
5370 -- Note: overriding indicator is an Ada 2005 feature
996ae0b0
RK
5371
5372 ---------------------
5373 -- 6.1 Designator --
5374 ---------------------
5375
5376 -- DESIGNATOR ::=
5377 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
5378
5379 -- Designators that are simply identifiers or operator symbols appear
5380 -- directly in the tree in this form. The following node is used only
5381 -- in the case where the designator has a parent unit name component.
5382
5383 -- N_Designator
5384 -- Sloc points to period
bbe9779c 5385 -- Name (Node2) holds the parent unit name
996ae0b0
RK
5386 -- Identifier (Node1)
5387
bbe9779c
AC
5388 -- Note: Name is always non-Empty, since this node is only used for the
5389 -- case where a parent library unit package name is present.
5390
d8db0bca 5391 -- Note that the identifier can also be an operator symbol here
996ae0b0
RK
5392
5393 ------------------------------
5394 -- 6.1 Defining Designator --
5395 ------------------------------
5396
5397 -- DEFINING_DESIGNATOR ::=
5398 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
5399
5400 -------------------------------------
5401 -- 6.1 Defining Program Unit Name --
5402 -------------------------------------
5403
5404 -- DEFINING_PROGRAM_UNIT_NAME ::=
5405 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
5406
bbe9779c
AC
5407 -- The parent unit name is present only in the case of a child unit name
5408 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
5409 -- at scope level one). If no such name is present, the defining program
5410 -- unit name is represented simply as the defining identifier. In the
5411 -- child unit case, the following node is used to represent the child
5412 -- unit name.
996ae0b0
RK
5413
5414 -- N_Defining_Program_Unit_Name
5415 -- Sloc points to period
bbe9779c 5416 -- Name (Node2) holds the parent unit name
996ae0b0
RK
5417 -- Defining_Identifier (Node1)
5418
bbe9779c
AC
5419 -- Note: Name is always non-Empty, since this node is only used for the
5420 -- case where a parent unit name is present.
5421
996ae0b0
RK
5422 --------------------------
5423 -- 6.1 Operator Symbol --
5424 --------------------------
5425
5426 -- OPERATOR_SYMBOL ::= STRING_LITERAL
5427
bbe9779c
AC
5428 -- Note: the fields of the N_Operator_Symbol node are laid out to match
5429 -- the corresponding fields of an N_Character_Literal node. This allows
5430 -- easy conversion of the operator symbol node into a character literal
5431 -- node in the case where a string constant of the form of an operator
5432 -- symbol is scanned out as such, but turns out semantically to be a
5433 -- string literal that is not an operator. For details see Sinfo.CN.
5434 -- Change_Operator_Symbol_To_String_Literal.
996ae0b0
RK
5435
5436 -- N_Operator_Symbol
5437 -- Sloc points to literal
5438 -- Chars (Name1) contains the Name_Id for the operator symbol
5439 -- Strval (Str3) Id of string value. This is used if the operator
5440 -- symbol turns out to be a normal string after all.
5441 -- Entity (Node4-Sem)
3e542a58 5442 -- Associated_Node (Node4-Sem)
996ae0b0 5443 -- Etype (Node5-Sem)
90e491a7 5444 -- Has_Private_View (Flag11-Sem) set in generic units
996ae0b0
RK
5445
5446 -- Note: the Strval field may be set to No_String for generated
5447 -- operator symbols that are known not to be string literals
5448 -- semantically.
5449
5450 -----------------------------------
5451 -- 6.1 Defining Operator Symbol --
5452 -----------------------------------
5453
5454 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5455
5456 -- A defining operator symbol is an entity, which has additional
5457 -- fields depending on the setting of the Ekind field. These
5458 -- additional fields are defined (and access subprograms declared)
5459 -- in package Einfo.
5460
5461 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
1f159b86 5462 -- are deliberately laid out to match the layout of fields in an
996ae0b0
RK
5463 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5464 -- an operator symbol node into a defining operator symbol node.
5465 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5466 -- for further details.
5467
5468 -- N_Defining_Operator_Symbol
5469 -- Sloc points to literal
5470 -- Chars (Name1) contains the Name_Id for the operator symbol
5471 -- Next_Entity (Node2-Sem)
5472 -- Scope (Node3-Sem)
5473 -- Etype (Node5-Sem)
5474
5475 ----------------------------
5476 -- 6.1 Parameter Profile --
5477 ----------------------------
5478
5479 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5480
5481 ---------------------------------------
5482 -- 6.1 Parameter and Result Profile --
5483 ---------------------------------------
5484
244480db
GD
5485 -- PARAMETER_AND_RESULT_PROFILE ::=
5486 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5487 -- | [FORMAL_PART] return ACCESS_DEFINITION
996ae0b0
RK
5488
5489 -- There is no explicit node in the tree for a parameter and result
5490 -- profile. Instead the information appears directly in the parent.
5491
5492 ----------------------
f5afb270 5493 -- 6.1 Formal Part --
996ae0b0
RK
5494 ----------------------
5495
5496 -- FORMAL_PART ::=
5497 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5498
5499 ----------------------------------
f5afb270 5500 -- 6.1 Parameter Specification --
996ae0b0
RK
5501 ----------------------------------
5502
5503 -- PARAMETER_SPECIFICATION ::=
fecbd779
AC
5504 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5505 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
996ae0b0
RK
5506 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5507 -- [:= DEFAULT_EXPRESSION]
5508
5509 -- Although the syntax allows multiple identifiers in the list, the
5510 -- semantics is as though successive specifications were given with
5511 -- identical type definition and expression components. To simplify
5512 -- semantic processing, the parser represents a multiple declaration
5513 -- case as a sequence of single Specifications, using the More_Ids and
5514 -- Prev_Ids flags to preserve the original source form as described
5515 -- in the section on "Handling of Defining Identifier Lists".
5516
fecbd779
AC
5517 -- ALIASED can only be present in Ada 2012 mode
5518
996ae0b0
RK
5519 -- N_Parameter_Specification
5520 -- Sloc points to first identifier
5521 -- Defining_Identifier (Node1)
fecbd779 5522 -- Aliased_Present (Flag4)
996ae0b0
RK
5523 -- In_Present (Flag15)
5524 -- Out_Present (Flag17)
a9d8907c 5525 -- Null_Exclusion_Present (Flag11)
996ae0b0
RK
5526 -- Parameter_Type (Node2) subtype mark or access definition
5527 -- Expression (Node3) (set to Empty if no default expression present)
5528 -- Do_Accessibility_Check (Flag13-Sem)
5529 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5530 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5531 -- Default_Expression (Node5-Sem)
5532
5533 ---------------
5534 -- 6.1 Mode --
5535 ---------------
5536
5537 -- MODE ::= [in] | in out | out
5538
5539 -- There is no explicit node in the tree for the Mode. Instead the
5540 -- In_Present and Out_Present flags are set in the parent node to
5541 -- record the presence of keywords specifying the mode.
5542
5543 --------------------------
5544 -- 6.3 Subprogram Body --
5545 --------------------------
5546
5547 -- SUBPROGRAM_BODY ::=
a532f98b 5548 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
996ae0b0
RK
5549 -- DECLARATIVE_PART
5550 -- begin
5551 -- HANDLED_SEQUENCE_OF_STATEMENTS
5552 -- end [DESIGNATOR];
5553
5554 -- N_Subprogram_Body
5555 -- Sloc points to FUNCTION or PROCEDURE
5556 -- Specification (Node1)
5557 -- Declarations (List2)
5558 -- Handled_Statement_Sequence (Node4)
5559 -- Activation_Chain_Entity (Node3-Sem)
5560 -- Corresponding_Spec (Node5-Sem)
5561 -- Acts_As_Spec (Flag4-Sem)
5562 -- Bad_Is_Detected (Flag15) used only by parser
5563 -- Do_Storage_Check (Flag17-Sem)
5dc203d2 5564 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
e3da30b2 5565 -- Is_Entry_Barrier_Function (Flag8-Sem)
877a5a12
AC
5566 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5567 -- Is_Task_Body_Procedure (Flag1-Sem)
996ae0b0 5568 -- Is_Task_Master (Flag5-Sem)
90e491a7 5569 -- Was_Attribute_Reference (Flag2-Sem)
549cc9c2 5570 -- Was_Expression_Function (Flag18-Sem)
5dc203d2 5571 -- Was_Originally_Stub (Flag13-Sem)
996ae0b0
RK
5572
5573 -----------------------------------
5574 -- 6.4 Procedure Call Statement --
5575 -----------------------------------
5576
5577 -- PROCEDURE_CALL_STATEMENT ::=
5578 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5579
bbe9779c
AC
5580 -- Note: the reason that a procedure call has expression fields is that
5581 -- it semantically resembles an expression, e.g. overloading is allowed
5582 -- and a type is concocted for semantic processing purposes. Certain of
5583 -- these fields, such as Parens are not relevant, but it is easier to
5584 -- just supply all of them together.
996ae0b0
RK
5585
5586 -- N_Procedure_Call_Statement
5587 -- Sloc points to first token of name or prefix
5588 -- Name (Node2) stores name or prefix
5589 -- Parameter_Associations (List3) (set to No_List if no
5590 -- actual parameter part)
5591 -- First_Named_Actual (Node4-Sem)
5592 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
90e491a7
PMR
5593 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5594 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 5595 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
967947ed 5596 -- No_Elaboration_Check (Flag4-Sem)
996ae0b0 5597 -- Do_Tag_Check (Flag13-Sem)
967947ed 5598 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0
RK
5599 -- plus fields for expression
5600
5601 -- If any IN parameter requires a range check, then the corresponding
5602 -- argument expression has the Do_Range_Check flag set, and the range
5603 -- check is done against the formal type. Note that this argument
5604 -- expression may appear directly in the Parameter_Associations list,
d9d25d04 5605 -- or may be a descendant of an N_Parameter_Association node that
996ae0b0
RK
5606 -- appears in this list.
5607
5608 ------------------------
5609 -- 6.4 Function Call --
5610 ------------------------
5611
5612 -- FUNCTION_CALL ::=
5613 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5614
5615 -- Note: the parser may generate an indexed component node or simply
5616 -- a name node instead of a function call node. The semantic pass must
5617 -- correct this misidentification.
5618
5619 -- N_Function_Call
5620 -- Sloc points to first token of name or prefix
5621 -- Name (Node2) stores name or prefix
5622 -- Parameter_Associations (List3) (set to No_List if no
5623 -- actual parameter part)
5624 -- First_Named_Actual (Node4-Sem)
5625 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
90e491a7
PMR
5626 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
5627 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 5628 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
967947ed 5629 -- No_Elaboration_Check (Flag4-Sem)
fdce4bb7 5630 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
996ae0b0 5631 -- Do_Tag_Check (Flag13-Sem)
90e491a7 5632 -- No_Side_Effect_Removal (Flag17-Sem)
967947ed 5633 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0
RK
5634 -- plus fields for expression
5635
5636 --------------------------------
5637 -- 6.4 Actual Parameter Part --
5638 --------------------------------
5639
5640 -- ACTUAL_PARAMETER_PART ::=
5641 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5642
5643 --------------------------------
5644 -- 6.4 Parameter Association --
5645 --------------------------------
5646
5647 -- PARAMETER_ASSOCIATION ::=
5648 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5649
5650 -- Note: the N_Parameter_Association node is built only if a formal
5651 -- parameter selector name is present, otherwise the parameter
5652 -- association appears in the tree simply as the node for the
5653 -- explicit actual parameter.
5654
5655 -- N_Parameter_Association
5656 -- Sloc points to formal parameter
e3da30b2 5657 -- Selector_Name (Node2) (always non-Empty)
996ae0b0
RK
5658 -- Explicit_Actual_Parameter (Node3)
5659 -- Next_Named_Actual (Node4-Sem)
d0995fa2 5660 -- Is_Accessibility_Actual (Flag13-Sem)
996ae0b0
RK
5661
5662 ---------------------------
5663 -- 6.4 Actual Parameter --
5664 ---------------------------
5665
fc47ef60
PMR
5666 -- EXPLICIT_ACTUAL_PARAMETER ::=
5667 -- EXPRESSION | variable_NAME | REDUCTION_EXPRESSION_PARAMETER
5668
996ae0b0
RK
5669 ---------------------------
5670 -- 6.5 Return Statement --
5671 ---------------------------
5672
e3da30b2
RD
5673 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5674
5675 -- EXTENDED_RETURN_STATEMENT ::=
5676 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5677 -- [:= EXPRESSION] [do
5678 -- HANDLED_SEQUENCE_OF_STATEMENTS
5679 -- end return];
5680
5681 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5682
92a7cd46
RD
5683 -- The term "return statement" is defined in 6.5 to mean either a
5684 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5685 -- the use of this term, since it used to mean someting else in earlier
5686 -- versions of Ada.
996ae0b0 5687
92a7cd46 5688 -- N_Simple_Return_Statement
996ae0b0 5689 -- Sloc points to RETURN
e3da30b2 5690 -- Return_Statement_Entity (Node5-Sem)
996ae0b0
RK
5691 -- Expression (Node3) (set to Empty if no expression present)
5692 -- Storage_Pool (Node1-Sem)
e3da30b2
RD
5693 -- Procedure_To_Call (Node2-Sem)
5694 -- Do_Tag_Check (Flag13-Sem)
5695 -- By_Ref (Flag5-Sem)
5696 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5697
e3da30b2
RD
5698 -- Note: Return_Statement_Entity points to an E_Return_Statement
5699
5700 -- If a range check is required, then Do_Range_Check is set on the
5701 -- Expression. The check is against the return subtype of the function.
5702
5703 -- N_Extended_Return_Statement
5704 -- Sloc points to RETURN
5705 -- Return_Statement_Entity (Node5-Sem)
5706 -- Return_Object_Declarations (List3)
5707 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5708 -- Storage_Pool (Node1-Sem)
5709 -- Procedure_To_Call (Node2-Sem)
996ae0b0 5710 -- Do_Tag_Check (Flag13-Sem)
996ae0b0
RK
5711 -- By_Ref (Flag5-Sem)
5712
e3da30b2 5713 -- Note: Return_Statement_Entity points to an E_Return_Statement.
313d6f2c 5714
e3da30b2
RD
5715 -- Note that Return_Object_Declarations is a list containing the
5716 -- N_Object_Declaration -- see comment on this field above.
313d6f2c 5717
e3da30b2 5718 -- The declared object will have Is_Return_Object = True.
313d6f2c 5719
e3da30b2
RD
5720 -- There is no such syntactic category as return_object_declaration
5721 -- in the RM. Return_Object_Declarations represents this portion of
5722 -- the syntax for EXTENDED_RETURN_STATEMENT:
5723 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5724 -- [:= EXPRESSION]
5725
5726 -- There are two entities associated with an extended_return_statement:
bbe9779c
AC
5727 -- the Return_Statement_Entity represents the statement itself,
5728 -- and the Defining_Identifier of the Object_Declaration in
e3da30b2 5729 -- Return_Object_Declarations represents the object being
33c423c8 5730 -- returned. N_Simple_Return_Statement has only the former.
996ae0b0 5731
f32eb591
AC
5732 ------------------------------
5733 -- 6.8 Expression Function --
5734 ------------------------------
5735
5736 -- EXPRESSION_FUNCTION ::=
5737 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5738 -- [ASPECT_SPECIFICATIONS];
5739
5740 -- N_Expression_Function
5741 -- Sloc points to FUNCTION
5742 -- Specification (Node1)
5743 -- Expression (Node3)
5744 -- Corresponding_Spec (Node5-Sem)
5745
996ae0b0
RK
5746 ------------------------------
5747 -- 7.1 Package Declaration --
5748 ------------------------------
5749
718deaf1 5750 -- PACKAGE_DECLARATION ::=
1c54829e 5751 -- PACKAGE_SPECIFICATION;
996ae0b0
RK
5752
5753 -- Note: the activation chain entity for a package spec is used for
5754 -- all tasks declared in the package spec, or in the package body.
5755
5756 -- N_Package_Declaration
5757 -- Sloc points to PACKAGE
5758 -- Specification (Node1)
5759 -- Corresponding_Body (Node5-Sem)
5760 -- Parent_Spec (Node4-Sem)
5761 -- Activation_Chain_Entity (Node3-Sem)
5762
5763 --------------------------------
5764 -- 7.1 Package Specification --
5765 --------------------------------
5766
5767 -- PACKAGE_SPECIFICATION ::=
1c54829e
AC
5768 -- package DEFINING_PROGRAM_UNIT_NAME
5769 -- [ASPECT_SPECIFICATIONS]
5770 -- is
996ae0b0
RK
5771 -- {BASIC_DECLARATIVE_ITEM}
5772 -- [private
5773 -- {BASIC_DECLARATIVE_ITEM}]
5774 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5775
5776 -- N_Package_Specification
5777 -- Sloc points to PACKAGE
5778 -- Defining_Unit_Name (Node1)
5779 -- Visible_Declarations (List2)
5780 -- Private_Declarations (List3) (set to No_List if no private
5781 -- part present)
5782 -- End_Label (Node4)
5783 -- Generic_Parent (Node5-Sem)
fbf5a39b 5784 -- Limited_View_Installed (Flag18-Sem)
996ae0b0
RK
5785
5786 -----------------------
5787 -- 7.1 Package Body --
5788 -----------------------
5789
5790 -- PACKAGE_BODY ::=
1c54829e
AC
5791 -- package body DEFINING_PROGRAM_UNIT_NAME
5792 -- [ASPECT_SPECIFICATIONS]
5793 -- is
996ae0b0
RK
5794 -- DECLARATIVE_PART
5795 -- [begin
5796 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5797 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5798
5799 -- N_Package_Body
5800 -- Sloc points to PACKAGE
5801 -- Defining_Unit_Name (Node1)
5802 -- Declarations (List2)
5803 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5804 -- Corresponding_Spec (Node5-Sem)
5805 -- Was_Originally_Stub (Flag13-Sem)
5806
5807 -- Note: if a source level package does not contain a handled sequence
5808 -- of statements, then the parser supplies a dummy one with a null
5809 -- sequence of statements. Comes_From_Source will be False in this
5810 -- constructed sequence. The reason we need this is for the End_Label
5811 -- field in the HSS.
5812
5813 -----------------------------------
5814 -- 7.4 Private Type Declaration --
5815 -----------------------------------
5816
5817 -- PRIVATE_TYPE_DECLARATION ::=
5818 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
cdcf1c7a
AC
5819 -- is [[abstract] tagged] [limited] private
5820 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5821
5822 -- Note: TAGGED is not permitted in Ada 83 mode
5823
5824 -- N_Private_Type_Declaration
5825 -- Sloc points to TYPE
5826 -- Defining_Identifier (Node1)
5827 -- Discriminant_Specifications (List4) (set to No_List if no
5828 -- discriminant part)
5829 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5830 -- Abstract_Present (Flag4)
5831 -- Tagged_Present (Flag15)
5832 -- Limited_Present (Flag17)
5833
5834 ----------------------------------------
5835 -- 7.4 Private Extension Declaration --
5836 ----------------------------------------
5837
5838 -- PRIVATE_EXTENSION_DECLARATION ::=
5839 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
e3da30b2
RD
5840 -- [abstract] [limited | synchronized]
5841 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
cdcf1c7a 5842 -- with private [ASPECT_SPECIFICATIONS];
996ae0b0 5843
e3da30b2
RD
5844 -- Note: LIMITED, and private extension declarations are not allowed
5845 -- in Ada 83 mode.
996ae0b0
RK
5846
5847 -- N_Private_Extension_Declaration
5848 -- Sloc points to TYPE
5849 -- Defining_Identifier (Node1)
2c8d828a 5850 -- Uninitialized_Variable (Node3-Sem)
996ae0b0
RK
5851 -- Discriminant_Specifications (List4) (set to No_List if no
5852 -- discriminant part)
5853 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5854 -- Abstract_Present (Flag4)
244480db 5855 -- Limited_Present (Flag17)
e3da30b2 5856 -- Synchronized_Present (Flag7)
996ae0b0 5857 -- Subtype_Indication (Node5)
a9d8907c 5858 -- Interface_List (List2) (set to No_List if none)
996ae0b0
RK
5859
5860 ---------------------
5861 -- 8.4 Use Clause --
5862 ---------------------
5863
5864 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5865
5866 -----------------------------
5867 -- 8.4 Use Package Clause --
5868 -----------------------------
5869
5870 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5871
5872 -- N_Use_Package_Clause
5873 -- Sloc points to USE
851e9f19
PMR
5874 -- Prev_Use_Clause (Node1-Sem)
5875 -- Name (Node2)
996ae0b0 5876 -- Next_Use_Clause (Node3-Sem)
851e9f19
PMR
5877 -- Associated_Node (Node4-Sem)
5878 -- Hidden_By_Use_Clause (Elist5-Sem)
5879 -- Is_Effective_Use_Clause (Flag1)
5880 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5881 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
996ae0b0
RK
5882
5883 --------------------------
5884 -- 8.4 Use Type Clause --
5885 --------------------------
5886
bd622b64 5887 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
996ae0b0
RK
5888
5889 -- Note: use type clause is not permitted in Ada 83 mode
5890
bd622b64
AC
5891 -- Note: the ALL keyword can appear only in Ada 2012 mode
5892
996ae0b0
RK
5893 -- N_Use_Type_Clause
5894 -- Sloc points to USE
851e9f19
PMR
5895 -- Prev_Use_Clause (Node1-Sem)
5896 -- Used_Operations (Elist2-Sem)
996ae0b0 5897 -- Next_Use_Clause (Node3-Sem)
851e9f19
PMR
5898 -- Subtype_Mark (Node4)
5899 -- Hidden_By_Use_Clause (Elist5-Sem)
5900 -- Is_Effective_Use_Clause (Flag1)
5901 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5902 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
bd622b64 5903 -- All_Present (Flag15)
996ae0b0
RK
5904
5905 -------------------------------
5906 -- 8.5 Renaming Declaration --
5907 -------------------------------
5908
5909 -- RENAMING_DECLARATION ::=
5910 -- OBJECT_RENAMING_DECLARATION
5911 -- | EXCEPTION_RENAMING_DECLARATION
5912 -- | PACKAGE_RENAMING_DECLARATION
5913 -- | SUBPROGRAM_RENAMING_DECLARATION
5914 -- | GENERIC_RENAMING_DECLARATION
5915
5916 --------------------------------------
5917 -- 8.5 Object Renaming Declaration --
5918 --------------------------------------
5919
5920 -- OBJECT_RENAMING_DECLARATION ::=
e3da30b2 5921 -- DEFINING_IDENTIFIER :
cdcf1c7a
AC
5922 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5923 -- [ASPECT_SPECIFICATIONS];
e3da30b2 5924 -- | DEFINING_IDENTIFIER :
cdcf1c7a
AC
5925 -- ACCESS_DEFINITION renames object_NAME
5926 -- [ASPECT_SPECIFICATIONS];
6e937c1c
AC
5927
5928 -- Note: Access_Definition is an optional field that gives support to
0ab80019 5929 -- Ada 2005 (AI-230). The parser generates nodes that have either the
6e937c1c 5930 -- Subtype_Indication field or else the Access_Definition field.
996ae0b0
RK
5931
5932 -- N_Object_Renaming_Declaration
5933 -- Sloc points to first identifier
5934 -- Defining_Identifier (Node1)
e3da30b2 5935 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6e937c1c
AC
5936 -- Subtype_Mark (Node4) (set to Empty if not present)
5937 -- Access_Definition (Node3) (set to Empty if not present)
996ae0b0
RK
5938 -- Name (Node2)
5939 -- Corresponding_Generic_Association (Node5-Sem)
5940
5941 -----------------------------------------
5942 -- 8.5 Exception Renaming Declaration --
5943 -----------------------------------------
5944
5945 -- EXCEPTION_RENAMING_DECLARATION ::=
cdcf1c7a
AC
5946 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5947 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5948
5949 -- N_Exception_Renaming_Declaration
5950 -- Sloc points to first identifier
5951 -- Defining_Identifier (Node1)
5952 -- Name (Node2)
5953
5954 ---------------------------------------
5955 -- 8.5 Package Renaming Declaration --
5956 ---------------------------------------
5957
5958 -- PACKAGE_RENAMING_DECLARATION ::=
cdcf1c7a
AC
5959 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5960 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5961
5962 -- N_Package_Renaming_Declaration
5963 -- Sloc points to PACKAGE
5964 -- Defining_Unit_Name (Node1)
5965 -- Name (Node2)
5966 -- Parent_Spec (Node4-Sem)
5967
5968 ------------------------------------------
5969 -- 8.5 Subprogram Renaming Declaration --
5970 ------------------------------------------
5971
5972 -- SUBPROGRAM_RENAMING_DECLARATION ::=
cdcf1c7a
AC
5973 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5974 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5975
5976 -- N_Subprogram_Renaming_Declaration
5977 -- Sloc points to RENAMES
5978 -- Specification (Node1)
5979 -- Name (Node2)
5980 -- Parent_Spec (Node4-Sem)
5981 -- Corresponding_Spec (Node5-Sem)
82c80734 5982 -- Corresponding_Formal_Spec (Node3-Sem)
6d11af89 5983 -- From_Default (Flag6-Sem)
996ae0b0
RK
5984
5985 -----------------------------------------
5986 -- 8.5.5 Generic Renaming Declaration --
5987 -----------------------------------------
5988
5989 -- GENERIC_RENAMING_DECLARATION ::=
5990 -- generic package DEFINING_PROGRAM_UNIT_NAME
5991 -- renames generic_package_NAME
cdcf1c7a 5992 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5993 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5994 -- renames generic_procedure_NAME
cdcf1c7a 5995 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5996 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5997 -- renames generic_function_NAME
cdcf1c7a 5998 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
5999
6000 -- N_Generic_Package_Renaming_Declaration
6001 -- Sloc points to GENERIC
6002 -- Defining_Unit_Name (Node1)
6003 -- Name (Node2)
6004 -- Parent_Spec (Node4-Sem)
6005
6006 -- N_Generic_Procedure_Renaming_Declaration
6007 -- Sloc points to GENERIC
6008 -- Defining_Unit_Name (Node1)
6009 -- Name (Node2)
6010 -- Parent_Spec (Node4-Sem)
6011
6012 -- N_Generic_Function_Renaming_Declaration
6013 -- Sloc points to GENERIC
6014 -- Defining_Unit_Name (Node1)
6015 -- Name (Node2)
6016 -- Parent_Spec (Node4-Sem)
6017
6018 --------------------------------
6019 -- 9.1 Task Type Declaration --
6020 --------------------------------
6021
6022 -- TASK_TYPE_DECLARATION ::=
6023 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1c54829e
AC
6024 -- [ASPECT_SPECIFICATIONS]
6025 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
996ae0b0
RK
6026
6027 -- N_Task_Type_Declaration
6028 -- Sloc points to TASK
6029 -- Defining_Identifier (Node1)
996ae0b0
RK
6030 -- Discriminant_Specifications (List4) (set to No_List if no
6031 -- discriminant part)
a9d8907c 6032 -- Interface_List (List2) (set to No_List if none)
996ae0b0
RK
6033 -- Task_Definition (Node3) (set to Empty if not present)
6034 -- Corresponding_Body (Node5-Sem)
6035
6036 ----------------------------------
6037 -- 9.1 Single Task Declaration --
6038 ----------------------------------
6039
6040 -- SINGLE_TASK_DECLARATION ::=
edd63e9b 6041 -- task DEFINING_IDENTIFIER
1c54829e
AC
6042 -- [ASPECT_SPECIFICATIONS]
6043 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
996ae0b0
RK
6044
6045 -- N_Single_Task_Declaration
6046 -- Sloc points to TASK
6047 -- Defining_Identifier (Node1)
edd63e9b 6048 -- Interface_List (List2) (set to No_List if none)
996ae0b0
RK
6049 -- Task_Definition (Node3) (set to Empty if not present)
6050
6051 --------------------------
6052 -- 9.1 Task Definition --
6053 --------------------------
6054
6055 -- TASK_DEFINITION ::=
6056 -- {TASK_ITEM}
6057 -- [private
6058 -- {TASK_ITEM}]
6059 -- end [task_IDENTIFIER]
6060
6061 -- Note: as a result of semantic analysis, the list of task items can
6062 -- include implicit type declarations resulting from entry families.
6063
6064 -- N_Task_Definition
6065 -- Sloc points to first token of task definition
6066 -- Visible_Declarations (List2)
6067 -- Private_Declarations (List3) (set to No_List if no private part)
6068 -- End_Label (Node4)
996ae0b0 6069 -- Has_Storage_Size_Pragma (Flag5-Sem)
21d27997 6070 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
996ae0b0
RK
6071
6072 --------------------
6073 -- 9.1 Task Item --
6074 --------------------
6075
6076 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
6077
6078 --------------------
6079 -- 9.1 Task Body --
6080 --------------------
6081
6082 -- TASK_BODY ::=
1c54829e
AC
6083 -- task body task_DEFINING_IDENTIFIER
6084 -- [ASPECT_SPECIFICATIONS]
6085 -- is
996ae0b0
RK
6086 -- DECLARATIVE_PART
6087 -- begin
6088 -- HANDLED_SEQUENCE_OF_STATEMENTS
6089 -- end [task_IDENTIFIER];
6090
d8db0bca 6091 -- Gigi restriction: This node never appears
996ae0b0
RK
6092
6093 -- N_Task_Body
6094 -- Sloc points to TASK
6095 -- Defining_Identifier (Node1)
6096 -- Declarations (List2)
6097 -- Handled_Statement_Sequence (Node4)
6098 -- Is_Task_Master (Flag5-Sem)
6099 -- Activation_Chain_Entity (Node3-Sem)
6100 -- Corresponding_Spec (Node5-Sem)
6101 -- Was_Originally_Stub (Flag13-Sem)
6102
6103 -------------------------------------
6104 -- 9.4 Protected Type Declaration --
6105 -------------------------------------
6106
6107 -- PROTECTED_TYPE_DECLARATION ::=
6108 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1c54829e
AC
6109 -- [ASPECT_SPECIFICATIONS]
6110 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
996ae0b0
RK
6111
6112 -- Note: protected type declarations are not permitted in Ada 83 mode
6113
6114 -- N_Protected_Type_Declaration
6115 -- Sloc points to PROTECTED
6116 -- Defining_Identifier (Node1)
6117 -- Discriminant_Specifications (List4) (set to No_List if no
6118 -- discriminant part)
a9d8907c 6119 -- Interface_List (List2) (set to No_List if none)
996ae0b0
RK
6120 -- Protected_Definition (Node3)
6121 -- Corresponding_Body (Node5-Sem)
6122
6123 ---------------------------------------
6124 -- 9.4 Single Protected Declaration --
6125 ---------------------------------------
6126
6127 -- SINGLE_PROTECTED_DECLARATION ::=
edd63e9b 6128 -- protected DEFINING_IDENTIFIER
1c54829e
AC
6129 -- [ASPECT_SPECIFICATIONS]
6130 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
996ae0b0
RK
6131
6132 -- Note: single protected declarations are not allowed in Ada 83 mode
6133
6134 -- N_Single_Protected_Declaration
6135 -- Sloc points to PROTECTED
6136 -- Defining_Identifier (Node1)
edd63e9b 6137 -- Interface_List (List2) (set to No_List if none)
996ae0b0
RK
6138 -- Protected_Definition (Node3)
6139
6140 -------------------------------
6141 -- 9.4 Protected Definition --
6142 -------------------------------
6143
6144 -- PROTECTED_DEFINITION ::=
6145 -- {PROTECTED_OPERATION_DECLARATION}
6146 -- [private
6147 -- {PROTECTED_ELEMENT_DECLARATION}]
6148 -- end [protected_IDENTIFIER]
6149
6150 -- N_Protected_Definition
6151 -- Sloc points to first token of protected definition
6152 -- Visible_Declarations (List2)
6153 -- Private_Declarations (List3) (set to No_List if no private part)
6154 -- End_Label (Node4)
996ae0b0
RK
6155
6156 ------------------------------------------
6157 -- 9.4 Protected Operation Declaration --
6158 ------------------------------------------
6159
6160 -- PROTECTED_OPERATION_DECLARATION ::=
6161 -- SUBPROGRAM_DECLARATION
6162 -- | ENTRY_DECLARATION
6163 -- | REPRESENTATION_CLAUSE
6164
6165 ----------------------------------------
6166 -- 9.4 Protected Element Declaration --
6167 ----------------------------------------
6168
6169 -- PROTECTED_ELEMENT_DECLARATION ::=
6170 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
6171
6172 -------------------------
6173 -- 9.4 Protected Body --
6174 -------------------------
6175
6176 -- PROTECTED_BODY ::=
1c54829e
AC
6177 -- protected body DEFINING_IDENTIFIER
6178 -- [ASPECT_SPECIFICATIONS];
6179 -- is
996ae0b0
RK
6180 -- {PROTECTED_OPERATION_ITEM}
6181 -- end [protected_IDENTIFIER];
6182
6183 -- Note: protected bodies are not allowed in Ada 83 mode
6184
d8db0bca 6185 -- Gigi restriction: This node never appears
996ae0b0
RK
6186
6187 -- N_Protected_Body
6188 -- Sloc points to PROTECTED
6189 -- Defining_Identifier (Node1)
6190 -- Declarations (List2) protected operation items (and pragmas)
6191 -- End_Label (Node4)
6192 -- Corresponding_Spec (Node5-Sem)
6193 -- Was_Originally_Stub (Flag13-Sem)
6194
6195 -----------------------------------
6196 -- 9.4 Protected Operation Item --
6197 -----------------------------------
6198
6199 -- PROTECTED_OPERATION_ITEM ::=
6200 -- SUBPROGRAM_DECLARATION
6201 -- | SUBPROGRAM_BODY
6202 -- | ENTRY_BODY
6203 -- | REPRESENTATION_CLAUSE
6204
6205 ------------------------------
6206 -- 9.5.2 Entry Declaration --
6207 ------------------------------
6208
6209 -- ENTRY_DECLARATION ::=
edd63e9b 6210 -- [[not] overriding]
996ae0b0 6211 -- entry DEFINING_IDENTIFIER
cdcf1c7a
AC
6212 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
6213 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
6214
6215 -- N_Entry_Declaration
6216 -- Sloc points to ENTRY
6217 -- Defining_Identifier (Node1)
6218 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
6219 -- Parameter_Specifications (List3) (set to No_List if no formal part)
fbf5a39b 6220 -- Corresponding_Body (Node5-Sem)
edd63e9b
ES
6221 -- Must_Override (Flag14) set if overriding indicator present
6222 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6223
6224 -- Note: overriding indicator is an Ada 2005 feature
996ae0b0
RK
6225
6226 -----------------------------
6227 -- 9.5.2 Accept statement --
6228 -----------------------------
6229
6230 -- ACCEPT_STATEMENT ::=
6231 -- accept entry_DIRECT_NAME
6232 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
6233 -- HANDLED_SEQUENCE_OF_STATEMENTS
6234 -- end [entry_IDENTIFIER]];
6235
d8db0bca 6236 -- Gigi restriction: This node never appears
996ae0b0
RK
6237
6238 -- Note: there are no explicit declarations allowed in an accept
6239 -- statement. However, the implicit declarations for any statement
6240 -- identifiers (labels and block/loop identifiers) are declarations
6241 -- that belong logically to the accept statement, and that is why
6242 -- there is a Declarations field in this node.
6243
6244 -- N_Accept_Statement
6245 -- Sloc points to ACCEPT
6246 -- Entry_Direct_Name (Node1)
6247 -- Entry_Index (Node5) (set to Empty if not present)
6248 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6249 -- Handled_Statement_Sequence (Node4)
6250 -- Declarations (List2) (set to No_List if no declarations)
6251
6252 ------------------------
6253 -- 9.5.2 Entry Index --
6254 ------------------------
6255
6256 -- ENTRY_INDEX ::= EXPRESSION
6257
6258 -----------------------
6259 -- 9.5.2 Entry Body --
6260 -----------------------
6261
6262 -- ENTRY_BODY ::=
6263 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
6264 -- DECLARATIVE_PART
6265 -- begin
6266 -- HANDLED_SEQUENCE_OF_STATEMENTS
6267 -- end [entry_IDENTIFIER];
6268
6269 -- ENTRY_BARRIER ::= when CONDITION
6270
6271 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
6272 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
6273 -- too full (it would otherwise have too many fields)
6274
d8db0bca 6275 -- Gigi restriction: This node never appears
996ae0b0
RK
6276
6277 -- N_Entry_Body
6278 -- Sloc points to ENTRY
6279 -- Defining_Identifier (Node1)
6280 -- Entry_Body_Formal_Part (Node5)
6281 -- Declarations (List2)
6282 -- Handled_Statement_Sequence (Node4)
6283 -- Activation_Chain_Entity (Node3-Sem)
6284
6285 -----------------------------------
6286 -- 9.5.2 Entry Body Formal Part --
6287 -----------------------------------
6288
6289 -- ENTRY_BODY_FORMAL_PART ::=
6290 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
6291
6292 -- Note that an entry body formal part node is present even if it is
6293 -- empty. This reflects the grammar, in which it is the components of
6294 -- the entry body formal part that are optional, not the entry body
6295 -- formal part itself. Also this means that the barrier condition
6296 -- always has somewhere to be stored.
6297
d8db0bca 6298 -- Gigi restriction: This node never appears
996ae0b0
RK
6299
6300 -- N_Entry_Body_Formal_Part
6301 -- Sloc points to first token
6302 -- Entry_Index_Specification (Node4) (set to Empty if not present)
6303 -- Parameter_Specifications (List3) (set to No_List if no formal part)
6304 -- Condition (Node1) from entry barrier of entry body
6305
6306 --------------------------
6307 -- 9.5.2 Entry Barrier --
6308 --------------------------
6309
6310 -- ENTRY_BARRIER ::= when CONDITION
6311
6312 --------------------------------------
6313 -- 9.5.2 Entry Index Specification --
6314 --------------------------------------
6315
6316 -- ENTRY_INDEX_SPECIFICATION ::=
6317 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
6318
d8db0bca 6319 -- Gigi restriction: This node never appears
996ae0b0
RK
6320
6321 -- N_Entry_Index_Specification
6322 -- Sloc points to FOR
6323 -- Defining_Identifier (Node1)
6324 -- Discrete_Subtype_Definition (Node4)
6325
6326 ---------------------------------
6327 -- 9.5.3 Entry Call Statement --
6328 ---------------------------------
6329
6330 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
6331
6332 -- The parser may generate a procedure call for this construct. The
6333 -- semantic pass must correct this misidentification where needed.
6334
d8db0bca 6335 -- Gigi restriction: This node never appears
996ae0b0
RK
6336
6337 -- N_Entry_Call_Statement
6338 -- Sloc points to first token of name
6339 -- Name (Node2)
6340 -- Parameter_Associations (List3) (set to No_List if no
6341 -- actual parameter part)
6342 -- First_Named_Actual (Node4-Sem)
90e491a7
PMR
6343 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6344 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 6345 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
996ae0b0
RK
6346
6347 ------------------------------
6348 -- 9.5.4 Requeue Statement --
6349 ------------------------------
6350
6351 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
6352
6353 -- Note: requeue statements are not permitted in Ada 83 mode
6354
d8db0bca 6355 -- Gigi restriction: This node never appears
996ae0b0
RK
6356
6357 -- N_Requeue_Statement
6358 -- Sloc points to REQUEUE
6359 -- Name (Node2)
6360 -- Abort_Present (Flag15)
90e491a7
PMR
6361 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
6362 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 6363 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
996ae0b0
RK
6364
6365 --------------------------
6366 -- 9.6 Delay Statement --
6367 --------------------------
6368
6369 -- DELAY_STATEMENT ::=
6370 -- DELAY_UNTIL_STATEMENT
6371 -- | DELAY_RELATIVE_STATEMENT
6372
6373 --------------------------------
6374 -- 9.6 Delay Until Statement --
6375 --------------------------------
6376
6377 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
6378
6379 -- Note: delay until statements are not permitted in Ada 83 mode
6380
d8db0bca 6381 -- Gigi restriction: This node never appears
996ae0b0
RK
6382
6383 -- N_Delay_Until_Statement
6384 -- Sloc points to DELAY
6385 -- Expression (Node3)
6386
6387 -----------------------------------
6388 -- 9.6 Delay Relative Statement --
6389 -----------------------------------
6390
6391 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
6392
d8db0bca 6393 -- Gigi restriction: This node never appears
996ae0b0
RK
6394
6395 -- N_Delay_Relative_Statement
6396 -- Sloc points to DELAY
6397 -- Expression (Node3)
6398
6399 ---------------------------
6400 -- 9.7 Select Statement --
6401 ---------------------------
6402
6403 -- SELECT_STATEMENT ::=
6404 -- SELECTIVE_ACCEPT
6405 -- | TIMED_ENTRY_CALL
6406 -- | CONDITIONAL_ENTRY_CALL
6407 -- | ASYNCHRONOUS_SELECT
6408
6409 -----------------------------
6410 -- 9.7.1 Selective Accept --
6411 -----------------------------
6412
6413 -- SELECTIVE_ACCEPT ::=
6414 -- select
6415 -- [GUARD]
6416 -- SELECT_ALTERNATIVE
6417 -- {or
6418 -- [GUARD]
6419 -- SELECT_ALTERNATIVE}
6420 -- [else
6421 -- SEQUENCE_OF_STATEMENTS]
6422 -- end select;
6423
d8db0bca 6424 -- Gigi restriction: This node never appears
996ae0b0
RK
6425
6426 -- Note: the guard expression, if present, appears in the node for
6427 -- the select alternative.
6428
6429 -- N_Selective_Accept
6430 -- Sloc points to SELECT
6431 -- Select_Alternatives (List1)
6432 -- Else_Statements (List4) (set to No_List if no else part)
6433
6434 ------------------
6435 -- 9.7.1 Guard --
6436 ------------------
6437
6438 -- GUARD ::= when CONDITION =>
6439
6440 -- As noted above, the CONDITION that is part of a GUARD is included
3354f96d 6441 -- in the node for the select alternative for convenience.
996ae0b0
RK
6442
6443 -------------------------------
6444 -- 9.7.1 Select Alternative --
6445 -------------------------------
6446
6447 -- SELECT_ALTERNATIVE ::=
6448 -- ACCEPT_ALTERNATIVE
6449 -- | DELAY_ALTERNATIVE
6450 -- | TERMINATE_ALTERNATIVE
6451
6452 -------------------------------
6453 -- 9.7.1 Accept Alternative --
6454 -------------------------------
6455
6456 -- ACCEPT_ALTERNATIVE ::=
6457 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
6458
d8db0bca 6459 -- Gigi restriction: This node never appears
996ae0b0
RK
6460
6461 -- N_Accept_Alternative
6462 -- Sloc points to ACCEPT
6463 -- Accept_Statement (Node2)
6464 -- Condition (Node1) from the guard (set to Empty if no guard present)
6465 -- Statements (List3) (set to Empty_List if no statements)
6466 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6467 -- Accept_Handler_Records (List5-Sem)
6468
6469 ------------------------------
6470 -- 9.7.1 Delay Alternative --
6471 ------------------------------
6472
6473 -- DELAY_ALTERNATIVE ::=
6474 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6475
d8db0bca 6476 -- Gigi restriction: This node never appears
996ae0b0
RK
6477
6478 -- N_Delay_Alternative
6479 -- Sloc points to DELAY
6480 -- Delay_Statement (Node2)
6481 -- Condition (Node1) from the guard (set to Empty if no guard present)
6482 -- Statements (List3) (set to Empty_List if no statements)
6483 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6484
6485 ----------------------------------
6486 -- 9.7.1 Terminate Alternative --
6487 ----------------------------------
6488
6489 -- TERMINATE_ALTERNATIVE ::= terminate;
6490
d8db0bca 6491 -- Gigi restriction: This node never appears
996ae0b0
RK
6492
6493 -- N_Terminate_Alternative
6494 -- Sloc points to TERMINATE
6495 -- Condition (Node1) from the guard (set to Empty if no guard present)
6496 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6497 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6498
6499 -----------------------------
6500 -- 9.7.2 Timed Entry Call --
6501 -----------------------------
6502
6503 -- TIMED_ENTRY_CALL ::=
6504 -- select
6505 -- ENTRY_CALL_ALTERNATIVE
6506 -- or
6507 -- DELAY_ALTERNATIVE
6508 -- end select;
6509
d8db0bca 6510 -- Gigi restriction: This node never appears
996ae0b0
RK
6511
6512 -- N_Timed_Entry_Call
6513 -- Sloc points to SELECT
6514 -- Entry_Call_Alternative (Node1)
6515 -- Delay_Alternative (Node4)
6516
6517 -----------------------------------
6518 -- 9.7.2 Entry Call Alternative --
6519 -----------------------------------
6520
6521 -- ENTRY_CALL_ALTERNATIVE ::=
244480db
GD
6522 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6523
6524 -- PROCEDURE_OR_ENTRY_CALL ::=
6525 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
996ae0b0 6526
d8db0bca 6527 -- Gigi restriction: This node never appears
996ae0b0
RK
6528
6529 -- N_Entry_Call_Alternative
6530 -- Sloc points to first token of entry call statement
6531 -- Entry_Call_Statement (Node1)
6532 -- Statements (List3) (set to Empty_List if no statements)
6533 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6534
6535 -----------------------------------
6536 -- 9.7.3 Conditional Entry Call --
6537 -----------------------------------
6538
6539 -- CONDITIONAL_ENTRY_CALL ::=
6540 -- select
6541 -- ENTRY_CALL_ALTERNATIVE
6542 -- else
6543 -- SEQUENCE_OF_STATEMENTS
6544 -- end select;
6545
d8db0bca 6546 -- Gigi restriction: This node never appears
996ae0b0
RK
6547
6548 -- N_Conditional_Entry_Call
6549 -- Sloc points to SELECT
6550 -- Entry_Call_Alternative (Node1)
6551 -- Else_Statements (List4)
6552
6553 --------------------------------
6554 -- 9.7.4 Asynchronous Select --
6555 --------------------------------
6556
6557 -- ASYNCHRONOUS_SELECT ::=
6558 -- select
6559 -- TRIGGERING_ALTERNATIVE
6560 -- then abort
6561 -- ABORTABLE_PART
6562 -- end select;
6563
6564 -- Note: asynchronous select is not permitted in Ada 83 mode
6565
d8db0bca 6566 -- Gigi restriction: This node never appears
996ae0b0
RK
6567
6568 -- N_Asynchronous_Select
6569 -- Sloc points to SELECT
6570 -- Triggering_Alternative (Node1)
6571 -- Abortable_Part (Node2)
6572
6573 -----------------------------------
6574 -- 9.7.4 Triggering Alternative --
6575 -----------------------------------
6576
6577 -- TRIGGERING_ALTERNATIVE ::=
6578 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6579
d8db0bca 6580 -- Gigi restriction: This node never appears
996ae0b0
RK
6581
6582 -- N_Triggering_Alternative
6583 -- Sloc points to first token of triggering statement
6584 -- Triggering_Statement (Node1)
6585 -- Statements (List3) (set to Empty_List if no statements)
6586 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6587
6588 ---------------------------------
6589 -- 9.7.4 Triggering Statement --
6590 ---------------------------------
6591
244480db 6592 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
996ae0b0
RK
6593
6594 ---------------------------
6595 -- 9.7.4 Abortable Part --
6596 ---------------------------
6597
6598 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6599
d8db0bca 6600 -- Gigi restriction: This node never appears
996ae0b0
RK
6601
6602 -- N_Abortable_Part
6603 -- Sloc points to ABORT
6604 -- Statements (List3)
6605
6606 --------------------------
6607 -- 9.8 Abort Statement --
6608 --------------------------
6609
6610 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6611
d8db0bca 6612 -- Gigi restriction: This node never appears
996ae0b0
RK
6613
6614 -- N_Abort_Statement
6615 -- Sloc points to ABORT
6616 -- Names (List2)
6617
6618 -------------------------
6619 -- 10.1.1 Compilation --
6620 -------------------------
6621
6622 -- COMPILATION ::= {COMPILATION_UNIT}
6623
6624 -- There is no explicit node in the tree for a compilation, since in
6625 -- general the compiler is processing only a single compilation unit
6626 -- at a time. It is possible to parse multiple units in syntax check
8737a29a 6627 -- only mode, but the trees are discarded in that case.
996ae0b0
RK
6628
6629 ------------------------------
6630 -- 10.1.1 Compilation Unit --
6631 ------------------------------
6632
6633 -- COMPILATION_UNIT ::=
6634 -- CONTEXT_CLAUSE LIBRARY_ITEM
6635 -- | CONTEXT_CLAUSE SUBUNIT
6636
3354f96d 6637 -- The N_Compilation_Unit node itself represents the above syntax.
996ae0b0
RK
6638 -- However, there are two additional items not reflected in the above
6639 -- syntax. First we have the global declarations that are added by the
6640 -- code generator. These are outer level declarations (so they cannot
6641 -- be represented as being inside the units). An example is the wrapper
6642 -- subprograms that are created to do ABE checking. As always a list of
6643 -- declarations can contain actions as well (i.e. statements), and such
6644 -- statements are executed as part of the elaboration of the unit. Note
6645 -- that all such declarations are elaborated before the library unit.
6646
6647 -- Similarly, certain actions need to be elaborated at the completion
6648 -- of elaboration of the library unit (notably the statement that sets
6649 -- the Boolean flag indicating that elaboration is complete).
6650
6651 -- The third item not reflected in the syntax is pragmas that appear
6652 -- after the compilation unit. As always pragmas are a problem since
6653 -- they are not part of the formal syntax, but can be stuck into the
6654 -- source following a set of ad hoc rules, and we have to find an ad
6655 -- hoc way of sticking them into the tree. For pragmas that appear
6656 -- before the library unit, we just consider them to be part of the
6657 -- context clause, and pragmas can appear in the Context_Items list
6658 -- of the compilation unit. However, pragmas can also appear after
6659 -- the library item.
6660
6661 -- To deal with all these problems, we create an auxiliary node for
fab2daeb
AC
6662 -- a compilation unit, referenced from the N_Compilation_Unit node,
6663 -- that contains these items.
996ae0b0
RK
6664
6665 -- N_Compilation_Unit
6666 -- Sloc points to first token of defining unit name
996ae0b0
RK
6667 -- Context_Items (List1) context items and pragmas preceding unit
6668 -- Private_Present (Flag15) set if library unit has private keyword
6669 -- Unit (Node2) library item or subunit
6670 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
996ae0b0 6671 -- First_Inlined_Subprogram (Node3-Sem)
69e6ee2f
HK
6672 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6673 -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
6674 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6675 -- Body_Required (Flag13-Sem) set for spec if body is required
c775c209 6676 -- Has_Pragma_Suppress_All (Flag14-Sem)
69e6ee2f
HK
6677 -- Context_Pending (Flag16-Sem)
6678 -- Has_No_Elaboration_Code (Flag17-Sem)
996ae0b0
RK
6679
6680 -- N_Compilation_Unit_Aux
6681 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6682 -- Declarations (List2) (set to No_List if no global declarations)
6683 -- Actions (List1) (set to No_List if no actions)
6684 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
fbf5a39b 6685 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
fab2daeb 6686 -- Default_Storage_Pool (Node3-Sem)
996ae0b0
RK
6687
6688 --------------------------
6689 -- 10.1.1 Library Item --
6690 --------------------------
6691
6692 -- LIBRARY_ITEM ::=
6693 -- [private] LIBRARY_UNIT_DECLARATION
6694 -- | LIBRARY_UNIT_BODY
6695 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6696
6697 -- Note: PRIVATE is not allowed in Ada 83 mode
6698
6699 -- There is no explicit node in the tree for library item, instead
6700 -- the declaration or body, and the flag for private if present,
8737a29a 6701 -- appear in the N_Compilation_Unit node.
996ae0b0 6702
3354f96d
RW
6703 --------------------------------------
6704 -- 10.1.1 Library Unit Declaration --
6705 --------------------------------------
996ae0b0
RK
6706
6707 -- LIBRARY_UNIT_DECLARATION ::=
6708 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6709 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6710
3354f96d
RW
6711 -----------------------------------------------
6712 -- 10.1.1 Library Unit Renaming Declaration --
6713 -----------------------------------------------
996ae0b0
RK
6714
6715 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6716 -- PACKAGE_RENAMING_DECLARATION
6717 -- | GENERIC_RENAMING_DECLARATION
6718 -- | SUBPROGRAM_RENAMING_DECLARATION
6719
6720 -------------------------------
6721 -- 10.1.1 Library unit body --
6722 -------------------------------
6723
6724 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6725
6726 ------------------------------
6727 -- 10.1.1 Parent Unit Name --
6728 ------------------------------
6729
6730 -- PARENT_UNIT_NAME ::= NAME
6731
6732 ----------------------------
6733 -- 10.1.2 Context clause --
6734 ----------------------------
6735
6736 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6737
6738 -- The context clause can include pragmas, and any pragmas that appear
6739 -- before the context clause proper (i.e. all configuration pragmas,
6740 -- also appear at the front of this list).
6741
6742 --------------------------
6743 -- 10.1.2 Context_Item --
6744 --------------------------
6745
6746 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6747
6748 -------------------------
6749 -- 10.1.2 With clause --
6750 -------------------------
6751
6752 -- WITH_CLAUSE ::=
6753 -- with library_unit_NAME {,library_unit_NAME};
6754
6755 -- A separate With clause is built for each name, so that we have
6756 -- a Corresponding_Spec field for each with'ed spec. The flags
6757 -- First_Name and Last_Name are used to reconstruct the exact
6758 -- source form. When a list of names appears in one with clause,
6759 -- the first name in the list has First_Name set, and the last
6760 -- has Last_Name set. If the with clause has only one name, then
6761 -- both of the flags First_Name and Last_Name are set in this name.
6762
6763 -- Note: in the case of implicit with's that are installed by the
6764 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6765 -- set to Standard_Location, but it is incorrect to test the Sloc
6766 -- to find out if a with clause is implicit, test the flag instead.
6767
6768 -- N_With_Clause
6769 -- Sloc points to first token of library unit name
6770 -- Name (Node2)
94ce4941
HK
6771 -- Private_Present (Flag15) set if with_clause has private keyword
6772 -- Limited_Present (Flag17) set if LIMITED is present
9af094a1 6773 -- Next_Implicit_With (Node3-Sem)
996ae0b0
RK
6774 -- Library_Unit (Node4-Sem)
6775 -- Corresponding_Spec (Node5-Sem)
6776 -- First_Name (Flag5) (set to True if first name or only one name)
6777 -- Last_Name (Flag6) (set to True if last name or only one name)
6778 -- Context_Installed (Flag13-Sem)
6779 -- Elaborate_Present (Flag4-Sem)
555360a5 6780 -- Elaborate_All_Present (Flag14-Sem)
bde33286
RD
6781 -- Elaborate_All_Desirable (Flag9-Sem)
6782 -- Elaborate_Desirable (Flag11-Sem)
fbf5a39b 6783 -- Implicit_With (Flag16-Sem)
fbf5a39b 6784 -- Limited_View_Installed (Flag18-Sem)
94ce4941 6785 -- Parent_With (Flag1-Sem)
996ae0b0
RK
6786 -- Unreferenced_In_Spec (Flag7-Sem)
6787 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6788
f691d19f
AC
6789 -- Note: Limited_Present and Limited_View_Installed are used to support
6790 -- the implementation of Ada 2005 (AI-50217).
6791
6792 -- Similarly, Private_Present is used to support the implementation of
6793 -- Ada 2005 (AI-50262).
19f0526a 6794
598a56c0
ES
6795 -- Note: if the WITH clause refers to a standard library unit, then a
6796 -- limited with clause is changed into a normal with clause, because we
6797 -- are not prepared to deal with limited with in the context of Rtsfind.
6798 -- So in this case, the Limited_Present flag will be False in the final
6799 -- tree. However, we do NOT do this transformation in ASIS mode, so for
6800 -- ASIS the flag will remain set in this situation.
6801
996ae0b0
RK
6802 ----------------------
6803 -- With_Type clause --
6804 ----------------------
6805
6806 -- This is a GNAT extension, used to implement mutually recursive
6807 -- types declared in different packages.
f691d19f 6808
0712790c 6809 -- Note: this is now obsolete. The functionality of this construct
f691d19f 6810 -- is now implemented by the Ada 2005 limited_with_clause.
996ae0b0
RK
6811
6812 ---------------------
6813 -- 10.2 Body stub --
6814 ---------------------
6815
6816 -- BODY_STUB ::=
6817 -- SUBPROGRAM_BODY_STUB
6818 -- | PACKAGE_BODY_STUB
6819 -- | TASK_BODY_STUB
6820 -- | PROTECTED_BODY_STUB
6821
6822 ----------------------------------
6823 -- 10.1.3 Subprogram Body Stub --
6824 ----------------------------------
6825
6826 -- SUBPROGRAM_BODY_STUB ::=
cdcf1c7a
AC
6827 -- SUBPROGRAM_SPECIFICATION is separate
6828 -- [ASPECT_SPECIFICATION];
996ae0b0
RK
6829
6830 -- N_Subprogram_Body_Stub
6831 -- Sloc points to FUNCTION or PROCEDURE
6832 -- Specification (Node1)
e28072cd 6833 -- Corresponding_Spec_Of_Stub (Node2-Sem)
996ae0b0
RK
6834 -- Library_Unit (Node4-Sem) points to the subunit
6835 -- Corresponding_Body (Node5-Sem)
6836
6837 -------------------------------
6838 -- 10.1.3 Package Body Stub --
6839 -------------------------------
6840
6841 -- PACKAGE_BODY_STUB ::=
cdcf1c7a
AC
6842 -- package body DEFINING_IDENTIFIER is separate
6843 -- [ASPECT_SPECIFICATION];
996ae0b0
RK
6844
6845 -- N_Package_Body_Stub
6846 -- Sloc points to PACKAGE
6847 -- Defining_Identifier (Node1)
e28072cd 6848 -- Corresponding_Spec_Of_Stub (Node2-Sem)
996ae0b0
RK
6849 -- Library_Unit (Node4-Sem) points to the subunit
6850 -- Corresponding_Body (Node5-Sem)
6851
6852 ----------------------------
6853 -- 10.1.3 Task Body Stub --
6854 ----------------------------
6855
6856 -- TASK_BODY_STUB ::=
cdcf1c7a
AC
6857 -- task body DEFINING_IDENTIFIER is separate
6858 -- [ASPECT_SPECIFICATION];
996ae0b0
RK
6859
6860 -- N_Task_Body_Stub
6861 -- Sloc points to TASK
6862 -- Defining_Identifier (Node1)
e28072cd 6863 -- Corresponding_Spec_Of_Stub (Node2-Sem)
996ae0b0
RK
6864 -- Library_Unit (Node4-Sem) points to the subunit
6865 -- Corresponding_Body (Node5-Sem)
6866
6867 ---------------------------------
6868 -- 10.1.3 Protected Body Stub --
6869 ---------------------------------
6870
6871 -- PROTECTED_BODY_STUB ::=
cdcf1c7a
AC
6872 -- protected body DEFINING_IDENTIFIER is separate
6873 -- [ASPECT_SPECIFICATION];
996ae0b0
RK
6874
6875 -- Note: protected body stubs are not allowed in Ada 83 mode
6876
6877 -- N_Protected_Body_Stub
6878 -- Sloc points to PROTECTED
6879 -- Defining_Identifier (Node1)
e28072cd 6880 -- Corresponding_Spec_Of_Stub (Node2-Sem)
996ae0b0
RK
6881 -- Library_Unit (Node4-Sem) points to the subunit
6882 -- Corresponding_Body (Node5-Sem)
6883
6884 ---------------------
6885 -- 10.1.3 Subunit --
6886 ---------------------
6887
6888 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6889
6890 -- N_Subunit
6891 -- Sloc points to SEPARATE
6892 -- Name (Node2) is the name of the parent unit
6893 -- Proper_Body (Node1) is the subunit body
6894 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6895
6896 ---------------------------------
6897 -- 11.1 Exception Declaration --
6898 ---------------------------------
6899
718deaf1
AC
6900 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6901 -- [ASPECT_SPECIFICATIONS];
996ae0b0 6902
3354f96d 6903 -- For consistency with object declarations etc., the parser converts
996ae0b0
RK
6904 -- the case of multiple identifiers being declared to a series of
6905 -- declarations in which the expression is copied, using the More_Ids
3354f96d 6906 -- and Prev_Ids flags to remember the source form as described in the
996ae0b0
RK
6907 -- section on "Handling of Defining Identifier Lists".
6908
6909 -- N_Exception_Declaration
6910 -- Sloc points to EXCEPTION
6911 -- Defining_Identifier (Node1)
6912 -- Expression (Node3-Sem)
0712790c 6913 -- Renaming_Exception (Node2-Sem)
996ae0b0
RK
6914 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6915 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6916
6917 ------------------------------------------
6918 -- 11.2 Handled Sequence Of Statements --
6919 ------------------------------------------
6920
6921 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6922 -- SEQUENCE_OF_STATEMENTS
6923 -- [exception
6924 -- EXCEPTION_HANDLER
6925 -- {EXCEPTION_HANDLER}]
6926 -- [at end
6927 -- cleanup_procedure_call (param, param, param, ...);]
6928
6929 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6930 -- used only internally currently, but is considered to be syntactic.
6931 -- At the moment, the only cleanup action allowed is a single call to
6932 -- a parameterless procedure, and the Identifier field of the node is
7ae0d98c
AC
6933 -- the procedure to be called. The cleanup action occurs whenever the
6934 -- sequence of statements is left for any reason. The possible reasons
6935 -- are:
6936 -- 1. reaching the end of the sequence
6937 -- 2. exit, return, or goto
6938 -- 3. exception or abort
6939 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6940 -- entirely in the back end. In this case, a handled sequence of
6941 -- statements with an "at end" cannot also have exception handlers.
57d3adcd 6942 -- For other back ends, such as gcc with front-end SJLJ, the
7ae0d98c
AC
6943 -- implementation is split between the front end and back end; the front
6944 -- end implements 3, and the back end implements 1 and 2. In this case,
6945 -- if there is an "at end", the front end inserts the appropriate
6946 -- exception handler, and this handler takes precedence over "at end"
6947 -- in case of exception.
6948
6949 -- The inserted exception handler is of the form:
996ae0b0
RK
6950
6951 -- when all others =>
6952 -- cleanup;
6953 -- raise;
6954
7ae0d98c
AC
6955 -- where cleanup is the procedure to be called. The reason we do this is
6956 -- so that the front end can handle the necessary entries in the
6957 -- exception tables, and other exception handler actions required as
6958 -- part of the normal handling for exception handlers.
996ae0b0
RK
6959
6960 -- The AT END cleanup handler protects only the sequence of statements
6961 -- (not the associated declarations of the parent), just like exception
6962 -- handlers. The big difference is that the cleanup procedure is called
6963 -- on either a normal or an abnormal exit from the statement sequence.
6964
6965 -- Note: the list of Exception_Handlers can contain pragmas as well
6966 -- as actual handlers. In practice these pragmas can only occur at
6967 -- the start of the list, since any pragmas occurring later on will
6968 -- be included in the statement list of the corresponding handler.
6969
6970 -- Note: although in the Ada syntax, the sequence of statements in
6971 -- a handled sequence of statements can only contain statements, we
6972 -- allow free mixing of declarations and statements in the resulting
6973 -- expanded tree. This is for example used to deal with the case of
6974 -- a cleanup procedure that must handle declarations as well as the
6975 -- statements of a block.
6976
17ce1f52
AC
6977 -- Note: the cleanup_procedure_call does not go through the common
6978 -- processing for calls, which in particular means that it will not be
6979 -- automatically inlined in all cases, even though the procedure to be
6980 -- called is marked inline. More specifically, if the procedure comes
6981 -- from another unit than the main source unit, for example a run-time
6982 -- unit, then it needs to be manually added to the list of bodies to be
6983 -- inlined by invoking Add_Inlined_Body on it.
6984
996ae0b0
RK
6985 -- N_Handled_Sequence_Of_Statements
6986 -- Sloc points to first token of first statement
6987 -- Statements (List3)
6988 -- End_Label (Node4) (set to Empty if expander generated)
6989 -- Exception_Handlers (List5) (set to No_List if none present)
6990 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6991 -- First_Real_Statement (Node2-Sem)
996ae0b0
RK
6992
6993 -- Note: the parent always contains a Declarations field which contains
6994 -- declarations associated with the handled sequence of statements. This
6995 -- is true even in the case of an accept statement (see description of
6996 -- the N_Accept_Statement node).
6997
d8db0bca 6998 -- End_Label refers to the containing construct
996ae0b0
RK
6999
7000 -----------------------------
7001 -- 11.2 Exception Handler --
7002 -----------------------------
7003
7004 -- EXCEPTION_HANDLER ::=
7005 -- when [CHOICE_PARAMETER_SPECIFICATION :]
7006 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
7007 -- SEQUENCE_OF_STATEMENTS
7008
7009 -- Note: choice parameter specification is not allowed in Ada 83 mode
7010
7011 -- N_Exception_Handler
7012 -- Sloc points to WHEN
7013 -- Choice_Parameter (Node2) (set to Empty if not present)
7014 -- Exception_Choices (List4)
7015 -- Statements (List3)
f28573f4 7016 -- Exception_Label (Node5-Sem) (set to Empty of not present)
f28573f4
ES
7017 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
7018 -- Local_Raise_Not_OK (Flag7-Sem)
0712790c 7019 -- Has_Local_Raise (Flag8-Sem)
996ae0b0
RK
7020
7021 ------------------------------------------
7022 -- 11.2 Choice parameter specification --
7023 ------------------------------------------
7024
7025 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
7026
7027 ----------------------------
7028 -- 11.2 Exception Choice --
7029 ----------------------------
7030
7031 -- EXCEPTION_CHOICE ::= exception_NAME | others
7032
7033 -- Except in the case of OTHERS, no explicit node appears in the tree
7034 -- for exception choice. Instead the exception name appears directly.
7035 -- An OTHERS choice is represented by a N_Others_Choice node (see
7036 -- section 3.8.1.
7037
7038 -- Note: for the exception choice created for an at end handler, the
7039 -- exception choice is an N_Others_Choice node with All_Others set.
7040
7041 ---------------------------
7042 -- 11.3 Raise Statement --
7043 ---------------------------
7044
7045 -- RAISE_STATEMENT ::= raise [exception_NAME];
7046
a9d8907c
JM
7047 -- In Ada 2005, we have
7048
c8d63650
RD
7049 -- RAISE_STATEMENT ::=
7050 -- raise; | raise exception_NAME [with string_EXPRESSION];
a9d8907c 7051
996ae0b0
RK
7052 -- N_Raise_Statement
7053 -- Sloc points to RAISE
7054 -- Name (Node2) (set to Empty if no exception name present)
a9d8907c 7055 -- Expression (Node3) (set to Empty if no expression present)
d9f86c0c 7056 -- From_At_End (Flag4-Sem)
996ae0b0 7057
c8d63650
RD
7058 ----------------------------
7059 -- 11.3 Raise Expression --
7060 ----------------------------
7061
7062 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
7063
7064 -- N_Raise_Expression
7065 -- Sloc points to RAISE
7066 -- Name (Node2) (always present)
7067 -- Expression (Node3) (set to Empty if no expression present)
fc142f63 7068 -- Convert_To_Return_False (Flag13-Sem)
c8d63650
RD
7069 -- plus fields for expression
7070
996ae0b0
RK
7071 -------------------------------
7072 -- 12.1 Generic Declaration --
7073 -------------------------------
7074
7075 -- GENERIC_DECLARATION ::=
7076 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
7077
7078 ------------------------------------------
7079 -- 12.1 Generic Subprogram Declaration --
7080 ------------------------------------------
7081
7082 -- GENERIC_SUBPROGRAM_DECLARATION ::=
cdcf1c7a
AC
7083 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
7084 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
7085
7086 -- Note: Generic_Formal_Declarations can include pragmas
7087
7088 -- N_Generic_Subprogram_Declaration
7089 -- Sloc points to GENERIC
7090 -- Specification (Node1) subprogram specification
7091 -- Corresponding_Body (Node5-Sem)
7092 -- Generic_Formal_Declarations (List2) from generic formal part
7093 -- Parent_Spec (Node4-Sem)
7094
7095 ---------------------------------------
7096 -- 12.1 Generic Package Declaration --
7097 ---------------------------------------
7098
7099 -- GENERIC_PACKAGE_DECLARATION ::=
718deaf1
AC
7100 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
7101 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
7102
7103 -- Note: when we do generics right, the Activation_Chain_Entity entry
7104 -- for this node can be removed (since the expander won't see generic
7105 -- units any more)???.
7106
7107 -- Note: Generic_Formal_Declarations can include pragmas
7108
7109 -- N_Generic_Package_Declaration
7110 -- Sloc points to GENERIC
7111 -- Specification (Node1) package specification
7112 -- Corresponding_Body (Node5-Sem)
7113 -- Generic_Formal_Declarations (List2) from generic formal part
7114 -- Parent_Spec (Node4-Sem)
7115 -- Activation_Chain_Entity (Node3-Sem)
7116
7117 -------------------------------
7118 -- 12.1 Generic Formal Part --
7119 -------------------------------
7120
7121 -- GENERIC_FORMAL_PART ::=
7122 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
7123
7124 ------------------------------------------------
7125 -- 12.1 Generic Formal Parameter Declaration --
7126 ------------------------------------------------
7127
7128 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
7129 -- FORMAL_OBJECT_DECLARATION
7130 -- | FORMAL_TYPE_DECLARATION
7131 -- | FORMAL_SUBPROGRAM_DECLARATION
7132 -- | FORMAL_PACKAGE_DECLARATION
7133
7134 ---------------------------------
7135 -- 12.3 Generic Instantiation --
7136 ---------------------------------
7137
7138 -- GENERIC_INSTANTIATION ::=
7139 -- package DEFINING_PROGRAM_UNIT_NAME is
718deaf1
AC
7140 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
7141 -- [ASPECT_SPECIFICATIONS];
edd63e9b
ES
7142 -- | [[not] overriding]
7143 -- procedure DEFINING_PROGRAM_UNIT_NAME is
718deaf1
AC
7144 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
7145 -- [ASPECT_SPECIFICATIONS];
edd63e9b
ES
7146 -- | [[not] overriding]
7147 -- function DEFINING_DESIGNATOR is
718deaf1
AC
7148 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
7149 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
7150
7151 -- N_Package_Instantiation
7152 -- Sloc points to PACKAGE
7153 -- Defining_Unit_Name (Node1)
7154 -- Name (Node2)
7155 -- Generic_Associations (List3) (set to No_List if no
7156 -- generic actual part)
7157 -- Parent_Spec (Node4-Sem)
7158 -- Instance_Spec (Node5-Sem)
90e491a7
PMR
7159 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7160 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 7161 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7 7162 -- Is_Declaration_Level_Node (Flag5-Sem)
90e491a7 7163 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0
RK
7164
7165 -- N_Procedure_Instantiation
7166 -- Sloc points to PROCEDURE
7167 -- Defining_Unit_Name (Node1)
7168 -- Name (Node2)
7169 -- Parent_Spec (Node4-Sem)
7170 -- Generic_Associations (List3) (set to No_List if no
7171 -- generic actual part)
7172 -- Instance_Spec (Node5-Sem)
90e491a7
PMR
7173 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7174 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 7175 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7 7176 -- Is_Declaration_Level_Node (Flag5-Sem)
edd63e9b
ES
7177 -- Must_Override (Flag14) set if overriding indicator present
7178 -- Must_Not_Override (Flag15) set if not_overriding indicator present
90e491a7 7179 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0
RK
7180
7181 -- N_Function_Instantiation
7182 -- Sloc points to FUNCTION
7183 -- Defining_Unit_Name (Node1)
7184 -- Name (Node2)
7185 -- Generic_Associations (List3) (set to No_List if no
7186 -- generic actual part)
7187 -- Parent_Spec (Node4-Sem)
7188 -- Instance_Spec (Node5-Sem)
90e491a7
PMR
7189 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7190 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 7191 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7 7192 -- Is_Declaration_Level_Node (Flag5-Sem)
edd63e9b
ES
7193 -- Must_Override (Flag14) set if overriding indicator present
7194 -- Must_Not_Override (Flag15) set if not_overriding indicator present
90e491a7 7195 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0 7196
edd63e9b
ES
7197 -- Note: overriding indicator is an Ada 2005 feature
7198
b473ab45
RD
7199 -------------------------------
7200 -- 12.3 Generic Actual Part --
7201 -------------------------------
996ae0b0
RK
7202
7203 -- GENERIC_ACTUAL_PART ::=
7204 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
7205
7206 -------------------------------
7207 -- 12.3 Generic Association --
7208 -------------------------------
7209
7210 -- GENERIC_ASSOCIATION ::=
7211 -- [generic_formal_parameter_SELECTOR_NAME =>]
996ae0b0
RK
7212
7213 -- Note: unlike the procedure call case, a generic association node
b473ab45
RD
7214 -- is generated for every association, even if no formal parameter
7215 -- selector name is present. In this case the parser will leave the
7216 -- Selector_Name field set to Empty, to be filled in later by the
7217 -- semantic pass.
996ae0b0 7218
e3da30b2
RD
7219 -- In Ada 2005, a formal may be associated with a box, if the
7220 -- association is part of the list of actuals for a formal package.
7221 -- If the association is given by OTHERS => <>, the association is
7222 -- an N_Others_Choice.
7223
996ae0b0
RK
7224 -- N_Generic_Association
7225 -- Sloc points to first token of generic association
7226 -- Selector_Name (Node2) (set to Empty if no formal
7227 -- parameter selector name)
e3da30b2
RD
7228 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
7229 -- Box_Present (Flag15) (for formal_package associations with a box)
996ae0b0
RK
7230
7231 ---------------------------------------------
7232 -- 12.3 Explicit Generic Actual Parameter --
7233 ---------------------------------------------
7234
7235 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
7236 -- EXPRESSION | variable_NAME | subprogram_NAME
7237 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
7238
7239 -------------------------------------
7240 -- 12.4 Formal Object Declaration --
7241 -------------------------------------
7242
7243 -- FORMAL_OBJECT_DECLARATION ::=
7244 -- DEFINING_IDENTIFIER_LIST :
718deaf1
AC
7245 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
7246 -- [ASPECT_SPECIFICATIONS];
e3da30b2 7247 -- | DEFINING_IDENTIFIER_LIST :
718deaf1
AC
7248 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
7249 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
7250
7251 -- Although the syntax allows multiple identifiers in the list, the
7252 -- semantics is as though successive declarations were given with
7253 -- identical type definition and expression components. To simplify
7254 -- semantic processing, the parser represents a multiple declaration
7255 -- case as a sequence of single declarations, using the More_Ids and
7256 -- Prev_Ids flags to preserve the original source form as described
7257 -- in the section on "Handling of Defining Identifier Lists".
7258
7259 -- N_Formal_Object_Declaration
7260 -- Sloc points to first identifier
7261 -- Defining_Identifier (Node1)
7262 -- In_Present (Flag15)
7263 -- Out_Present (Flag17)
e3da30b2
RD
7264 -- Null_Exclusion_Present (Flag11) (set to False if not present)
7265 -- Subtype_Mark (Node4) (set to Empty if not present)
7266 -- Access_Definition (Node3) (set to Empty if not present)
7267 -- Default_Expression (Node5) (set to Empty if no default expression)
996ae0b0
RK
7268 -- More_Ids (Flag5) (set to False if no more identifiers in list)
7269 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
7270
7271 -----------------------------------
7272 -- 12.5 Formal Type Declaration --
7273 -----------------------------------
7274
7275 -- FORMAL_TYPE_DECLARATION ::=
7276 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
718deaf1
AC
7277 -- is FORMAL_TYPE_DEFINITION
7278 -- [ASPECT_SPECIFICATIONS];
d3cb4cc0 7279 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
996ae0b0
RK
7280
7281 -- N_Formal_Type_Declaration
7282 -- Sloc points to TYPE
7283 -- Defining_Identifier (Node1)
7284 -- Formal_Type_Definition (Node3)
7285 -- Discriminant_Specifications (List4) (set to No_List if no
7286 -- discriminant part)
7287 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
7288
7289 ----------------------------------
7290 -- 12.5 Formal type definition --
7291 ----------------------------------
7292
7293 -- FORMAL_TYPE_DEFINITION ::=
7294 -- FORMAL_PRIVATE_TYPE_DEFINITION
7295 -- | FORMAL_DERIVED_TYPE_DEFINITION
7296 -- | FORMAL_DISCRETE_TYPE_DEFINITION
7297 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
7298 -- | FORMAL_MODULAR_TYPE_DEFINITION
7299 -- | FORMAL_FLOATING_POINT_DEFINITION
7300 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
7301 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
7302 -- | FORMAL_ARRAY_TYPE_DEFINITION
7303 -- | FORMAL_ACCESS_TYPE_DEFINITION
a9d8907c 7304 -- | FORMAL_INTERFACE_TYPE_DEFINITION
d3cb4cc0
AC
7305 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
7306
646e2823
AC
7307 -- The Ada 2012 syntax introduces two new non-terminals:
7308 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
7309 -- the latter category. Here we introduce an incomplete type definition
d3cb4cc0 7310 -- in order to preserve as much as possible the existing structure.
996ae0b0
RK
7311
7312 ---------------------------------------------
7313 -- 12.5.1 Formal Private Type Definition --
7314 ---------------------------------------------
7315
7316 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
7317 -- [[abstract] tagged] [limited] private
7318
7319 -- Note: TAGGED is not allowed in Ada 83 mode
7320
7321 -- N_Formal_Private_Type_Definition
7322 -- Sloc points to PRIVATE
2c8d828a 7323 -- Uninitialized_Variable (Node3-Sem)
996ae0b0
RK
7324 -- Abstract_Present (Flag4)
7325 -- Tagged_Present (Flag15)
7326 -- Limited_Present (Flag17)
7327
7328 --------------------------------------------
7329 -- 12.5.1 Formal Derived Type Definition --
7330 --------------------------------------------
7331
7332 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
e3da30b2 7333 -- [abstract] [limited | synchronized]
653da906 7334 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
996ae0b0
RK
7335 -- Note: this construct is not allowed in Ada 83 mode
7336
7337 -- N_Formal_Derived_Type_Definition
7338 -- Sloc points to NEW
7339 -- Subtype_Mark (Node4)
7340 -- Private_Present (Flag15)
7341 -- Abstract_Present (Flag4)
653da906 7342 -- Limited_Present (Flag17)
e3da30b2 7343 -- Synchronized_Present (Flag7)
a9d8907c 7344 -- Interface_List (List2) (set to No_List if none)
996ae0b0 7345
164e06c6
AC
7346 -----------------------------------------------
7347 -- 12.5.1 Formal Incomplete Type Definition --
7348 -----------------------------------------------
d3cb4cc0 7349
164e06c6 7350 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
d3cb4cc0
AC
7351
7352 -- N_Formal_Incomplete_Type_Definition
7353 -- Sloc points to identifier of parent
7354 -- Tagged_Present (Flag15)
7355
996ae0b0
RK
7356 ---------------------------------------------
7357 -- 12.5.2 Formal Discrete Type Definition --
7358 ---------------------------------------------
7359
7360 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
7361
7362 -- N_Formal_Discrete_Type_Definition
7363 -- Sloc points to (
7364
7365 ---------------------------------------------------
7366 -- 12.5.2 Formal Signed Integer Type Definition --
7367 ---------------------------------------------------
7368
7369 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
7370
7371 -- N_Formal_Signed_Integer_Type_Definition
7372 -- Sloc points to RANGE
7373
7374 --------------------------------------------
7375 -- 12.5.2 Formal Modular Type Definition --
7376 --------------------------------------------
7377
7378 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
7379
7380 -- N_Formal_Modular_Type_Definition
7381 -- Sloc points to MOD
7382
7383 ----------------------------------------------
7384 -- 12.5.2 Formal Floating Point Definition --
7385 ----------------------------------------------
7386
7387 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
7388
7389 -- N_Formal_Floating_Point_Definition
7390 -- Sloc points to DIGITS
7391
7392 ----------------------------------------------------
7393 -- 12.5.2 Formal Ordinary Fixed Point Definition --
7394 ----------------------------------------------------
7395
7396 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
7397
7398 -- N_Formal_Ordinary_Fixed_Point_Definition
7399 -- Sloc points to DELTA
7400
7401 ---------------------------------------------------
7402 -- 12.5.2 Formal Decimal Fixed Point Definition --
7403 ---------------------------------------------------
7404
7405 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
7406
7407 -- Note: formal decimal fixed point definition not allowed in Ada 83
7408
7409 -- N_Formal_Decimal_Fixed_Point_Definition
7410 -- Sloc points to DELTA
7411
7412 ------------------------------------------
7413 -- 12.5.3 Formal Array Type Definition --
7414 ------------------------------------------
7415
7416 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
7417
7418 -------------------------------------------
7419 -- 12.5.4 Formal Access Type Definition --
7420 -------------------------------------------
7421
7422 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
7423
a9d8907c
JM
7424 ----------------------------------------------
7425 -- 12.5.5 Formal Interface Type Definition --
7426 ----------------------------------------------
7427
7428 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
7429
996ae0b0
RK
7430 -----------------------------------------
7431 -- 12.6 Formal Subprogram Declaration --
7432 -----------------------------------------
7433
7434 -- FORMAL_SUBPROGRAM_DECLARATION ::=
82c80734
RD
7435 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
7436 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
7437
7438 --------------------------------------------------
7439 -- 12.6 Formal Concrete Subprogram Declaration --
7440 --------------------------------------------------
7441
7442 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
718deaf1
AC
7443 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
7444 -- [ASPECT_SPECIFICATIONS];
996ae0b0 7445
82c80734
RD
7446 -- N_Formal_Concrete_Subprogram_Declaration
7447 -- Sloc points to WITH
7448 -- Specification (Node1)
7449 -- Default_Name (Node2) (set to Empty if no subprogram default)
7450 -- Box_Present (Flag15)
7451
7452 -- Note: if no subprogram default is present, then Name is set
7453 -- to Empty, and Box_Present is False.
7454
7455 --------------------------------------------------
7456 -- 12.6 Formal Abstract Subprogram Declaration --
7457 --------------------------------------------------
7458
7459 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
718deaf1
AC
7460 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
7461 -- [ASPECT_SPECIFICATIONS];
82c80734
RD
7462
7463 -- N_Formal_Abstract_Subprogram_Declaration
996ae0b0
RK
7464 -- Sloc points to WITH
7465 -- Specification (Node1)
7466 -- Default_Name (Node2) (set to Empty if no subprogram default)
7467 -- Box_Present (Flag15)
7468
7469 -- Note: if no subprogram default is present, then Name is set
7470 -- to Empty, and Box_Present is False.
7471
7472 ------------------------------
7473 -- 12.6 Subprogram Default --
7474 ------------------------------
7475
7476 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
7477
7478 -- There is no separate node in the tree for a subprogram default.
82c80734
RD
7479 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
7480 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
7481 -- default name or box indication, as needed.
996ae0b0
RK
7482
7483 ------------------------
7484 -- 12.6 Default Name --
7485 ------------------------
7486
7487 -- DEFAULT_NAME ::= NAME
7488
7489 --------------------------------------
7490 -- 12.7 Formal Package Declaration --
7491 --------------------------------------
7492
7493 -- FORMAL_PACKAGE_DECLARATION ::=
7494 -- with package DEFINING_IDENTIFIER
718deaf1
AC
7495 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
7496 -- [ASPECT_SPECIFICATIONS];
996ae0b0
RK
7497
7498 -- Note: formal package declarations not allowed in Ada 83 mode
7499
7500 -- N_Formal_Package_Declaration
7501 -- Sloc points to WITH
7502 -- Defining_Identifier (Node1)
7503 -- Name (Node2)
7504 -- Generic_Associations (List3) (set to No_List if (<>) case or
7505 -- empty generic actual part)
7506 -- Box_Present (Flag15)
7507 -- Instance_Spec (Node5-Sem)
967947ed 7508 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
996ae0b0
RK
7509
7510 --------------------------------------
7511 -- 12.7 Formal Package Actual Part --
7512 --------------------------------------
7513
7514 -- FORMAL_PACKAGE_ACTUAL_PART ::=
e3da30b2
RD
7515 -- ([OTHERS] => <>)
7516 -- | [GENERIC_ACTUAL_PART]
7517 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7518
7519 -- FORMAL_PACKAGE_ASSOCIATION ::=
7520 -- GENERIC_ASSOCIATION
7521 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7522
7523 -- There is no explicit node in the tree for a formal package actual
7524 -- part. Instead the information appears in the parent node (i.e. the
7525 -- formal package declaration node itself).
996ae0b0 7526
e3da30b2
RD
7527 -- There is no explicit node for a formal package association. All of
7528 -- them are represented either by a generic association, possibly with
7529 -- Box_Present, or by an N_Others_Choice.
996ae0b0
RK
7530
7531 ---------------------------------
7532 -- 13.1 Representation clause --
7533 ---------------------------------
7534
7535 -- REPRESENTATION_CLAUSE ::=
7536 -- ATTRIBUTE_DEFINITION_CLAUSE
7537 -- | ENUMERATION_REPRESENTATION_CLAUSE
7538 -- | RECORD_REPRESENTATION_CLAUSE
7539 -- | AT_CLAUSE
7540
7541 ----------------------
7542 -- 13.1 Local Name --
7543 ----------------------
7544
7545 -- LOCAL_NAME :=
7546 -- DIRECT_NAME
7547 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7548 -- | library_unit_NAME
7549
7550 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7551 -- as an attribute reference, which has essentially the same form.
7552
7553 ---------------------------------------
7554 -- 13.3 Attribute definition clause --
7555 ---------------------------------------
7556
7557 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7558 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7559 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7560
7561 -- In Ada 83, the expression must be a simple expression and the
7562 -- local name must be a direct name.
7563
fbf5a39b
AC
7564 -- Note: the only attribute definition clause that is processed by
7565 -- gigi is an address clause. For all other cases, the information
7566 -- is extracted by the front end and either results in setting entity
7567 -- information, e.g. Esize for the Size clause, or in appropriate
7568 -- expansion actions (e.g. in the case of Storage_Size).
7569
7570 -- For an address clause, Gigi constructs the appropriate addressing
7571 -- code. It also ensures that no aliasing optimizations are made
7572 -- for the object for which the address clause appears.
7573
7574 -- Note: for an address clause used to achieve an overlay:
7575
7576 -- A : Integer;
7577 -- B : Integer;
7578 -- for B'Address use A'Address;
7579
7580 -- the above rule means that Gigi will ensure that no optimizations
7581 -- will be made for B that would violate the implementation advice
7582 -- of RM 13.3(19). However, this advice applies only to B and not
7583 -- to A, which seems unfortunate. The GNAT front end will mark the
7584 -- object A as volatile to also prevent unwanted optimization
7585 -- assumptions based on no aliasing being made for B.
996ae0b0
RK
7586
7587 -- N_Attribute_Definition_Clause
7588 -- Sloc points to FOR
7589 -- Name (Node2) the local name
7590 -- Chars (Name1) the identifier name from the attribute designator
7591 -- Expression (Node3) the expression or name
e3da30b2
RD
7592 -- Entity (Node4-Sem)
7593 -- Next_Rep_Item (Node5-Sem)
996ae0b0 7594 -- From_At_Mod (Flag4-Sem)
fbf5a39b 7595 -- Check_Address_Alignment (Flag11-Sem)
0f1a6a0b 7596 -- From_Aspect_Specification (Flag13-Sem)
c159409f 7597 -- Is_Delayed_Aspect (Flag14-Sem)
fdce4bb7 7598 -- Address_Warning_Posted (Flag18-Sem)
996ae0b0 7599
0f1a6a0b
AC
7600 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7601 -- aspect name, and Entity is resolved already to reference the entity
7602 -- to which the aspect applies.
7603
7604 -----------------------------------
7605 -- 13.3.1 Aspect Specifications --
7606 -----------------------------------
7607
7608 -- We modify the RM grammar here, the RM grammar is:
7609
7610 -- ASPECT_SPECIFICATION ::=
1c163178 7611 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
0f1a6a0b
AC
7612 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7613
7614 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7615
7616 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7617
7618 -- That's inconvenient, since there is no non-terminal name for a single
7619 -- entry in the list of aspects. So we use this grammar instead:
7620
7621 -- ASPECT_SPECIFICATIONS ::=
718deaf1 7622 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
313d6f2c 7623
0f1a6a0b
AC
7624 -- ASPECT_SPECIFICATION =>
7625 -- ASPECT_MARK [=> ASPECT_DEFINITION]
313d6f2c 7626
0f1a6a0b 7627 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
313d6f2c 7628
0f1a6a0b 7629 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
313d6f2c 7630
52d9ba4d
AC
7631 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7632 -- aggregate with the elements of the aggregate corresponding to the
7633 -- successive arguments of the corresponding pragma.
7634
0f1a6a0b
AC
7635 -- See separate package Aspects for details on the incorporation of
7636 -- these nodes into the tree, and how aspect specifications for a given
7637 -- declaration node are associated with that node.
313d6f2c
AC
7638
7639 -- N_Aspect_Specification
7640 -- Sloc points to aspect identifier
7641 -- Identifier (Node1) aspect identifier
c159409f 7642 -- Aspect_Rep_Item (Node2-Sem)
313d6f2c 7643 -- Expression (Node3) Aspect_Definition (set to Empty if none)
c159409f 7644 -- Entity (Node4-Sem) entity to which the aspect applies
c159409f 7645 -- Next_Rep_Item (Node5-Sem)
1773d80b
AC
7646 -- Class_Present (Flag6) Set if 'Class present
7647 -- Is_Ignored (Flag9-Sem)
7fe6c026 7648 -- Is_Checked (Flag11-Sem)
47e11d08 7649 -- Is_Delayed_Aspect (Flag14-Sem)
aab45d22 7650 -- Is_Disabled (Flag15-Sem)
1773d80b
AC
7651 -- Is_Boolean_Aspect (Flag16-Sem)
7652 -- Split_PPC (Flag17) Set if split pre/post attribute
b622076c 7653 -- Aspect_On_Partial_View (Flag18-Sem)
313d6f2c
AC
7654
7655 -- Note: Aspect_Specification is an Ada 2012 feature
7656
47e11d08
AC
7657 -- Note: The Identifier serves to identify the aspect involved (it
7658 -- is the aspect whose name corresponds to the Chars field). This
7659 -- means that the other fields of this identifier are unused, and
7660 -- in particular we use the Entity field of this identifier to save
7661 -- a copy of the expression for visibility analysis, see spec of
7662 -- Sem_Ch13 for full details of this usage.
7663
2e86f679
RD
7664 -- In the case of aspects of the form xxx'Class, the aspect identifier
7665 -- is for xxx, and Class_Present is set to True.
7666
beacce02
AC
7667 -- Note: When a Pre or Post aspect specification is processed, it is
7668 -- broken into AND THEN sections. The left most section has Split_PPC
7669 -- set to False, indicating that it is the original specification (e.g.
7670 -- for posting errors). For the other sections, Split_PPC is set True.
7671
996ae0b0
RK
7672 ---------------------------------------------
7673 -- 13.4 Enumeration representation clause --
7674 ---------------------------------------------
7675
7676 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7677 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7678
7679 -- In Ada 83, the name must be a direct name
7680
7681 -- N_Enumeration_Representation_Clause
7682 -- Sloc points to FOR
7683 -- Identifier (Node1) direct name
7684 -- Array_Aggregate (Node3)
e3da30b2 7685 -- Next_Rep_Item (Node5-Sem)
996ae0b0
RK
7686
7687 ---------------------------------
7688 -- 13.4 Enumeration aggregate --
7689 ---------------------------------
7690
7691 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7692
7693 ------------------------------------------
7694 -- 13.5.1 Record representation clause --
7695 ------------------------------------------
7696
7697 -- RECORD_REPRESENTATION_CLAUSE ::=
7698 -- for first_subtype_LOCAL_NAME use
7699 -- record [MOD_CLAUSE]
7700 -- {COMPONENT_CLAUSE}
7701 -- end record;
7702
7703 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7704 -- replaced by a corresponding Alignment attribute definition clause).
7705
7706 -- Note: Component_Clauses can include pragmas
7707
7708 -- N_Record_Representation_Clause
7709 -- Sloc points to FOR
7710 -- Identifier (Node1) direct name
7711 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7712 -- Component_Clauses (List3)
e3da30b2 7713 -- Next_Rep_Item (Node5-Sem)
996ae0b0
RK
7714
7715 ------------------------------
7716 -- 13.5.1 Component clause --
7717 ------------------------------
7718
7719 -- COMPONENT_CLAUSE ::=
7720 -- component_LOCAL_NAME at POSITION
7721 -- range FIRST_BIT .. LAST_BIT;
7722
7723 -- N_Component_Clause
7724 -- Sloc points to AT
7725 -- Component_Name (Node1) points to Name or Attribute_Reference
7726 -- Position (Node2)
7727 -- First_Bit (Node3)
7728 -- Last_Bit (Node4)
7729
7730 ----------------------
7731 -- 13.5.1 Position --
7732 ----------------------
7733
7734 -- POSITION ::= static_EXPRESSION
7735
7736 -----------------------
7737 -- 13.5.1 First_Bit --
7738 -----------------------
7739
7740 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7741
7742 ----------------------
7743 -- 13.5.1 Last_Bit --
7744 ----------------------
7745
7746 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7747
7748 --------------------------
7749 -- 13.8 Code statement --
7750 --------------------------
7751
7752 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7753
7754 -- Note: in GNAT, the qualified expression has the form
7755
7756 -- Asm_Insn'(Asm (...));
7757
e3da30b2
RD
7758 -- See package System.Machine_Code in file s-maccod.ads for details on
7759 -- the allowed parameters to Asm. There are two ways this node can
7760 -- arise, as a code statement, in which case the expression is the
7761 -- qualified expression, or as a result of the expansion of an intrinsic
7762 -- call to the Asm or Asm_Input procedure.
996ae0b0
RK
7763
7764 -- N_Code_Statement
7765 -- Sloc points to first token of the expression
7766 -- Expression (Node3)
7767
7768 -- Note: package Exp_Code contains an abstract functional interface
7769 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7770
7771 ------------------------
7772 -- 13.12 Restriction --
7773 ------------------------
7774
7775 -- RESTRICTION ::=
7776 -- restriction_IDENTIFIER
7777 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7778
7779 -- There is no explicit node for restrictions. Instead the restriction
7780 -- appears in normal pragma syntax as a pragma argument association,
7781 -- which has the same syntactic form.
7782
7783 --------------------------
7784 -- B.2 Shift Operators --
7785 --------------------------
7786
7787 -- Calls to the intrinsic shift functions are converted to one of
7788 -- the following shift nodes, which have the form of normal binary
7789 -- operator names. Note that for a given shift operation, one node
7790 -- covers all possible types, as for normal operators.
7791
7792 -- Note: it is perfectly permissible for the expander to generate
7793 -- shift operation nodes directly, in which case they will be analyzed
7794 -- and parsed in the usual manner.
7795
7796 -- Sprint syntax: shift-function-name!(expr, count)
7797
7798 -- Note: the Left_Opnd field holds the first argument (the value to
7799 -- be shifted). The Right_Opnd field holds the second argument (the
7800 -- shift count). The Chars field is the name of the intrinsic function.
7801
7802 -- N_Op_Rotate_Left
7803 -- Sloc points to the function name
7804 -- plus fields for binary operator
7805 -- plus fields for expression
7806 -- Shift_Count_OK (Flag4-Sem)
7807
7808 -- N_Op_Rotate_Right
7809 -- Sloc points to the function name
7810 -- plus fields for binary operator
7811 -- plus fields for expression
7812 -- Shift_Count_OK (Flag4-Sem)
7813
7814 -- N_Op_Shift_Left
7815 -- Sloc points to the function name
7816 -- plus fields for binary operator
7817 -- plus fields for expression
7818 -- Shift_Count_OK (Flag4-Sem)
7819
7820 -- N_Op_Shift_Right_Arithmetic
7821 -- Sloc points to the function name
7822 -- plus fields for binary operator
7823 -- plus fields for expression
7824 -- Shift_Count_OK (Flag4-Sem)
7825
7826 -- N_Op_Shift_Right
7827 -- Sloc points to the function name
7828 -- plus fields for binary operator
7829 -- plus fields for expression
7830 -- Shift_Count_OK (Flag4-Sem)
7831
e09a5598
AC
7832 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7833 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7834
7835 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7836 -- always less than the word size if Modify_Tree_For_C mode is set.
7837
996ae0b0
RK
7838 --------------------------
7839 -- Obsolescent Features --
7840 --------------------------
7841
7842 -- The syntax descriptions and tree nodes for obsolescent features are
7843 -- grouped together, corresponding to their location in appendix I in
7844 -- the RM. However, parsing and semantic analysis for these constructs
7845 -- is located in an appropriate chapter (see individual notes).
7846
7847 ---------------------------
7848 -- J.3 Delta Constraint --
7849 ---------------------------
7850
7851 -- Note: the parse routine for this construct is located in section
7852 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7853 -- where delta constraint logically belongs.
7854
7855 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7856
7857 -- N_Delta_Constraint
7858 -- Sloc points to DELTA
7859 -- Delta_Expression (Node3)
7860 -- Range_Constraint (Node4) (set to Empty if not present)
7861
7862 --------------------
7863 -- J.7 At Clause --
7864 --------------------
7865
7866 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7867
7868 -- Note: the parse routine for this construct is located in Par-Ch13,
7869 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7870 -- belongs if it were not obsolescent.
7871
7872 -- Note: in Ada 83 the expression must be a simple expression
7873
7874 -- Gigi restriction: This node never appears, it is rewritten as an
7875 -- address attribute definition clause.
7876
7877 -- N_At_Clause
7878 -- Sloc points to FOR
7879 -- Identifier (Node1)
7880 -- Expression (Node3)
7881
7882 ---------------------
7883 -- J.8 Mod clause --
7884 ---------------------
7885
7886 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7887
7888 -- Note: the parse routine for this construct is located in Par-Ch13,
7889 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7890 -- belongs if it were not obsolescent.
7891
7892 -- Note: in Ada 83, the expression must be a simple expression
7893
7894 -- Gigi restriction: this node never appears. It is replaced
7895 -- by a corresponding Alignment attribute definition clause.
7896
7897 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7898 -- its name has "clause" in it. This is rather strange, but is quite
7899 -- definitely specified. The pragmas before are collected in the
7900 -- Pragmas_Before field of the mod clause node itself, and pragmas
7901 -- after are simply swallowed up in the list of component clauses.
7902
7903 -- N_Mod_Clause
7904 -- Sloc points to AT
7905 -- Expression (Node3)
7906 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7907
7908 --------------------
7909 -- Semantic Nodes --
7910 --------------------
7911
7912 -- These semantic nodes are used to hold additional semantic information.
7913 -- They are inserted into the tree as a result of semantic processing.
7914 -- Although there are no legitimate source syntax constructions that
7915 -- correspond directly to these nodes, we need a source syntax for the
7916 -- reconstructed tree printed by Sprint, and the node descriptions here
7917 -- show this syntax.
7918
90e491a7
PMR
7919 -----------------
7920 -- Call_Marker --
7921 -----------------
7922
7923 -- This node is created during the analysis/resolution of entry calls,
7924 -- requeues, and subprogram calls. It performs several functions:
7925
7926 -- * Call markers provide a uniform model for handling calls by the
7927 -- ABE mechanism, regardless of whether expansion took place.
7928
7929 -- * The call marker captures the target of the related call along
7930 -- with other attributes which are either unavailabe or expensive
7931 -- to recompute once analysis, resolution, and expansion are over.
7932
7933 -- * The call marker aids the ABE Processing phase by signaling the
7934 -- presence of a call in case the original call was transformed by
7935 -- expansion.
7936
7937 -- * The call marker acts as a reference point for the insertion of
7938 -- run-time conditional ABE checks or guaranteed ABE failures.
7939
7940 -- Sprint syntax: #target#
7941
7942 -- The Sprint syntax shown above is not enabled by default
7943
7944 -- N_Call_Marker
7945 -- Sloc points to Sloc of original call
7946 -- Target (Node1-Sem)
7947 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
7948 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
7fb62ca1 7949 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7
PMR
7950 -- Is_Source_Call (Flag4-Sem)
7951 -- Is_Declaration_Level_Node (Flag5-Sem)
7fb62ca1 7952 -- Is_Dispatching_Call (Flag6-Sem)
90e491a7
PMR
7953 -- Is_Known_Guaranteed_ABE (Flag18-Sem)
7954
2ffcbaa5
AC
7955 ------------------------
7956 -- Compound Statement --
7957 ------------------------
7958
7959 -- This node is created by the analyzer/expander to handle some
7960 -- expansion cases where a sequence of actions needs to be captured
7961 -- within a single node (which acts as a container and allows the
7962 -- entire list of actions to be moved around as a whole) appearing
7963 -- in a sequence of statements.
7964
9dc30a5f
AC
7965 -- This is the statement counterpart to the expression node
7966 -- N_Expression_With_Actions.
2ffcbaa5
AC
7967
7968 -- The required semantics is that the set of actions is executed in
7969 -- the order in which it appears, as though they appeared by themselves
3a248f7c 7970 -- in the enclosing list of declarations or statements. Unlike what
2ffcbaa5
AC
7971 -- happens when using an N_Block_Statement, no new scope is introduced.
7972
7973 -- Note: for the time being, this is used only as a transient
7974 -- representation during expansion, and all compound statement nodes
7975 -- must be exploded back to their constituent statements before handing
7976 -- the tree to the back end.
7977
7978 -- Sprint syntax: do
7979 -- action;
7980 -- action;
7981 -- ...
7982 -- action;
7983 -- end;
7984
7985 -- N_Compound_Statement
7986 -- Actions (List1)
7987
dac3bede
YM
7988 --------------
7989 -- Contract --
7990 --------------
7991
54e28df2
HK
7992 -- This node is used to hold the various parts of an entry, subprogram
7993 -- [body] or package [body] contract, in particular:
7994 -- Abstract states declared by a package declaration
7995 -- Contract cases that apply to a subprogram
7996 -- Dependency relations of inputs and output of a subprogram
7997 -- Global annotations classifying data as input or output
7998 -- Initialization sequences for a package declaration
7999 -- Pre- and postconditions that apply to a subprogram
dac3bede 8000
ea3c0651 8001 -- The node appears in an entry and [generic] subprogram [body] entity.
dac3bede
YM
8002
8003 -- Sprint syntax: <none> as the node should not appear in the tree, but
8004 -- only attached to an entry or [generic] subprogram
8005 -- entity.
8006
8007 -- N_Contract
8008 -- Sloc points to the subprogram's name
caf07df9
AC
8009 -- Pre_Post_Conditions (Node1-Sem) (set to Empty if none)
8010 -- Contract_Test_Cases (Node2-Sem) (set to Empty if none)
8011 -- Classifications (Node3-Sem) (set to Empty if none)
879ac954 8012 -- Is_Expanded_Contract (Flag1-Sem)
d6095153
AC
8013
8014 -- Pre_Post_Conditions contains a collection of pragmas that correspond
ea3c0651
AC
8015 -- to pre- and postconditions associated with an entry or a subprogram
8016 -- [body or stub]. The pragmas can either come from source or be the
54e28df2
HK
8017 -- byproduct of aspect expansion. Currently the following pragmas appear
8018 -- in this list:
8019 -- Post
8020 -- Postcondition
8021 -- Pre
8022 -- Precondition
4f7c83ca 8023 -- Refined_Post
54e28df2 8024 -- The ordering in the list is in LIFO fashion.
d6095153 8025
573e5dd6
RD
8026 -- Note that there might be multiple preconditions or postconditions
8027 -- in this list, either because they come from separate pragmas in the
8028 -- source, or because a Pre (resp. Post) aspect specification has been
8029 -- broken into AND THEN sections. See Split_PPC for details.
eefe3761 8030
20250fb8
AC
8031 -- In GNATprove mode, the inherited classwide pre- and postconditions
8032 -- (suitably specialized for the specific type of the overriding
8033 -- operation) are also in this list.
8034
d6095153
AC
8035 -- Contract_Test_Cases contains a collection of pragmas that correspond
8036 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
4bb9c7b9 8037 -- list is in LIFO fashion.
d6095153 8038
d63199d8 8039 -- Classifications contains pragmas that either declare, categorize, or
54e28df2
HK
8040 -- establish dependencies between subprogram or package inputs and
8041 -- outputs. Currently the following pragmas appear in this list:
8042 -- Abstract_States
6c3c671e
AC
8043 -- Async_Readers
8044 -- Async_Writers
879ac954 8045 -- Constant_After_Elaboration
54e28df2 8046 -- Depends
6c3c671e
AC
8047 -- Effective_Reads
8048 -- Effective_Writes
879ac954 8049 -- Extensions_Visible
54e28df2 8050 -- Global
9b2451e5 8051 -- Initial_Condition
54e28df2 8052 -- Initializes
d7af5ea5 8053 -- Part_Of
54e28df2
HK
8054 -- Refined_Depends
8055 -- Refined_Global
8056 -- Refined_States
879ac954 8057 -- Volatile_Function
54e28df2 8058 -- The ordering is in LIFO fashion.
dac3bede 8059
996ae0b0 8060 -------------------
2ffcbaa5 8061 -- Expanded Name --
996ae0b0
RK
8062 -------------------
8063
8064 -- The N_Expanded_Name node is used to represent a selected component
8065 -- name that has been resolved to an expanded name. The semantic phase
8066 -- replaces N_Selected_Component nodes that represent names by the use
8067 -- of this node, leaving the N_Selected_Component node used only when
8068 -- the prefix is a record or protected type.
8069
1f159b86 8070 -- The fields of the N_Expanded_Name node are laid out identically
996ae0b0
RK
8071 -- to those of the N_Selected_Component node, allowing conversion of
8072 -- an expanded name node to a selected component node to be done
8073 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
8074
d8db0bca 8075 -- There is no special sprint syntax for an expanded name
996ae0b0
RK
8076
8077 -- N_Expanded_Name
8078 -- Sloc points to the period
8079 -- Chars (Name1) copy of Chars field of selector name
8080 -- Prefix (Node3)
8081 -- Selector_Name (Node2)
8082 -- Entity (Node4-Sem)
3e542a58 8083 -- Associated_Node (Node4-Sem)
90e491a7
PMR
8084 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
8085 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
69e6ee2f 8086 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
90e491a7 8087 -- Has_Private_View (Flag11-Sem) set in generic units
12b4d338
AC
8088 -- Redundant_Use (Flag13-Sem)
8089 -- Atomic_Sync_Required (Flag14-Sem)
996ae0b0
RK
8090 -- plus fields for expression
8091
955871d3 8092 -----------------------------
2ffcbaa5 8093 -- Expression With Actions --
955871d3
AC
8094 -----------------------------
8095
8096 -- This node is created by the analyzer/expander to handle some
5a527952 8097 -- expansion cases, notably short-circuit forms where there are
1d801f21 8098 -- actions associated with the right-hand side operand.
955871d3
AC
8099
8100 -- The N_Expression_With_Actions node represents an expression with
c28408b7
RD
8101 -- an associated set of actions (which are executable statements and
8102 -- declarations, as might occur in a handled statement sequence).
8103
955871d3
AC
8104 -- The required semantics is that the set of actions is executed in
8105 -- the order in which it appears just before the expression is
8106 -- evaluated (and these actions must only be executed if the value
8107 -- of the expression is evaluated). The node is considered to be
8108 -- a subexpression, whose value is the value of the Expression after
8109 -- executing all the actions.
8110
3a3af4c3
AC
8111 -- If the actions contain declarations, then these declarations may
8112 -- be referenced within the expression. However note that there is
8113 -- no proper scope associated with the expression-with-action, so the
8114 -- back-end will elaborate them in the context of the enclosing scope.
cf6956bb 8115
955871d3
AC
8116 -- Sprint syntax: do
8117 -- action;
8118 -- action;
8119 -- ...
8120 -- action;
8121 -- in expression end
8122
8123 -- N_Expression_With_Actions
8124 -- Actions (List1)
8125 -- Expression (Node3)
8126 -- plus fields for expression
8127
ebdaa81b
AC
8128 -- Note: In the final generated tree presented to the code generator,
8129 -- the actions list is always non-null, since there is no point in this
8130 -- node if the actions are Empty. During semantic analysis there are
8131 -- cases where it is convenient to temporarily generate an empty actions
81bd8c90
AC
8132 -- list. This arises in cases where we create such an empty actions
8133 -- list, and it may or may not end up being a place where additional
8134 -- actions are inserted. The expander removes such empty cases after
8135 -- the expression of the node is fully analyzed and expanded, at which
8136 -- point it is safe to remove it, since no more actions can be inserted.
955871d3 8137
adb252d8
AC
8138 -- Note: In Modify_Tree_For_C, we never generate any declarations in
8139 -- the action list, which can contain only non-declarative statements.
e0f63680 8140
996ae0b0
RK
8141 --------------------
8142 -- Free Statement --
8143 --------------------
8144
8145 -- The N_Free_Statement node is generated as a result of a call to an
8146 -- instantiation of Unchecked_Deallocation. The instantiation of this
8147 -- generic is handled specially and generates this node directly.
8148
8149 -- Sprint syntax: free expression
8150
8151 -- N_Free_Statement
8152 -- Sloc is copied from the unchecked deallocation call
8153 -- Expression (Node3) argument to unchecked deallocation call
8154 -- Storage_Pool (Node1-Sem)
e3da30b2
RD
8155 -- Procedure_To_Call (Node2-Sem)
8156 -- Actual_Designated_Subtype (Node4-Sem)
996ae0b0
RK
8157
8158 -- Note: in the case where a debug source file is generated, the Sloc
8159 -- for this node points to the FREE keyword in the Sprint file output.
8160
8161 -------------------
8162 -- Freeze Entity --
8163 -------------------
8164
8165 -- This node marks the point in a declarative part at which an entity
8166 -- declared therein becomes frozen. The expander places initialization
8167 -- procedures for types at those points. Gigi uses the freezing point
8168 -- to elaborate entities that may depend on previous private types.
8169
8170 -- See the section in Einfo "Delayed Freezing and Elaboration" for
8171 -- a full description of the use of this node.
8172
8173 -- The Entity field points back to the entity for the type (whose
8174 -- Freeze_Node field points back to this freeze node).
8175
8176 -- The Actions field contains a list of declarations and statements
8177 -- generated by the expander which are associated with the freeze
8178 -- node, and are elaborated as though the freeze node were replaced
8179 -- by this sequence of actions.
8180
8181 -- Note: the Sloc field in the freeze node references a construct
8182 -- associated with the freezing point. This is used for posting
8183 -- messages in some error/warning situations, e.g. the case where
8184 -- a primitive operation of a tagged type is declared too late.
8185
8186 -- Sprint syntax: freeze entity-name [
8187 -- freeze actions
8188 -- ]
8189
8190 -- N_Freeze_Entity
8191 -- Sloc points near freeze point (see above special note)
8192 -- Entity (Node4-Sem)
8193 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
8194 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
8195 -- Actions (List1) (set to No_List if no freeze actions)
8196 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
8197
8198 -- The Actions field holds actions associated with the freeze. These
8199 -- actions are elaborated at the point where the type is frozen.
8200
8201 -- Note: in the case where a debug source file is generated, the Sloc
8202 -- for this node points to the FREEZE keyword in the Sprint file output.
8203
3cd4a210 8204 ---------------------------
2ffcbaa5 8205 -- Freeze Generic Entity --
3cd4a210
AC
8206 ---------------------------
8207
8208 -- The freeze point of an entity indicates the point at which the
8209 -- information needed to generate code for the entity is complete.
8210 -- The freeze node for an entity triggers expander activities, such as
8211 -- build initialization procedures, and backend activities, such as
8212 -- completing the elaboration of packages.
8213
8214 -- For entities declared within a generic unit, for which no code is
8215 -- generated, the freeze point is not equally meaningful. However, in
8216 -- Ada 2012 several semantic checks on declarations must be delayed to
8217 -- the freeze point, and we need to include such a mark in the tree to
8218 -- trigger these checks. The Freeze_Generic_Entity node plays no other
8219 -- role, and is ignored by the expander and the back-end.
8220
5a8a6763
RD
8221 -- Sprint syntax: freeze_generic entity-name
8222
3cd4a210
AC
8223 -- N_Freeze_Generic_Entity
8224 -- Sloc points near freeze point
8225 -- Entity (Node4-Sem)
8226
996ae0b0
RK
8227 --------------------------------
8228 -- Implicit Label Declaration --
8229 --------------------------------
8230
8231 -- An implicit label declaration is created for every occurrence of a
8232 -- label on a statement or a label on a block or loop. It is chained
8233 -- in the declarations of the innermost enclosing block as specified
8234 -- in RM section 5.1 (3).
8235
162f2c72
AC
8236 -- The Defining_Identifier is the actual identifier for the statement
8237 -- identifier. Note that the occurrence of the label is a reference, NOT
8238 -- the defining occurrence. The defining occurrence occurs at the head
8239 -- of the innermost enclosing block, and is represented by this node.
996ae0b0
RK
8240
8241 -- Note: from the grammar, this might better be called an implicit
8242 -- statement identifier declaration, but the term we choose seems
8243 -- friendlier, since at least informally statement identifiers are
8244 -- called labels in both cases (i.e. when used in labels, and when
8245 -- used as the identifiers of blocks and loops).
8246
162f2c72
AC
8247 -- Note: although this is logically a semantic node, since it does not
8248 -- correspond directly to a source syntax construction, these nodes are
8249 -- actually created by the parser in a post pass done just after parsing
8250 -- is complete, before semantic analysis is started (see Par.Labl).
996ae0b0
RK
8251
8252 -- Sprint syntax: labelname : label;
8253
8254 -- N_Implicit_Label_Declaration
baed70ac
AC
8255 -- Sloc points to the << token for a statement identifier, or to the
8256 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
996ae0b0
RK
8257 -- Defining_Identifier (Node1)
8258 -- Label_Construct (Node2-Sem)
8259
8260 -- Note: in the case where a debug source file is generated, the Sloc
8261 -- for this node points to the label name in the generated declaration.
8262
8263 ---------------------
2ffcbaa5 8264 -- Itype Reference --
996ae0b0
RK
8265 ---------------------
8266
162f2c72
AC
8267 -- This node is used to create a reference to an Itype. The only purpose
8268 -- is to make sure the Itype is defined if this is the first reference.
996ae0b0
RK
8269
8270 -- A typical use of this node is when an Itype is to be referenced in
162f2c72
AC
8271 -- two branches of an IF statement. In this case it is important that
8272 -- the first use of the Itype not be inside the conditional, since then
8273 -- it might not be defined if the other branch of the IF is taken, in
8274 -- the case where the definition generates elaboration code.
996ae0b0
RK
8275
8276 -- The Itype field points to the referenced Itype
8277
162f2c72 8278 -- Sprint syntax: reference itype-name
996ae0b0
RK
8279
8280 -- N_Itype_Reference
8281 -- Sloc points to the node generating the reference
8282 -- Itype (Node1-Sem)
8283
8284 -- Note: in the case where a debug source file is generated, the Sloc
8285 -- for this node points to the REFERENCE keyword in the file output.
8286
8287 ---------------------
2ffcbaa5 8288 -- Raise xxx Error --
996ae0b0
RK
8289 ---------------------
8290
8291 -- One of these nodes is created during semantic analysis to replace
8292 -- a node for an expression that is determined to definitely raise
8293 -- the corresponding exception.
8294
8295 -- The N_Raise_xxx_Error node may also stand alone in place
8296 -- of a declaration or statement, in which case it simply causes
8297 -- the exception to be raised (i.e. it is equivalent to a raise
8298 -- statement that raises the corresponding exception). This use
8299 -- is distinguished by the fact that the Etype in this case is
3a3af4c3 8300 -- Standard_Void_Type; in the subexpression case, the Etype is the
996ae0b0
RK
8301 -- same as the type of the subexpression which it replaces.
8302
8303 -- If Condition is empty, then the raise is unconditional. If the
5a527952
AC
8304 -- Condition field is non-empty, it is a boolean expression which is
8305 -- first evaluated, and the exception is raised only if the value of the
8306 -- expression is True. In the unconditional case, the creation of this
8307 -- node is usually accompanied by a warning message (unless it appears
8308 -- within the right operand of a short-circuit form whose left argument
8309 -- is static and decisively eliminates elaboration of the raise
8310 -- operation). The condition field can ONLY be present when the node is
8311 -- used as a statement form; it must NOT be present in the case where
8312 -- the node appears within an expression.
996ae0b0 8313
07fc65c4
GB
8314 -- The exception is generated with a message that contains the
8315 -- file name and line number, and then appended text. The Reason
8316 -- code shows the text to be added. The Reason code is an element
8317 -- of the type Types.RT_Exception_Code, and indicates both the
8318 -- message to be added, and the exception to be raised (which must
8319 -- match the node type). The value is stored by storing a Uint which
8320 -- is the Pos value of the enumeration element in this type.
8321
996ae0b0
RK
8322 -- Gigi restriction: This expander ensures that the type of the
8323 -- Condition field is always Standard.Boolean, even if the type
8324 -- in the source is some non-standard boolean type.
8325
07fc65c4
GB
8326 -- Sprint syntax: [xxx_error "msg"]
8327 -- or: [xxx_error when condition "msg"]
996ae0b0
RK
8328
8329 -- N_Raise_Constraint_Error
8330 -- Sloc references related construct
8331 -- Condition (Node1) (set to Empty if no condition)
07fc65c4 8332 -- Reason (Uint3)
996ae0b0
RK
8333 -- plus fields for expression
8334
8335 -- N_Raise_Program_Error
8336 -- Sloc references related construct
8337 -- Condition (Node1) (set to Empty if no condition)
07fc65c4 8338 -- Reason (Uint3)
996ae0b0
RK
8339 -- plus fields for expression
8340
8341 -- N_Raise_Storage_Error
8342 -- Sloc references related construct
8343 -- Condition (Node1) (set to Empty if no condition)
07fc65c4 8344 -- Reason (Uint3)
996ae0b0
RK
8345 -- plus fields for expression
8346
07fc65c4
GB
8347 -- Note: Sloc is copied from the expression generating the exception.
8348 -- In the case where a debug source file is generated, the Sloc for
8349 -- this node points to the left bracket in the Sprint file output.
996ae0b0 8350
f28573f4
ES
8351 -- Note: the back end may be required to translate these nodes into
8352 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
8353
8354 ---------------------------------------------
8355 -- Optimization of Exception Raise to Goto --
8356 ---------------------------------------------
8357
8358 -- In some cases, the front end will determine that any exception raised
8359 -- by the back end for a certain exception should be transformed into a
8360 -- goto statement.
8361
8362 -- There are three kinds of exceptions raised by the back end (note that
8363 -- for this purpose we consider gigi to be part of the back end in the
8364 -- gcc case):
8365
8366 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
8367 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
8368 -- 3. Other cases not specifically marked by the front end
8369
8370 -- Normally all such exceptions are translated into calls to the proper
8371 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
8372 -- and the exception message.
8373
8374 -- The front end may determine that for a particular sequence of code,
8375 -- exceptions in any of these three categories for a particular builtin
8376 -- exception should result in a goto, rather than a call to Rcheck_xx.
8377 -- The exact sequence to be generated is:
8378
8379 -- Local_Raise (exception'Identity);
8380 -- goto Label
8381
8382 -- The front end marks such a sequence of code by bracketing it with
8383 -- push and pop nodes:
8384
8385 -- N_Push_xxx_Label (referencing the label)
8386 -- ...
8387 -- (code where transformation is expected for exception xxx)
8388 -- ...
8389 -- N_Pop_xxx_Label
8390
8391 -- The use of push/pop reflects the fact that such regions can properly
8392 -- nest, and one special case is a subregion in which no transformation
8393 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
8394 -- Exception_Label field is Empty.
8395
8396 -- N_Push_Constraint_Error_Label
8397 -- Sloc references first statement in region covered
8398 -- Exception_Label (Node5-Sem)
8399
8400 -- N_Push_Program_Error_Label
8401 -- Sloc references first statement in region covered
8402 -- Exception_Label (Node5-Sem)
8403
8404 -- N_Push_Storage_Error_Label
8405 -- Sloc references first statement in region covered
8406 -- Exception_Label (Node5-Sem)
8407
8408 -- N_Pop_Constraint_Error_Label
8409 -- Sloc references last statement in region covered
8410
8411 -- N_Pop_Program_Error_Label
8412 -- Sloc references last statement in region covered
8413
8414 -- N_Pop_Storage_Error_Label
8415 -- Sloc references last statement in region covered
8416
996ae0b0
RK
8417 ---------------
8418 -- Reference --
8419 ---------------
8420
8421 -- For a number of purposes, we need to construct references to objects.
8422 -- These references are subsequently treated as normal access values.
8423 -- An example is the construction of the parameter block passed to a
8424 -- task entry. The N_Reference node is provided for this purpose. It is
8425 -- similar in effect to the use of the Unrestricted_Access attribute,
8426 -- and like Unrestricted_Access can be applied to objects which would
8427 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
8428 -- objects which are not aliased, and slices). In addition it can be
8429 -- applied to composite type values as well as objects, including string
8430 -- values and aggregates.
8431
8432 -- Note: we use the Prefix field for this expression so that the
8433 -- resulting node can be treated using common code with the attribute
8434 -- nodes for the 'Access and related attributes. Logically it would make
8435 -- more sense to call it an Expression field, but then we would have to
8436 -- special case the treatment of the N_Reference node.
8437
03e1048e
AC
8438 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
8439 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
8440 -- a temporary initialized to a N_Reference node in order to eliminate
8441 -- superfluous access checks.
8442
996ae0b0
RK
8443 -- Sprint syntax: prefix'reference
8444
8445 -- N_Reference
8446 -- Sloc is copied from the expression
8447 -- Prefix (Node3)
8448 -- plus fields for expression
8449
8450 -- Note: in the case where a debug source file is generated, the Sloc
8451 -- for this node points to the quote in the Sprint file output.
8452
b16ffa33
AC
8453 ----------------
8454 -- SCIL Nodes --
8455 ----------------
8456
8457 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
8458 -- is active. They are only generated if SCIL generation is enabled.
8459 -- A standard tree-walk will not encounter these nodes even if they
8460 -- are present; these nodes are only accessible via the function
8461 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
8462 -- semantics.
327503f1 8463
b16ffa33
AC
8464 -- Sprint syntax: [ <node kind> ]
8465 -- No semantic field values are displayed.
327503f1 8466
327503f1
JM
8467 -- N_SCIL_Dispatch_Table_Tag_Init
8468 -- Sloc references a node for a tag initialization
327503f1 8469 -- SCIL_Entity (Node4-Sem)
ceee0bde
AC
8470 --
8471 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
8472 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
8473 -- the declaration of the dispatch table for a tagged type.
327503f1
JM
8474
8475 -- N_SCIL_Dispatching_Call
8476 -- Sloc references the node of a dispatching call
327503f1
JM
8477 -- SCIL_Target_Prim (Node2-Sem)
8478 -- SCIL_Entity (Node4-Sem)
8479 -- SCIL_Controlling_Tag (Node5-Sem)
ceee0bde
AC
8480 --
8481 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
9fe696a3
AC
8482 -- with the N_Procedure_Call_Statement or N_Function_Call node (or a
8483 -- rewriting thereof) corresponding to a dispatching call.
327503f1 8484
82878151
AC
8485 -- N_SCIL_Membership_Test
8486 -- Sloc references the node of a membership test
82878151
AC
8487 -- SCIL_Tag_Value (Node5-Sem)
8488 -- SCIL_Entity (Node4-Sem)
ceee0bde
AC
8489 --
8490 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
8491 -- with the N_In node (or a rewriting thereof) corresponding to a
8492 -- classwide membership test.
82878151 8493
996ae0b0
RK
8494 --------------------------
8495 -- Unchecked Expression --
8496 --------------------------
8497
8498 -- An unchecked expression is one that must be analyzed and resolved
8499 -- with all checks off, regardless of the current setting of scope
8500 -- suppress flags.
8501
d8db0bca 8502 -- Sprint syntax: `(expression)
996ae0b0
RK
8503
8504 -- Note: this node is always removed from the tree (and replaced by
8505 -- its constituent expression) on completion of analysis, so it only
8506 -- appears in intermediate trees, and will never be seen by Gigi.
8507
8508 -- N_Unchecked_Expression
8509 -- Sloc is a copy of the Sloc of the expression
8510 -- Expression (Node3)
8511 -- plus fields for expression
8512
8513 -- Note: in the case where a debug source file is generated, the Sloc
8514 -- for this node points to the back quote in the Sprint file output.
8515
8516 -------------------------------
8517 -- Unchecked Type Conversion --
8518 -------------------------------
8519
8520 -- An unchecked type conversion node represents the semantic action
8521 -- corresponding to a call to an instantiation of Unchecked_Conversion.
8522 -- It is generated as a result of actual use of Unchecked_Conversion
8523 -- and also the expander generates unchecked type conversion nodes
8524 -- directly for expansion of complex semantic actions.
8525
8526 -- Note: an unchecked type conversion is a variable as far as the
8527 -- semantics are concerned, which is convenient for the expander.
8528 -- This does not change what Ada source programs are legal, since
8529 -- clearly a function call to an instantiation of Unchecked_Conversion
8530 -- is not a variable in any case.
8531
d8db0bca 8532 -- Sprint syntax: subtype-mark!(expression)
996ae0b0
RK
8533
8534 -- N_Unchecked_Type_Conversion
8535 -- Sloc points to related node in source
8536 -- Subtype_Mark (Node4)
8537 -- Expression (Node3)
8538 -- Kill_Range_Check (Flag11-Sem)
fbf5a39b 8539 -- No_Truncation (Flag17-Sem)
996ae0b0
RK
8540 -- plus fields for expression
8541
8542 -- Note: in the case where a debug source file is generated, the Sloc
8543 -- for this node points to the exclamation in the Sprint file output.
8544
8545 -----------------------------------
8546 -- Validate_Unchecked_Conversion --
8547 -----------------------------------
8548
8549 -- The front end does most of the validation of unchecked conversion,
8550 -- including checking sizes (this is done after the back end is called
8551 -- to take advantage of back-annotation of calculated sizes).
8552
8553 -- The front end also deals with specific cases that are not allowed
8554 -- e.g. involving unconstrained array types.
8555
6d11af89 8556 -- For the case of the standard gigi backend, this means that all
979b94ea 8557 -- checks are done in the front end.
996ae0b0 8558
535a8637
AC
8559 -- However, in the case of specialized back-ends, in particular the JVM
8560 -- backend in the past, additional requirements and restrictions may
8561 -- apply to unchecked conversion, and these are most conveniently
8562 -- performed in the specialized back-end.
996ae0b0 8563
6d11af89
AC
8564 -- To accommodate this requirement, for such back ends, the following
8565 -- special node is generated recording an unchecked conversion that
8566 -- needs to be validated. The back end should post an appropriate
8567 -- error message if the unchecked conversion is invalid or warrants
8568 -- a special warning message.
996ae0b0
RK
8569
8570 -- Source_Type and Target_Type point to the entities for the two
8571 -- types involved in the unchecked conversion instantiation that
8572 -- is to be validated.
8573
8574 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8575
8576 -- N_Validate_Unchecked_Conversion
8577 -- Sloc points to instantiation (location for warning message)
8578 -- Source_Type (Node1-Sem)
8579 -- Target_Type (Node2-Sem)
8580
8581 -- Note: in the case where a debug source file is generated, the Sloc
8582 -- for this node points to the VALIDATE keyword in the file output.
8583
daf82dd8
HK
8584 -------------------------------
8585 -- Variable_Reference_Marker --
8586 -------------------------------
8587
8588 -- This node is created during the analysis of direct or expanded names,
8589 -- and the resolution of entry and subprogram calls. It performs several
8590 -- functions:
8591
8592 -- * Variable reference markers provide a uniform model for handling
8593 -- variable references by the ABE mechanism, regardless of whether
8594 -- expansion took place.
8595
8596 -- * The variable reference marker captures the entity of the variable
8597 -- being read or written.
8598
8599 -- * The variable reference markers aid the ABE Processing phase by
8600 -- signaling the presence of a call in case the original variable
8601 -- reference was transformed by expansion.
8602
8603 -- Sprint syntax: r#target# -- for a read
8604 -- rw#target# -- for a read/write
8605 -- w#target# -- for a write
8606
8607 -- The Sprint syntax shown above is not enabled by default
8608
8609 -- N_Variable_Reference_Marker
8610 -- Sloc points to Sloc of original variable reference
8611 -- Target (Node1-Sem)
69e6ee2f
HK
8612 -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
8613 -- Is_SPARK_Mode_On_Node (Flag2-Sem)
8614 -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
8615 -- Is_Read (Flag4-Sem)
8616 -- Is_Write (Flag5-Sem)
daf82dd8 8617
996ae0b0
RK
8618 -----------
8619 -- Empty --
8620 -----------
8621
90e491a7
PMR
8622 -- Used as the contents of the Nkind field of the dummy Empty node and in
8623 -- some other situations to indicate an uninitialized value.
996ae0b0 8624
5c736541
RD
8625 -- N_Empty
8626 -- Chars (Name1) is set to No_Name
8627
996ae0b0
RK
8628 -----------
8629 -- Error --
8630 -----------
8631
5c736541
RD
8632 -- Used as the contents of the Nkind field of the dummy Error node.
8633 -- Has an Etype field, which gets set to Any_Type later on, to help
8634 -- error recovery (Error_Posted is also set in the Error node).
8635
996ae0b0
RK
8636 -- N_Error
8637 -- Chars (Name1) is set to Error_Name
5c736541 8638 -- Etype (Node5-Sem)
996ae0b0
RK
8639
8640 --------------------------
8641 -- Node Type Definition --
8642 --------------------------
8643
8644 -- The following is the definition of the Node_Kind type. As previously
c159409f
AC
8645 -- discussed, this is separated off to allow rearrangement of the order to
8646 -- facilitate definition of subtype ranges. The comments show the subtype
8647 -- classes which apply to each set of node kinds. The first entry in the
8648 -- comment characterizes the following list of nodes.
996ae0b0
RK
8649
8650 type Node_Kind is (
8651 N_Unused_At_Start,
8652
8653 -- N_Representation_Clause
a9d8907c 8654
996ae0b0
RK
8655 N_At_Clause,
8656 N_Component_Clause,
8657 N_Enumeration_Representation_Clause,
8658 N_Mod_Clause,
8659 N_Record_Representation_Clause,
8660
8661 -- N_Representation_Clause, N_Has_Chars
a9d8907c 8662
996ae0b0
RK
8663 N_Attribute_Definition_Clause,
8664
8665 -- N_Has_Chars
a9d8907c 8666
996ae0b0 8667 N_Empty,
996ae0b0
RK
8668 N_Pragma_Argument_Association,
8669
c7f0d2c0 8670 -- N_Has_Etype, N_Has_Chars
a9d8907c 8671
84df40f7
AC
8672 -- Note: of course N_Error does not really have Etype or Chars fields,
8673 -- and any attempt to access these fields in N_Error will cause an
8674 -- error, but historically this always has been positioned so that an
8675 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8676 -- Most likely this makes coding easier somewhere but still seems
8677 -- undesirable. To be investigated some time ???
8678
5c736541
RD
8679 N_Error,
8680
996ae0b0 8681 -- N_Entity, N_Has_Etype, N_Has_Chars
a9d8907c 8682
996ae0b0
RK
8683 N_Defining_Character_Literal,
8684 N_Defining_Identifier,
8685 N_Defining_Operator_Symbol,
8686
8687 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
a9d8907c 8688
996ae0b0
RK
8689 N_Expanded_Name,
8690
8691 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8692 -- N_Has_Chars, N_Has_Entity
a9d8907c 8693
996ae0b0
RK
8694 N_Identifier,
8695 N_Operator_Symbol,
8696
8697 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8698 -- N_Has_Chars, N_Has_Entity
a9d8907c 8699
996ae0b0
RK
8700 N_Character_Literal,
8701
8702 -- N_Binary_Op, N_Op, N_Subexpr,
8703 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
a9d8907c 8704
996ae0b0
RK
8705 N_Op_Add,
8706 N_Op_Concat,
996ae0b0 8707 N_Op_Expon,
fbf5a39b
AC
8708 N_Op_Subtract,
8709
8710 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
e3da30b2 8711 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
fbf5a39b
AC
8712
8713 N_Op_Divide,
996ae0b0
RK
8714 N_Op_Mod,
8715 N_Op_Multiply,
8716 N_Op_Rem,
996ae0b0
RK
8717
8718 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8719 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
a9d8907c 8720
996ae0b0
RK
8721 N_Op_And,
8722
8723 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
a9d8907c
JM
8724 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8725
996ae0b0
RK
8726 N_Op_Eq,
8727 N_Op_Ge,
8728 N_Op_Gt,
8729 N_Op_Le,
8730 N_Op_Lt,
8731 N_Op_Ne,
8732
8733 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8734 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
a9d8907c 8735
996ae0b0
RK
8736 N_Op_Or,
8737 N_Op_Xor,
8738
8739 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8740 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
a9d8907c 8741
996ae0b0
RK
8742 N_Op_Rotate_Left,
8743 N_Op_Rotate_Right,
8744 N_Op_Shift_Left,
8745 N_Op_Shift_Right,
8746 N_Op_Shift_Right_Arithmetic,
8747
8748 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8749 -- N_Has_Chars, N_Has_Entity
a9d8907c 8750
996ae0b0
RK
8751 N_Op_Abs,
8752 N_Op_Minus,
8753 N_Op_Not,
8754 N_Op_Plus,
8755
8756 -- N_Subexpr, N_Has_Etype, N_Has_Entity
a9d8907c 8757
996ae0b0
RK
8758 N_Attribute_Reference,
8759
e3da30b2
RD
8760 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8761
8762 N_In,
8763 N_Not_In,
8764
514d0fc5 8765 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
a9d8907c 8766
996ae0b0 8767 N_And_Then,
514d0fc5
AC
8768 N_Or_Else,
8769
d3b00ce3
AC
8770 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8771
996ae0b0 8772 N_Function_Call,
d3b00ce3
AC
8773 N_Procedure_Call_Statement,
8774
a132df2e
AC
8775 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8776
8777 N_Raise_Constraint_Error,
8778 N_Raise_Program_Error,
8779 N_Raise_Storage_Error,
8780
11d59a86
AC
8781 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8782
8783 N_Integer_Literal,
8784 N_Real_Literal,
8785 N_String_Literal,
8786
d3b00ce3
AC
8787 -- N_Subexpr, N_Has_Etype
8788
9b16cb57
RD
8789 N_Explicit_Dereference,
8790 N_Expression_With_Actions,
8791 N_If_Expression,
996ae0b0 8792 N_Indexed_Component,
996ae0b0 8793 N_Null,
996ae0b0 8794 N_Qualified_Expression,
a961aa79 8795 N_Quantified_Expression,
996ae0b0
RK
8796 N_Aggregate,
8797 N_Allocator,
19d846a0 8798 N_Case_Expression,
9eb8d5b4 8799 N_Delta_Aggregate,
996ae0b0 8800 N_Extension_Aggregate,
c8d63650 8801 N_Raise_Expression,
996ae0b0 8802 N_Range,
996ae0b0
RK
8803 N_Reference,
8804 N_Selected_Component,
8805 N_Slice,
ae33543c 8806 N_Target_Name,
996ae0b0
RK
8807 N_Type_Conversion,
8808 N_Unchecked_Expression,
8809 N_Unchecked_Type_Conversion,
8810
8811 -- N_Has_Etype
a9d8907c 8812
996ae0b0
RK
8813 N_Subtype_Indication,
8814
8815 -- N_Declaration
a9d8907c 8816
996ae0b0
RK
8817 N_Component_Declaration,
8818 N_Entry_Declaration,
b0186f71 8819 N_Expression_Function,
996ae0b0
RK
8820 N_Formal_Object_Declaration,
8821 N_Formal_Type_Declaration,
8822 N_Full_Type_Declaration,
8823 N_Incomplete_Type_Declaration,
57d62f0c 8824 N_Iterator_Specification,
996ae0b0
RK
8825 N_Loop_Parameter_Specification,
8826 N_Object_Declaration,
8827 N_Protected_Type_Declaration,
8828 N_Private_Extension_Declaration,
8829 N_Private_Type_Declaration,
8830 N_Subtype_Declaration,
8831
8832 -- N_Subprogram_Specification, N_Declaration
a9d8907c 8833
996ae0b0
RK
8834 N_Function_Specification,
8835 N_Procedure_Specification,
8836
996ae0b0 8837 -- N_Access_To_Subprogram_Definition
a9d8907c 8838
996ae0b0
RK
8839 N_Access_Function_Definition,
8840 N_Access_Procedure_Definition,
8841
a9d8907c
JM
8842 -- N_Later_Decl_Item
8843
996ae0b0
RK
8844 N_Task_Type_Declaration,
8845
8846 -- N_Body_Stub, N_Later_Decl_Item
a9d8907c 8847
996ae0b0
RK
8848 N_Package_Body_Stub,
8849 N_Protected_Body_Stub,
8850 N_Subprogram_Body_Stub,
8851 N_Task_Body_Stub,
8852
8853 -- N_Generic_Instantiation, N_Later_Decl_Item
bde33286 8854 -- N_Subprogram_Instantiation
a9d8907c 8855
996ae0b0 8856 N_Function_Instantiation,
996ae0b0
RK
8857 N_Procedure_Instantiation,
8858
bde33286
RD
8859 -- N_Generic_Instantiation, N_Later_Decl_Item
8860
8861 N_Package_Instantiation,
8862
996ae0b0 8863 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
a9d8907c 8864
996ae0b0
RK
8865 N_Package_Body,
8866 N_Subprogram_Body,
8867
8868 -- N_Later_Decl_Item, N_Proper_Body
a9d8907c 8869
996ae0b0
RK
8870 N_Protected_Body,
8871 N_Task_Body,
8872
8873 -- N_Later_Decl_Item
a9d8907c 8874
996ae0b0
RK
8875 N_Implicit_Label_Declaration,
8876 N_Package_Declaration,
8877 N_Single_Task_Declaration,
8878 N_Subprogram_Declaration,
8879 N_Use_Package_Clause,
8880
8881 -- N_Generic_Declaration, N_Later_Decl_Item
a9d8907c 8882
996ae0b0
RK
8883 N_Generic_Package_Declaration,
8884 N_Generic_Subprogram_Declaration,
8885
8886 -- N_Array_Type_Definition
a9d8907c 8887
996ae0b0
RK
8888 N_Constrained_Array_Definition,
8889 N_Unconstrained_Array_Definition,
8890
8891 -- N_Renaming_Declaration
a9d8907c 8892
996ae0b0
RK
8893 N_Exception_Renaming_Declaration,
8894 N_Object_Renaming_Declaration,
8895 N_Package_Renaming_Declaration,
8896 N_Subprogram_Renaming_Declaration,
8897
bde33286 8898 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
a9d8907c 8899
996ae0b0
RK
8900 N_Generic_Function_Renaming_Declaration,
8901 N_Generic_Package_Renaming_Declaration,
8902 N_Generic_Procedure_Renaming_Declaration,
8903
8904 -- N_Statement_Other_Than_Procedure_Call
a9d8907c 8905
996ae0b0
RK
8906 N_Abort_Statement,
8907 N_Accept_Statement,
8908 N_Assignment_Statement,
8909 N_Asynchronous_Select,
8910 N_Block_Statement,
8911 N_Case_Statement,
8912 N_Code_Statement,
2ffcbaa5 8913 N_Compound_Statement,
996ae0b0 8914 N_Conditional_Entry_Call,
bde33286 8915
c7f0d2c0 8916 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
bde33286 8917
996ae0b0
RK
8918 N_Delay_Relative_Statement,
8919 N_Delay_Until_Statement,
bde33286
RD
8920
8921 -- N_Statement_Other_Than_Procedure_Call
8922
996ae0b0
RK
8923 N_Entry_Call_Statement,
8924 N_Free_Statement,
8925 N_Goto_Statement,
8926 N_Loop_Statement,
8927 N_Null_Statement,
8928 N_Raise_Statement,
8929 N_Requeue_Statement,
92a7cd46 8930 N_Simple_Return_Statement,
e3da30b2 8931 N_Extended_Return_Statement,
996ae0b0
RK
8932 N_Selective_Accept,
8933 N_Timed_Entry_Call,
8934
8935 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
a9d8907c 8936
996ae0b0
RK
8937 N_Exit_Statement,
8938 N_If_Statement,
8939
8940 -- N_Has_Condition
a9d8907c 8941
996ae0b0
RK
8942 N_Accept_Alternative,
8943 N_Delay_Alternative,
8944 N_Elsif_Part,
8945 N_Entry_Body_Formal_Part,
8946 N_Iteration_Scheme,
8947 N_Terminate_Alternative,
8948
a9d8907c
JM
8949 -- N_Formal_Subprogram_Declaration
8950
8951 N_Formal_Abstract_Subprogram_Declaration,
8952 N_Formal_Concrete_Subprogram_Declaration,
8953
0712790c 8954 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
f28573f4
ES
8955
8956 N_Push_Constraint_Error_Label,
8957 N_Push_Program_Error_Label,
8958 N_Push_Storage_Error_Label,
8959
0712790c 8960 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
f28573f4
ES
8961
8962 N_Pop_Constraint_Error_Label,
8963 N_Pop_Program_Error_Label,
8964 N_Pop_Storage_Error_Label,
8965
327503f1
JM
8966 -- SCIL nodes
8967
327503f1
JM
8968 N_SCIL_Dispatch_Table_Tag_Init,
8969 N_SCIL_Dispatching_Call,
82878151 8970 N_SCIL_Membership_Test,
327503f1 8971
996ae0b0 8972 -- Other nodes (not part of any subtype class)
a9d8907c 8973
996ae0b0
RK
8974 N_Abortable_Part,
8975 N_Abstract_Subprogram_Declaration,
8976 N_Access_Definition,
8977 N_Access_To_Object_Definition,
c159409f 8978 N_Aspect_Specification,
90e491a7 8979 N_Call_Marker,
19d846a0 8980 N_Case_Expression_Alternative,
996ae0b0
RK
8981 N_Case_Statement_Alternative,
8982 N_Compilation_Unit,
8983 N_Compilation_Unit_Aux,
8984 N_Component_Association,
a397db96 8985 N_Component_Definition,
996ae0b0 8986 N_Component_List,
dac3bede 8987 N_Contract,
996ae0b0
RK
8988 N_Derived_Type_Definition,
8989 N_Decimal_Fixed_Point_Definition,
8990 N_Defining_Program_Unit_Name,
8991 N_Delta_Constraint,
8992 N_Designator,
8993 N_Digits_Constraint,
8994 N_Discriminant_Association,
8995 N_Discriminant_Specification,
8996 N_Enumeration_Type_Definition,
8997 N_Entry_Body,
8998 N_Entry_Call_Alternative,
a9d8907c 8999 N_Entry_Index_Specification,
996ae0b0
RK
9000 N_Exception_Declaration,
9001 N_Exception_Handler,
9002 N_Floating_Point_Definition,
9003 N_Formal_Decimal_Fixed_Point_Definition,
9004 N_Formal_Derived_Type_Definition,
9005 N_Formal_Discrete_Type_Definition,
9006 N_Formal_Floating_Point_Definition,
9007 N_Formal_Modular_Type_Definition,
9008 N_Formal_Ordinary_Fixed_Point_Definition,
9009 N_Formal_Package_Declaration,
9010 N_Formal_Private_Type_Definition,
d3cb4cc0 9011 N_Formal_Incomplete_Type_Definition,
996ae0b0 9012 N_Formal_Signed_Integer_Type_Definition,
a9d8907c 9013 N_Freeze_Entity,
3cd4a210 9014 N_Freeze_Generic_Entity,
996ae0b0
RK
9015 N_Generic_Association,
9016 N_Handled_Sequence_Of_Statements,
9017 N_Index_Or_Discriminant_Constraint,
a702c9b9 9018 N_Iterated_Component_Association,
996ae0b0
RK
9019 N_Itype_Reference,
9020 N_Label,
9021 N_Modular_Type_Definition,
9022 N_Number_Declaration,
9023 N_Ordinary_Fixed_Point_Definition,
9024 N_Others_Choice,
9025 N_Package_Specification,
9026 N_Parameter_Association,
9027 N_Parameter_Specification,
d9f86c0c 9028 N_Pragma,
996ae0b0
RK
9029 N_Protected_Definition,
9030 N_Range_Constraint,
9031 N_Real_Range_Specification,
9032 N_Record_Definition,
9033 N_Signed_Integer_Type_Definition,
9034 N_Single_Protected_Declaration,
9035 N_Subunit,
9036 N_Task_Definition,
9037 N_Triggering_Alternative,
9038 N_Use_Type_Clause,
9039 N_Validate_Unchecked_Conversion,
daf82dd8 9040 N_Variable_Reference_Marker,
996ae0b0
RK
9041 N_Variant,
9042 N_Variant_Part,
9043 N_With_Clause,
996ae0b0
RK
9044 N_Unused_At_End);
9045
9046 for Node_Kind'Size use 8;
159a5104 9047 -- The data structures in Atree assume this
996ae0b0
RK
9048
9049 ----------------------------
9050 -- Node Class Definitions --
9051 ----------------------------
9052
9053 subtype N_Access_To_Subprogram_Definition is Node_Kind range
9054 N_Access_Function_Definition ..
9055 N_Access_Procedure_Definition;
9056
9057 subtype N_Array_Type_Definition is Node_Kind range
9058 N_Constrained_Array_Definition ..
9059 N_Unconstrained_Array_Definition;
9060
9061 subtype N_Binary_Op is Node_Kind range
9062 N_Op_Add ..
9063 N_Op_Shift_Right_Arithmetic;
9064
9065 subtype N_Body_Stub is Node_Kind range
9066 N_Package_Body_Stub ..
9067 N_Task_Body_Stub;
9068
9069 subtype N_Declaration is Node_Kind range
9070 N_Component_Declaration ..
9071 N_Procedure_Specification;
9072 -- Note: this includes all constructs normally thought of as declarations
9073 -- except those which are separately grouped as later declarations.
9074
bde33286
RD
9075 subtype N_Delay_Statement is Node_Kind range
9076 N_Delay_Relative_Statement ..
9077 N_Delay_Until_Statement;
9078
996ae0b0
RK
9079 subtype N_Direct_Name is Node_Kind range
9080 N_Identifier ..
9081 N_Character_Literal;
9082
9083 subtype N_Entity is Node_Kind range
9084 N_Defining_Character_Literal ..
9085 N_Defining_Operator_Symbol;
9086
82c80734
RD
9087 subtype N_Formal_Subprogram_Declaration is Node_Kind range
9088 N_Formal_Abstract_Subprogram_Declaration ..
9089 N_Formal_Concrete_Subprogram_Declaration;
9090
996ae0b0
RK
9091 subtype N_Generic_Declaration is Node_Kind range
9092 N_Generic_Package_Declaration ..
9093 N_Generic_Subprogram_Declaration;
9094
9095 subtype N_Generic_Instantiation is Node_Kind range
9096 N_Function_Instantiation ..
bde33286 9097 N_Package_Instantiation;
996ae0b0
RK
9098
9099 subtype N_Generic_Renaming_Declaration is Node_Kind range
9100 N_Generic_Function_Renaming_Declaration ..
9101 N_Generic_Procedure_Renaming_Declaration;
9102
9103 subtype N_Has_Chars is Node_Kind range
9104 N_Attribute_Definition_Clause ..
9105 N_Op_Plus;
9106
9107 subtype N_Has_Entity is Node_Kind range
9108 N_Expanded_Name ..
9109 N_Attribute_Reference;
9110 -- Nodes that have Entity fields
3cd4a210
AC
9111 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
9112 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
a50790d1 9113
996ae0b0 9114 subtype N_Has_Etype is Node_Kind range
5c736541 9115 N_Error ..
996ae0b0
RK
9116 N_Subtype_Indication;
9117
fbf5a39b
AC
9118 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
9119 N_Op_Divide ..
9120 N_Op_Rem;
9121
e3da30b2
RD
9122 subtype N_Multiplying_Operator is Node_Kind range
9123 N_Op_Divide ..
9124 N_Op_Rem;
9125
996ae0b0
RK
9126 subtype N_Later_Decl_Item is Node_Kind range
9127 N_Task_Type_Declaration ..
9128 N_Generic_Subprogram_Declaration;
eaa826f8
RD
9129 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
9130 -- only those items which can appear as later declarative items. This also
9131 -- includes N_Implicit_Label_Declaration which is not specifically in the
9132 -- grammar but may appear as a valid later declarative items. It does NOT
9133 -- include N_Pragma which can also appear among later declarative items.
9134 -- It does however include N_Protected_Body, which is a bit peculiar, but
9135 -- harmless since this cannot appear in Ada 83 mode anyway.
996ae0b0 9136
e3da30b2
RD
9137 subtype N_Membership_Test is Node_Kind range
9138 N_In ..
9139 N_Not_In;
9140
11d59a86
AC
9141 subtype N_Numeric_Or_String_Literal is Node_Kind range
9142 N_Integer_Literal ..
9143 N_String_Literal;
9144
996ae0b0
RK
9145 subtype N_Op is Node_Kind range
9146 N_Op_Add ..
9147 N_Op_Plus;
9148
9149 subtype N_Op_Boolean is Node_Kind range
9150 N_Op_And ..
9151 N_Op_Xor;
9152 -- Binary operators which take operands of a boolean type, and yield
9153 -- a result of a boolean type.
9154
9155 subtype N_Op_Compare is Node_Kind range
9156 N_Op_Eq ..
9157 N_Op_Ne;
9158
9159 subtype N_Op_Shift is Node_Kind range
9160 N_Op_Rotate_Left ..
9161 N_Op_Shift_Right_Arithmetic;
9162
9163 subtype N_Proper_Body is Node_Kind range
9164 N_Package_Body ..
9165 N_Task_Body;
9166
f28573f4
ES
9167 subtype N_Push_xxx_Label is Node_Kind range
9168 N_Push_Constraint_Error_Label ..
9169 N_Push_Storage_Error_Label;
9170
9171 subtype N_Pop_xxx_Label is Node_Kind range
9172 N_Pop_Constraint_Error_Label ..
9173 N_Pop_Storage_Error_Label;
9174
0712790c
ES
9175 subtype N_Push_Pop_xxx_Label is Node_Kind range
9176 N_Push_Constraint_Error_Label ..
9177 N_Pop_Storage_Error_Label;
9178
996ae0b0
RK
9179 subtype N_Raise_xxx_Error is Node_Kind range
9180 N_Raise_Constraint_Error ..
9181 N_Raise_Storage_Error;
9182
9183 subtype N_Renaming_Declaration is Node_Kind range
9184 N_Exception_Renaming_Declaration ..
9185 N_Generic_Procedure_Renaming_Declaration;
9186
9187 subtype N_Representation_Clause is Node_Kind range
9188 N_At_Clause ..
9189 N_Attribute_Definition_Clause;
9190
514d0fc5 9191 subtype N_Short_Circuit is Node_Kind range
327503f1
JM
9192 N_And_Then ..
9193 N_Or_Else;
9194
9195 subtype N_SCIL_Node is Node_Kind range
7665e4bd
AC
9196 N_SCIL_Dispatch_Table_Tag_Init ..
9197 N_SCIL_Membership_Test;
514d0fc5 9198
996ae0b0
RK
9199 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
9200 N_Abort_Statement ..
9201 N_If_Statement;
9202 -- Note that this includes all statement types except for the cases of the
9203 -- N_Procedure_Call_Statement which is considered to be a subexpression
9204 -- (since overloading is possible, so it needs to go through the normal
9205 -- overloading resolution for expressions).
9206
d3b00ce3
AC
9207 subtype N_Subprogram_Call is Node_Kind range
9208 N_Function_Call ..
9209 N_Procedure_Call_Statement;
9210
bde33286
RD
9211 subtype N_Subprogram_Instantiation is Node_Kind range
9212 N_Function_Instantiation ..
9213 N_Procedure_Instantiation;
9214
996ae0b0
RK
9215 subtype N_Has_Condition is Node_Kind range
9216 N_Exit_Statement ..
9217 N_Terminate_Alternative;
9218 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
9219
9220 subtype N_Subexpr is Node_Kind range
9221 N_Expanded_Name ..
9222 N_Unchecked_Type_Conversion;
9223 -- Nodes with expression fields
9224
9225 subtype N_Subprogram_Specification is Node_Kind range
9226 N_Function_Specification ..
9227 N_Procedure_Specification;
9228
9229 subtype N_Unary_Op is Node_Kind range
9230 N_Op_Abs ..
9231 N_Op_Plus;
9232
9233 subtype N_Unit_Body is Node_Kind range
9234 N_Package_Body ..
caf07df9 9235 N_Subprogram_Body;
996ae0b0
RK
9236
9237 ---------------------------
9238 -- Node Access Functions --
9239 ---------------------------
9240
9241 -- The following functions return the contents of the indicated field of
9242 -- the node referenced by the argument, which is a Node_Id. They provide
9243 -- logical access to fields in the node which could be accessed using the
9244 -- Atree.Unchecked_Access package, but the idea is always to use these
9245 -- higher level routines which preserve strong typing. In debug mode,
9246 -- these routines check that they are being applied to an appropriate
9247 -- node, as well as checking that the node is in range.
9248
996ae0b0
RK
9249 function Abort_Present
9250 (N : Node_Id) return Boolean; -- Flag15
9251
9252 function Abortable_Part
9253 (N : Node_Id) return Node_Id; -- Node2
9254
9255 function Abstract_Present
9256 (N : Node_Id) return Boolean; -- Flag4
9257
9258 function Accept_Handler_Records
9259 (N : Node_Id) return List_Id; -- List5
9260
9261 function Accept_Statement
9262 (N : Node_Id) return Node_Id; -- Node2
9263
6e937c1c
AC
9264 function Access_Definition
9265 (N : Node_Id) return Node_Id; -- Node3
9266
7324bf49
AC
9267 function Access_To_Subprogram_Definition
9268 (N : Node_Id) return Node_Id; -- Node3
9269
996ae0b0
RK
9270 function Access_Types_To_Process
9271 (N : Node_Id) return Elist_Id; -- Elist2
9272
9273 function Actions
9274 (N : Node_Id) return List_Id; -- List1
9275
9276 function Activation_Chain_Entity
9277 (N : Node_Id) return Node_Id; -- Node3
9278
9279 function Acts_As_Spec
9280 (N : Node_Id) return Boolean; -- Flag4
9281
bde33286 9282 function Actual_Designated_Subtype
e3da30b2 9283 (N : Node_Id) return Node_Id; -- Node4
bde33286 9284
fdce4bb7
JM
9285 function Address_Warning_Posted
9286 (N : Node_Id) return Boolean; -- Flag18
9287
996ae0b0
RK
9288 function Aggregate_Bounds
9289 (N : Node_Id) return Node_Id; -- Node3
9290
9291 function Aliased_Present
9292 (N : Node_Id) return Boolean; -- Flag4
9293
3a248f7c
BD
9294 function Alloc_For_BIP_Return
9295 (N : Node_Id) return Boolean; -- Flag1
9296
996ae0b0
RK
9297 function All_Others
9298 (N : Node_Id) return Boolean; -- Flag11
9299
9300 function All_Present
9301 (N : Node_Id) return Boolean; -- Flag15
9302
9303 function Alternatives
9304 (N : Node_Id) return List_Id; -- List4
9305
9306 function Ancestor_Part
9307 (N : Node_Id) return Node_Id; -- Node3
9308
12b4d338
AC
9309 function Atomic_Sync_Required
9310 (N : Node_Id) return Boolean; -- Flag14
9311
996ae0b0
RK
9312 function Array_Aggregate
9313 (N : Node_Id) return Node_Id; -- Node3
9314
b622076c
ES
9315 function Aspect_On_Partial_View
9316 (N : Node_Id) return Boolean; -- Flag18
9317
c159409f
AC
9318 function Aspect_Rep_Item
9319 (N : Node_Id) return Node_Id; -- Node2
9320
996ae0b0
RK
9321 function Assignment_OK
9322 (N : Node_Id) return Boolean; -- Flag15
9323
3e542a58
RD
9324 function Associated_Node
9325 (N : Node_Id) return Node_Id; -- Node4
9326
996ae0b0
RK
9327 function At_End_Proc
9328 (N : Node_Id) return Node_Id; -- Node1
9329
9330 function Attribute_Name
9331 (N : Node_Id) return Name_Id; -- Name2
9332
9333 function Aux_Decls_Node
9334 (N : Node_Id) return Node_Id; -- Node5
9335
9336 function Backwards_OK
9337 (N : Node_Id) return Boolean; -- Flag6
9338
9339 function Bad_Is_Detected
9340 (N : Node_Id) return Boolean; -- Flag15
9341
9342 function By_Ref
9343 (N : Node_Id) return Boolean; -- Flag5
9344
9345 function Body_Required
9346 (N : Node_Id) return Boolean; -- Flag13
9347
9348 function Body_To_Inline
9349 (N : Node_Id) return Node_Id; -- Node3
9350
9351 function Box_Present
9352 (N : Node_Id) return Boolean; -- Flag15
9353
9354 function Char_Literal_Value
82c80734 9355 (N : Node_Id) return Uint; -- Uint2
996ae0b0
RK
9356
9357 function Chars
9358 (N : Node_Id) return Name_Id; -- Name1
9359
fbf5a39b
AC
9360 function Check_Address_Alignment
9361 (N : Node_Id) return Boolean; -- Flag11
9362
996ae0b0
RK
9363 function Choice_Parameter
9364 (N : Node_Id) return Node_Id; -- Node2
9365
9366 function Choices
9367 (N : Node_Id) return List_Id; -- List1
9368
313d6f2c
AC
9369 function Class_Present
9370 (N : Node_Id) return Boolean; -- Flag6
9371
d6095153
AC
9372 function Classifications
9373 (N : Node_Id) return Node_Id; -- Node3
9374
36295779
AC
9375 function Cleanup_Actions
9376 (N : Node_Id) return List_Id; -- List5
9377
e3da30b2
RD
9378 function Comes_From_Extended_Return_Statement
9379 (N : Node_Id) return Boolean; -- Flag18
9380
996ae0b0
RK
9381 function Compile_Time_Known_Aggregate
9382 (N : Node_Id) return Boolean; -- Flag18
9383
9384 function Component_Associations
9385 (N : Node_Id) return List_Id; -- List2
9386
9387 function Component_Clauses
9388 (N : Node_Id) return List_Id; -- List3
9389
a397db96
AC
9390 function Component_Definition
9391 (N : Node_Id) return Node_Id; -- Node4
9392
996ae0b0
RK
9393 function Component_Items
9394 (N : Node_Id) return List_Id; -- List3
9395
9396 function Component_List
9397 (N : Node_Id) return Node_Id; -- Node1
9398
9399 function Component_Name
9400 (N : Node_Id) return Node_Id; -- Node1
9401
6fb4cdde
AC
9402 function Componentwise_Assignment
9403 (N : Node_Id) return Boolean; -- Flag14
9404
996ae0b0
RK
9405 function Condition
9406 (N : Node_Id) return Node_Id; -- Node1
9407
9408 function Condition_Actions
9409 (N : Node_Id) return List_Id; -- List3
9410
fbf5a39b
AC
9411 function Config_Pragmas
9412 (N : Node_Id) return List_Id; -- List4
9413
996ae0b0
RK
9414 function Constant_Present
9415 (N : Node_Id) return Boolean; -- Flag17
9416
9417 function Constraint
9418 (N : Node_Id) return Node_Id; -- Node3
9419
9420 function Constraints
9421 (N : Node_Id) return List_Id; -- List1
9422
9423 function Context_Installed
9424 (N : Node_Id) return Boolean; -- Flag13
9425
f6256631
AC
9426 function Context_Pending
9427 (N : Node_Id) return Boolean; -- Flag16
9428
996ae0b0
RK
9429 function Context_Items
9430 (N : Node_Id) return List_Id; -- List1
9431
d6095153
AC
9432 function Contract_Test_Cases
9433 (N : Node_Id) return Node_Id; -- Node2
9434
996ae0b0
RK
9435 function Controlling_Argument
9436 (N : Node_Id) return Node_Id; -- Node1
9437
9438 function Conversion_OK
9439 (N : Node_Id) return Boolean; -- Flag14
9440
fc142f63
AC
9441 function Convert_To_Return_False
9442 (N : Node_Id) return Boolean; -- Flag13
9443
ba759acd
AC
9444 function Corresponding_Aspect
9445 (N : Node_Id) return Node_Id; -- Node3
9446
996ae0b0
RK
9447 function Corresponding_Body
9448 (N : Node_Id) return Node_Id; -- Node5
9449
82c80734
RD
9450 function Corresponding_Formal_Spec
9451 (N : Node_Id) return Node_Id; -- Node3
9452
996ae0b0
RK
9453 function Corresponding_Generic_Association
9454 (N : Node_Id) return Node_Id; -- Node5
9455
9456 function Corresponding_Integer_Value
9457 (N : Node_Id) return Uint; -- Uint4
9458
9459 function Corresponding_Spec
1ba563f5 9460 (N : Node_Id) return Entity_Id; -- Node5
996ae0b0 9461
e28072cd
AC
9462 function Corresponding_Spec_Of_Stub
9463 (N : Node_Id) return Node_Id; -- Node2
9464
996ae0b0
RK
9465 function Corresponding_Stub
9466 (N : Node_Id) return Node_Id; -- Node3
9467
9468 function Dcheck_Function
9469 (N : Node_Id) return Entity_Id; -- Node5
9470
996ae0b0
RK
9471 function Declarations
9472 (N : Node_Id) return List_Id; -- List2
9473
9474 function Default_Expression
9475 (N : Node_Id) return Node_Id; -- Node5
9476
fab2daeb
AC
9477 function Default_Storage_Pool
9478 (N : Node_Id) return Node_Id; -- Node3
9479
996ae0b0
RK
9480 function Default_Name
9481 (N : Node_Id) return Node_Id; -- Node2
9482
9483 function Defining_Identifier
9484 (N : Node_Id) return Entity_Id; -- Node1
9485
9486 function Defining_Unit_Name
9487 (N : Node_Id) return Node_Id; -- Node1
9488
9489 function Delay_Alternative
9490 (N : Node_Id) return Node_Id; -- Node4
9491
996ae0b0
RK
9492 function Delay_Statement
9493 (N : Node_Id) return Node_Id; -- Node2
9494
9495 function Delta_Expression
9496 (N : Node_Id) return Node_Id; -- Node3
9497
9498 function Digits_Expression
9499 (N : Node_Id) return Node_Id; -- Node2
9500
9501 function Discr_Check_Funcs_Built
9502 (N : Node_Id) return Boolean; -- Flag11
9503
9504 function Discrete_Choices
9505 (N : Node_Id) return List_Id; -- List4
9506
9507 function Discrete_Range
9508 (N : Node_Id) return Node_Id; -- Node4
9509
9510 function Discrete_Subtype_Definition
9511 (N : Node_Id) return Node_Id; -- Node4
9512
9513 function Discrete_Subtype_Definitions
9514 (N : Node_Id) return List_Id; -- List2
9515
9516 function Discriminant_Specifications
9517 (N : Node_Id) return List_Id; -- List4
9518
9519 function Discriminant_Type
9520 (N : Node_Id) return Node_Id; -- Node5
9521
996ae0b0
RK
9522 function Do_Accessibility_Check
9523 (N : Node_Id) return Boolean; -- Flag13
9524
9525 function Do_Discriminant_Check
90e491a7 9526 (N : Node_Id) return Boolean; -- Flag3
996ae0b0
RK
9527
9528 function Do_Division_Check
9529 (N : Node_Id) return Boolean; -- Flag13
9530
9531 function Do_Length_Check
9532 (N : Node_Id) return Boolean; -- Flag4
9533
9534 function Do_Overflow_Check
9535 (N : Node_Id) return Boolean; -- Flag17
9536
9537 function Do_Range_Check
9538 (N : Node_Id) return Boolean; -- Flag9
9539
9540 function Do_Storage_Check
9541 (N : Node_Id) return Boolean; -- Flag17
9542
9543 function Do_Tag_Check
9544 (N : Node_Id) return Boolean; -- Flag13
9545
bde33286
RD
9546 function Elaborate_All_Desirable
9547 (N : Node_Id) return Boolean; -- Flag9
9548
996ae0b0 9549 function Elaborate_All_Present
555360a5 9550 (N : Node_Id) return Boolean; -- Flag14
996ae0b0 9551
bde33286
RD
9552 function Elaborate_Desirable
9553 (N : Node_Id) return Boolean; -- Flag11
9554
996ae0b0
RK
9555 function Elaborate_Present
9556 (N : Node_Id) return Boolean; -- Flag4
9557
996ae0b0
RK
9558 function Else_Actions
9559 (N : Node_Id) return List_Id; -- List3
9560
9561 function Else_Statements
9562 (N : Node_Id) return List_Id; -- List4
9563
9564 function Elsif_Parts
9565 (N : Node_Id) return List_Id; -- List3
9566
9567 function Enclosing_Variant
9568 (N : Node_Id) return Node_Id; -- Node2
9569
9570 function End_Label
9571 (N : Node_Id) return Node_Id; -- Node4
9572
9573 function End_Span
9574 (N : Node_Id) return Uint; -- Uint5
9575
9576 function Entity
9577 (N : Node_Id) return Node_Id; -- Node4
9578
9596236a
AC
9579 function Entity_Or_Associated_Node
9580 (N : Node_Id) return Node_Id; -- Node4
9581
996ae0b0
RK
9582 function Entry_Body_Formal_Part
9583 (N : Node_Id) return Node_Id; -- Node5
9584
9585 function Entry_Call_Alternative
9586 (N : Node_Id) return Node_Id; -- Node1
9587
9588 function Entry_Call_Statement
9589 (N : Node_Id) return Node_Id; -- Node1
9590
9591 function Entry_Direct_Name
9592 (N : Node_Id) return Node_Id; -- Node1
9593
9594 function Entry_Index
9595 (N : Node_Id) return Node_Id; -- Node5
9596
9597 function Entry_Index_Specification
9598 (N : Node_Id) return Node_Id; -- Node4
9599
9600 function Etype
9601 (N : Node_Id) return Node_Id; -- Node5
9602
9603 function Exception_Choices
9604 (N : Node_Id) return List_Id; -- List4
9605
9606 function Exception_Handlers
9607 (N : Node_Id) return List_Id; -- List5
9608
9609 function Exception_Junk
0712790c 9610 (N : Node_Id) return Boolean; -- Flag8
996ae0b0 9611
f28573f4
ES
9612 function Exception_Label
9613 (N : Node_Id) return Node_Id; -- Node5
9614
996ae0b0
RK
9615 function Explicit_Actual_Parameter
9616 (N : Node_Id) return Node_Id; -- Node3
9617
9618 function Expansion_Delayed
9619 (N : Node_Id) return Boolean; -- Flag11
9620
9621 function Explicit_Generic_Actual_Parameter
9622 (N : Node_Id) return Node_Id; -- Node1
9623
9624 function Expression
9625 (N : Node_Id) return Node_Id; -- Node3
9626
f63d601b
HK
9627 function Expression_Copy
9628 (N : Node_Id) return Node_Id; -- Node2
9629
996ae0b0
RK
9630 function Expressions
9631 (N : Node_Id) return List_Id; -- List1
9632
9633 function First_Bit
9634 (N : Node_Id) return Node_Id; -- Node3
9635
9636 function First_Inlined_Subprogram
9637 (N : Node_Id) return Entity_Id; -- Node3
9638
9639 function First_Name
9640 (N : Node_Id) return Boolean; -- Flag5
9641
9642 function First_Named_Actual
9643 (N : Node_Id) return Node_Id; -- Node4
9644
9645 function First_Real_Statement
9646 (N : Node_Id) return Node_Id; -- Node2
9647
9648 function First_Subtype_Link
9649 (N : Node_Id) return Entity_Id; -- Node5
9650
9651 function Float_Truncate
9652 (N : Node_Id) return Boolean; -- Flag11
9653
9654 function Formal_Type_Definition
9655 (N : Node_Id) return Node_Id; -- Node3
9656
9657 function Forwards_OK
9658 (N : Node_Id) return Boolean; -- Flag5
9659
0f1a6a0b
AC
9660 function From_Aspect_Specification
9661 (N : Node_Id) return Boolean; -- Flag13
9662
d9f86c0c
RD
9663 function From_At_End
9664 (N : Node_Id) return Boolean; -- Flag4
9665
996ae0b0
RK
9666 function From_At_Mod
9667 (N : Node_Id) return Boolean; -- Flag4
9668
414c6563
AC
9669 function From_Conditional_Expression
9670 (N : Node_Id) return Boolean; -- Flag1
9671
6d11af89
AC
9672 function From_Default
9673 (N : Node_Id) return Boolean; -- Flag6
9674
5f50020a
ES
9675 function Generalized_Indexing
9676 (N : Node_Id) return Node_Id; -- Node4
634a926b 9677
996ae0b0
RK
9678 function Generic_Associations
9679 (N : Node_Id) return List_Id; -- List3
9680
9681 function Generic_Formal_Declarations
9682 (N : Node_Id) return List_Id; -- List2
9683
9684 function Generic_Parent
9685 (N : Node_Id) return Node_Id; -- Node5
9686
9687 function Generic_Parent_Type
9688 (N : Node_Id) return Node_Id; -- Node4
9689
9690 function Handled_Statement_Sequence
9691 (N : Node_Id) return Node_Id; -- Node4
9692
9693 function Handler_List_Entry
9694 (N : Node_Id) return Node_Id; -- Node2
9695
9696 function Has_Created_Identifier
9697 (N : Node_Id) return Boolean; -- Flag15
9698
b0d71355
HK
9699 function Has_Dereference_Action
9700 (N : Node_Id) return Boolean; -- Flag13
9701
996ae0b0
RK
9702 function Has_Dynamic_Length_Check
9703 (N : Node_Id) return Boolean; -- Flag10
9704
9705 function Has_Dynamic_Range_Check
9706 (N : Node_Id) return Boolean; -- Flag12
9707
0712790c
ES
9708 function Has_Init_Expression
9709 (N : Node_Id) return Boolean; -- Flag14
9710
9711 function Has_Local_Raise
9712 (N : Node_Id) return Boolean; -- Flag8
9713
996ae0b0
RK
9714 function Has_No_Elaboration_Code
9715 (N : Node_Id) return Boolean; -- Flag17
9716
c775c209
AC
9717 function Has_Pragma_Suppress_All
9718 (N : Node_Id) return Boolean; -- Flag14
9719
996ae0b0
RK
9720 function Has_Private_View
9721 (N : Node_Id) return Boolean; -- Flag11
9722
21d27997
RD
9723 function Has_Relative_Deadline_Pragma
9724 (N : Node_Id) return Boolean; -- Flag9
9725
e3da30b2
RD
9726 function Has_Self_Reference
9727 (N : Node_Id) return Boolean; -- Flag13
9728
15918371
AC
9729 function Has_SP_Choice
9730 (N : Node_Id) return Boolean; -- Flag15
9731
996ae0b0
RK
9732 function Has_Storage_Size_Pragma
9733 (N : Node_Id) return Boolean; -- Flag5
9734
ae33543c
ES
9735 function Has_Target_Names
9736 (N : Node_Id) return Boolean; -- Flag8
9737
996ae0b0
RK
9738 function Has_Wide_Character
9739 (N : Node_Id) return Boolean; -- Flag11
9740
fd22cd21
RD
9741 function Has_Wide_Wide_Character
9742 (N : Node_Id) return Boolean; -- Flag13
9743
ca20a08e
AC
9744 function Header_Size_Added
9745 (N : Node_Id) return Boolean; -- Flag11
9746
996ae0b0 9747 function Hidden_By_Use_Clause
851e9f19 9748 (N : Node_Id) return Elist_Id; -- Elist5
996ae0b0
RK
9749
9750 function High_Bound
9751 (N : Node_Id) return Node_Id; -- Node2
9752
9753 function Identifier
9754 (N : Node_Id) return Node_Id; -- Node1
9755
a9d8907c
JM
9756 function Interface_List
9757 (N : Node_Id) return List_Id; -- List2
9758
9759 function Interface_Present
9760 (N : Node_Id) return Boolean; -- Flag16
9761
996ae0b0 9762 function Implicit_With
fbf5a39b 9763 (N : Node_Id) return Boolean; -- Flag16
996ae0b0 9764
c28408b7
RD
9765 function Import_Interface_Present
9766 (N : Node_Id) return Boolean; -- Flag16
9767
996ae0b0
RK
9768 function In_Present
9769 (N : Node_Id) return Boolean; -- Flag15
9770
9771 function Includes_Infinities
9772 (N : Node_Id) return Boolean; -- Flag11
9773
daff5ab7
AC
9774 function Incomplete_View
9775 (N : Node_Id) return Node_Id; -- Node2
9776
f104fca1
AC
9777 function Inherited_Discriminant
9778 (N : Node_Id) return Boolean; -- Flag13
9779
996ae0b0
RK
9780 function Instance_Spec
9781 (N : Node_Id) return Node_Id; -- Node5
9782
9783 function Intval
9784 (N : Node_Id) return Uint; -- Uint3
9785
bb072d1c
AC
9786 function Is_Abort_Block
9787 (N : Node_Id) return Boolean; -- Flag4
9788
75a64833 9789 function Is_Accessibility_Actual
d0995fa2 9790 (N : Node_Id) return Boolean; -- Flag13
75a64833 9791
2ba4f1fb
AC
9792 function Is_Analyzed_Pragma
9793 (N : Node_Id) return Boolean; -- Flag5
9794
996ae0b0
RK
9795 function Is_Asynchronous_Call_Block
9796 (N : Node_Id) return Boolean; -- Flag7
9797
6bb88533
AC
9798 function Is_Boolean_Aspect
9799 (N : Node_Id) return Boolean; -- Flag16
9800
7fe6c026
RD
9801 function Is_Checked
9802 (N : Node_Id) return Boolean; -- Flag11
9803
d65a80fd
HK
9804 function Is_Checked_Ghost_Pragma
9805 (N : Node_Id) return Boolean; -- Flag3
9806
996ae0b0
RK
9807 function Is_Component_Left_Opnd
9808 (N : Node_Id) return Boolean; -- Flag13
9809
9810 function Is_Component_Right_Opnd
9811 (N : Node_Id) return Boolean; -- Flag14
9812
9813 function Is_Controlling_Actual
9814 (N : Node_Id) return Boolean; -- Flag16
9815
90e491a7
PMR
9816 function Is_Declaration_Level_Node
9817 (N : Node_Id) return Boolean; -- Flag5
9818
c159409f
AC
9819 function Is_Delayed_Aspect
9820 (N : Node_Id) return Boolean; -- Flag14
9821
aab45d22
AC
9822 function Is_Disabled
9823 (N : Node_Id) return Boolean; -- Flag15
9824
90e491a7 9825 function Is_Dispatching_Call
7fb62ca1 9826 (N : Node_Id) return Boolean; -- Flag6
90e491a7 9827
33c423c8
AC
9828 function Is_Dynamic_Coextension
9829 (N : Node_Id) return Boolean; -- Flag18
9830
851e9f19
PMR
9831 function Is_Effective_Use_Clause
9832 (N : Node_Id) return Boolean; -- Flag1
9833
90e491a7
PMR
9834 function Is_Elaboration_Checks_OK_Node
9835 (N : Node_Id) return Boolean; -- Flag1
9836
8dce7371
PMR
9837 function Is_Elaboration_Code
9838 (N : Node_Id) return Boolean; -- Flag9
9839
7fb62ca1
HK
9840 function Is_Elaboration_Warnings_OK_Node
9841 (N : Node_Id) return Boolean; -- Flag3
9842
b46be8a2
RD
9843 function Is_Elsif
9844 (N : Node_Id) return Boolean; -- Flag13
9845
e3da30b2
RD
9846 function Is_Entry_Barrier_Function
9847 (N : Node_Id) return Boolean; -- Flag8
9848
fdce4bb7
JM
9849 function Is_Expanded_Build_In_Place_Call
9850 (N : Node_Id) return Boolean; -- Flag11
9851
879ac954
AC
9852 function Is_Expanded_Contract
9853 (N : Node_Id) return Boolean; -- Flag1
9854
e98668b1
AC
9855 function Is_Finalization_Wrapper
9856 (N : Node_Id) return Boolean; -- Flag9
9857
dae2b8ea
HK
9858 function Is_Folded_In_Parser
9859 (N : Node_Id) return Boolean; -- Flag4
9860
caf07df9
AC
9861 function Is_Generic_Contract_Pragma
9862 (N : Node_Id) return Boolean; -- Flag2
9863
3c08de34
ES
9864 function Is_Homogeneous_Aggregate
9865 (N : Node_Id) return Boolean; -- Flag14
9866
aab45d22
AC
9867 function Is_Ignored
9868 (N : Node_Id) return Boolean; -- Flag9
9869
d65a80fd
HK
9870 function Is_Ignored_Ghost_Pragma
9871 (N : Node_Id) return Boolean; -- Flag8
9872
fbf5a39b
AC
9873 function Is_In_Discriminant_Check
9874 (N : Node_Id) return Boolean; -- Flag11
9875
2ba4f1fb 9876 function Is_Inherited_Pragma
039538bc
AC
9877 (N : Node_Id) return Boolean; -- Flag4
9878
90e491a7
PMR
9879 function Is_Initialization_Block
9880 (N : Node_Id) return Boolean; -- Flag1
9881
9882 function Is_Known_Guaranteed_ABE
9883 (N : Node_Id) return Boolean; -- Flag18
9884
996ae0b0
RK
9885 function Is_Machine_Number
9886 (N : Node_Id) return Boolean; -- Flag11
9887
fbf5a39b
AC
9888 function Is_Null_Loop
9889 (N : Node_Id) return Boolean; -- Flag16
9890
95f2be29
OH
9891 function Is_OpenAcc_Environment
9892 (N : Node_Id) return Boolean; -- Flag13
9893
9894 function Is_OpenAcc_Loop
9895 (N : Node_Id) return Boolean; -- Flag14
9896
996ae0b0
RK
9897 function Is_Overloaded
9898 (N : Node_Id) return Boolean; -- Flag5
9899
9900 function Is_Power_Of_2_For_Shift
9901 (N : Node_Id) return Boolean; -- Flag13
9902
4913e24c
AC
9903 function Is_Prefixed_Call
9904 (N : Node_Id) return Boolean; -- Flag17
9905
996ae0b0
RK
9906 function Is_Protected_Subprogram_Body
9907 (N : Node_Id) return Boolean; -- Flag7
9908
06f6c43f
AC
9909 function Is_Qualified_Universal_Literal
9910 (N : Node_Id) return Boolean; -- Flag4
9911
daf82dd8 9912 function Is_Read
69e6ee2f 9913 (N : Node_Id) return Boolean; -- Flag4
daf82dd8 9914
90e491a7
PMR
9915 function Is_Source_Call
9916 (N : Node_Id) return Boolean; -- Flag4
9917
9918 function Is_SPARK_Mode_On_Node
9919 (N : Node_Id) return Boolean; -- Flag2
9920
0712790c
ES
9921 function Is_Static_Coextension
9922 (N : Node_Id) return Boolean; -- Flag14
9923
996ae0b0
RK
9924 function Is_Static_Expression
9925 (N : Node_Id) return Boolean; -- Flag6
9926
9927 function Is_Subprogram_Descriptor
9928 (N : Node_Id) return Boolean; -- Flag16
9929
9930 function Is_Task_Allocation_Block
9931 (N : Node_Id) return Boolean; -- Flag6
9932
877a5a12
AC
9933 function Is_Task_Body_Procedure
9934 (N : Node_Id) return Boolean; -- Flag1
9935
996ae0b0
RK
9936 function Is_Task_Master
9937 (N : Node_Id) return Boolean; -- Flag5
9938
daf82dd8 9939 function Is_Write
69e6ee2f 9940 (N : Node_Id) return Boolean; -- Flag5
daf82dd8 9941
996ae0b0
RK
9942 function Iteration_Scheme
9943 (N : Node_Id) return Node_Id; -- Node2
9944
57d62f0c
AC
9945 function Iterator_Specification
9946 (N : Node_Id) return Node_Id; -- Node2
9947
996ae0b0
RK
9948 function Itype
9949 (N : Node_Id) return Entity_Id; -- Node1
9950
9951 function Kill_Range_Check
9952 (N : Node_Id) return Boolean; -- Flag11
9953
9954 function Label_Construct
9955 (N : Node_Id) return Node_Id; -- Node2
9956
9957 function Left_Opnd
9958 (N : Node_Id) return Node_Id; -- Node2
9959
9960 function Last_Bit
9961 (N : Node_Id) return Node_Id; -- Node4
9962
9963 function Last_Name
9964 (N : Node_Id) return Boolean; -- Flag6
9965
9966 function Library_Unit
9967 (N : Node_Id) return Node_Id; -- Node4
9968
fbf5a39b
AC
9969 function Limited_View_Installed
9970 (N : Node_Id) return Boolean; -- Flag18
9971
996ae0b0
RK
9972 function Limited_Present
9973 (N : Node_Id) return Boolean; -- Flag17
9974
9975 function Literals
9976 (N : Node_Id) return List_Id; -- List1
9977
f28573f4
ES
9978 function Local_Raise_Not_OK
9979 (N : Node_Id) return Boolean; -- Flag7
9980
9981 function Local_Raise_Statements
9982 (N : Node_Id) return Elist_Id; -- Elist1
9983
996ae0b0
RK
9984 function Loop_Actions
9985 (N : Node_Id) return List_Id; -- List2
9986
9987 function Loop_Parameter_Specification
9988 (N : Node_Id) return Node_Id; -- Node4
9989
9990 function Low_Bound
9991 (N : Node_Id) return Node_Id; -- Node1
9992
9993 function Mod_Clause
9994 (N : Node_Id) return Node_Id; -- Node2
9995
9996 function More_Ids
9997 (N : Node_Id) return Boolean; -- Flag5
9998
07fc65c4
GB
9999 function Must_Be_Byte_Aligned
10000 (N : Node_Id) return Boolean; -- Flag14
10001
996ae0b0
RK
10002 function Must_Not_Freeze
10003 (N : Node_Id) return Boolean; -- Flag8
10004
edd63e9b
ES
10005 function Must_Not_Override
10006 (N : Node_Id) return Boolean; -- Flag15
10007
10008 function Must_Override
10009 (N : Node_Id) return Boolean; -- Flag14
10010
996ae0b0
RK
10011 function Name
10012 (N : Node_Id) return Node_Id; -- Node2
10013
10014 function Names
10015 (N : Node_Id) return List_Id; -- List2
10016
10017 function Next_Entity
10018 (N : Node_Id) return Node_Id; -- Node2
10019
51bf9bdf
AC
10020 function Next_Exit_Statement
10021 (N : Node_Id) return Node_Id; -- Node3
10022
9af094a1
ES
10023 function Next_Implicit_With
10024 (N : Node_Id) return Node_Id; -- Node3
10025
996ae0b0
RK
10026 function Next_Named_Actual
10027 (N : Node_Id) return Node_Id; -- Node4
10028
21d27997
RD
10029 function Next_Pragma
10030 (N : Node_Id) return Node_Id; -- Node1
10031
996ae0b0 10032 function Next_Rep_Item
e3da30b2 10033 (N : Node_Id) return Node_Id; -- Node5
996ae0b0
RK
10034
10035 function Next_Use_Clause
10036 (N : Node_Id) return Node_Id; -- Node3
10037
10038 function No_Ctrl_Actions
10039 (N : Node_Id) return Boolean; -- Flag7
10040
967947ed
PMR
10041 function No_Elaboration_Check
10042 (N : Node_Id) return Boolean; -- Flag4
10043
996ae0b0
RK
10044 function No_Entities_Ref_In_Spec
10045 (N : Node_Id) return Boolean; -- Flag8
10046
10047 function No_Initialization
10048 (N : Node_Id) return Boolean; -- Flag13
10049
f6194278
RD
10050 function No_Minimize_Eliminate
10051 (N : Node_Id) return Boolean; -- Flag17
10052
10edebe7 10053 function No_Side_Effect_Removal
90e491a7 10054 (N : Node_Id) return Boolean; -- Flag17
10edebe7 10055
fbf5a39b
AC
10056 function No_Truncation
10057 (N : Node_Id) return Boolean; -- Flag17
10058
7a2c2277
AC
10059 function Null_Excluding_Subtype
10060 (N : Node_Id) return Boolean; -- Flag16
10061
2820d220 10062 function Null_Exclusion_Present
a9d8907c 10063 (N : Node_Id) return Boolean; -- Flag11
2820d220 10064
b66c3ff4
AC
10065 function Null_Exclusion_In_Return_Present
10066 (N : Node_Id) return Boolean; -- Flag14
10067
b912db16
AC
10068 function Null_Present
10069 (N : Node_Id) return Boolean; -- Flag13
10070
996ae0b0
RK
10071 function Null_Record_Present
10072 (N : Node_Id) return Boolean; -- Flag17
10073
b912db16
AC
10074 function Null_Statement
10075 (N : Node_Id) return Node_Id; -- Node2
10076
996ae0b0
RK
10077 function Object_Definition
10078 (N : Node_Id) return Node_Id; -- Node4
10079
57d62f0c
AC
10080 function Of_Present
10081 (N : Node_Id) return Boolean; -- Flag16
10082
996ae0b0
RK
10083 function Original_Discriminant
10084 (N : Node_Id) return Node_Id; -- Node2
10085
fbf5a39b
AC
10086 function Original_Entity
10087 (N : Node_Id) return Entity_Id; -- Node2
10088
996ae0b0
RK
10089 function Others_Discrete_Choices
10090 (N : Node_Id) return List_Id; -- List1
10091
10092 function Out_Present
10093 (N : Node_Id) return Boolean; -- Flag17
10094
10095 function Parameter_Associations
10096 (N : Node_Id) return List_Id; -- List3
10097
996ae0b0
RK
10098 function Parameter_Specifications
10099 (N : Node_Id) return List_Id; -- List3
10100
10101 function Parameter_Type
10102 (N : Node_Id) return Node_Id; -- Node2
10103
10104 function Parent_Spec
10105 (N : Node_Id) return Node_Id; -- Node4
10106
94ce4941
HK
10107 function Parent_With
10108 (N : Node_Id) return Boolean; -- Flag1
10109
996ae0b0
RK
10110 function Position
10111 (N : Node_Id) return Node_Id; -- Node2
10112
10113 function Pragma_Argument_Associations
10114 (N : Node_Id) return List_Id; -- List2
10115
ac4d6407
RD
10116 function Pragma_Identifier
10117 (N : Node_Id) return Node_Id; -- Node4
10118
996ae0b0
RK
10119 function Pragmas_After
10120 (N : Node_Id) return List_Id; -- List5
10121
10122 function Pragmas_Before
10123 (N : Node_Id) return List_Id; -- List4
10124
d6095153
AC
10125 function Pre_Post_Conditions
10126 (N : Node_Id) return Node_Id; -- Node1
10127
996ae0b0
RK
10128 function Prefix
10129 (N : Node_Id) return Node_Id; -- Node3
10130
99d520ad
ES
10131 function Premature_Use
10132 (N : Node_Id) return Node_Id; -- Node5
10133
996ae0b0
RK
10134 function Present_Expr
10135 (N : Node_Id) return Uint; -- Uint3
10136
10137 function Prev_Ids
10138 (N : Node_Id) return Boolean; -- Flag6
10139
851e9f19
PMR
10140 function Prev_Use_Clause
10141 (N : Node_Id) return Node_Id; -- Node1
10142
996ae0b0
RK
10143 function Print_In_Hex
10144 (N : Node_Id) return Boolean; -- Flag13
10145
10146 function Private_Declarations
10147 (N : Node_Id) return List_Id; -- List3
10148
10149 function Private_Present
10150 (N : Node_Id) return Boolean; -- Flag15
10151
10152 function Procedure_To_Call
e3da30b2 10153 (N : Node_Id) return Node_Id; -- Node2
996ae0b0
RK
10154
10155 function Proper_Body
10156 (N : Node_Id) return Node_Id; -- Node1
10157
10158 function Protected_Definition
10159 (N : Node_Id) return Node_Id; -- Node3
10160
10161 function Protected_Present
a9d8907c 10162 (N : Node_Id) return Boolean; -- Flag6
996ae0b0
RK
10163
10164 function Raises_Constraint_Error
10165 (N : Node_Id) return Boolean; -- Flag7
10166
10167 function Range_Constraint
10168 (N : Node_Id) return Node_Id; -- Node4
10169
10170 function Range_Expression
10171 (N : Node_Id) return Node_Id; -- Node4
10172
10173 function Real_Range_Specification
10174 (N : Node_Id) return Node_Id; -- Node4
10175
10176 function Realval
10177 (N : Node_Id) return Ureal; -- Ureal3
10178
07fc65c4
GB
10179 function Reason
10180 (N : Node_Id) return Uint; -- Uint3
10181
996ae0b0
RK
10182 function Record_Extension_Part
10183 (N : Node_Id) return Node_Id; -- Node3
10184
10185 function Redundant_Use
10186 (N : Node_Id) return Boolean; -- Flag13
10187
0712790c
ES
10188 function Renaming_Exception
10189 (N : Node_Id) return Node_Id; -- Node2
10190
244480db
GD
10191 function Result_Definition
10192 (N : Node_Id) return Node_Id; -- Node4
10193
e3da30b2
RD
10194 function Return_Object_Declarations
10195 (N : Node_Id) return List_Id; -- List3
10196
10197 function Return_Statement_Entity
10198 (N : Node_Id) return Node_Id; -- Node5
996ae0b0
RK
10199
10200 function Reverse_Present
10201 (N : Node_Id) return Boolean; -- Flag15
10202
10203 function Right_Opnd
10204 (N : Node_Id) return Node_Id; -- Node3
10205
10206 function Rounded_Result
10207 (N : Node_Id) return Boolean; -- Flag18
10208
69e6ee2f
HK
10209 function Save_Invocation_Graph_Of_Body
10210 (N : Node_Id) return Boolean; -- Flag1
10211
327503f1
JM
10212 function SCIL_Controlling_Tag
10213 (N : Node_Id) return Node_Id; -- Node5
10214
1c5c721a
AC
10215 function SCIL_Entity
10216 (N : Node_Id) return Node_Id; -- Node4
10217
82878151
AC
10218 function SCIL_Tag_Value
10219 (N : Node_Id) return Node_Id; -- Node5
10220
1c5c721a 10221 function SCIL_Target_Prim
81d93365
AC
10222 (N : Node_Id) return Node_Id; -- Node2
10223
996ae0b0
RK
10224 function Scope
10225 (N : Node_Id) return Node_Id; -- Node3
10226
10227 function Select_Alternatives
10228 (N : Node_Id) return List_Id; -- List1
10229
10230 function Selector_Name
10231 (N : Node_Id) return Node_Id; -- Node2
10232
10233 function Selector_Names
10234 (N : Node_Id) return List_Id; -- List1
10235
10236 function Shift_Count_OK
10237 (N : Node_Id) return Boolean; -- Flag4
10238
10239 function Source_Type
10240 (N : Node_Id) return Entity_Id; -- Node1
10241
10242 function Specification
10243 (N : Node_Id) return Node_Id; -- Node1
10244
beacce02
AC
10245 function Split_PPC
10246 (N : Node_Id) return Boolean; -- Flag17
10247
996ae0b0
RK
10248 function Statements
10249 (N : Node_Id) return List_Id; -- List3
10250
996ae0b0
RK
10251 function Storage_Pool
10252 (N : Node_Id) return Node_Id; -- Node1
10253
d50f4827
AC
10254 function Subpool_Handle_Name
10255 (N : Node_Id) return Node_Id; -- Node4
10256
996ae0b0
RK
10257 function Strval
10258 (N : Node_Id) return String_Id; -- Str3
10259
10260 function Subtype_Indication
10261 (N : Node_Id) return Node_Id; -- Node5
10262
10263 function Subtype_Mark
10264 (N : Node_Id) return Node_Id; -- Node4
10265
10266 function Subtype_Marks
10267 (N : Node_Id) return List_Id; -- List2
10268
c7532b2d
AC
10269 function Suppress_Assignment_Checks
10270 (N : Node_Id) return Boolean; -- Flag18
10271
c800f862
RD
10272 function Suppress_Loop_Warnings
10273 (N : Node_Id) return Boolean; -- Flag17
10274
a9d8907c
JM
10275 function Synchronized_Present
10276 (N : Node_Id) return Boolean; -- Flag7
10277
996ae0b0
RK
10278 function Tagged_Present
10279 (N : Node_Id) return Boolean; -- Flag15
10280
90e491a7
PMR
10281 function Target
10282 (N : Node_Id) return Entity_Id; -- Node1
10283
996ae0b0
RK
10284 function Target_Type
10285 (N : Node_Id) return Entity_Id; -- Node2
10286
996ae0b0
RK
10287 function Task_Definition
10288 (N : Node_Id) return Node_Id; -- Node3
10289
a9d8907c
JM
10290 function Task_Present
10291 (N : Node_Id) return Boolean; -- Flag5
10292
996ae0b0
RK
10293 function Then_Actions
10294 (N : Node_Id) return List_Id; -- List2
10295
10296 function Then_Statements
10297 (N : Node_Id) return List_Id; -- List2
10298
10299 function Treat_Fixed_As_Integer
10300 (N : Node_Id) return Boolean; -- Flag14
10301
10302 function Triggering_Alternative
10303 (N : Node_Id) return Node_Id; -- Node1
10304
10305 function Triggering_Statement
10306 (N : Node_Id) return Node_Id; -- Node1
10307
10308 function TSS_Elist
10309 (N : Node_Id) return Elist_Id; -- Elist3
10310
10311 function Type_Definition
10312 (N : Node_Id) return Node_Id; -- Node3
10313
1773d80b 10314 function Uneval_Old_Accept
effdbb7d 10315 (N : Node_Id) return Boolean; -- Flag7
1773d80b
AC
10316
10317 function Uneval_Old_Warn
10318 (N : Node_Id) return Boolean; -- Flag18
10319
996ae0b0
RK
10320 function Unit
10321 (N : Node_Id) return Node_Id; -- Node2
10322
10323 function Unknown_Discriminants_Present
10324 (N : Node_Id) return Boolean; -- Flag13
10325
10326 function Unreferenced_In_Spec
10327 (N : Node_Id) return Boolean; -- Flag7
10328
10329 function Variant_Part
10330 (N : Node_Id) return Node_Id; -- Node4
10331
10332 function Variants
10333 (N : Node_Id) return List_Id; -- List1
10334
10335 function Visible_Declarations
10336 (N : Node_Id) return List_Id; -- List2
10337
2c8d828a
AC
10338 function Uninitialized_Variable
10339 (N : Node_Id) return Node_Id; -- Node3
10340
29efbb8c 10341 function Used_Operations
851e9f19 10342 (N : Node_Id) return Elist_Id; -- Elist2
29efbb8c 10343
90e491a7
PMR
10344 function Was_Attribute_Reference
10345 (N : Node_Id) return Boolean; -- Flag2
10346
549cc9c2
AC
10347 function Was_Expression_Function
10348 (N : Node_Id) return Boolean; -- Flag18
10349
996ae0b0
RK
10350 function Was_Originally_Stub
10351 (N : Node_Id) return Boolean; -- Flag13
10352
996ae0b0
RK
10353 -- End functions (note used by xsinfo utility program to end processing)
10354
10355 ----------------------------
10356 -- Node Update Procedures --
10357 ----------------------------
10358
10359 -- These are the corresponding node update routines, which again provide
10360 -- a high level logical access with type checking. In addition to setting
10361 -- the indicated field of the node N to the given Val, in the case of
10362 -- tree pointers (List1-4), the parent pointer of the Val node is set to
10363 -- point back to node N. This automates the setting of the parent pointer.
10364
c7732bbe
EB
10365 -- WARNING: There is a matching C declaration of a few subprograms in fe.h
10366
996ae0b0
RK
10367 procedure Set_Abort_Present
10368 (N : Node_Id; Val : Boolean := True); -- Flag15
10369
10370 procedure Set_Abortable_Part
10371 (N : Node_Id; Val : Node_Id); -- Node2
10372
10373 procedure Set_Abstract_Present
10374 (N : Node_Id; Val : Boolean := True); -- Flag4
10375
10376 procedure Set_Accept_Handler_Records
10377 (N : Node_Id; Val : List_Id); -- List5
10378
10379 procedure Set_Accept_Statement
10380 (N : Node_Id; Val : Node_Id); -- Node2
10381
6e937c1c
AC
10382 procedure Set_Access_Definition
10383 (N : Node_Id; Val : Node_Id); -- Node3
10384
7324bf49
AC
10385 procedure Set_Access_To_Subprogram_Definition
10386 (N : Node_Id; Val : Node_Id); -- Node3
10387
996ae0b0
RK
10388 procedure Set_Access_Types_To_Process
10389 (N : Node_Id; Val : Elist_Id); -- Elist2
10390
10391 procedure Set_Actions
10392 (N : Node_Id; Val : List_Id); -- List1
10393
10394 procedure Set_Activation_Chain_Entity
10395 (N : Node_Id; Val : Node_Id); -- Node3
10396
10397 procedure Set_Acts_As_Spec
10398 (N : Node_Id; Val : Boolean := True); -- Flag4
10399
bde33286 10400 procedure Set_Actual_Designated_Subtype
e3da30b2 10401 (N : Node_Id; Val : Node_Id); -- Node4
bde33286 10402
fdce4bb7
JM
10403 procedure Set_Address_Warning_Posted
10404 (N : Node_Id; Val : Boolean := True); -- Flag18
10405
996ae0b0
RK
10406 procedure Set_Aggregate_Bounds
10407 (N : Node_Id; Val : Node_Id); -- Node3
10408
10409 procedure Set_Aliased_Present
10410 (N : Node_Id; Val : Boolean := True); -- Flag4
10411
3a248f7c
BD
10412 procedure Set_Alloc_For_BIP_Return
10413 (N : Node_Id; Val : Boolean := True); -- Flag1
10414
996ae0b0
RK
10415 procedure Set_All_Others
10416 (N : Node_Id; Val : Boolean := True); -- Flag11
10417
10418 procedure Set_All_Present
10419 (N : Node_Id; Val : Boolean := True); -- Flag15
10420
10421 procedure Set_Alternatives
10422 (N : Node_Id; Val : List_Id); -- List4
10423
10424 procedure Set_Ancestor_Part
10425 (N : Node_Id; Val : Node_Id); -- Node3
10426
12b4d338
AC
10427 procedure Set_Atomic_Sync_Required
10428 (N : Node_Id; Val : Boolean := True); -- Flag14
10429
996ae0b0
RK
10430 procedure Set_Array_Aggregate
10431 (N : Node_Id; Val : Node_Id); -- Node3
10432
b622076c
ES
10433 procedure Set_Aspect_On_Partial_View
10434 (N : Node_Id; Val : Boolean := True); -- Flag18
10435
c159409f
AC
10436 procedure Set_Aspect_Rep_Item
10437 (N : Node_Id; Val : Node_Id); -- Node2
10438
996ae0b0
RK
10439 procedure Set_Assignment_OK
10440 (N : Node_Id; Val : Boolean := True); -- Flag15
10441
3e542a58
RD
10442 procedure Set_Associated_Node
10443 (N : Node_Id; Val : Node_Id); -- Node4
10444
996ae0b0
RK
10445 procedure Set_Attribute_Name
10446 (N : Node_Id; Val : Name_Id); -- Name2
10447
10448 procedure Set_At_End_Proc
10449 (N : Node_Id; Val : Node_Id); -- Node1
10450
10451 procedure Set_Aux_Decls_Node
10452 (N : Node_Id; Val : Node_Id); -- Node5
10453
10454 procedure Set_Backwards_OK
10455 (N : Node_Id; Val : Boolean := True); -- Flag6
10456
10457 procedure Set_Bad_Is_Detected
10458 (N : Node_Id; Val : Boolean := True); -- Flag15
10459
10460 procedure Set_Body_Required
10461 (N : Node_Id; Val : Boolean := True); -- Flag13
10462
10463 procedure Set_Body_To_Inline
10464 (N : Node_Id; Val : Node_Id); -- Node3
10465
10466 procedure Set_Box_Present
10467 (N : Node_Id; Val : Boolean := True); -- Flag15
10468
10469 procedure Set_By_Ref
10470 (N : Node_Id; Val : Boolean := True); -- Flag5
10471
10472 procedure Set_Char_Literal_Value
82c80734 10473 (N : Node_Id; Val : Uint); -- Uint2
996ae0b0
RK
10474
10475 procedure Set_Chars
10476 (N : Node_Id; Val : Name_Id); -- Name1
10477
fbf5a39b
AC
10478 procedure Set_Check_Address_Alignment
10479 (N : Node_Id; Val : Boolean := True); -- Flag11
10480
996ae0b0
RK
10481 procedure Set_Choice_Parameter
10482 (N : Node_Id; Val : Node_Id); -- Node2
10483
10484 procedure Set_Choices
10485 (N : Node_Id; Val : List_Id); -- List1
10486
313d6f2c
AC
10487 procedure Set_Class_Present
10488 (N : Node_Id; Val : Boolean := True); -- Flag6
10489
d6095153
AC
10490 procedure Set_Classifications
10491 (N : Node_Id; Val : Node_Id); -- Node3
10492
36295779
AC
10493 procedure Set_Cleanup_Actions
10494 (N : Node_Id; Val : List_Id); -- List5
10495
e3da30b2
RD
10496 procedure Set_Comes_From_Extended_Return_Statement
10497 (N : Node_Id; Val : Boolean := True); -- Flag18
10498
996ae0b0
RK
10499 procedure Set_Compile_Time_Known_Aggregate
10500 (N : Node_Id; Val : Boolean := True); -- Flag18
10501
10502 procedure Set_Component_Associations
10503 (N : Node_Id; Val : List_Id); -- List2
10504
10505 procedure Set_Component_Clauses
10506 (N : Node_Id; Val : List_Id); -- List3
10507
a397db96
AC
10508 procedure Set_Component_Definition
10509 (N : Node_Id; Val : Node_Id); -- Node4
10510
996ae0b0
RK
10511 procedure Set_Component_Items
10512 (N : Node_Id; Val : List_Id); -- List3
10513
10514 procedure Set_Component_List
10515 (N : Node_Id; Val : Node_Id); -- Node1
10516
10517 procedure Set_Component_Name
10518 (N : Node_Id; Val : Node_Id); -- Node1
10519
6fb4cdde
AC
10520 procedure Set_Componentwise_Assignment
10521 (N : Node_Id; Val : Boolean := True); -- Flag14
10522
996ae0b0
RK
10523 procedure Set_Condition
10524 (N : Node_Id; Val : Node_Id); -- Node1
10525
10526 procedure Set_Condition_Actions
10527 (N : Node_Id; Val : List_Id); -- List3
10528
fbf5a39b
AC
10529 procedure Set_Config_Pragmas
10530 (N : Node_Id; Val : List_Id); -- List4
10531
996ae0b0
RK
10532 procedure Set_Constant_Present
10533 (N : Node_Id; Val : Boolean := True); -- Flag17
10534
10535 procedure Set_Constraint
10536 (N : Node_Id; Val : Node_Id); -- Node3
10537
10538 procedure Set_Constraints
10539 (N : Node_Id; Val : List_Id); -- List1
10540
10541 procedure Set_Context_Installed
10542 (N : Node_Id; Val : Boolean := True); -- Flag13
10543
10544 procedure Set_Context_Items
10545 (N : Node_Id; Val : List_Id); -- List1
10546
f6256631
AC
10547 procedure Set_Context_Pending
10548 (N : Node_Id; Val : Boolean := True); -- Flag16
10549
d6095153
AC
10550 procedure Set_Contract_Test_Cases
10551 (N : Node_Id; Val : Node_Id); -- Node2
10552
996ae0b0
RK
10553 procedure Set_Controlling_Argument
10554 (N : Node_Id; Val : Node_Id); -- Node1
10555
10556 procedure Set_Conversion_OK
10557 (N : Node_Id; Val : Boolean := True); -- Flag14
10558
fc142f63
AC
10559 procedure Set_Convert_To_Return_False
10560 (N : Node_Id; Val : Boolean := True); -- Flag13
10561
ba759acd
AC
10562 procedure Set_Corresponding_Aspect
10563 (N : Node_Id; Val : Node_Id); -- Node3
10564
996ae0b0
RK
10565 procedure Set_Corresponding_Body
10566 (N : Node_Id; Val : Node_Id); -- Node5
10567
82c80734
RD
10568 procedure Set_Corresponding_Formal_Spec
10569 (N : Node_Id; Val : Node_Id); -- Node3
10570
996ae0b0
RK
10571 procedure Set_Corresponding_Generic_Association
10572 (N : Node_Id; Val : Node_Id); -- Node5
10573
10574 procedure Set_Corresponding_Integer_Value
10575 (N : Node_Id; Val : Uint); -- Uint4
10576
10577 procedure Set_Corresponding_Spec
1ba563f5 10578 (N : Node_Id; Val : Entity_Id); -- Node5
996ae0b0 10579
e28072cd
AC
10580 procedure Set_Corresponding_Spec_Of_Stub
10581 (N : Node_Id; Val : Node_Id); -- Node2
10582
996ae0b0
RK
10583 procedure Set_Corresponding_Stub
10584 (N : Node_Id; Val : Node_Id); -- Node3
10585
10586 procedure Set_Dcheck_Function
10587 (N : Node_Id; Val : Entity_Id); -- Node5
10588
996ae0b0
RK
10589 procedure Set_Declarations
10590 (N : Node_Id; Val : List_Id); -- List2
10591
10592 procedure Set_Default_Expression
10593 (N : Node_Id; Val : Node_Id); -- Node5
10594
fab2daeb
AC
10595 procedure Set_Default_Storage_Pool
10596 (N : Node_Id; Val : Node_Id); -- Node3
10597
996ae0b0
RK
10598 procedure Set_Default_Name
10599 (N : Node_Id; Val : Node_Id); -- Node2
10600
10601 procedure Set_Defining_Identifier
10602 (N : Node_Id; Val : Entity_Id); -- Node1
10603
10604 procedure Set_Defining_Unit_Name
10605 (N : Node_Id; Val : Node_Id); -- Node1
10606
10607 procedure Set_Delay_Alternative
10608 (N : Node_Id; Val : Node_Id); -- Node4
10609
996ae0b0
RK
10610 procedure Set_Delay_Statement
10611 (N : Node_Id; Val : Node_Id); -- Node2
10612
10613 procedure Set_Delta_Expression
10614 (N : Node_Id; Val : Node_Id); -- Node3
10615
10616 procedure Set_Digits_Expression
10617 (N : Node_Id; Val : Node_Id); -- Node2
10618
10619 procedure Set_Discr_Check_Funcs_Built
10620 (N : Node_Id; Val : Boolean := True); -- Flag11
10621
10622 procedure Set_Discrete_Choices
10623 (N : Node_Id; Val : List_Id); -- List4
10624
10625 procedure Set_Discrete_Range
10626 (N : Node_Id; Val : Node_Id); -- Node4
10627
10628 procedure Set_Discrete_Subtype_Definition
10629 (N : Node_Id; Val : Node_Id); -- Node4
10630
10631 procedure Set_Discrete_Subtype_Definitions
10632 (N : Node_Id; Val : List_Id); -- List2
10633
10634 procedure Set_Discriminant_Specifications
10635 (N : Node_Id; Val : List_Id); -- List4
10636
10637 procedure Set_Discriminant_Type
10638 (N : Node_Id; Val : Node_Id); -- Node5
10639
996ae0b0
RK
10640 procedure Set_Do_Accessibility_Check
10641 (N : Node_Id; Val : Boolean := True); -- Flag13
10642
10643 procedure Set_Do_Discriminant_Check
90e491a7 10644 (N : Node_Id; Val : Boolean := True); -- Flag3
996ae0b0
RK
10645
10646 procedure Set_Do_Division_Check
10647 (N : Node_Id; Val : Boolean := True); -- Flag13
10648
10649 procedure Set_Do_Length_Check
10650 (N : Node_Id; Val : Boolean := True); -- Flag4
10651
10652 procedure Set_Do_Overflow_Check
10653 (N : Node_Id; Val : Boolean := True); -- Flag17
10654
10655 procedure Set_Do_Range_Check
10656 (N : Node_Id; Val : Boolean := True); -- Flag9
10657
10658 procedure Set_Do_Storage_Check
10659 (N : Node_Id; Val : Boolean := True); -- Flag17
10660
10661 procedure Set_Do_Tag_Check
10662 (N : Node_Id; Val : Boolean := True); -- Flag13
10663
bde33286
RD
10664 procedure Set_Elaborate_All_Desirable
10665 (N : Node_Id; Val : Boolean := True); -- Flag9
10666
996ae0b0 10667 procedure Set_Elaborate_All_Present
555360a5 10668 (N : Node_Id; Val : Boolean := True); -- Flag14
996ae0b0 10669
bde33286
RD
10670 procedure Set_Elaborate_Desirable
10671 (N : Node_Id; Val : Boolean := True); -- Flag11
10672
996ae0b0
RK
10673 procedure Set_Elaborate_Present
10674 (N : Node_Id; Val : Boolean := True); -- Flag4
10675
996ae0b0
RK
10676 procedure Set_Else_Actions
10677 (N : Node_Id; Val : List_Id); -- List3
10678
10679 procedure Set_Else_Statements
10680 (N : Node_Id; Val : List_Id); -- List4
10681
10682 procedure Set_Elsif_Parts
10683 (N : Node_Id; Val : List_Id); -- List3
10684
10685 procedure Set_Enclosing_Variant
10686 (N : Node_Id; Val : Node_Id); -- Node2
10687
10688 procedure Set_End_Label
10689 (N : Node_Id; Val : Node_Id); -- Node4
10690
10691 procedure Set_End_Span
10692 (N : Node_Id; Val : Uint); -- Uint5
10693
10694 procedure Set_Entity
10695 (N : Node_Id; Val : Node_Id); -- Node4
10696
10697 procedure Set_Entry_Body_Formal_Part
10698 (N : Node_Id; Val : Node_Id); -- Node5
10699
10700 procedure Set_Entry_Call_Alternative
10701 (N : Node_Id; Val : Node_Id); -- Node1
10702
10703 procedure Set_Entry_Call_Statement
10704 (N : Node_Id; Val : Node_Id); -- Node1
10705
10706 procedure Set_Entry_Direct_Name
10707 (N : Node_Id; Val : Node_Id); -- Node1
10708
10709 procedure Set_Entry_Index
10710 (N : Node_Id; Val : Node_Id); -- Node5
10711
10712 procedure Set_Entry_Index_Specification
10713 (N : Node_Id; Val : Node_Id); -- Node4
10714
10715 procedure Set_Etype
10716 (N : Node_Id; Val : Node_Id); -- Node5
10717
10718 procedure Set_Exception_Choices
10719 (N : Node_Id; Val : List_Id); -- List4
10720
10721 procedure Set_Exception_Handlers
10722 (N : Node_Id; Val : List_Id); -- List5
10723
10724 procedure Set_Exception_Junk
0712790c 10725 (N : Node_Id; Val : Boolean := True); -- Flag8
996ae0b0 10726
f28573f4
ES
10727 procedure Set_Exception_Label
10728 (N : Node_Id; Val : Node_Id); -- Node5
10729
996ae0b0
RK
10730 procedure Set_Expansion_Delayed
10731 (N : Node_Id; Val : Boolean := True); -- Flag11
10732
10733 procedure Set_Explicit_Actual_Parameter
10734 (N : Node_Id; Val : Node_Id); -- Node3
10735
10736 procedure Set_Explicit_Generic_Actual_Parameter
10737 (N : Node_Id; Val : Node_Id); -- Node1
10738
10739 procedure Set_Expression
10740 (N : Node_Id; Val : Node_Id); -- Node3
10741
f63d601b
HK
10742 procedure Set_Expression_Copy
10743 (N : Node_Id; Val : Node_Id); -- Node2
10744
996ae0b0
RK
10745 procedure Set_Expressions
10746 (N : Node_Id; Val : List_Id); -- List1
10747
10748 procedure Set_First_Bit
10749 (N : Node_Id; Val : Node_Id); -- Node3
10750
10751 procedure Set_First_Inlined_Subprogram
10752 (N : Node_Id; Val : Entity_Id); -- Node3
10753
10754 procedure Set_First_Name
10755 (N : Node_Id; Val : Boolean := True); -- Flag5
10756
10757 procedure Set_First_Named_Actual
10758 (N : Node_Id; Val : Node_Id); -- Node4
10759
10760 procedure Set_First_Real_Statement
10761 (N : Node_Id; Val : Node_Id); -- Node2
10762
10763 procedure Set_First_Subtype_Link
10764 (N : Node_Id; Val : Entity_Id); -- Node5
10765
10766 procedure Set_Float_Truncate
10767 (N : Node_Id; Val : Boolean := True); -- Flag11
10768
10769 procedure Set_Formal_Type_Definition
10770 (N : Node_Id; Val : Node_Id); -- Node3
10771
10772 procedure Set_Forwards_OK
10773 (N : Node_Id; Val : Boolean := True); -- Flag5
10774
0f1a6a0b
AC
10775 procedure Set_From_Aspect_Specification
10776 (N : Node_Id; Val : Boolean := True); -- Flag13
10777
d9f86c0c
RD
10778 procedure Set_From_At_End
10779 (N : Node_Id; Val : Boolean := True); -- Flag4
10780
414c6563
AC
10781 procedure Set_From_At_Mod
10782 (N : Node_Id; Val : Boolean := True); -- Flag4
10783
10784 procedure Set_From_Conditional_Expression
10785 (N : Node_Id; Val : Boolean := True); -- Flag1
10786
6d11af89
AC
10787 procedure Set_From_Default
10788 (N : Node_Id; Val : Boolean := True); -- Flag6
10789
5f50020a
ES
10790 procedure Set_Generalized_Indexing
10791 (N : Node_Id; Val : Node_Id); -- Node4
10792
996ae0b0
RK
10793 procedure Set_Generic_Associations
10794 (N : Node_Id; Val : List_Id); -- List3
10795
10796 procedure Set_Generic_Formal_Declarations
10797 (N : Node_Id; Val : List_Id); -- List2
10798
10799 procedure Set_Generic_Parent
10800 (N : Node_Id; Val : Node_Id); -- Node5
10801
10802 procedure Set_Generic_Parent_Type
10803 (N : Node_Id; Val : Node_Id); -- Node4
10804
10805 procedure Set_Handled_Statement_Sequence
10806 (N : Node_Id; Val : Node_Id); -- Node4
10807
10808 procedure Set_Handler_List_Entry
10809 (N : Node_Id; Val : Node_Id); -- Node2
10810
10811 procedure Set_Has_Created_Identifier
10812 (N : Node_Id; Val : Boolean := True); -- Flag15
10813
b0d71355
HK
10814 procedure Set_Has_Dereference_Action
10815 (N : Node_Id; Val : Boolean := True); -- Flag13
10816
996ae0b0
RK
10817 procedure Set_Has_Dynamic_Length_Check
10818 (N : Node_Id; Val : Boolean := True); -- Flag10
10819
10820 procedure Set_Has_Dynamic_Range_Check
10821 (N : Node_Id; Val : Boolean := True); -- Flag12
10822
0712790c
ES
10823 procedure Set_Has_Init_Expression
10824 (N : Node_Id; Val : Boolean := True); -- Flag14
10825
10826 procedure Set_Has_Local_Raise
10827 (N : Node_Id; Val : Boolean := True); -- Flag8
10828
996ae0b0
RK
10829 procedure Set_Has_No_Elaboration_Code
10830 (N : Node_Id; Val : Boolean := True); -- Flag17
10831
c775c209
AC
10832 procedure Set_Has_Pragma_Suppress_All
10833 (N : Node_Id; Val : Boolean := True); -- Flag14
10834
996ae0b0
RK
10835 procedure Set_Has_Private_View
10836 (N : Node_Id; Val : Boolean := True); -- Flag11
10837
21d27997
RD
10838 procedure Set_Has_Relative_Deadline_Pragma
10839 (N : Node_Id; Val : Boolean := True); -- Flag9
10840
e3da30b2
RD
10841 procedure Set_Has_Self_Reference
10842 (N : Node_Id; Val : Boolean := True); -- Flag13
10843
15918371
AC
10844 procedure Set_Has_SP_Choice
10845 (N : Node_Id; Val : Boolean := True); -- Flag15
10846
996ae0b0
RK
10847 procedure Set_Has_Storage_Size_Pragma
10848 (N : Node_Id; Val : Boolean := True); -- Flag5
10849
ae33543c
ES
10850 procedure Set_Has_Target_Names
10851 (N : Node_Id; Val : Boolean := True); -- Flag8
10852
996ae0b0
RK
10853 procedure Set_Has_Wide_Character
10854 (N : Node_Id; Val : Boolean := True); -- Flag11
10855
fd22cd21
RD
10856 procedure Set_Has_Wide_Wide_Character
10857 (N : Node_Id; Val : Boolean := True); -- Flag13
10858
ca20a08e
AC
10859 procedure Set_Header_Size_Added
10860 (N : Node_Id; Val : Boolean := True); -- Flag11
10861
996ae0b0 10862 procedure Set_Hidden_By_Use_Clause
851e9f19 10863 (N : Node_Id; Val : Elist_Id); -- Elist5
996ae0b0
RK
10864
10865 procedure Set_High_Bound
10866 (N : Node_Id; Val : Node_Id); -- Node2
10867
10868 procedure Set_Identifier
10869 (N : Node_Id; Val : Node_Id); -- Node1
10870
a9d8907c
JM
10871 procedure Set_Interface_List
10872 (N : Node_Id; Val : List_Id); -- List2
10873
10874 procedure Set_Interface_Present
10875 (N : Node_Id; Val : Boolean := True); -- Flag16
10876
996ae0b0 10877 procedure Set_Implicit_With
fbf5a39b 10878 (N : Node_Id; Val : Boolean := True); -- Flag16
996ae0b0 10879
c28408b7
RD
10880 procedure Set_Import_Interface_Present
10881 (N : Node_Id; Val : Boolean := True); -- Flag16
10882
996ae0b0
RK
10883 procedure Set_In_Present
10884 (N : Node_Id; Val : Boolean := True); -- Flag15
10885
10886 procedure Set_Includes_Infinities
10887 (N : Node_Id; Val : Boolean := True); -- Flag11
10888
daff5ab7
AC
10889 procedure Set_Incomplete_View
10890 (N : Node_Id; Val : Node_Id); -- Node2
10891
f104fca1
AC
10892 procedure Set_Inherited_Discriminant
10893 (N : Node_Id; Val : Boolean := True); -- Flag13
10894
996ae0b0
RK
10895 procedure Set_Instance_Spec
10896 (N : Node_Id; Val : Node_Id); -- Node5
10897
10898 procedure Set_Intval
10899 (N : Node_Id; Val : Uint); -- Uint3
10900
bb072d1c
AC
10901 procedure Set_Is_Abort_Block
10902 (N : Node_Id; Val : Boolean := True); -- Flag4
10903
75a64833 10904 procedure Set_Is_Accessibility_Actual
d0995fa2 10905 (N : Node_Id; Val : Boolean := True); -- Flag13
75a64833 10906
2ba4f1fb
AC
10907 procedure Set_Is_Analyzed_Pragma
10908 (N : Node_Id; Val : Boolean := True); -- Flag5
10909
996ae0b0
RK
10910 procedure Set_Is_Asynchronous_Call_Block
10911 (N : Node_Id; Val : Boolean := True); -- Flag7
10912
6bb88533
AC
10913 procedure Set_Is_Boolean_Aspect
10914 (N : Node_Id; Val : Boolean := True); -- Flag16
10915
7fe6c026
RD
10916 procedure Set_Is_Checked
10917 (N : Node_Id; Val : Boolean := True); -- Flag11
10918
d65a80fd
HK
10919 procedure Set_Is_Checked_Ghost_Pragma
10920 (N : Node_Id; Val : Boolean := True); -- Flag3
10921
996ae0b0
RK
10922 procedure Set_Is_Component_Left_Opnd
10923 (N : Node_Id; Val : Boolean := True); -- Flag13
10924
10925 procedure Set_Is_Component_Right_Opnd
10926 (N : Node_Id; Val : Boolean := True); -- Flag14
10927
10928 procedure Set_Is_Controlling_Actual
10929 (N : Node_Id; Val : Boolean := True); -- Flag16
10930
90e491a7
PMR
10931 procedure Set_Is_Declaration_Level_Node
10932 (N : Node_Id; Val : Boolean := True); -- Flag5
10933
c159409f
AC
10934 procedure Set_Is_Delayed_Aspect
10935 (N : Node_Id; Val : Boolean := True); -- Flag14
10936
aab45d22
AC
10937 procedure Set_Is_Disabled
10938 (N : Node_Id; Val : Boolean := True); -- Flag15
10939
90e491a7 10940 procedure Set_Is_Dispatching_Call
7fb62ca1 10941 (N : Node_Id; Val : Boolean := True); -- Flag6
90e491a7 10942
33c423c8
AC
10943 procedure Set_Is_Dynamic_Coextension
10944 (N : Node_Id; Val : Boolean := True); -- Flag18
10945
851e9f19
PMR
10946 procedure Set_Is_Effective_Use_Clause
10947 (N : Node_Id; Val : Boolean := True); -- Flag1
10948
90e491a7
PMR
10949 procedure Set_Is_Elaboration_Checks_OK_Node
10950 (N : Node_Id; Val : Boolean := True); -- Flag1
10951
8dce7371
PMR
10952 procedure Set_Is_Elaboration_Code
10953 (N : Node_Id; Val : Boolean := True); -- Flag9
10954
7fb62ca1
HK
10955 procedure Set_Is_Elaboration_Warnings_OK_Node
10956 (N : Node_Id; Val : Boolean := True); -- Flag3
10957
b46be8a2
RD
10958 procedure Set_Is_Elsif
10959 (N : Node_Id; Val : Boolean := True); -- Flag13
10960
e3da30b2
RD
10961 procedure Set_Is_Entry_Barrier_Function
10962 (N : Node_Id; Val : Boolean := True); -- Flag8
10963
fdce4bb7
JM
10964 procedure Set_Is_Expanded_Build_In_Place_Call
10965 (N : Node_Id; Val : Boolean := True); -- Flag11
10966
879ac954
AC
10967 procedure Set_Is_Expanded_Contract
10968 (N : Node_Id; Val : Boolean := True); -- Flag1
10969
e98668b1
AC
10970 procedure Set_Is_Finalization_Wrapper
10971 (N : Node_Id; Val : Boolean := True); -- Flag9
10972
dae2b8ea
HK
10973 procedure Set_Is_Folded_In_Parser
10974 (N : Node_Id; Val : Boolean := True); -- Flag4
10975
caf07df9
AC
10976 procedure Set_Is_Generic_Contract_Pragma
10977 (N : Node_Id; Val : Boolean := True); -- Flag2
10978
3c08de34
ES
10979 procedure Set_Is_Homogeneous_Aggregate
10980 (N : Node_Id; Val : Boolean := True); -- Flag14
10981
caf07df9
AC
10982 procedure Set_Is_Ignored
10983 (N : Node_Id; Val : Boolean := True); -- Flag9
10984
d65a80fd
HK
10985 procedure Set_Is_Ignored_Ghost_Pragma
10986 (N : Node_Id; Val : Boolean := True); -- Flag8
10987
fbf5a39b
AC
10988 procedure Set_Is_In_Discriminant_Check
10989 (N : Node_Id; Val : Boolean := True); -- Flag11
10990
2ba4f1fb 10991 procedure Set_Is_Inherited_Pragma
039538bc
AC
10992 (N : Node_Id; Val : Boolean := True); -- Flag4
10993
90e491a7
PMR
10994 procedure Set_Is_Initialization_Block
10995 (N : Node_Id; Val : Boolean := True); -- Flag1
10996
10997 procedure Set_Is_Known_Guaranteed_ABE
10998 (N : Node_Id; Val : Boolean := True); -- Flag18
10999
996ae0b0
RK
11000 procedure Set_Is_Machine_Number
11001 (N : Node_Id; Val : Boolean := True); -- Flag11
11002
fbf5a39b
AC
11003 procedure Set_Is_Null_Loop
11004 (N : Node_Id; Val : Boolean := True); -- Flag16
11005
95f2be29
OH
11006 procedure Set_Is_OpenAcc_Environment
11007 (N : Node_Id; Val : Boolean := True); -- Flag13
11008
11009 procedure Set_Is_OpenAcc_Loop
11010 (N : Node_Id; Val : Boolean := True); -- Flag14
11011
996ae0b0
RK
11012 procedure Set_Is_Overloaded
11013 (N : Node_Id; Val : Boolean := True); -- Flag5
11014
11015 procedure Set_Is_Power_Of_2_For_Shift
11016 (N : Node_Id; Val : Boolean := True); -- Flag13
11017
4913e24c
AC
11018 procedure Set_Is_Prefixed_Call
11019 (N : Node_Id; Val : Boolean := True); -- Flag17
11020
996ae0b0
RK
11021 procedure Set_Is_Protected_Subprogram_Body
11022 (N : Node_Id; Val : Boolean := True); -- Flag7
11023
06f6c43f
AC
11024 procedure Set_Is_Qualified_Universal_Literal
11025 (N : Node_Id; Val : Boolean := True); -- Flag4
11026
daf82dd8 11027 procedure Set_Is_Read
69e6ee2f 11028 (N : Node_Id; Val : Boolean := True); -- Flag4
daf82dd8 11029
90e491a7
PMR
11030 procedure Set_Is_Source_Call
11031 (N : Node_Id; Val : Boolean := True); -- Flag4
11032
11033 procedure Set_Is_SPARK_Mode_On_Node
11034 (N : Node_Id; Val : Boolean := True); -- Flag2
11035
0712790c
ES
11036 procedure Set_Is_Static_Coextension
11037 (N : Node_Id; Val : Boolean := True); -- Flag14
11038
996ae0b0
RK
11039 procedure Set_Is_Static_Expression
11040 (N : Node_Id; Val : Boolean := True); -- Flag6
11041
11042 procedure Set_Is_Subprogram_Descriptor
11043 (N : Node_Id; Val : Boolean := True); -- Flag16
11044
11045 procedure Set_Is_Task_Allocation_Block
11046 (N : Node_Id; Val : Boolean := True); -- Flag6
11047
877a5a12
AC
11048 procedure Set_Is_Task_Body_Procedure
11049 (N : Node_Id; Val : Boolean := True); -- Flag1
11050
996ae0b0
RK
11051 procedure Set_Is_Task_Master
11052 (N : Node_Id; Val : Boolean := True); -- Flag5
11053
daf82dd8 11054 procedure Set_Is_Write
69e6ee2f 11055 (N : Node_Id; Val : Boolean := True); -- Flag5
daf82dd8 11056
996ae0b0
RK
11057 procedure Set_Iteration_Scheme
11058 (N : Node_Id; Val : Node_Id); -- Node2
11059
57d62f0c
AC
11060 procedure Set_Iterator_Specification
11061 (N : Node_Id; Val : Node_Id); -- Node2
11062
996ae0b0
RK
11063 procedure Set_Itype
11064 (N : Node_Id; Val : Entity_Id); -- Node1
11065
11066 procedure Set_Kill_Range_Check
11067 (N : Node_Id; Val : Boolean := True); -- Flag11
11068
11069 procedure Set_Last_Bit
11070 (N : Node_Id; Val : Node_Id); -- Node4
11071
11072 procedure Set_Last_Name
11073 (N : Node_Id; Val : Boolean := True); -- Flag6
11074
11075 procedure Set_Library_Unit
11076 (N : Node_Id; Val : Node_Id); -- Node4
11077
11078 procedure Set_Label_Construct
11079 (N : Node_Id; Val : Node_Id); -- Node2
11080
11081 procedure Set_Left_Opnd
11082 (N : Node_Id; Val : Node_Id); -- Node2
11083
fbf5a39b
AC
11084 procedure Set_Limited_View_Installed
11085 (N : Node_Id; Val : Boolean := True); -- Flag18
11086
996ae0b0
RK
11087 procedure Set_Limited_Present
11088 (N : Node_Id; Val : Boolean := True); -- Flag17
11089
11090 procedure Set_Literals
11091 (N : Node_Id; Val : List_Id); -- List1
11092
f28573f4
ES
11093 procedure Set_Local_Raise_Not_OK
11094 (N : Node_Id; Val : Boolean := True); -- Flag7
11095
11096 procedure Set_Local_Raise_Statements
11097 (N : Node_Id; Val : Elist_Id); -- Elist1
11098
996ae0b0
RK
11099 procedure Set_Loop_Actions
11100 (N : Node_Id; Val : List_Id); -- List2
11101
11102 procedure Set_Loop_Parameter_Specification
11103 (N : Node_Id; Val : Node_Id); -- Node4
11104
11105 procedure Set_Low_Bound
11106 (N : Node_Id; Val : Node_Id); -- Node1
11107
11108 procedure Set_Mod_Clause
11109 (N : Node_Id; Val : Node_Id); -- Node2
11110
11111 procedure Set_More_Ids
11112 (N : Node_Id; Val : Boolean := True); -- Flag5
11113
07fc65c4
GB
11114 procedure Set_Must_Be_Byte_Aligned
11115 (N : Node_Id; Val : Boolean := True); -- Flag14
11116
996ae0b0
RK
11117 procedure Set_Must_Not_Freeze
11118 (N : Node_Id; Val : Boolean := True); -- Flag8
11119
edd63e9b
ES
11120 procedure Set_Must_Not_Override
11121 (N : Node_Id; Val : Boolean := True); -- Flag15
11122
11123 procedure Set_Must_Override
11124 (N : Node_Id; Val : Boolean := True); -- Flag14
11125
996ae0b0
RK
11126 procedure Set_Name
11127 (N : Node_Id; Val : Node_Id); -- Node2
11128
11129 procedure Set_Names
11130 (N : Node_Id; Val : List_Id); -- List2
11131
11132 procedure Set_Next_Entity
11133 (N : Node_Id; Val : Node_Id); -- Node2
11134
51bf9bdf
AC
11135 procedure Set_Next_Exit_Statement
11136 (N : Node_Id; Val : Node_Id); -- Node3
11137
9af094a1
ES
11138 procedure Set_Next_Implicit_With
11139 (N : Node_Id; Val : Node_Id); -- Node3
11140
996ae0b0
RK
11141 procedure Set_Next_Named_Actual
11142 (N : Node_Id; Val : Node_Id); -- Node4
11143
21d27997
RD
11144 procedure Set_Next_Pragma
11145 (N : Node_Id; Val : Node_Id); -- Node1
11146
996ae0b0 11147 procedure Set_Next_Rep_Item
e3da30b2 11148 (N : Node_Id; Val : Node_Id); -- Node5
996ae0b0
RK
11149
11150 procedure Set_Next_Use_Clause
11151 (N : Node_Id; Val : Node_Id); -- Node3
11152
11153 procedure Set_No_Ctrl_Actions
11154 (N : Node_Id; Val : Boolean := True); -- Flag7
11155
967947ed
PMR
11156 procedure Set_No_Elaboration_Check
11157 (N : Node_Id; Val : Boolean := True); -- Flag4
11158
996ae0b0
RK
11159 procedure Set_No_Entities_Ref_In_Spec
11160 (N : Node_Id; Val : Boolean := True); -- Flag8
11161
11162 procedure Set_No_Initialization
11163 (N : Node_Id; Val : Boolean := True); -- Flag13
11164
f6194278
RD
11165 procedure Set_No_Minimize_Eliminate
11166 (N : Node_Id; Val : Boolean := True); -- Flag17
11167
10edebe7 11168 procedure Set_No_Side_Effect_Removal
90e491a7 11169 (N : Node_Id; Val : Boolean := True); -- Flag17
10edebe7 11170
fbf5a39b
AC
11171 procedure Set_No_Truncation
11172 (N : Node_Id; Val : Boolean := True); -- Flag17
11173
7a2c2277
AC
11174 procedure Set_Null_Excluding_Subtype
11175 (N : Node_Id; Val : Boolean := True); -- Flag16
11176
2820d220 11177 procedure Set_Null_Exclusion_Present
a9d8907c 11178 (N : Node_Id; Val : Boolean := True); -- Flag11
2820d220 11179
b66c3ff4
AC
11180 procedure Set_Null_Exclusion_In_Return_Present
11181 (N : Node_Id; Val : Boolean := True); -- Flag14
11182
b912db16
AC
11183 procedure Set_Null_Present
11184 (N : Node_Id; Val : Boolean := True); -- Flag13
11185
996ae0b0
RK
11186 procedure Set_Null_Record_Present
11187 (N : Node_Id; Val : Boolean := True); -- Flag17
11188
b912db16
AC
11189 procedure Set_Null_Statement
11190 (N : Node_Id; Val : Node_Id); -- Node2
11191
996ae0b0
RK
11192 procedure Set_Object_Definition
11193 (N : Node_Id; Val : Node_Id); -- Node4
11194
57d62f0c
AC
11195 procedure Set_Of_Present
11196 (N : Node_Id; Val : Boolean := True); -- Flag16
11197
996ae0b0
RK
11198 procedure Set_Original_Discriminant
11199 (N : Node_Id; Val : Node_Id); -- Node2
11200
fbf5a39b
AC
11201 procedure Set_Original_Entity
11202 (N : Node_Id; Val : Entity_Id); -- Node2
11203
996ae0b0
RK
11204 procedure Set_Others_Discrete_Choices
11205 (N : Node_Id; Val : List_Id); -- List1
11206
11207 procedure Set_Out_Present
11208 (N : Node_Id; Val : Boolean := True); -- Flag17
11209
11210 procedure Set_Parameter_Associations
11211 (N : Node_Id; Val : List_Id); -- List3
11212
996ae0b0
RK
11213 procedure Set_Parameter_Specifications
11214 (N : Node_Id; Val : List_Id); -- List3
11215
11216 procedure Set_Parameter_Type
11217 (N : Node_Id; Val : Node_Id); -- Node2
11218
11219 procedure Set_Parent_Spec
11220 (N : Node_Id; Val : Node_Id); -- Node4
11221
94ce4941
HK
11222 procedure Set_Parent_With
11223 (N : Node_Id; Val : Boolean := True); -- Flag1
11224
996ae0b0
RK
11225 procedure Set_Position
11226 (N : Node_Id; Val : Node_Id); -- Node2
11227
11228 procedure Set_Pragma_Argument_Associations
11229 (N : Node_Id; Val : List_Id); -- List2
11230
ac4d6407
RD
11231 procedure Set_Pragma_Identifier
11232 (N : Node_Id; Val : Node_Id); -- Node4
11233
996ae0b0
RK
11234 procedure Set_Pragmas_After
11235 (N : Node_Id; Val : List_Id); -- List5
11236
11237 procedure Set_Pragmas_Before
11238 (N : Node_Id; Val : List_Id); -- List4
11239
d6095153
AC
11240 procedure Set_Pre_Post_Conditions
11241 (N : Node_Id; Val : Node_Id); -- Node1
11242
996ae0b0
RK
11243 procedure Set_Prefix
11244 (N : Node_Id; Val : Node_Id); -- Node3
11245
99d520ad
ES
11246 procedure Set_Premature_Use
11247 (N : Node_Id; Val : Node_Id); -- Node5
11248
996ae0b0
RK
11249 procedure Set_Present_Expr
11250 (N : Node_Id; Val : Uint); -- Uint3
11251
11252 procedure Set_Prev_Ids
11253 (N : Node_Id; Val : Boolean := True); -- Flag6
11254
851e9f19
PMR
11255 procedure Set_Prev_Use_Clause
11256 (N : Node_Id; Val : Node_Id); -- Node1
11257
996ae0b0
RK
11258 procedure Set_Print_In_Hex
11259 (N : Node_Id; Val : Boolean := True); -- Flag13
11260
11261 procedure Set_Private_Declarations
11262 (N : Node_Id; Val : List_Id); -- List3
11263
11264 procedure Set_Private_Present
11265 (N : Node_Id; Val : Boolean := True); -- Flag15
11266
11267 procedure Set_Procedure_To_Call
e3da30b2 11268 (N : Node_Id; Val : Node_Id); -- Node2
996ae0b0
RK
11269
11270 procedure Set_Proper_Body
11271 (N : Node_Id; Val : Node_Id); -- Node1
11272
11273 procedure Set_Protected_Definition
11274 (N : Node_Id; Val : Node_Id); -- Node3
11275
11276 procedure Set_Protected_Present
a9d8907c 11277 (N : Node_Id; Val : Boolean := True); -- Flag6
996ae0b0
RK
11278
11279 procedure Set_Raises_Constraint_Error
11280 (N : Node_Id; Val : Boolean := True); -- Flag7
11281
11282 procedure Set_Range_Constraint
11283 (N : Node_Id; Val : Node_Id); -- Node4
11284
11285 procedure Set_Range_Expression
11286 (N : Node_Id; Val : Node_Id); -- Node4
11287
11288 procedure Set_Real_Range_Specification
11289 (N : Node_Id; Val : Node_Id); -- Node4
11290
11291 procedure Set_Realval
11292 (N : Node_Id; Val : Ureal); -- Ureal3
11293
07fc65c4
GB
11294 procedure Set_Reason
11295 (N : Node_Id; Val : Uint); -- Uint3
11296
996ae0b0
RK
11297 procedure Set_Record_Extension_Part
11298 (N : Node_Id; Val : Node_Id); -- Node3
11299
11300 procedure Set_Redundant_Use
11301 (N : Node_Id; Val : Boolean := True); -- Flag13
11302
0712790c
ES
11303 procedure Set_Renaming_Exception
11304 (N : Node_Id; Val : Node_Id); -- Node2
11305
244480db
GD
11306 procedure Set_Result_Definition
11307 (N : Node_Id; Val : Node_Id); -- Node4
11308
e3da30b2
RD
11309 procedure Set_Return_Object_Declarations
11310 (N : Node_Id; Val : List_Id); -- List3
11311
11312 procedure Set_Return_Statement_Entity
11313 (N : Node_Id; Val : Node_Id); -- Node5
996ae0b0
RK
11314
11315 procedure Set_Reverse_Present
11316 (N : Node_Id; Val : Boolean := True); -- Flag15
11317
11318 procedure Set_Right_Opnd
11319 (N : Node_Id; Val : Node_Id); -- Node3
11320
11321 procedure Set_Rounded_Result
11322 (N : Node_Id; Val : Boolean := True); -- Flag18
11323
69e6ee2f
HK
11324 procedure Set_Save_Invocation_Graph_Of_Body
11325 (N : Node_Id; Val : Boolean := True); -- Flag1
11326
327503f1
JM
11327 procedure Set_SCIL_Controlling_Tag
11328 (N : Node_Id; Val : Node_Id); -- Node5
11329
1c5c721a
AC
11330 procedure Set_SCIL_Entity
11331 (N : Node_Id; Val : Node_Id); -- Node4
11332
82878151
AC
11333 procedure Set_SCIL_Tag_Value
11334 (N : Node_Id; Val : Node_Id); -- Node5
11335
1c5c721a 11336 procedure Set_SCIL_Target_Prim
81d93365
AC
11337 (N : Node_Id; Val : Node_Id); -- Node2
11338
996ae0b0
RK
11339 procedure Set_Scope
11340 (N : Node_Id; Val : Node_Id); -- Node3
11341
11342 procedure Set_Select_Alternatives
11343 (N : Node_Id; Val : List_Id); -- List1
11344
11345 procedure Set_Selector_Name
11346 (N : Node_Id; Val : Node_Id); -- Node2
11347
11348 procedure Set_Selector_Names
11349 (N : Node_Id; Val : List_Id); -- List1
11350
11351 procedure Set_Shift_Count_OK
11352 (N : Node_Id; Val : Boolean := True); -- Flag4
11353
11354 procedure Set_Source_Type
11355 (N : Node_Id; Val : Entity_Id); -- Node1
11356
11357 procedure Set_Specification
11358 (N : Node_Id; Val : Node_Id); -- Node1
11359
beacce02
AC
11360 procedure Set_Split_PPC
11361 (N : Node_Id; Val : Boolean); -- Flag17
11362
996ae0b0
RK
11363 procedure Set_Statements
11364 (N : Node_Id; Val : List_Id); -- List3
11365
996ae0b0
RK
11366 procedure Set_Storage_Pool
11367 (N : Node_Id; Val : Node_Id); -- Node1
11368
d50f4827
AC
11369 procedure Set_Subpool_Handle_Name
11370 (N : Node_Id; Val : Node_Id); -- Node4
11371
996ae0b0
RK
11372 procedure Set_Strval
11373 (N : Node_Id; Val : String_Id); -- Str3
11374
11375 procedure Set_Subtype_Indication
11376 (N : Node_Id; Val : Node_Id); -- Node5
11377
11378 procedure Set_Subtype_Mark
11379 (N : Node_Id; Val : Node_Id); -- Node4
11380
11381 procedure Set_Subtype_Marks
11382 (N : Node_Id; Val : List_Id); -- List2
11383
c7532b2d
AC
11384 procedure Set_Suppress_Assignment_Checks
11385 (N : Node_Id; Val : Boolean := True); -- Flag18
11386
c800f862
RD
11387 procedure Set_Suppress_Loop_Warnings
11388 (N : Node_Id; Val : Boolean := True); -- Flag17
11389
a9d8907c
JM
11390 procedure Set_Synchronized_Present
11391 (N : Node_Id; Val : Boolean := True); -- Flag7
11392
996ae0b0
RK
11393 procedure Set_Tagged_Present
11394 (N : Node_Id; Val : Boolean := True); -- Flag15
11395
90e491a7
PMR
11396 procedure Set_Target
11397 (N : Node_Id; Val : Entity_Id); -- Node1
11398
996ae0b0
RK
11399 procedure Set_Target_Type
11400 (N : Node_Id; Val : Entity_Id); -- Node2
11401
996ae0b0
RK
11402 procedure Set_Task_Definition
11403 (N : Node_Id; Val : Node_Id); -- Node3
11404
a9d8907c
JM
11405 procedure Set_Task_Present
11406 (N : Node_Id; Val : Boolean := True); -- Flag5
11407
996ae0b0
RK
11408 procedure Set_Then_Actions
11409 (N : Node_Id; Val : List_Id); -- List2
11410
11411 procedure Set_Then_Statements
11412 (N : Node_Id; Val : List_Id); -- List2
11413
11414 procedure Set_Treat_Fixed_As_Integer
11415 (N : Node_Id; Val : Boolean := True); -- Flag14
11416
11417 procedure Set_Triggering_Alternative
11418 (N : Node_Id; Val : Node_Id); -- Node1
11419
11420 procedure Set_Triggering_Statement
11421 (N : Node_Id; Val : Node_Id); -- Node1
11422
11423 procedure Set_TSS_Elist
11424 (N : Node_Id; Val : Elist_Id); -- Elist3
11425
11426 procedure Set_Type_Definition
11427 (N : Node_Id; Val : Node_Id); -- Node3
11428
1773d80b 11429 procedure Set_Uneval_Old_Accept
effdbb7d 11430 (N : Node_Id; Val : Boolean := True); -- Flag7
1773d80b
AC
11431
11432 procedure Set_Uneval_Old_Warn
11433 (N : Node_Id; Val : Boolean := True); -- Flag18
11434
996ae0b0
RK
11435 procedure Set_Unit
11436 (N : Node_Id; Val : Node_Id); -- Node2
11437
11438 procedure Set_Unknown_Discriminants_Present
11439 (N : Node_Id; Val : Boolean := True); -- Flag13
11440
11441 procedure Set_Unreferenced_In_Spec
11442 (N : Node_Id; Val : Boolean := True); -- Flag7
11443
11444 procedure Set_Variant_Part
11445 (N : Node_Id; Val : Node_Id); -- Node4
11446
11447 procedure Set_Variants
11448 (N : Node_Id; Val : List_Id); -- List1
11449
11450 procedure Set_Visible_Declarations
11451 (N : Node_Id; Val : List_Id); -- List2
11452
2c8d828a
AC
11453 procedure Set_Uninitialized_Variable
11454 (N : Node_Id; Val : Node_Id); -- Node3
11455
29efbb8c 11456 procedure Set_Used_Operations
851e9f19 11457 (N : Node_Id; Val : Elist_Id); -- Elist2
29efbb8c 11458
90e491a7
PMR
11459 procedure Set_Was_Attribute_Reference
11460 (N : Node_Id; Val : Boolean := True); -- Flag2
11461
549cc9c2
AC
11462 procedure Set_Was_Expression_Function
11463 (N : Node_Id; Val : Boolean := True); -- Flag18
11464
996ae0b0
RK
11465 procedure Set_Was_Originally_Stub
11466 (N : Node_Id; Val : Boolean := True); -- Flag13
11467
996ae0b0
RK
11468 -------------------------
11469 -- Iterator Procedures --
11470 -------------------------
11471
11472 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
11473
11474 procedure Next_Entity (N : in out Node_Id);
11475 procedure Next_Named_Actual (N : in out Node_Id);
11476 procedure Next_Rep_Item (N : in out Node_Id);
11477 procedure Next_Use_Clause (N : in out Node_Id);
11478
c159409f
AC
11479 -------------------------------------------
11480 -- Miscellaneous Tree Access Subprograms --
11481 -------------------------------------------
996ae0b0
RK
11482
11483 function End_Location (N : Node_Id) return Source_Ptr;
c159409f
AC
11484 -- N is an N_If_Statement or N_Case_Statement node, and this function
11485 -- returns the location of the IF token in the END IF sequence by
11486 -- translating the value of the End_Span field.
996ae0b0 11487
c7732bbe
EB
11488 -- WARNING: There is a matching C declaration of this subprogram in fe.h
11489
996ae0b0 11490 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
c159409f
AC
11491 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
11492 -- the End_Span field to correspond to the given value S. In other words,
11493 -- End_Span is set to the difference between S and Sloc (N), the starting
11494 -- location.
11495
11496 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
11497 -- Given an argument to a pragma Arg, this function returns the expression
11498 -- for the argument. This is Arg itself, or, in the case where Arg is a
11499 -- pragma argument association node, the expression from this node.
996ae0b0 11500
ac4d6407
RD
11501 --------------------------------
11502 -- Node_Kind Membership Tests --
11503 --------------------------------
11504
3354f96d 11505 -- The following functions allow a convenient notation for testing whether
ac4d6407
RD
11506 -- a Node_Kind value matches any one of a list of possible values. In each
11507 -- case True is returned if the given T argument is equal to any of the V
11508 -- arguments. Note that there is a similar set of functions defined in
11509 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
11510
11511 function Nkind_In
11512 (T : Node_Kind;
11513 V1 : Node_Kind;
11514 V2 : Node_Kind) return Boolean;
11515
11516 function Nkind_In
11517 (T : Node_Kind;
11518 V1 : Node_Kind;
11519 V2 : Node_Kind;
11520 V3 : Node_Kind) return Boolean;
11521
11522 function Nkind_In
11523 (T : Node_Kind;
11524 V1 : Node_Kind;
11525 V2 : Node_Kind;
11526 V3 : Node_Kind;
11527 V4 : Node_Kind) return Boolean;
11528
11529 function Nkind_In
11530 (T : Node_Kind;
11531 V1 : Node_Kind;
11532 V2 : Node_Kind;
11533 V3 : Node_Kind;
11534 V4 : Node_Kind;
11535 V5 : Node_Kind) return Boolean;
11536
11537 function Nkind_In
11538 (T : Node_Kind;
11539 V1 : Node_Kind;
11540 V2 : Node_Kind;
11541 V3 : Node_Kind;
11542 V4 : Node_Kind;
11543 V5 : Node_Kind;
11544 V6 : Node_Kind) return Boolean;
11545
11546 function Nkind_In
11547 (T : Node_Kind;
11548 V1 : Node_Kind;
11549 V2 : Node_Kind;
11550 V3 : Node_Kind;
11551 V4 : Node_Kind;
11552 V5 : Node_Kind;
11553 V6 : Node_Kind;
11554 V7 : Node_Kind) return Boolean;
11555
11556 function Nkind_In
11557 (T : Node_Kind;
11558 V1 : Node_Kind;
11559 V2 : Node_Kind;
11560 V3 : Node_Kind;
11561 V4 : Node_Kind;
11562 V5 : Node_Kind;
11563 V6 : Node_Kind;
11564 V7 : Node_Kind;
11565 V8 : Node_Kind) return Boolean;
11566
ef76538f
AC
11567 function Nkind_In
11568 (T : Node_Kind;
11569 V1 : Node_Kind;
11570 V2 : Node_Kind;
11571 V3 : Node_Kind;
11572 V4 : Node_Kind;
11573 V5 : Node_Kind;
11574 V6 : Node_Kind;
11575 V7 : Node_Kind;
11576 V8 : Node_Kind;
11577 V9 : Node_Kind) return Boolean;
11578
8dce7371
PMR
11579 function Nkind_In
11580 (T : Node_Kind;
11581 V1 : Node_Kind;
11582 V2 : Node_Kind;
11583 V3 : Node_Kind;
11584 V4 : Node_Kind;
11585 V5 : Node_Kind;
11586 V6 : Node_Kind;
11587 V7 : Node_Kind;
11588 V8 : Node_Kind;
11589 V9 : Node_Kind;
11590 V10 : Node_Kind) return Boolean;
11591
11592 function Nkind_In
11593 (T : Node_Kind;
11594 V1 : Node_Kind;
11595 V2 : Node_Kind;
11596 V3 : Node_Kind;
11597 V4 : Node_Kind;
11598 V5 : Node_Kind;
11599 V6 : Node_Kind;
11600 V7 : Node_Kind;
11601 V8 : Node_Kind;
11602 V9 : Node_Kind;
11603 V10 : Node_Kind;
11604 V11 : Node_Kind) return Boolean;
11605
f18344b7
BD
11606 -- 12..15-parameter versions are not yet needed
11607
11608 function Nkind_In
11609 (T : Node_Kind;
11610 V1 : Node_Kind;
11611 V2 : Node_Kind;
11612 V3 : Node_Kind;
11613 V4 : Node_Kind;
11614 V5 : Node_Kind;
11615 V6 : Node_Kind;
11616 V7 : Node_Kind;
11617 V8 : Node_Kind;
11618 V9 : Node_Kind;
11619 V10 : Node_Kind;
11620 V11 : Node_Kind;
11621 V12 : Node_Kind;
11622 V13 : Node_Kind;
11623 V14 : Node_Kind;
11624 V15 : Node_Kind;
11625 V16 : Node_Kind) return Boolean;
11626
ac4d6407
RD
11627 pragma Inline (Nkind_In);
11628 -- Inline all above functions
11629
d9f86c0c
RD
11630 -----------------------
11631 -- Utility Functions --
11632 -----------------------
11633
0789ef6f
AC
11634 procedure Map_Pragma_Name (From, To : Name_Id);
11635 -- Used in the implementation of pragma Rename_Pragma. Maps pragma name
533e3abc
BD
11636 -- From to pragma name To, so From can be used as a synonym for To.
11637
11638 Too_Many_Pragma_Mappings : exception;
11639 -- Raised if Map_Pragma_Name is called too many times. We expect that few
11640 -- programs will use it at all, and those that do will use it approximately
11641 -- once or twice.
0789ef6f 11642
6e759c2a 11643 function Pragma_Name (N : Node_Id) return Name_Id;
e51102b2
AC
11644 -- Obtain the name of pragma N from the Chars field of its identifier. If
11645 -- the pragma has been renamed using Rename_Pragma, this routine returns
11646 -- the name of the renaming.
11647
11648 function Pragma_Name_Unmapped (N : Node_Id) return Name_Id;
11649 -- Obtain the name of pragma N from the Chars field of its identifier. This
11650 -- form of name extraction does not take into account renamings performed
11651 -- by Rename_Pragma.
ffa168bc 11652
e3da30b2
RD
11653 -----------------------------
11654 -- Syntactic Parent Tables --
11655 -----------------------------
11656
11657 -- These tables show for each node, and for each of the five fields,
11658 -- whether the corresponding field is syntactic (True) or semantic (False).
11659 -- Unused entries are also set to False.
11660
11661 subtype Field_Num is Natural range 1 .. 5;
11662
11663 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
11664
11665 -- Following entries can be built automatically from the sinfo sources
11666 -- using the makeisf utility (currently this program is in spitbol).
11667
11668 N_Identifier =>
11669 (1 => True, -- Chars (Name1)
11670 2 => False, -- Original_Discriminant (Node2-Sem)
11671 3 => False, -- unused
11672 4 => False, -- Entity (Node4-Sem)
11673 5 => False), -- Etype (Node5-Sem)
11674
11675 N_Integer_Literal =>
11676 (1 => False, -- unused
11677 2 => False, -- Original_Entity (Node2-Sem)
11678 3 => True, -- Intval (Uint3)
11679 4 => False, -- unused
11680 5 => False), -- Etype (Node5-Sem)
11681
11682 N_Real_Literal =>
11683 (1 => False, -- unused
11684 2 => False, -- Original_Entity (Node2-Sem)
11685 3 => True, -- Realval (Ureal3)
11686 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
11687 5 => False), -- Etype (Node5-Sem)
11688
11689 N_Character_Literal =>
11690 (1 => True, -- Chars (Name1)
11691 2 => True, -- Char_Literal_Value (Uint2)
11692 3 => False, -- unused
11693 4 => False, -- Entity (Node4-Sem)
11694 5 => False), -- Etype (Node5-Sem)
11695
11696 N_String_Literal =>
11697 (1 => False, -- unused
11698 2 => False, -- unused
11699 3 => True, -- Strval (Str3)
11700 4 => False, -- unused
11701 5 => False), -- Etype (Node5-Sem)
11702
11703 N_Pragma =>
21d27997 11704 (1 => False, -- Next_Pragma (Node1-Sem)
e3da30b2 11705 2 => True, -- Pragma_Argument_Associations (List2)
caf07df9 11706 3 => False, -- Corresponding_Aspect (Node3-Sem)
ac4d6407 11707 4 => True, -- Pragma_Identifier (Node4)
e3da30b2
RD
11708 5 => False), -- Next_Rep_Item (Node5-Sem)
11709
11710 N_Pragma_Argument_Association =>
11711 (1 => True, -- Chars (Name1)
f63d601b 11712 2 => False, -- Expression_Copy (Node2-Sem)
e3da30b2
RD
11713 3 => True, -- Expression (Node3)
11714 4 => False, -- unused
11715 5 => False), -- unused
11716
11717 N_Defining_Identifier =>
11718 (1 => True, -- Chars (Name1)
11719 2 => False, -- Next_Entity (Node2-Sem)
11720 3 => False, -- Scope (Node3-Sem)
11721 4 => False, -- unused
11722 5 => False), -- Etype (Node5-Sem)
11723
11724 N_Full_Type_Declaration =>
11725 (1 => True, -- Defining_Identifier (Node1)
daff5ab7 11726 2 => False, -- Incomplete_View (Node2-Sem)
e3da30b2
RD
11727 3 => True, -- Type_Definition (Node3)
11728 4 => True, -- Discriminant_Specifications (List4)
11729 5 => False), -- unused
11730
11731 N_Subtype_Declaration =>
11732 (1 => True, -- Defining_Identifier (Node1)
11733 2 => False, -- unused
11734 3 => False, -- unused
11735 4 => False, -- Generic_Parent_Type (Node4-Sem)
11736 5 => True), -- Subtype_Indication (Node5)
11737
11738 N_Subtype_Indication =>
11739 (1 => False, -- unused
11740 2 => False, -- unused
11741 3 => True, -- Constraint (Node3)
11742 4 => True, -- Subtype_Mark (Node4)
11743 5 => False), -- Etype (Node5-Sem)
11744
11745 N_Object_Declaration =>
11746 (1 => True, -- Defining_Identifier (Node1)
11747 2 => False, -- Handler_List_Entry (Node2-Sem)
11748 3 => True, -- Expression (Node3)
11749 4 => True, -- Object_Definition (Node4)
11750 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11751
11752 N_Number_Declaration =>
11753 (1 => True, -- Defining_Identifier (Node1)
11754 2 => False, -- unused
11755 3 => True, -- Expression (Node3)
11756 4 => False, -- unused
11757 5 => False), -- unused
11758
11759 N_Derived_Type_Definition =>
11760 (1 => False, -- unused
11761 2 => True, -- Interface_List (List2)
11762 3 => True, -- Record_Extension_Part (Node3)
11763 4 => False, -- unused
11764 5 => True), -- Subtype_Indication (Node5)
11765
11766 N_Range_Constraint =>
11767 (1 => False, -- unused
11768 2 => False, -- unused
11769 3 => False, -- unused
11770 4 => True, -- Range_Expression (Node4)
11771 5 => False), -- unused
11772
11773 N_Range =>
11774 (1 => True, -- Low_Bound (Node1)
11775 2 => True, -- High_Bound (Node2)
11776 3 => False, -- unused
11777 4 => False, -- unused
11778 5 => False), -- Etype (Node5-Sem)
11779
11780 N_Enumeration_Type_Definition =>
11781 (1 => True, -- Literals (List1)
11782 2 => False, -- unused
11783 3 => False, -- unused
11784 4 => True, -- End_Label (Node4)
11785 5 => False), -- unused
11786
11787 N_Defining_Character_Literal =>
11788 (1 => True, -- Chars (Name1)
11789 2 => False, -- Next_Entity (Node2-Sem)
11790 3 => False, -- Scope (Node3-Sem)
11791 4 => False, -- unused
11792 5 => False), -- Etype (Node5-Sem)
11793
11794 N_Signed_Integer_Type_Definition =>
11795 (1 => True, -- Low_Bound (Node1)
11796 2 => True, -- High_Bound (Node2)
11797 3 => False, -- unused
11798 4 => False, -- unused
11799 5 => False), -- unused
11800
11801 N_Modular_Type_Definition =>
11802 (1 => False, -- unused
11803 2 => False, -- unused
11804 3 => True, -- Expression (Node3)
11805 4 => False, -- unused
11806 5 => False), -- unused
11807
11808 N_Floating_Point_Definition =>
11809 (1 => False, -- unused
11810 2 => True, -- Digits_Expression (Node2)
11811 3 => False, -- unused
11812 4 => True, -- Real_Range_Specification (Node4)
11813 5 => False), -- unused
11814
11815 N_Real_Range_Specification =>
11816 (1 => True, -- Low_Bound (Node1)
11817 2 => True, -- High_Bound (Node2)
11818 3 => False, -- unused
11819 4 => False, -- unused
11820 5 => False), -- unused
11821
11822 N_Ordinary_Fixed_Point_Definition =>
11823 (1 => False, -- unused
11824 2 => False, -- unused
11825 3 => True, -- Delta_Expression (Node3)
11826 4 => True, -- Real_Range_Specification (Node4)
11827 5 => False), -- unused
11828
11829 N_Decimal_Fixed_Point_Definition =>
11830 (1 => False, -- unused
11831 2 => True, -- Digits_Expression (Node2)
11832 3 => True, -- Delta_Expression (Node3)
11833 4 => True, -- Real_Range_Specification (Node4)
11834 5 => False), -- unused
11835
11836 N_Digits_Constraint =>
11837 (1 => False, -- unused
11838 2 => True, -- Digits_Expression (Node2)
11839 3 => False, -- unused
11840 4 => True, -- Range_Constraint (Node4)
11841 5 => False), -- unused
11842
11843 N_Unconstrained_Array_Definition =>
11844 (1 => False, -- unused
11845 2 => True, -- Subtype_Marks (List2)
11846 3 => False, -- unused
11847 4 => True, -- Component_Definition (Node4)
11848 5 => False), -- unused
11849
11850 N_Constrained_Array_Definition =>
11851 (1 => False, -- unused
11852 2 => True, -- Discrete_Subtype_Definitions (List2)
11853 3 => False, -- unused
11854 4 => True, -- Component_Definition (Node4)
11855 5 => False), -- unused
11856
11857 N_Component_Definition =>
11858 (1 => False, -- unused
11859 2 => False, -- unused
11860 3 => True, -- Access_Definition (Node3)
11861 4 => False, -- unused
11862 5 => True), -- Subtype_Indication (Node5)
11863
11864 N_Discriminant_Specification =>
11865 (1 => True, -- Defining_Identifier (Node1)
11866 2 => False, -- unused
11867 3 => True, -- Expression (Node3)
11868 4 => False, -- unused
11869 5 => True), -- Discriminant_Type (Node5)
11870
11871 N_Index_Or_Discriminant_Constraint =>
11872 (1 => True, -- Constraints (List1)
11873 2 => False, -- unused
11874 3 => False, -- unused
11875 4 => False, -- unused
11876 5 => False), -- unused
11877
11878 N_Discriminant_Association =>
11879 (1 => True, -- Selector_Names (List1)
11880 2 => False, -- unused
11881 3 => True, -- Expression (Node3)
11882 4 => False, -- unused
11883 5 => False), -- unused
11884
11885 N_Record_Definition =>
11886 (1 => True, -- Component_List (Node1)
11887 2 => True, -- Interface_List (List2)
11888 3 => False, -- unused
11889 4 => True, -- End_Label (Node4)
11890 5 => False), -- unused
11891
11892 N_Component_List =>
11893 (1 => False, -- unused
11894 2 => False, -- unused
11895 3 => True, -- Component_Items (List3)
11896 4 => True, -- Variant_Part (Node4)
11897 5 => False), -- unused
11898
11899 N_Component_Declaration =>
11900 (1 => True, -- Defining_Identifier (Node1)
11901 2 => False, -- unused
11902 3 => True, -- Expression (Node3)
11903 4 => True, -- Component_Definition (Node4)
11904 5 => False), -- unused
11905
11906 N_Variant_Part =>
11907 (1 => True, -- Variants (List1)
11908 2 => True, -- Name (Node2)
11909 3 => False, -- unused
11910 4 => False, -- unused
11911 5 => False), -- unused
11912
11913 N_Variant =>
11914 (1 => True, -- Component_List (Node1)
11915 2 => False, -- Enclosing_Variant (Node2-Sem)
11916 3 => False, -- Present_Expr (Uint3-Sem)
11917 4 => True, -- Discrete_Choices (List4)
11918 5 => False), -- Dcheck_Function (Node5-Sem)
11919
11920 N_Others_Choice =>
11921 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11922 2 => False, -- unused
11923 3 => False, -- unused
11924 4 => False, -- unused
11925 5 => False), -- unused
11926
11927 N_Access_To_Object_Definition =>
11928 (1 => False, -- unused
11929 2 => False, -- unused
11930 3 => False, -- unused
11931 4 => False, -- unused
11932 5 => True), -- Subtype_Indication (Node5)
11933
11934 N_Access_Function_Definition =>
11935 (1 => False, -- unused
11936 2 => False, -- unused
11937 3 => True, -- Parameter_Specifications (List3)
11938 4 => True, -- Result_Definition (Node4)
11939 5 => False), -- unused
11940
11941 N_Access_Procedure_Definition =>
11942 (1 => False, -- unused
11943 2 => False, -- unused
11944 3 => True, -- Parameter_Specifications (List3)
11945 4 => False, -- unused
11946 5 => False), -- unused
11947
11948 N_Access_Definition =>
11949 (1 => False, -- unused
11950 2 => False, -- unused
11951 3 => True, -- Access_To_Subprogram_Definition (Node3)
11952 4 => True, -- Subtype_Mark (Node4)
11953 5 => False), -- unused
11954
11955 N_Incomplete_Type_Declaration =>
11956 (1 => True, -- Defining_Identifier (Node1)
11957 2 => False, -- unused
11958 3 => False, -- unused
11959 4 => True, -- Discriminant_Specifications (List4)
99d520ad 11960 5 => False), -- Premature_Use
e3da30b2
RD
11961
11962 N_Explicit_Dereference =>
11963 (1 => False, -- unused
11964 2 => False, -- unused
11965 3 => True, -- Prefix (Node3)
11966 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11967 5 => False), -- Etype (Node5-Sem)
11968
11969 N_Indexed_Component =>
11970 (1 => True, -- Expressions (List1)
11971 2 => False, -- unused
11972 3 => True, -- Prefix (Node3)
d3289ba2 11973 4 => False, -- Generalized_Indexing (Node4-Sem)
e3da30b2
RD
11974 5 => False), -- Etype (Node5-Sem)
11975
11976 N_Slice =>
11977 (1 => False, -- unused
11978 2 => False, -- unused
11979 3 => True, -- Prefix (Node3)
11980 4 => True, -- Discrete_Range (Node4)
11981 5 => False), -- Etype (Node5-Sem)
11982
11983 N_Selected_Component =>
11984 (1 => False, -- unused
11985 2 => True, -- Selector_Name (Node2)
11986 3 => True, -- Prefix (Node3)
11987 4 => False, -- unused
11988 5 => False), -- Etype (Node5-Sem)
11989
11990 N_Attribute_Reference =>
11991 (1 => True, -- Expressions (List1)
11992 2 => True, -- Attribute_Name (Name2)
11993 3 => True, -- Prefix (Node3)
11994 4 => False, -- Entity (Node4-Sem)
11995 5 => False), -- Etype (Node5-Sem)
11996
11997 N_Aggregate =>
11998 (1 => True, -- Expressions (List1)
11999 2 => True, -- Component_Associations (List2)
12000 3 => False, -- Aggregate_Bounds (Node3-Sem)
12001 4 => False, -- unused
12002 5 => False), -- Etype (Node5-Sem)
12003
12004 N_Component_Association =>
12005 (1 => True, -- Choices (List1)
12006 2 => False, -- Loop_Actions (List2-Sem)
12007 3 => True, -- Expression (Node3)
12008 4 => False, -- unused
12009 5 => False), -- unused
12010
a702c9b9
ES
12011 N_Iterated_Component_Association =>
12012 (1 => True, -- Defining_Identifier (Node1)
96cdd379 12013 2 => True, -- Loop_Actions (List2-Sem)
a702c9b9
ES
12014 3 => True, -- Expression (Node3)
12015 4 => True, -- Discrete_Choices (List4)
12016 5 => False), -- unused
12017
9eb8d5b4 12018 N_Delta_Aggregate =>
8dce7371 12019 (1 => False, -- Expressions (List1-Sem)
9eb8d5b4
AC
12020 2 => True, -- Component_Associations (List2)
12021 3 => True, -- Expression (Node3)
12022 4 => False, -- Unused
12023 5 => False), -- Etype (Node5-Sem)
12024
e3da30b2
RD
12025 N_Extension_Aggregate =>
12026 (1 => True, -- Expressions (List1)
12027 2 => True, -- Component_Associations (List2)
12028 3 => True, -- Ancestor_Part (Node3)
12029 4 => False, -- unused
12030 5 => False), -- Etype (Node5-Sem)
12031
12032 N_Null =>
12033 (1 => False, -- unused
12034 2 => False, -- unused
12035 3 => False, -- unused
12036 4 => False, -- unused
12037 5 => False), -- Etype (Node5-Sem)
12038
12039 N_And_Then =>
12040 (1 => False, -- Actions (List1-Sem)
12041 2 => True, -- Left_Opnd (Node2)
12042 3 => True, -- Right_Opnd (Node3)
12043 4 => False, -- unused
12044 5 => False), -- Etype (Node5-Sem)
12045
12046 N_Or_Else =>
12047 (1 => False, -- Actions (List1-Sem)
12048 2 => True, -- Left_Opnd (Node2)
12049 3 => True, -- Right_Opnd (Node3)
12050 4 => False, -- unused
12051 5 => False), -- Etype (Node5-Sem)
12052
12053 N_In =>
12054 (1 => False, -- unused
12055 2 => True, -- Left_Opnd (Node2)
12056 3 => True, -- Right_Opnd (Node3)
1629f700 12057 4 => True, -- Alternatives (List4)
e3da30b2
RD
12058 5 => False), -- Etype (Node5-Sem)
12059
12060 N_Not_In =>
12061 (1 => False, -- unused
12062 2 => True, -- Left_Opnd (Node2)
12063 3 => True, -- Right_Opnd (Node3)
1629f700 12064 4 => True, -- Alternatives (List4)
e3da30b2
RD
12065 5 => False), -- Etype (Node5-Sem)
12066
12067 N_Op_And =>
12068 (1 => True, -- Chars (Name1)
12069 2 => True, -- Left_Opnd (Node2)
12070 3 => True, -- Right_Opnd (Node3)
12071 4 => False, -- Entity (Node4-Sem)
12072 5 => False), -- Etype (Node5-Sem)
12073
12074 N_Op_Or =>
12075 (1 => True, -- Chars (Name1)
12076 2 => True, -- Left_Opnd (Node2)
12077 3 => True, -- Right_Opnd (Node3)
12078 4 => False, -- Entity (Node4-Sem)
12079 5 => False), -- Etype (Node5-Sem)
12080
12081 N_Op_Xor =>
12082 (1 => True, -- Chars (Name1)
12083 2 => True, -- Left_Opnd (Node2)
12084 3 => True, -- Right_Opnd (Node3)
12085 4 => False, -- Entity (Node4-Sem)
12086 5 => False), -- Etype (Node5-Sem)
12087
12088 N_Op_Eq =>
12089 (1 => True, -- Chars (Name1)
12090 2 => True, -- Left_Opnd (Node2)
12091 3 => True, -- Right_Opnd (Node3)
12092 4 => False, -- Entity (Node4-Sem)
12093 5 => False), -- Etype (Node5-Sem)
12094
12095 N_Op_Ne =>
12096 (1 => True, -- Chars (Name1)
12097 2 => True, -- Left_Opnd (Node2)
12098 3 => True, -- Right_Opnd (Node3)
12099 4 => False, -- Entity (Node4-Sem)
12100 5 => False), -- Etype (Node5-Sem)
12101
12102 N_Op_Lt =>
12103 (1 => True, -- Chars (Name1)
12104 2 => True, -- Left_Opnd (Node2)
12105 3 => True, -- Right_Opnd (Node3)
12106 4 => False, -- Entity (Node4-Sem)
12107 5 => False), -- Etype (Node5-Sem)
12108
12109 N_Op_Le =>
12110 (1 => True, -- Chars (Name1)
12111 2 => True, -- Left_Opnd (Node2)
12112 3 => True, -- Right_Opnd (Node3)
12113 4 => False, -- Entity (Node4-Sem)
12114 5 => False), -- Etype (Node5-Sem)
12115
12116 N_Op_Gt =>
12117 (1 => True, -- Chars (Name1)
12118 2 => True, -- Left_Opnd (Node2)
12119 3 => True, -- Right_Opnd (Node3)
12120 4 => False, -- Entity (Node4-Sem)
12121 5 => False), -- Etype (Node5-Sem)
12122
12123 N_Op_Ge =>
12124 (1 => True, -- Chars (Name1)
12125 2 => True, -- Left_Opnd (Node2)
12126 3 => True, -- Right_Opnd (Node3)
12127 4 => False, -- Entity (Node4-Sem)
12128 5 => False), -- Etype (Node5-Sem)
12129
12130 N_Op_Add =>
12131 (1 => True, -- Chars (Name1)
12132 2 => True, -- Left_Opnd (Node2)
12133 3 => True, -- Right_Opnd (Node3)
12134 4 => False, -- Entity (Node4-Sem)
12135 5 => False), -- Etype (Node5-Sem)
12136
12137 N_Op_Subtract =>
12138 (1 => True, -- Chars (Name1)
12139 2 => True, -- Left_Opnd (Node2)
12140 3 => True, -- Right_Opnd (Node3)
12141 4 => False, -- Entity (Node4-Sem)
12142 5 => False), -- Etype (Node5-Sem)
12143
12144 N_Op_Concat =>
12145 (1 => True, -- Chars (Name1)
12146 2 => True, -- Left_Opnd (Node2)
12147 3 => True, -- Right_Opnd (Node3)
12148 4 => False, -- Entity (Node4-Sem)
12149 5 => False), -- Etype (Node5-Sem)
12150
12151 N_Op_Multiply =>
12152 (1 => True, -- Chars (Name1)
12153 2 => True, -- Left_Opnd (Node2)
12154 3 => True, -- Right_Opnd (Node3)
12155 4 => False, -- Entity (Node4-Sem)
12156 5 => False), -- Etype (Node5-Sem)
12157
12158 N_Op_Divide =>
12159 (1 => True, -- Chars (Name1)
12160 2 => True, -- Left_Opnd (Node2)
12161 3 => True, -- Right_Opnd (Node3)
12162 4 => False, -- Entity (Node4-Sem)
12163 5 => False), -- Etype (Node5-Sem)
12164
12165 N_Op_Mod =>
12166 (1 => True, -- Chars (Name1)
12167 2 => True, -- Left_Opnd (Node2)
12168 3 => True, -- Right_Opnd (Node3)
12169 4 => False, -- Entity (Node4-Sem)
12170 5 => False), -- Etype (Node5-Sem)
12171
12172 N_Op_Rem =>
12173 (1 => True, -- Chars (Name1)
12174 2 => True, -- Left_Opnd (Node2)
12175 3 => True, -- Right_Opnd (Node3)
12176 4 => False, -- Entity (Node4-Sem)
12177 5 => False), -- Etype (Node5-Sem)
12178
12179 N_Op_Expon =>
12180 (1 => True, -- Chars (Name1)
12181 2 => True, -- Left_Opnd (Node2)
12182 3 => True, -- Right_Opnd (Node3)
12183 4 => False, -- Entity (Node4-Sem)
12184 5 => False), -- Etype (Node5-Sem)
12185
12186 N_Op_Plus =>
12187 (1 => True, -- Chars (Name1)
12188 2 => False, -- unused
12189 3 => True, -- Right_Opnd (Node3)
12190 4 => False, -- Entity (Node4-Sem)
12191 5 => False), -- Etype (Node5-Sem)
12192
12193 N_Op_Minus =>
12194 (1 => True, -- Chars (Name1)
12195 2 => False, -- unused
12196 3 => True, -- Right_Opnd (Node3)
12197 4 => False, -- Entity (Node4-Sem)
12198 5 => False), -- Etype (Node5-Sem)
12199
12200 N_Op_Abs =>
12201 (1 => True, -- Chars (Name1)
12202 2 => False, -- unused
12203 3 => True, -- Right_Opnd (Node3)
12204 4 => False, -- Entity (Node4-Sem)
12205 5 => False), -- Etype (Node5-Sem)
12206
12207 N_Op_Not =>
12208 (1 => True, -- Chars (Name1)
12209 2 => False, -- unused
12210 3 => True, -- Right_Opnd (Node3)
12211 4 => False, -- Entity (Node4-Sem)
12212 5 => False), -- Etype (Node5-Sem)
12213
12214 N_Type_Conversion =>
12215 (1 => False, -- unused
12216 2 => False, -- unused
12217 3 => True, -- Expression (Node3)
12218 4 => True, -- Subtype_Mark (Node4)
12219 5 => False), -- Etype (Node5-Sem)
12220
12221 N_Qualified_Expression =>
12222 (1 => False, -- unused
12223 2 => False, -- unused
12224 3 => True, -- Expression (Node3)
12225 4 => True, -- Subtype_Mark (Node4)
12226 5 => False), -- Etype (Node5-Sem)
12227
a961aa79
AC
12228 N_Quantified_Expression =>
12229 (1 => True, -- Condition (Node1)
8dce7371 12230 2 => True, -- Iterator_Specification (Node2)
a961aa79
AC
12231 3 => False, -- unused
12232 4 => True, -- Loop_Parameter_Specification (Node4)
12233 5 => False), -- Etype (Node5-Sem)
12234
e3da30b2
RD
12235 N_Allocator =>
12236 (1 => False, -- Storage_Pool (Node1-Sem)
12237 2 => False, -- Procedure_To_Call (Node2-Sem)
12238 3 => True, -- Expression (Node3)
d50f4827 12239 4 => True, -- Subpool_Handle_Name (Node4)
e3da30b2
RD
12240 5 => False), -- Etype (Node5-Sem)
12241
12242 N_Null_Statement =>
12243 (1 => False, -- unused
12244 2 => False, -- unused
12245 3 => False, -- unused
12246 4 => False, -- unused
12247 5 => False), -- unused
12248
12249 N_Label =>
12250 (1 => True, -- Identifier (Node1)
12251 2 => False, -- unused
12252 3 => False, -- unused
12253 4 => False, -- unused
12254 5 => False), -- unused
12255
12256 N_Assignment_Statement =>
12257 (1 => False, -- unused
12258 2 => True, -- Name (Node2)
12259 3 => True, -- Expression (Node3)
12260 4 => False, -- unused
12261 5 => False), -- unused
12262
ae33543c
ES
12263 N_Target_Name =>
12264 (1 => False, -- unused
12265 2 => False, -- unused
12266 3 => False, -- unused
12267 4 => False, -- unused
12268 5 => False), -- Etype (Node5-Sem)
12269
e3da30b2
RD
12270 N_If_Statement =>
12271 (1 => True, -- Condition (Node1)
12272 2 => True, -- Then_Statements (List2)
12273 3 => True, -- Elsif_Parts (List3)
12274 4 => True, -- Else_Statements (List4)
12275 5 => True), -- End_Span (Uint5)
12276
12277 N_Elsif_Part =>
12278 (1 => True, -- Condition (Node1)
12279 2 => True, -- Then_Statements (List2)
12280 3 => False, -- Condition_Actions (List3-Sem)
12281 4 => False, -- unused
12282 5 => False), -- unused
12283
19d846a0
RD
12284 N_Case_Expression =>
12285 (1 => False, -- unused
12286 2 => False, -- unused
12287 3 => True, -- Expression (Node3)
12288 4 => True, -- Alternatives (List4)
12289 5 => False), -- unused
12290
12291 N_Case_Expression_Alternative =>
12292 (1 => False, -- Actions (List1-Sem)
12293 2 => False, -- unused
cc3a2986
AC
12294 3 => True, -- Expression (Node3)
12295 4 => True, -- Discrete_Choices (List4)
19d846a0
RD
12296 5 => False), -- unused
12297
e3da30b2
RD
12298 N_Case_Statement =>
12299 (1 => False, -- unused
12300 2 => False, -- unused
12301 3 => True, -- Expression (Node3)
12302 4 => True, -- Alternatives (List4)
12303 5 => True), -- End_Span (Uint5)
12304
12305 N_Case_Statement_Alternative =>
12306 (1 => False, -- unused
12307 2 => False, -- unused
12308 3 => True, -- Statements (List3)
12309 4 => True, -- Discrete_Choices (List4)
12310 5 => False), -- unused
12311
12312 N_Loop_Statement =>
12313 (1 => True, -- Identifier (Node1)
12314 2 => True, -- Iteration_Scheme (Node2)
12315 3 => True, -- Statements (List3)
12316 4 => True, -- End_Label (Node4)
12317 5 => False), -- unused
12318
12319 N_Iteration_Scheme =>
12320 (1 => True, -- Condition (Node1)
57d62f0c 12321 2 => True, -- Iterator_Specification (Node2)
e3da30b2
RD
12322 3 => False, -- Condition_Actions (List3-Sem)
12323 4 => True, -- Loop_Parameter_Specification (Node4)
12324 5 => False), -- unused
12325
12326 N_Loop_Parameter_Specification =>
12327 (1 => True, -- Defining_Identifier (Node1)
12328 2 => False, -- unused
12329 3 => False, -- unused
12330 4 => True, -- Discrete_Subtype_Definition (Node4)
12331 5 => False), -- unused
12332
57d62f0c
AC
12333 N_Iterator_Specification =>
12334 (1 => True, -- Defining_Identifier (Node1)
12335 2 => True, -- Name (Node2)
12336 3 => False, -- Unused
12337 4 => False, -- Unused
12338 5 => True), -- Subtype_Indication (Node5)
12339
e3da30b2
RD
12340 N_Block_Statement =>
12341 (1 => True, -- Identifier (Node1)
12342 2 => True, -- Declarations (List2)
12343 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12344 4 => True, -- Handled_Statement_Sequence (Node4)
12345 5 => False), -- unused
12346
12347 N_Exit_Statement =>
12348 (1 => True, -- Condition (Node1)
12349 2 => True, -- Name (Node2)
12350 3 => False, -- unused
12351 4 => False, -- unused
12352 5 => False), -- unused
12353
12354 N_Goto_Statement =>
12355 (1 => False, -- unused
12356 2 => True, -- Name (Node2)
12357 3 => False, -- unused
12358 4 => False, -- unused
12359 5 => False), -- unused
12360
12361 N_Subprogram_Declaration =>
12362 (1 => True, -- Specification (Node1)
12363 2 => False, -- unused
12364 3 => False, -- Body_To_Inline (Node3-Sem)
12365 4 => False, -- Parent_Spec (Node4-Sem)
12366 5 => False), -- Corresponding_Body (Node5-Sem)
12367
12368 N_Abstract_Subprogram_Declaration =>
12369 (1 => True, -- Specification (Node1)
12370 2 => False, -- unused
12371 3 => False, -- unused
12372 4 => False, -- unused
12373 5 => False), -- unused
12374
12375 N_Function_Specification =>
12376 (1 => True, -- Defining_Unit_Name (Node1)
b04d926e 12377 2 => False, -- unused
e3da30b2
RD
12378 3 => True, -- Parameter_Specifications (List3)
12379 4 => True, -- Result_Definition (Node4)
12380 5 => False), -- Generic_Parent (Node5-Sem)
12381
12382 N_Procedure_Specification =>
12383 (1 => True, -- Defining_Unit_Name (Node1)
b912db16 12384 2 => False, -- Null_Statement (Node2-Sem)
e3da30b2
RD
12385 3 => True, -- Parameter_Specifications (List3)
12386 4 => False, -- unused
12387 5 => False), -- Generic_Parent (Node5-Sem)
12388
12389 N_Designator =>
12390 (1 => True, -- Identifier (Node1)
12391 2 => True, -- Name (Node2)
12392 3 => False, -- unused
12393 4 => False, -- unused
12394 5 => False), -- unused
12395
12396 N_Defining_Program_Unit_Name =>
12397 (1 => True, -- Defining_Identifier (Node1)
12398 2 => True, -- Name (Node2)
12399 3 => False, -- unused
12400 4 => False, -- unused
12401 5 => False), -- unused
12402
12403 N_Operator_Symbol =>
12404 (1 => True, -- Chars (Name1)
12405 2 => False, -- unused
12406 3 => True, -- Strval (Str3)
12407 4 => False, -- Entity (Node4-Sem)
12408 5 => False), -- Etype (Node5-Sem)
12409
12410 N_Defining_Operator_Symbol =>
12411 (1 => True, -- Chars (Name1)
12412 2 => False, -- Next_Entity (Node2-Sem)
12413 3 => False, -- Scope (Node3-Sem)
12414 4 => False, -- unused
12415 5 => False), -- Etype (Node5-Sem)
12416
12417 N_Parameter_Specification =>
12418 (1 => True, -- Defining_Identifier (Node1)
12419 2 => True, -- Parameter_Type (Node2)
12420 3 => True, -- Expression (Node3)
12421 4 => False, -- unused
12422 5 => False), -- Default_Expression (Node5-Sem)
12423
12424 N_Subprogram_Body =>
12425 (1 => True, -- Specification (Node1)
12426 2 => True, -- Declarations (List2)
12427 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12428 4 => True, -- Handled_Statement_Sequence (Node4)
12429 5 => False), -- Corresponding_Spec (Node5-Sem)
12430
b0186f71 12431 N_Expression_Function =>
ad110ee8
RD
12432 (1 => True, -- Specification (Node1)
12433 2 => False, -- unused
12434 3 => True, -- Expression (Node3)
12435 4 => False, -- unused
12436 5 => False), -- unused
12437
e3da30b2
RD
12438 N_Procedure_Call_Statement =>
12439 (1 => False, -- Controlling_Argument (Node1-Sem)
12440 2 => True, -- Name (Node2)
12441 3 => True, -- Parameter_Associations (List3)
12442 4 => False, -- First_Named_Actual (Node4-Sem)
12443 5 => False), -- Etype (Node5-Sem)
12444
12445 N_Function_Call =>
12446 (1 => False, -- Controlling_Argument (Node1-Sem)
12447 2 => True, -- Name (Node2)
12448 3 => True, -- Parameter_Associations (List3)
12449 4 => False, -- First_Named_Actual (Node4-Sem)
12450 5 => False), -- Etype (Node5-Sem)
12451
12452 N_Parameter_Association =>
12453 (1 => False, -- unused
12454 2 => True, -- Selector_Name (Node2)
12455 3 => True, -- Explicit_Actual_Parameter (Node3)
12456 4 => False, -- Next_Named_Actual (Node4-Sem)
12457 5 => False), -- unused
12458
92a7cd46 12459 N_Simple_Return_Statement =>
e3da30b2
RD
12460 (1 => False, -- Storage_Pool (Node1-Sem)
12461 2 => False, -- Procedure_To_Call (Node2-Sem)
12462 3 => True, -- Expression (Node3)
12463 4 => False, -- unused
12464 5 => False), -- Return_Statement_Entity (Node5-Sem)
12465
12466 N_Extended_Return_Statement =>
12467 (1 => False, -- Storage_Pool (Node1-Sem)
12468 2 => False, -- Procedure_To_Call (Node2-Sem)
12469 3 => True, -- Return_Object_Declarations (List3)
12470 4 => True, -- Handled_Statement_Sequence (Node4)
12471 5 => False), -- Return_Statement_Entity (Node5-Sem)
12472
12473 N_Package_Declaration =>
12474 (1 => True, -- Specification (Node1)
12475 2 => False, -- unused
12476 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12477 4 => False, -- Parent_Spec (Node4-Sem)
12478 5 => False), -- Corresponding_Body (Node5-Sem)
12479
12480 N_Package_Specification =>
12481 (1 => True, -- Defining_Unit_Name (Node1)
12482 2 => True, -- Visible_Declarations (List2)
12483 3 => True, -- Private_Declarations (List3)
12484 4 => True, -- End_Label (Node4)
12485 5 => False), -- Generic_Parent (Node5-Sem)
12486
12487 N_Package_Body =>
12488 (1 => True, -- Defining_Unit_Name (Node1)
12489 2 => True, -- Declarations (List2)
12490 3 => False, -- unused
12491 4 => True, -- Handled_Statement_Sequence (Node4)
12492 5 => False), -- Corresponding_Spec (Node5-Sem)
12493
12494 N_Private_Type_Declaration =>
12495 (1 => True, -- Defining_Identifier (Node1)
12496 2 => False, -- unused
12497 3 => False, -- unused
12498 4 => True, -- Discriminant_Specifications (List4)
12499 5 => False), -- unused
12500
12501 N_Private_Extension_Declaration =>
12502 (1 => True, -- Defining_Identifier (Node1)
12503 2 => True, -- Interface_List (List2)
12504 3 => False, -- unused
12505 4 => True, -- Discriminant_Specifications (List4)
12506 5 => True), -- Subtype_Indication (Node5)
12507
12508 N_Use_Package_Clause =>
851e9f19
PMR
12509 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12510 2 => True, -- Name (Node2)
e3da30b2 12511 3 => False, -- Next_Use_Clause (Node3-Sem)
851e9f19
PMR
12512 4 => False, -- Associated_Node (Node4-Sem)
12513 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
e3da30b2
RD
12514
12515 N_Use_Type_Clause =>
851e9f19
PMR
12516 (1 => False, -- Prev_Use_Clause (Node1-Sem)
12517 2 => False, -- Used_Operations (Elist2-Sem)
e3da30b2 12518 3 => False, -- Next_Use_Clause (Node3-Sem)
851e9f19
PMR
12519 4 => True, -- Subtype_Mark (Node4)
12520 5 => False), -- Hidden_By_Use_Clause (Elist5-Sem)
e3da30b2
RD
12521
12522 N_Object_Renaming_Declaration =>
12523 (1 => True, -- Defining_Identifier (Node1)
12524 2 => True, -- Name (Node2)
12525 3 => True, -- Access_Definition (Node3)
12526 4 => True, -- Subtype_Mark (Node4)
12527 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
12528
12529 N_Exception_Renaming_Declaration =>
12530 (1 => True, -- Defining_Identifier (Node1)
12531 2 => True, -- Name (Node2)
12532 3 => False, -- unused
12533 4 => False, -- unused
12534 5 => False), -- unused
12535
12536 N_Package_Renaming_Declaration =>
12537 (1 => True, -- Defining_Unit_Name (Node1)
12538 2 => True, -- Name (Node2)
12539 3 => False, -- unused
12540 4 => False, -- Parent_Spec (Node4-Sem)
12541 5 => False), -- unused
12542
12543 N_Subprogram_Renaming_Declaration =>
12544 (1 => True, -- Specification (Node1)
12545 2 => True, -- Name (Node2)
12546 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
12547 4 => False, -- Parent_Spec (Node4-Sem)
12548 5 => False), -- Corresponding_Spec (Node5-Sem)
12549
12550 N_Generic_Package_Renaming_Declaration =>
12551 (1 => True, -- Defining_Unit_Name (Node1)
12552 2 => True, -- Name (Node2)
12553 3 => False, -- unused
12554 4 => False, -- Parent_Spec (Node4-Sem)
12555 5 => False), -- unused
12556
12557 N_Generic_Procedure_Renaming_Declaration =>
12558 (1 => True, -- Defining_Unit_Name (Node1)
12559 2 => True, -- Name (Node2)
12560 3 => False, -- unused
12561 4 => False, -- Parent_Spec (Node4-Sem)
12562 5 => False), -- unused
12563
12564 N_Generic_Function_Renaming_Declaration =>
12565 (1 => True, -- Defining_Unit_Name (Node1)
12566 2 => True, -- Name (Node2)
12567 3 => False, -- unused
12568 4 => False, -- Parent_Spec (Node4-Sem)
12569 5 => False), -- unused
12570
12571 N_Task_Type_Declaration =>
12572 (1 => True, -- Defining_Identifier (Node1)
12573 2 => True, -- Interface_List (List2)
12574 3 => True, -- Task_Definition (Node3)
12575 4 => True, -- Discriminant_Specifications (List4)
12576 5 => False), -- Corresponding_Body (Node5-Sem)
12577
12578 N_Single_Task_Declaration =>
12579 (1 => True, -- Defining_Identifier (Node1)
12580 2 => True, -- Interface_List (List2)
12581 3 => True, -- Task_Definition (Node3)
12582 4 => False, -- unused
12583 5 => False), -- unused
12584
12585 N_Task_Definition =>
12586 (1 => False, -- unused
12587 2 => True, -- Visible_Declarations (List2)
12588 3 => True, -- Private_Declarations (List3)
12589 4 => True, -- End_Label (Node4)
12590 5 => False), -- unused
12591
12592 N_Task_Body =>
12593 (1 => True, -- Defining_Identifier (Node1)
12594 2 => True, -- Declarations (List2)
12595 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12596 4 => True, -- Handled_Statement_Sequence (Node4)
12597 5 => False), -- Corresponding_Spec (Node5-Sem)
12598
12599 N_Protected_Type_Declaration =>
12600 (1 => True, -- Defining_Identifier (Node1)
12601 2 => True, -- Interface_List (List2)
12602 3 => True, -- Protected_Definition (Node3)
12603 4 => True, -- Discriminant_Specifications (List4)
12604 5 => False), -- Corresponding_Body (Node5-Sem)
12605
12606 N_Single_Protected_Declaration =>
12607 (1 => True, -- Defining_Identifier (Node1)
12608 2 => True, -- Interface_List (List2)
12609 3 => True, -- Protected_Definition (Node3)
12610 4 => False, -- unused
12611 5 => False), -- unused
12612
12613 N_Protected_Definition =>
12614 (1 => False, -- unused
12615 2 => True, -- Visible_Declarations (List2)
12616 3 => True, -- Private_Declarations (List3)
12617 4 => True, -- End_Label (Node4)
12618 5 => False), -- unused
12619
12620 N_Protected_Body =>
12621 (1 => True, -- Defining_Identifier (Node1)
12622 2 => True, -- Declarations (List2)
12623 3 => False, -- unused
12624 4 => True, -- End_Label (Node4)
12625 5 => False), -- Corresponding_Spec (Node5-Sem)
12626
12627 N_Entry_Declaration =>
12628 (1 => True, -- Defining_Identifier (Node1)
12629 2 => False, -- unused
12630 3 => True, -- Parameter_Specifications (List3)
12631 4 => True, -- Discrete_Subtype_Definition (Node4)
12632 5 => False), -- Corresponding_Body (Node5-Sem)
12633
12634 N_Accept_Statement =>
12635 (1 => True, -- Entry_Direct_Name (Node1)
12636 2 => True, -- Declarations (List2)
12637 3 => True, -- Parameter_Specifications (List3)
12638 4 => True, -- Handled_Statement_Sequence (Node4)
12639 5 => True), -- Entry_Index (Node5)
12640
12641 N_Entry_Body =>
12642 (1 => True, -- Defining_Identifier (Node1)
12643 2 => True, -- Declarations (List2)
12644 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12645 4 => True, -- Handled_Statement_Sequence (Node4)
12646 5 => True), -- Entry_Body_Formal_Part (Node5)
12647
12648 N_Entry_Body_Formal_Part =>
12649 (1 => True, -- Condition (Node1)
12650 2 => False, -- unused
12651 3 => True, -- Parameter_Specifications (List3)
12652 4 => True, -- Entry_Index_Specification (Node4)
12653 5 => False), -- unused
12654
12655 N_Entry_Index_Specification =>
12656 (1 => True, -- Defining_Identifier (Node1)
12657 2 => False, -- unused
12658 3 => False, -- unused
12659 4 => True, -- Discrete_Subtype_Definition (Node4)
12660 5 => False), -- unused
12661
12662 N_Entry_Call_Statement =>
12663 (1 => False, -- unused
12664 2 => True, -- Name (Node2)
12665 3 => True, -- Parameter_Associations (List3)
12666 4 => False, -- First_Named_Actual (Node4-Sem)
12667 5 => False), -- unused
12668
12669 N_Requeue_Statement =>
12670 (1 => False, -- unused
12671 2 => True, -- Name (Node2)
12672 3 => False, -- unused
12673 4 => False, -- unused
12674 5 => False), -- unused
12675
12676 N_Delay_Until_Statement =>
12677 (1 => False, -- unused
12678 2 => False, -- unused
12679 3 => True, -- Expression (Node3)
12680 4 => False, -- unused
12681 5 => False), -- unused
12682
12683 N_Delay_Relative_Statement =>
12684 (1 => False, -- unused
12685 2 => False, -- unused
12686 3 => True, -- Expression (Node3)
12687 4 => False, -- unused
12688 5 => False), -- unused
12689
12690 N_Selective_Accept =>
12691 (1 => True, -- Select_Alternatives (List1)
12692 2 => False, -- unused
12693 3 => False, -- unused
12694 4 => True, -- Else_Statements (List4)
12695 5 => False), -- unused
12696
12697 N_Accept_Alternative =>
12698 (1 => True, -- Condition (Node1)
12699 2 => True, -- Accept_Statement (Node2)
12700 3 => True, -- Statements (List3)
12701 4 => True, -- Pragmas_Before (List4)
12702 5 => False), -- Accept_Handler_Records (List5-Sem)
12703
12704 N_Delay_Alternative =>
12705 (1 => True, -- Condition (Node1)
12706 2 => True, -- Delay_Statement (Node2)
12707 3 => True, -- Statements (List3)
12708 4 => True, -- Pragmas_Before (List4)
12709 5 => False), -- unused
12710
12711 N_Terminate_Alternative =>
12712 (1 => True, -- Condition (Node1)
12713 2 => False, -- unused
12714 3 => False, -- unused
12715 4 => True, -- Pragmas_Before (List4)
12716 5 => True), -- Pragmas_After (List5)
12717
12718 N_Timed_Entry_Call =>
12719 (1 => True, -- Entry_Call_Alternative (Node1)
12720 2 => False, -- unused
12721 3 => False, -- unused
12722 4 => True, -- Delay_Alternative (Node4)
12723 5 => False), -- unused
12724
12725 N_Entry_Call_Alternative =>
12726 (1 => True, -- Entry_Call_Statement (Node1)
12727 2 => False, -- unused
12728 3 => True, -- Statements (List3)
12729 4 => True, -- Pragmas_Before (List4)
12730 5 => False), -- unused
12731
12732 N_Conditional_Entry_Call =>
12733 (1 => True, -- Entry_Call_Alternative (Node1)
12734 2 => False, -- unused
12735 3 => False, -- unused
12736 4 => True, -- Else_Statements (List4)
12737 5 => False), -- unused
12738
12739 N_Asynchronous_Select =>
12740 (1 => True, -- Triggering_Alternative (Node1)
12741 2 => True, -- Abortable_Part (Node2)
12742 3 => False, -- unused
12743 4 => False, -- unused
12744 5 => False), -- unused
12745
12746 N_Triggering_Alternative =>
12747 (1 => True, -- Triggering_Statement (Node1)
12748 2 => False, -- unused
12749 3 => True, -- Statements (List3)
12750 4 => True, -- Pragmas_Before (List4)
12751 5 => False), -- unused
12752
12753 N_Abortable_Part =>
12754 (1 => False, -- unused
12755 2 => False, -- unused
12756 3 => True, -- Statements (List3)
12757 4 => False, -- unused
12758 5 => False), -- unused
12759
12760 N_Abort_Statement =>
12761 (1 => False, -- unused
12762 2 => True, -- Names (List2)
12763 3 => False, -- unused
12764 4 => False, -- unused
12765 5 => False), -- unused
12766
12767 N_Compilation_Unit =>
12768 (1 => True, -- Context_Items (List1)
12769 2 => True, -- Unit (Node2)
12770 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
12771 4 => False, -- Library_Unit (Node4-Sem)
12772 5 => True), -- Aux_Decls_Node (Node5)
12773
12774 N_Compilation_Unit_Aux =>
12775 (1 => True, -- Actions (List1)
12776 2 => True, -- Declarations (List2)
fab2daeb 12777 3 => False, -- Default_Storage_Pool (Node3)
e3da30b2
RD
12778 4 => True, -- Config_Pragmas (List4)
12779 5 => True), -- Pragmas_After (List5)
12780
12781 N_With_Clause =>
12782 (1 => False, -- unused
12783 2 => True, -- Name (Node2)
12784 3 => False, -- unused
12785 4 => False, -- Library_Unit (Node4-Sem)
12786 5 => False), -- Corresponding_Spec (Node5-Sem)
12787
e3da30b2
RD
12788 N_Subprogram_Body_Stub =>
12789 (1 => True, -- Specification (Node1)
e28072cd 12790 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
e3da30b2
RD
12791 3 => False, -- unused
12792 4 => False, -- Library_Unit (Node4-Sem)
12793 5 => False), -- Corresponding_Body (Node5-Sem)
12794
12795 N_Package_Body_Stub =>
12796 (1 => True, -- Defining_Identifier (Node1)
e28072cd 12797 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
e3da30b2
RD
12798 3 => False, -- unused
12799 4 => False, -- Library_Unit (Node4-Sem)
12800 5 => False), -- Corresponding_Body (Node5-Sem)
12801
12802 N_Task_Body_Stub =>
12803 (1 => True, -- Defining_Identifier (Node1)
e28072cd 12804 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
e3da30b2
RD
12805 3 => False, -- unused
12806 4 => False, -- Library_Unit (Node4-Sem)
12807 5 => False), -- Corresponding_Body (Node5-Sem)
12808
12809 N_Protected_Body_Stub =>
12810 (1 => True, -- Defining_Identifier (Node1)
e28072cd 12811 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
e3da30b2
RD
12812 3 => False, -- unused
12813 4 => False, -- Library_Unit (Node4-Sem)
12814 5 => False), -- Corresponding_Body (Node5-Sem)
12815
12816 N_Subunit =>
12817 (1 => True, -- Proper_Body (Node1)
12818 2 => True, -- Name (Node2)
12819 3 => False, -- Corresponding_Stub (Node3-Sem)
12820 4 => False, -- unused
12821 5 => False), -- unused
12822
12823 N_Exception_Declaration =>
12824 (1 => True, -- Defining_Identifier (Node1)
12825 2 => False, -- unused
12826 3 => False, -- Expression (Node3-Sem)
12827 4 => False, -- unused
12828 5 => False), -- unused
12829
12830 N_Handled_Sequence_Of_Statements =>
12831 (1 => True, -- At_End_Proc (Node1)
12832 2 => False, -- First_Real_Statement (Node2-Sem)
12833 3 => True, -- Statements (List3)
12834 4 => True, -- End_Label (Node4)
12835 5 => True), -- Exception_Handlers (List5)
12836
12837 N_Exception_Handler =>
f28573f4 12838 (1 => False, -- Local_Raise_Statements (Elist1)
e3da30b2
RD
12839 2 => True, -- Choice_Parameter (Node2)
12840 3 => True, -- Statements (List3)
12841 4 => True, -- Exception_Choices (List4)
f28573f4 12842 5 => False), -- Exception_Label (Node5)
e3da30b2
RD
12843
12844 N_Raise_Statement =>
12845 (1 => False, -- unused
12846 2 => True, -- Name (Node2)
12847 3 => True, -- Expression (Node3)
12848 4 => False, -- unused
12849 5 => False), -- unused
12850
c8d63650
RD
12851 N_Raise_Expression =>
12852 (1 => False, -- unused
12853 2 => True, -- Name (Node2)
12854 3 => True, -- Expression (Node3)
12855 4 => False, -- unused
12856 5 => False), -- Etype (Node5-Sem)
12857
e3da30b2
RD
12858 N_Generic_Subprogram_Declaration =>
12859 (1 => True, -- Specification (Node1)
12860 2 => True, -- Generic_Formal_Declarations (List2)
12861 3 => False, -- unused
12862 4 => False, -- Parent_Spec (Node4-Sem)
12863 5 => False), -- Corresponding_Body (Node5-Sem)
12864
12865 N_Generic_Package_Declaration =>
12866 (1 => True, -- Specification (Node1)
12867 2 => True, -- Generic_Formal_Declarations (List2)
12868 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12869 4 => False, -- Parent_Spec (Node4-Sem)
12870 5 => False), -- Corresponding_Body (Node5-Sem)
12871
12872 N_Package_Instantiation =>
12873 (1 => True, -- Defining_Unit_Name (Node1)
12874 2 => True, -- Name (Node2)
12875 3 => True, -- Generic_Associations (List3)
12876 4 => False, -- Parent_Spec (Node4-Sem)
12877 5 => False), -- Instance_Spec (Node5-Sem)
12878
12879 N_Procedure_Instantiation =>
12880 (1 => True, -- Defining_Unit_Name (Node1)
12881 2 => True, -- Name (Node2)
12882 3 => True, -- Generic_Associations (List3)
12883 4 => False, -- Parent_Spec (Node4-Sem)
12884 5 => False), -- Instance_Spec (Node5-Sem)
12885
12886 N_Function_Instantiation =>
12887 (1 => True, -- Defining_Unit_Name (Node1)
12888 2 => True, -- Name (Node2)
12889 3 => True, -- Generic_Associations (List3)
12890 4 => False, -- Parent_Spec (Node4-Sem)
12891 5 => False), -- Instance_Spec (Node5-Sem)
12892
12893 N_Generic_Association =>
12894 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12895 2 => True, -- Selector_Name (Node2)
12896 3 => False, -- unused
12897 4 => False, -- unused
12898 5 => False), -- unused
12899
12900 N_Formal_Object_Declaration =>
12901 (1 => True, -- Defining_Identifier (Node1)
12902 2 => False, -- unused
12903 3 => True, -- Access_Definition (Node3)
12904 4 => True, -- Subtype_Mark (Node4)
12905 5 => True), -- Default_Expression (Node5)
12906
12907 N_Formal_Type_Declaration =>
12908 (1 => True, -- Defining_Identifier (Node1)
12909 2 => False, -- unused
12910 3 => True, -- Formal_Type_Definition (Node3)
12911 4 => True, -- Discriminant_Specifications (List4)
12912 5 => False), -- unused
12913
12914 N_Formal_Private_Type_Definition =>
12915 (1 => False, -- unused
12916 2 => False, -- unused
12917 3 => False, -- unused
12918 4 => False, -- unused
12919 5 => False), -- unused
12920
d3cb4cc0
AC
12921 N_Formal_Incomplete_Type_Definition =>
12922 (1 => False, -- unused
12923 2 => False, -- unused
12924 3 => False, -- unused
12925 4 => False, -- unused
12926 5 => False), -- unused
12927
e3da30b2
RD
12928 N_Formal_Derived_Type_Definition =>
12929 (1 => False, -- unused
12930 2 => True, -- Interface_List (List2)
12931 3 => False, -- unused
12932 4 => True, -- Subtype_Mark (Node4)
12933 5 => False), -- unused
12934
12935 N_Formal_Discrete_Type_Definition =>
12936 (1 => False, -- unused
12937 2 => False, -- unused
12938 3 => False, -- unused
12939 4 => False, -- unused
12940 5 => False), -- unused
12941
12942 N_Formal_Signed_Integer_Type_Definition =>
12943 (1 => False, -- unused
12944 2 => False, -- unused
12945 3 => False, -- unused
12946 4 => False, -- unused
12947 5 => False), -- unused
12948
12949 N_Formal_Modular_Type_Definition =>
12950 (1 => False, -- unused
12951 2 => False, -- unused
12952 3 => False, -- unused
12953 4 => False, -- unused
12954 5 => False), -- unused
12955
12956 N_Formal_Floating_Point_Definition =>
12957 (1 => False, -- unused
12958 2 => False, -- unused
12959 3 => False, -- unused
12960 4 => False, -- unused
12961 5 => False), -- unused
12962
12963 N_Formal_Ordinary_Fixed_Point_Definition =>
12964 (1 => False, -- unused
12965 2 => False, -- unused
12966 3 => False, -- unused
12967 4 => False, -- unused
12968 5 => False), -- unused
12969
12970 N_Formal_Decimal_Fixed_Point_Definition =>
12971 (1 => False, -- unused
12972 2 => False, -- unused
12973 3 => False, -- unused
12974 4 => False, -- unused
12975 5 => False), -- unused
12976
12977 N_Formal_Concrete_Subprogram_Declaration =>
12978 (1 => True, -- Specification (Node1)
12979 2 => True, -- Default_Name (Node2)
12980 3 => False, -- unused
12981 4 => False, -- unused
12982 5 => False), -- unused
12983
12984 N_Formal_Abstract_Subprogram_Declaration =>
12985 (1 => True, -- Specification (Node1)
12986 2 => True, -- Default_Name (Node2)
12987 3 => False, -- unused
12988 4 => False, -- unused
12989 5 => False), -- unused
12990
12991 N_Formal_Package_Declaration =>
12992 (1 => True, -- Defining_Identifier (Node1)
12993 2 => True, -- Name (Node2)
12994 3 => True, -- Generic_Associations (List3)
12995 4 => False, -- unused
12996 5 => False), -- Instance_Spec (Node5-Sem)
12997
12998 N_Attribute_Definition_Clause =>
12999 (1 => True, -- Chars (Name1)
13000 2 => True, -- Name (Node2)
13001 3 => True, -- Expression (Node3)
13002 4 => False, -- unused
13003 5 => False), -- Next_Rep_Item (Node5-Sem)
13004
313d6f2c
AC
13005 N_Aspect_Specification =>
13006 (1 => True, -- Identifier (Node1)
c159409f 13007 2 => False, -- Aspect_Rep_Item (Node2-Sem)
313d6f2c 13008 3 => True, -- Expression (Node3)
c159409f
AC
13009 4 => False, -- Entity (Node4-Sem)
13010 5 => False), -- Next_Rep_Item (Node5-Sem)
313d6f2c 13011
e3da30b2
RD
13012 N_Enumeration_Representation_Clause =>
13013 (1 => True, -- Identifier (Node1)
13014 2 => False, -- unused
13015 3 => True, -- Array_Aggregate (Node3)
13016 4 => False, -- unused
13017 5 => False), -- Next_Rep_Item (Node5-Sem)
13018
13019 N_Record_Representation_Clause =>
13020 (1 => True, -- Identifier (Node1)
13021 2 => True, -- Mod_Clause (Node2)
13022 3 => True, -- Component_Clauses (List3)
13023 4 => False, -- unused
13024 5 => False), -- Next_Rep_Item (Node5-Sem)
13025
13026 N_Component_Clause =>
13027 (1 => True, -- Component_Name (Node1)
13028 2 => True, -- Position (Node2)
13029 3 => True, -- First_Bit (Node3)
13030 4 => True, -- Last_Bit (Node4)
13031 5 => False), -- unused
13032
13033 N_Code_Statement =>
13034 (1 => False, -- unused
13035 2 => False, -- unused
13036 3 => True, -- Expression (Node3)
13037 4 => False, -- unused
13038 5 => False), -- unused
13039
13040 N_Op_Rotate_Left =>
13041 (1 => True, -- Chars (Name1)
13042 2 => True, -- Left_Opnd (Node2)
13043 3 => True, -- Right_Opnd (Node3)
13044 4 => False, -- Entity (Node4-Sem)
13045 5 => False), -- Etype (Node5-Sem)
13046
13047 N_Op_Rotate_Right =>
13048 (1 => True, -- Chars (Name1)
13049 2 => True, -- Left_Opnd (Node2)
13050 3 => True, -- Right_Opnd (Node3)
13051 4 => False, -- Entity (Node4-Sem)
13052 5 => False), -- Etype (Node5-Sem)
13053
13054 N_Op_Shift_Left =>
13055 (1 => True, -- Chars (Name1)
13056 2 => True, -- Left_Opnd (Node2)
13057 3 => True, -- Right_Opnd (Node3)
13058 4 => False, -- Entity (Node4-Sem)
13059 5 => False), -- Etype (Node5-Sem)
13060
13061 N_Op_Shift_Right_Arithmetic =>
13062 (1 => True, -- Chars (Name1)
13063 2 => True, -- Left_Opnd (Node2)
13064 3 => True, -- Right_Opnd (Node3)
13065 4 => False, -- Entity (Node4-Sem)
13066 5 => False), -- Etype (Node5-Sem)
13067
13068 N_Op_Shift_Right =>
13069 (1 => True, -- Chars (Name1)
13070 2 => True, -- Left_Opnd (Node2)
13071 3 => True, -- Right_Opnd (Node3)
13072 4 => False, -- Entity (Node4-Sem)
13073 5 => False), -- Etype (Node5-Sem)
13074
13075 N_Delta_Constraint =>
13076 (1 => False, -- unused
13077 2 => False, -- unused
13078 3 => True, -- Delta_Expression (Node3)
13079 4 => True, -- Range_Constraint (Node4)
13080 5 => False), -- unused
13081
13082 N_At_Clause =>
13083 (1 => True, -- Identifier (Node1)
13084 2 => False, -- unused
13085 3 => True, -- Expression (Node3)
13086 4 => False, -- unused
13087 5 => False), -- unused
13088
13089 N_Mod_Clause =>
13090 (1 => False, -- unused
13091 2 => False, -- unused
13092 3 => True, -- Expression (Node3)
13093 4 => True, -- Pragmas_Before (List4)
13094 5 => False), -- unused
13095
9b16cb57 13096 N_If_Expression =>
e3da30b2
RD
13097 (1 => True, -- Expressions (List1)
13098 2 => False, -- Then_Actions (List2-Sem)
13099 3 => False, -- Else_Actions (List3-Sem)
13100 4 => False, -- unused
13101 5 => False), -- Etype (Node5-Sem)
13102
2ffcbaa5
AC
13103 N_Compound_Statement =>
13104 (1 => True, -- Actions (List1)
13105 2 => False, -- unused
13106 3 => False, -- unused
13107 4 => False, -- unused
13108 5 => False), -- unused
13109
dac3bede 13110 N_Contract =>
caf07df9
AC
13111 (1 => False, -- Pre_Post_Conditions (Node1-Sem)
13112 2 => False, -- Contract_Test_Cases (Node2-Sem)
13113 3 => False, -- Classifications (Node3-Sem)
dac3bede
YM
13114 4 => False, -- unused
13115 5 => False), -- unused
13116
e3da30b2
RD
13117 N_Expanded_Name =>
13118 (1 => True, -- Chars (Name1)
13119 2 => True, -- Selector_Name (Node2)
13120 3 => True, -- Prefix (Node3)
13121 4 => False, -- Entity (Node4-Sem)
13122 5 => False), -- Etype (Node5-Sem)
13123
955871d3
AC
13124 N_Expression_With_Actions =>
13125 (1 => True, -- Actions (List1)
13126 2 => False, -- unused
13127 3 => True, -- Expression (Node3)
13128 4 => False, -- unused
13129 5 => False), -- unused
13130
e3da30b2
RD
13131 N_Free_Statement =>
13132 (1 => False, -- Storage_Pool (Node1-Sem)
13133 2 => False, -- Procedure_To_Call (Node2-Sem)
13134 3 => True, -- Expression (Node3)
13135 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
13136 5 => False), -- unused
13137
13138 N_Freeze_Entity =>
13139 (1 => True, -- Actions (List1)
13140 2 => False, -- Access_Types_To_Process (Elist2-Sem)
13141 3 => False, -- TSS_Elist (Elist3-Sem)
13142 4 => False, -- Entity (Node4-Sem)
13143 5 => False), -- First_Subtype_Link (Node5-Sem)
13144
3cd4a210
AC
13145 N_Freeze_Generic_Entity =>
13146 (1 => False, -- unused
13147 2 => False, -- unused
13148 3 => False, -- unused
13149 4 => False, -- Entity (Node4-Sem)
13150 5 => False), -- unused
13151
e3da30b2
RD
13152 N_Implicit_Label_Declaration =>
13153 (1 => True, -- Defining_Identifier (Node1)
13154 2 => False, -- Label_Construct (Node2-Sem)
13155 3 => False, -- unused
13156 4 => False, -- unused
13157 5 => False), -- unused
13158
13159 N_Itype_Reference =>
13160 (1 => False, -- Itype (Node1-Sem)
13161 2 => False, -- unused
13162 3 => False, -- unused
13163 4 => False, -- unused
13164 5 => False), -- unused
13165
13166 N_Raise_Constraint_Error =>
13167 (1 => True, -- Condition (Node1)
13168 2 => False, -- unused
13169 3 => True, -- Reason (Uint3)
13170 4 => False, -- unused
13171 5 => False), -- Etype (Node5-Sem)
13172
13173 N_Raise_Program_Error =>
13174 (1 => True, -- Condition (Node1)
13175 2 => False, -- unused
13176 3 => True, -- Reason (Uint3)
13177 4 => False, -- unused
13178 5 => False), -- Etype (Node5-Sem)
13179
13180 N_Raise_Storage_Error =>
13181 (1 => True, -- Condition (Node1)
13182 2 => False, -- unused
13183 3 => True, -- Reason (Uint3)
13184 4 => False, -- unused
13185 5 => False), -- Etype (Node5-Sem)
13186
f28573f4
ES
13187 N_Push_Constraint_Error_Label =>
13188 (1 => False, -- unused
13189 2 => False, -- unused
13190 3 => False, -- unused
13191 4 => False, -- unused
13192 5 => False), -- unused
13193
13194 N_Push_Program_Error_Label =>
f63d601b 13195 (1 => False, -- unused
f28573f4
ES
13196 2 => False, -- unused
13197 3 => False, -- unused
13198 4 => False, -- unused
13199 5 => False), -- Exception_Label
13200
13201 N_Push_Storage_Error_Label =>
f63d601b 13202 (1 => False, -- unused
f28573f4
ES
13203 2 => False, -- unused
13204 3 => False, -- unused
13205 4 => False, -- unused
13206 5 => False), -- Exception_Label
13207
13208 N_Pop_Constraint_Error_Label =>
13209 (1 => False, -- unused
13210 2 => False, -- unused
13211 3 => False, -- unused
13212 4 => False, -- unused
13213 5 => False), -- unused
13214
13215 N_Pop_Program_Error_Label =>
13216 (1 => False, -- unused
13217 2 => False, -- unused
13218 3 => False, -- unused
13219 4 => False, -- unused
13220 5 => False), -- unused
13221
13222 N_Pop_Storage_Error_Label =>
13223 (1 => False, -- unused
13224 2 => False, -- unused
13225 3 => False, -- unused
13226 4 => False, -- unused
13227 5 => False), -- unused
13228
e3da30b2
RD
13229 N_Reference =>
13230 (1 => False, -- unused
13231 2 => False, -- unused
13232 3 => True, -- Prefix (Node3)
13233 4 => False, -- unused
13234 5 => False), -- Etype (Node5-Sem)
13235
e3da30b2
RD
13236 N_Unchecked_Expression =>
13237 (1 => False, -- unused
13238 2 => False, -- unused
13239 3 => True, -- Expression (Node3)
13240 4 => False, -- unused
13241 5 => False), -- Etype (Node5-Sem)
13242
13243 N_Unchecked_Type_Conversion =>
13244 (1 => False, -- unused
13245 2 => False, -- unused
13246 3 => True, -- Expression (Node3)
13247 4 => True, -- Subtype_Mark (Node4)
13248 5 => False), -- Etype (Node5-Sem)
13249
13250 N_Validate_Unchecked_Conversion =>
13251 (1 => False, -- Source_Type (Node1-Sem)
13252 2 => False, -- Target_Type (Node2-Sem)
13253 3 => False, -- unused
13254 4 => False, -- unused
13255 5 => False), -- unused
13256
327503f1
JM
13257 -- Entries for SCIL nodes
13258
327503f1 13259 N_SCIL_Dispatch_Table_Tag_Init =>
7665e4bd 13260 (1 => False, -- unused
327503f1
JM
13261 2 => False, -- unused
13262 3 => False, -- unused
13263 4 => False, -- SCIL_Entity (Node4-Sem)
13264 5 => False), -- unused
13265
13266 N_SCIL_Dispatching_Call =>
7665e4bd 13267 (1 => False, -- unused
327503f1
JM
13268 2 => False, -- SCIL_Target_Prim (Node2-Sem)
13269 3 => False, -- unused
13270 4 => False, -- SCIL_Entity (Node4-Sem)
13271 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
13272
82878151 13273 N_SCIL_Membership_Test =>
7665e4bd 13274 (1 => False, -- unused
82878151
AC
13275 2 => False, -- unused
13276 3 => False, -- unused
13277 4 => False, -- SCIL_Entity (Node4-Sem)
13278 5 => False), -- SCIL_Tag_Value (Node5-Sem)
13279
90e491a7 13280 N_Call_Marker =>
3fc40cd7 13281 (1 => False, -- Target (Node1-Sem)
90e491a7
PMR
13282 2 => False, -- unused
13283 3 => False, -- unused
13284 4 => False, -- unused
13285 5 => False), -- unused
13286
daf82dd8
HK
13287 N_Variable_Reference_Marker =>
13288 (1 => False, -- Target (Node1-Sem)
13289 2 => False, -- unused
13290 3 => False, -- unused
13291 4 => False, -- unused
13292 5 => False), -- unused
13293
d63199d8 13294 -- Entries for Empty, Error, and Unused. Even though these have a Chars
e3da30b2
RD
13295 -- field for debugging purposes, they are not really syntactic fields, so
13296 -- we mark all fields as unused.
13297
13298 N_Empty =>
13299 (1 => False, -- unused
13300 2 => False, -- unused
13301 3 => False, -- unused
13302 4 => False, -- unused
13303 5 => False), -- unused
13304
13305 N_Error =>
13306 (1 => False, -- unused
13307 2 => False, -- unused
13308 3 => False, -- unused
13309 4 => False, -- unused
13310 5 => False), -- unused
13311
13312 N_Unused_At_Start =>
13313 (1 => False, -- unused
13314 2 => False, -- unused
13315 3 => False, -- unused
13316 4 => False, -- unused
13317 5 => False), -- unused
13318
13319 N_Unused_At_End =>
13320 (1 => False, -- unused
13321 2 => False, -- unused
13322 3 => False, -- unused
13323 4 => False, -- unused
13324 5 => False)); -- unused
13325
996ae0b0
RK
13326 --------------------
13327 -- Inline Pragmas --
13328 --------------------
13329
996ae0b0
RK
13330 pragma Inline (Abort_Present);
13331 pragma Inline (Abortable_Part);
13332 pragma Inline (Abstract_Present);
13333 pragma Inline (Accept_Handler_Records);
13334 pragma Inline (Accept_Statement);
6e937c1c 13335 pragma Inline (Access_Definition);
7324bf49 13336 pragma Inline (Access_To_Subprogram_Definition);
996ae0b0
RK
13337 pragma Inline (Access_Types_To_Process);
13338 pragma Inline (Actions);
13339 pragma Inline (Activation_Chain_Entity);
13340 pragma Inline (Acts_As_Spec);
bde33286 13341 pragma Inline (Actual_Designated_Subtype);
fdce4bb7 13342 pragma Inline (Address_Warning_Posted);
996ae0b0
RK
13343 pragma Inline (Aggregate_Bounds);
13344 pragma Inline (Aliased_Present);
3a248f7c 13345 pragma Inline (Alloc_For_BIP_Return);
996ae0b0
RK
13346 pragma Inline (All_Others);
13347 pragma Inline (All_Present);
13348 pragma Inline (Alternatives);
13349 pragma Inline (Ancestor_Part);
12b4d338 13350 pragma Inline (Atomic_Sync_Required);
996ae0b0 13351 pragma Inline (Array_Aggregate);
b622076c 13352 pragma Inline (Aspect_On_Partial_View);
c159409f 13353 pragma Inline (Aspect_Rep_Item);
996ae0b0 13354 pragma Inline (Assignment_OK);
3e542a58 13355 pragma Inline (Associated_Node);
996ae0b0
RK
13356 pragma Inline (At_End_Proc);
13357 pragma Inline (Attribute_Name);
13358 pragma Inline (Aux_Decls_Node);
13359 pragma Inline (Backwards_OK);
13360 pragma Inline (Bad_Is_Detected);
13361 pragma Inline (Body_To_Inline);
13362 pragma Inline (Body_Required);
13363 pragma Inline (By_Ref);
13364 pragma Inline (Box_Present);
13365 pragma Inline (Char_Literal_Value);
13366 pragma Inline (Chars);
fbf5a39b 13367 pragma Inline (Check_Address_Alignment);
996ae0b0
RK
13368 pragma Inline (Choice_Parameter);
13369 pragma Inline (Choices);
313d6f2c 13370 pragma Inline (Class_Present);
d6095153 13371 pragma Inline (Classifications);
36295779 13372 pragma Inline (Cleanup_Actions);
e3da30b2 13373 pragma Inline (Comes_From_Extended_Return_Statement);
996ae0b0
RK
13374 pragma Inline (Compile_Time_Known_Aggregate);
13375 pragma Inline (Component_Associations);
13376 pragma Inline (Component_Clauses);
a397db96 13377 pragma Inline (Component_Definition);
996ae0b0
RK
13378 pragma Inline (Component_Items);
13379 pragma Inline (Component_List);
13380 pragma Inline (Component_Name);
6fb4cdde 13381 pragma Inline (Componentwise_Assignment);
996ae0b0
RK
13382 pragma Inline (Condition);
13383 pragma Inline (Condition_Actions);
fbf5a39b 13384 pragma Inline (Config_Pragmas);
996ae0b0
RK
13385 pragma Inline (Constant_Present);
13386 pragma Inline (Constraint);
13387 pragma Inline (Constraints);
13388 pragma Inline (Context_Installed);
13389 pragma Inline (Context_Items);
f6256631 13390 pragma Inline (Context_Pending);
d6095153 13391 pragma Inline (Contract_Test_Cases);
996ae0b0 13392 pragma Inline (Controlling_Argument);
fc142f63 13393 pragma Inline (Convert_To_Return_False);
996ae0b0 13394 pragma Inline (Conversion_OK);
ba759acd 13395 pragma Inline (Corresponding_Aspect);
996ae0b0 13396 pragma Inline (Corresponding_Body);
82c80734 13397 pragma Inline (Corresponding_Formal_Spec);
996ae0b0
RK
13398 pragma Inline (Corresponding_Generic_Association);
13399 pragma Inline (Corresponding_Integer_Value);
13400 pragma Inline (Corresponding_Spec);
e28072cd 13401 pragma Inline (Corresponding_Spec_Of_Stub);
996ae0b0
RK
13402 pragma Inline (Corresponding_Stub);
13403 pragma Inline (Dcheck_Function);
996ae0b0
RK
13404 pragma Inline (Declarations);
13405 pragma Inline (Default_Expression);
fab2daeb 13406 pragma Inline (Default_Storage_Pool);
996ae0b0
RK
13407 pragma Inline (Default_Name);
13408 pragma Inline (Defining_Identifier);
13409 pragma Inline (Defining_Unit_Name);
13410 pragma Inline (Delay_Alternative);
996ae0b0
RK
13411 pragma Inline (Delay_Statement);
13412 pragma Inline (Delta_Expression);
13413 pragma Inline (Digits_Expression);
13414 pragma Inline (Discr_Check_Funcs_Built);
13415 pragma Inline (Discrete_Choices);
13416 pragma Inline (Discrete_Range);
13417 pragma Inline (Discrete_Subtype_Definition);
13418 pragma Inline (Discrete_Subtype_Definitions);
13419 pragma Inline (Discriminant_Specifications);
13420 pragma Inline (Discriminant_Type);
996ae0b0
RK
13421 pragma Inline (Do_Accessibility_Check);
13422 pragma Inline (Do_Discriminant_Check);
13423 pragma Inline (Do_Length_Check);
13424 pragma Inline (Do_Division_Check);
13425 pragma Inline (Do_Overflow_Check);
13426 pragma Inline (Do_Range_Check);
13427 pragma Inline (Do_Storage_Check);
13428 pragma Inline (Do_Tag_Check);
bde33286 13429 pragma Inline (Elaborate_All_Desirable);
996ae0b0 13430 pragma Inline (Elaborate_All_Present);
bde33286 13431 pragma Inline (Elaborate_Desirable);
90e491a7 13432 pragma Inline (Elaborate_Present);
996ae0b0
RK
13433 pragma Inline (Else_Actions);
13434 pragma Inline (Else_Statements);
13435 pragma Inline (Elsif_Parts);
13436 pragma Inline (Enclosing_Variant);
13437 pragma Inline (End_Label);
13438 pragma Inline (End_Span);
13439 pragma Inline (Entity);
9596236a 13440 pragma Inline (Entity_Or_Associated_Node);
996ae0b0
RK
13441 pragma Inline (Entry_Body_Formal_Part);
13442 pragma Inline (Entry_Call_Alternative);
13443 pragma Inline (Entry_Call_Statement);
13444 pragma Inline (Entry_Direct_Name);
13445 pragma Inline (Entry_Index);
13446 pragma Inline (Entry_Index_Specification);
13447 pragma Inline (Etype);
13448 pragma Inline (Exception_Choices);
996ae0b0 13449 pragma Inline (Exception_Handlers);
f28573f4
ES
13450 pragma Inline (Exception_Junk);
13451 pragma Inline (Exception_Label);
996ae0b0
RK
13452 pragma Inline (Expansion_Delayed);
13453 pragma Inline (Explicit_Actual_Parameter);
13454 pragma Inline (Explicit_Generic_Actual_Parameter);
13455 pragma Inline (Expression);
f63d601b 13456 pragma Inline (Expression_Copy);
996ae0b0
RK
13457 pragma Inline (Expressions);
13458 pragma Inline (First_Bit);
13459 pragma Inline (First_Inlined_Subprogram);
13460 pragma Inline (First_Name);
13461 pragma Inline (First_Named_Actual);
13462 pragma Inline (First_Real_Statement);
13463 pragma Inline (First_Subtype_Link);
13464 pragma Inline (Float_Truncate);
13465 pragma Inline (Formal_Type_Definition);
13466 pragma Inline (Forwards_OK);
0f1a6a0b 13467 pragma Inline (From_Aspect_Specification);
d9f86c0c 13468 pragma Inline (From_At_End);
996ae0b0 13469 pragma Inline (From_At_Mod);
414c6563 13470 pragma Inline (From_Conditional_Expression);
6d11af89 13471 pragma Inline (From_Default);
5f50020a 13472 pragma Inline (Generalized_Indexing);
996ae0b0
RK
13473 pragma Inline (Generic_Associations);
13474 pragma Inline (Generic_Formal_Declarations);
13475 pragma Inline (Generic_Parent);
13476 pragma Inline (Generic_Parent_Type);
13477 pragma Inline (Handled_Statement_Sequence);
13478 pragma Inline (Handler_List_Entry);
13479 pragma Inline (Has_Created_Identifier);
b0d71355 13480 pragma Inline (Has_Dereference_Action);
996ae0b0
RK
13481 pragma Inline (Has_Dynamic_Length_Check);
13482 pragma Inline (Has_Dynamic_Range_Check);
0712790c
ES
13483 pragma Inline (Has_Init_Expression);
13484 pragma Inline (Has_Local_Raise);
f28573f4 13485 pragma Inline (Has_Self_Reference);
15918371 13486 pragma Inline (Has_SP_Choice);
996ae0b0 13487 pragma Inline (Has_No_Elaboration_Code);
c775c209 13488 pragma Inline (Has_Pragma_Suppress_All);
996ae0b0 13489 pragma Inline (Has_Private_View);
21d27997 13490 pragma Inline (Has_Relative_Deadline_Pragma);
996ae0b0 13491 pragma Inline (Has_Storage_Size_Pragma);
ae33543c 13492 pragma Inline (Has_Target_Names);
996ae0b0 13493 pragma Inline (Has_Wide_Character);
fd22cd21 13494 pragma Inline (Has_Wide_Wide_Character);
ca20a08e 13495 pragma Inline (Header_Size_Added);
996ae0b0
RK
13496 pragma Inline (Hidden_By_Use_Clause);
13497 pragma Inline (High_Bound);
13498 pragma Inline (Identifier);
13499 pragma Inline (Implicit_With);
a9d8907c
JM
13500 pragma Inline (Interface_List);
13501 pragma Inline (Interface_Present);
996ae0b0 13502 pragma Inline (Includes_Infinities);
c28408b7 13503 pragma Inline (Import_Interface_Present);
996ae0b0 13504 pragma Inline (In_Present);
daff5ab7 13505 pragma Inline (Incomplete_View);
f104fca1 13506 pragma Inline (Inherited_Discriminant);
996ae0b0
RK
13507 pragma Inline (Instance_Spec);
13508 pragma Inline (Intval);
00c7151c 13509 pragma Inline (Iterator_Specification);
bb072d1c 13510 pragma Inline (Is_Abort_Block);
75a64833 13511 pragma Inline (Is_Accessibility_Actual);
2ba4f1fb 13512 pragma Inline (Is_Analyzed_Pragma);
996ae0b0 13513 pragma Inline (Is_Asynchronous_Call_Block);
6bb88533 13514 pragma Inline (Is_Boolean_Aspect);
7fe6c026 13515 pragma Inline (Is_Checked);
d65a80fd 13516 pragma Inline (Is_Checked_Ghost_Pragma);
996ae0b0
RK
13517 pragma Inline (Is_Component_Left_Opnd);
13518 pragma Inline (Is_Component_Right_Opnd);
13519 pragma Inline (Is_Controlling_Actual);
90e491a7 13520 pragma Inline (Is_Declaration_Level_Node);
c159409f 13521 pragma Inline (Is_Delayed_Aspect);
aab45d22 13522 pragma Inline (Is_Disabled);
90e491a7 13523 pragma Inline (Is_Dispatching_Call);
33c423c8 13524 pragma Inline (Is_Dynamic_Coextension);
851e9f19 13525 pragma Inline (Is_Effective_Use_Clause);
90e491a7 13526 pragma Inline (Is_Elaboration_Checks_OK_Node);
8dce7371 13527 pragma Inline (Is_Elaboration_Code);
7fb62ca1 13528 pragma Inline (Is_Elaboration_Warnings_OK_Node);
b46be8a2 13529 pragma Inline (Is_Elsif);
e3da30b2 13530 pragma Inline (Is_Entry_Barrier_Function);
fdce4bb7 13531 pragma Inline (Is_Expanded_Build_In_Place_Call);
879ac954 13532 pragma Inline (Is_Expanded_Contract);
e98668b1 13533 pragma Inline (Is_Finalization_Wrapper);
dae2b8ea 13534 pragma Inline (Is_Folded_In_Parser);
caf07df9 13535 pragma Inline (Is_Generic_Contract_Pragma);
3c08de34 13536 pragma Inline (Is_Homogeneous_Aggregate);
aab45d22 13537 pragma Inline (Is_Ignored);
d65a80fd 13538 pragma Inline (Is_Ignored_Ghost_Pragma);
fbf5a39b 13539 pragma Inline (Is_In_Discriminant_Check);
2ba4f1fb 13540 pragma Inline (Is_Inherited_Pragma);
90e491a7
PMR
13541 pragma Inline (Is_Initialization_Block);
13542 pragma Inline (Is_Known_Guaranteed_ABE);
996ae0b0 13543 pragma Inline (Is_Machine_Number);
fbf5a39b 13544 pragma Inline (Is_Null_Loop);
95f2be29
OH
13545 pragma Inline (Is_OpenAcc_Environment);
13546 pragma Inline (Is_OpenAcc_Loop);
996ae0b0
RK
13547 pragma Inline (Is_Overloaded);
13548 pragma Inline (Is_Power_Of_2_For_Shift);
4913e24c 13549 pragma Inline (Is_Prefixed_Call);
996ae0b0 13550 pragma Inline (Is_Protected_Subprogram_Body);
06f6c43f 13551 pragma Inline (Is_Qualified_Universal_Literal);
daf82dd8 13552 pragma Inline (Is_Read);
90e491a7
PMR
13553 pragma Inline (Is_Source_Call);
13554 pragma Inline (Is_SPARK_Mode_On_Node);
0712790c 13555 pragma Inline (Is_Static_Coextension);
996ae0b0
RK
13556 pragma Inline (Is_Static_Expression);
13557 pragma Inline (Is_Subprogram_Descriptor);
13558 pragma Inline (Is_Task_Allocation_Block);
877a5a12 13559 pragma Inline (Is_Task_Body_Procedure);
996ae0b0 13560 pragma Inline (Is_Task_Master);
daf82dd8 13561 pragma Inline (Is_Write);
996ae0b0
RK
13562 pragma Inline (Iteration_Scheme);
13563 pragma Inline (Itype);
13564 pragma Inline (Kill_Range_Check);
13565 pragma Inline (Last_Bit);
13566 pragma Inline (Last_Name);
13567 pragma Inline (Library_Unit);
13568 pragma Inline (Label_Construct);
13569 pragma Inline (Left_Opnd);
fbf5a39b 13570 pragma Inline (Limited_View_Installed);
996ae0b0
RK
13571 pragma Inline (Limited_Present);
13572 pragma Inline (Literals);
f28573f4
ES
13573 pragma Inline (Local_Raise_Not_OK);
13574 pragma Inline (Local_Raise_Statements);
996ae0b0
RK
13575 pragma Inline (Loop_Actions);
13576 pragma Inline (Loop_Parameter_Specification);
13577 pragma Inline (Low_Bound);
13578 pragma Inline (Mod_Clause);
13579 pragma Inline (More_Ids);
07fc65c4 13580 pragma Inline (Must_Be_Byte_Aligned);
996ae0b0 13581 pragma Inline (Must_Not_Freeze);
edd63e9b
ES
13582 pragma Inline (Must_Not_Override);
13583 pragma Inline (Must_Override);
996ae0b0
RK
13584 pragma Inline (Name);
13585 pragma Inline (Names);
13586 pragma Inline (Next_Entity);
51bf9bdf 13587 pragma Inline (Next_Exit_Statement);
9af094a1 13588 pragma Inline (Next_Implicit_With);
996ae0b0 13589 pragma Inline (Next_Named_Actual);
21d27997 13590 pragma Inline (Next_Pragma);
996ae0b0
RK
13591 pragma Inline (Next_Rep_Item);
13592 pragma Inline (Next_Use_Clause);
13593 pragma Inline (No_Ctrl_Actions);
967947ed 13594 pragma Inline (No_Elaboration_Check);
996ae0b0
RK
13595 pragma Inline (No_Entities_Ref_In_Spec);
13596 pragma Inline (No_Initialization);
f6194278 13597 pragma Inline (No_Minimize_Eliminate);
10edebe7 13598 pragma Inline (No_Side_Effect_Removal);
fbf5a39b 13599 pragma Inline (No_Truncation);
7a2c2277 13600 pragma Inline (Null_Excluding_Subtype);
2820d220 13601 pragma Inline (Null_Exclusion_Present);
b66c3ff4 13602 pragma Inline (Null_Exclusion_In_Return_Present);
b912db16 13603 pragma Inline (Null_Present);
996ae0b0 13604 pragma Inline (Null_Record_Present);
b912db16 13605 pragma Inline (Null_Statement);
996ae0b0 13606 pragma Inline (Object_Definition);
00c7151c 13607 pragma Inline (Of_Present);
996ae0b0 13608 pragma Inline (Original_Discriminant);
fbf5a39b 13609 pragma Inline (Original_Entity);
996ae0b0
RK
13610 pragma Inline (Others_Discrete_Choices);
13611 pragma Inline (Out_Present);
13612 pragma Inline (Parameter_Associations);
13613 pragma Inline (Parameter_Specifications);
996ae0b0
RK
13614 pragma Inline (Parameter_Type);
13615 pragma Inline (Parent_Spec);
94ce4941 13616 pragma Inline (Parent_With);
996ae0b0
RK
13617 pragma Inline (Position);
13618 pragma Inline (Pragma_Argument_Associations);
ac4d6407 13619 pragma Inline (Pragma_Identifier);
996ae0b0
RK
13620 pragma Inline (Pragmas_After);
13621 pragma Inline (Pragmas_Before);
d6095153 13622 pragma Inline (Pre_Post_Conditions);
996ae0b0 13623 pragma Inline (Prefix);
99d520ad 13624 pragma Inline (Premature_Use);
996ae0b0
RK
13625 pragma Inline (Present_Expr);
13626 pragma Inline (Prev_Ids);
851e9f19 13627 pragma Inline (Prev_Use_Clause);
996ae0b0
RK
13628 pragma Inline (Print_In_Hex);
13629 pragma Inline (Private_Declarations);
13630 pragma Inline (Private_Present);
13631 pragma Inline (Procedure_To_Call);
13632 pragma Inline (Proper_Body);
13633 pragma Inline (Protected_Definition);
13634 pragma Inline (Protected_Present);
13635 pragma Inline (Raises_Constraint_Error);
13636 pragma Inline (Range_Constraint);
13637 pragma Inline (Range_Expression);
996ae0b0 13638 pragma Inline (Real_Range_Specification);
07fc65c4
GB
13639 pragma Inline (Realval);
13640 pragma Inline (Reason);
996ae0b0
RK
13641 pragma Inline (Record_Extension_Part);
13642 pragma Inline (Redundant_Use);
0712790c 13643 pragma Inline (Renaming_Exception);
244480db 13644 pragma Inline (Result_Definition);
e3da30b2
RD
13645 pragma Inline (Return_Object_Declarations);
13646 pragma Inline (Return_Statement_Entity);
996ae0b0
RK
13647 pragma Inline (Reverse_Present);
13648 pragma Inline (Right_Opnd);
13649 pragma Inline (Rounded_Result);
69e6ee2f 13650 pragma Inline (Save_Invocation_Graph_Of_Body);
327503f1 13651 pragma Inline (SCIL_Controlling_Tag);
1c5c721a 13652 pragma Inline (SCIL_Entity);
82878151 13653 pragma Inline (SCIL_Tag_Value);
1c5c721a 13654 pragma Inline (SCIL_Target_Prim);
996ae0b0
RK
13655 pragma Inline (Scope);
13656 pragma Inline (Select_Alternatives);
13657 pragma Inline (Selector_Name);
13658 pragma Inline (Selector_Names);
13659 pragma Inline (Shift_Count_OK);
13660 pragma Inline (Source_Type);
13661 pragma Inline (Specification);
beacce02 13662 pragma Inline (Split_PPC);
996ae0b0 13663 pragma Inline (Statements);
996ae0b0 13664 pragma Inline (Storage_Pool);
d50f4827 13665 pragma Inline (Subpool_Handle_Name);
996ae0b0
RK
13666 pragma Inline (Strval);
13667 pragma Inline (Subtype_Indication);
13668 pragma Inline (Subtype_Mark);
13669 pragma Inline (Subtype_Marks);
c7532b2d 13670 pragma Inline (Suppress_Assignment_Checks);
c800f862 13671 pragma Inline (Suppress_Loop_Warnings);
a9d8907c 13672 pragma Inline (Synchronized_Present);
996ae0b0 13673 pragma Inline (Tagged_Present);
90e491a7 13674 pragma Inline (Target);
996ae0b0 13675 pragma Inline (Target_Type);
996ae0b0 13676 pragma Inline (Task_Definition);
a9d8907c 13677 pragma Inline (Task_Present);
996ae0b0
RK
13678 pragma Inline (Then_Actions);
13679 pragma Inline (Then_Statements);
13680 pragma Inline (Triggering_Alternative);
13681 pragma Inline (Triggering_Statement);
13682 pragma Inline (Treat_Fixed_As_Integer);
13683 pragma Inline (TSS_Elist);
13684 pragma Inline (Type_Definition);
1773d80b
AC
13685 pragma Inline (Uneval_Old_Accept);
13686 pragma Inline (Uneval_Old_Warn);
996ae0b0 13687 pragma Inline (Unit);
2c8d828a 13688 pragma Inline (Uninitialized_Variable);
996ae0b0
RK
13689 pragma Inline (Unknown_Discriminants_Present);
13690 pragma Inline (Unreferenced_In_Spec);
13691 pragma Inline (Variant_Part);
13692 pragma Inline (Variants);
13693 pragma Inline (Visible_Declarations);
29efbb8c 13694 pragma Inline (Used_Operations);
90e491a7 13695 pragma Inline (Was_Attribute_Reference);
549cc9c2 13696 pragma Inline (Was_Expression_Function);
996ae0b0 13697 pragma Inline (Was_Originally_Stub);
996ae0b0 13698
996ae0b0
RK
13699 pragma Inline (Set_Abort_Present);
13700 pragma Inline (Set_Abortable_Part);
13701 pragma Inline (Set_Abstract_Present);
13702 pragma Inline (Set_Accept_Handler_Records);
13703 pragma Inline (Set_Accept_Statement);
6e937c1c 13704 pragma Inline (Set_Access_Definition);
7324bf49 13705 pragma Inline (Set_Access_To_Subprogram_Definition);
996ae0b0
RK
13706 pragma Inline (Set_Access_Types_To_Process);
13707 pragma Inline (Set_Actions);
13708 pragma Inline (Set_Activation_Chain_Entity);
13709 pragma Inline (Set_Acts_As_Spec);
bde33286 13710 pragma Inline (Set_Actual_Designated_Subtype);
fdce4bb7 13711 pragma Inline (Set_Address_Warning_Posted);
996ae0b0
RK
13712 pragma Inline (Set_Aggregate_Bounds);
13713 pragma Inline (Set_Aliased_Present);
3a248f7c 13714 pragma Inline (Set_Alloc_For_BIP_Return);
996ae0b0
RK
13715 pragma Inline (Set_All_Others);
13716 pragma Inline (Set_All_Present);
13717 pragma Inline (Set_Alternatives);
13718 pragma Inline (Set_Ancestor_Part);
13719 pragma Inline (Set_Array_Aggregate);
b622076c 13720 pragma Inline (Set_Aspect_On_Partial_View);
c159409f 13721 pragma Inline (Set_Aspect_Rep_Item);
996ae0b0 13722 pragma Inline (Set_Assignment_OK);
3e542a58 13723 pragma Inline (Set_Associated_Node);
996ae0b0 13724 pragma Inline (Set_At_End_Proc);
aab45d22 13725 pragma Inline (Set_Atomic_Sync_Required);
996ae0b0
RK
13726 pragma Inline (Set_Attribute_Name);
13727 pragma Inline (Set_Aux_Decls_Node);
13728 pragma Inline (Set_Backwards_OK);
13729 pragma Inline (Set_Bad_Is_Detected);
996ae0b0 13730 pragma Inline (Set_Body_Required);
aab45d22 13731 pragma Inline (Set_Body_To_Inline);
996ae0b0 13732 pragma Inline (Set_Box_Present);
aab45d22 13733 pragma Inline (Set_By_Ref);
996ae0b0
RK
13734 pragma Inline (Set_Char_Literal_Value);
13735 pragma Inline (Set_Chars);
fbf5a39b 13736 pragma Inline (Set_Check_Address_Alignment);
996ae0b0
RK
13737 pragma Inline (Set_Choice_Parameter);
13738 pragma Inline (Set_Choices);
313d6f2c 13739 pragma Inline (Set_Class_Present);
d6095153 13740 pragma Inline (Set_Classifications);
36295779 13741 pragma Inline (Set_Cleanup_Actions);
e3da30b2 13742 pragma Inline (Set_Comes_From_Extended_Return_Statement);
996ae0b0
RK
13743 pragma Inline (Set_Compile_Time_Known_Aggregate);
13744 pragma Inline (Set_Component_Associations);
13745 pragma Inline (Set_Component_Clauses);
a397db96 13746 pragma Inline (Set_Component_Definition);
996ae0b0
RK
13747 pragma Inline (Set_Component_Items);
13748 pragma Inline (Set_Component_List);
13749 pragma Inline (Set_Component_Name);
6fb4cdde 13750 pragma Inline (Set_Componentwise_Assignment);
996ae0b0
RK
13751 pragma Inline (Set_Condition);
13752 pragma Inline (Set_Condition_Actions);
fbf5a39b 13753 pragma Inline (Set_Config_Pragmas);
996ae0b0
RK
13754 pragma Inline (Set_Constant_Present);
13755 pragma Inline (Set_Constraint);
13756 pragma Inline (Set_Constraints);
13757 pragma Inline (Set_Context_Installed);
13758 pragma Inline (Set_Context_Items);
f6256631 13759 pragma Inline (Set_Context_Pending);
d6095153 13760 pragma Inline (Set_Contract_Test_Cases);
996ae0b0
RK
13761 pragma Inline (Set_Controlling_Argument);
13762 pragma Inline (Set_Conversion_OK);
aab45d22 13763 pragma Inline (Set_Convert_To_Return_False);
ba759acd 13764 pragma Inline (Set_Corresponding_Aspect);
996ae0b0 13765 pragma Inline (Set_Corresponding_Body);
82c80734 13766 pragma Inline (Set_Corresponding_Formal_Spec);
996ae0b0
RK
13767 pragma Inline (Set_Corresponding_Generic_Association);
13768 pragma Inline (Set_Corresponding_Integer_Value);
13769 pragma Inline (Set_Corresponding_Spec);
e28072cd 13770 pragma Inline (Set_Corresponding_Spec_Of_Stub);
996ae0b0
RK
13771 pragma Inline (Set_Corresponding_Stub);
13772 pragma Inline (Set_Dcheck_Function);
996ae0b0
RK
13773 pragma Inline (Set_Declarations);
13774 pragma Inline (Set_Default_Expression);
13775 pragma Inline (Set_Default_Name);
aab45d22 13776 pragma Inline (Set_Default_Storage_Pool);
996ae0b0
RK
13777 pragma Inline (Set_Defining_Identifier);
13778 pragma Inline (Set_Defining_Unit_Name);
13779 pragma Inline (Set_Delay_Alternative);
996ae0b0
RK
13780 pragma Inline (Set_Delay_Statement);
13781 pragma Inline (Set_Delta_Expression);
13782 pragma Inline (Set_Digits_Expression);
13783 pragma Inline (Set_Discr_Check_Funcs_Built);
13784 pragma Inline (Set_Discrete_Choices);
13785 pragma Inline (Set_Discrete_Range);
13786 pragma Inline (Set_Discrete_Subtype_Definition);
13787 pragma Inline (Set_Discrete_Subtype_Definitions);
13788 pragma Inline (Set_Discriminant_Specifications);
13789 pragma Inline (Set_Discriminant_Type);
996ae0b0
RK
13790 pragma Inline (Set_Do_Accessibility_Check);
13791 pragma Inline (Set_Do_Discriminant_Check);
996ae0b0 13792 pragma Inline (Set_Do_Division_Check);
aab45d22 13793 pragma Inline (Set_Do_Length_Check);
996ae0b0
RK
13794 pragma Inline (Set_Do_Overflow_Check);
13795 pragma Inline (Set_Do_Range_Check);
13796 pragma Inline (Set_Do_Storage_Check);
13797 pragma Inline (Set_Do_Tag_Check);
bde33286 13798 pragma Inline (Set_Elaborate_All_Desirable);
996ae0b0 13799 pragma Inline (Set_Elaborate_All_Present);
bde33286 13800 pragma Inline (Set_Elaborate_Desirable);
aab45d22 13801 pragma Inline (Set_Elaborate_Present);
996ae0b0
RK
13802 pragma Inline (Set_Else_Actions);
13803 pragma Inline (Set_Else_Statements);
13804 pragma Inline (Set_Elsif_Parts);
13805 pragma Inline (Set_Enclosing_Variant);
13806 pragma Inline (Set_End_Label);
13807 pragma Inline (Set_End_Span);
13808 pragma Inline (Set_Entity);
13809 pragma Inline (Set_Entry_Body_Formal_Part);
13810 pragma Inline (Set_Entry_Call_Alternative);
13811 pragma Inline (Set_Entry_Call_Statement);
13812 pragma Inline (Set_Entry_Direct_Name);
13813 pragma Inline (Set_Entry_Index);
13814 pragma Inline (Set_Entry_Index_Specification);
13815 pragma Inline (Set_Etype);
13816 pragma Inline (Set_Exception_Choices);
996ae0b0 13817 pragma Inline (Set_Exception_Handlers);
f28573f4
ES
13818 pragma Inline (Set_Exception_Junk);
13819 pragma Inline (Set_Exception_Label);
996ae0b0
RK
13820 pragma Inline (Set_Expansion_Delayed);
13821 pragma Inline (Set_Explicit_Actual_Parameter);
13822 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
13823 pragma Inline (Set_Expression);
f63d601b 13824 pragma Inline (Set_Expression_Copy);
996ae0b0
RK
13825 pragma Inline (Set_Expressions);
13826 pragma Inline (Set_First_Bit);
13827 pragma Inline (Set_First_Inlined_Subprogram);
13828 pragma Inline (Set_First_Name);
13829 pragma Inline (Set_First_Named_Actual);
13830 pragma Inline (Set_First_Real_Statement);
13831 pragma Inline (Set_First_Subtype_Link);
13832 pragma Inline (Set_Float_Truncate);
13833 pragma Inline (Set_Formal_Type_Definition);
13834 pragma Inline (Set_Forwards_OK);
0f1a6a0b 13835 pragma Inline (Set_From_Aspect_Specification);
d9f86c0c 13836 pragma Inline (Set_From_At_End);
996ae0b0 13837 pragma Inline (Set_From_At_Mod);
414c6563 13838 pragma Inline (Set_From_Conditional_Expression);
6d11af89 13839 pragma Inline (Set_From_Default);
5f50020a 13840 pragma Inline (Set_Generalized_Indexing);
996ae0b0
RK
13841 pragma Inline (Set_Generic_Associations);
13842 pragma Inline (Set_Generic_Formal_Declarations);
13843 pragma Inline (Set_Generic_Parent);
13844 pragma Inline (Set_Generic_Parent_Type);
13845 pragma Inline (Set_Handled_Statement_Sequence);
13846 pragma Inline (Set_Handler_List_Entry);
13847 pragma Inline (Set_Has_Created_Identifier);
b0d71355 13848 pragma Inline (Set_Has_Dereference_Action);
996ae0b0 13849 pragma Inline (Set_Has_Dynamic_Length_Check);
aab45d22 13850 pragma Inline (Set_Has_Dynamic_Range_Check);
0712790c
ES
13851 pragma Inline (Set_Has_Init_Expression);
13852 pragma Inline (Set_Has_Local_Raise);
996ae0b0 13853 pragma Inline (Set_Has_No_Elaboration_Code);
c775c209 13854 pragma Inline (Set_Has_Pragma_Suppress_All);
996ae0b0 13855 pragma Inline (Set_Has_Private_View);
21d27997 13856 pragma Inline (Set_Has_Relative_Deadline_Pragma);
aab45d22 13857 pragma Inline (Set_Has_Self_Reference);
15918371 13858 pragma Inline (Set_Has_SP_Choice);
996ae0b0 13859 pragma Inline (Set_Has_Storage_Size_Pragma);
ae33543c 13860 pragma Inline (Set_Has_Target_Names);
996ae0b0 13861 pragma Inline (Set_Has_Wide_Character);
fd22cd21 13862 pragma Inline (Set_Has_Wide_Wide_Character);
ca20a08e 13863 pragma Inline (Set_Header_Size_Added);
996ae0b0
RK
13864 pragma Inline (Set_Hidden_By_Use_Clause);
13865 pragma Inline (Set_High_Bound);
13866 pragma Inline (Set_Identifier);
13867 pragma Inline (Set_Implicit_With);
c28408b7 13868 pragma Inline (Set_Import_Interface_Present);
996ae0b0 13869 pragma Inline (Set_In_Present);
aab45d22 13870 pragma Inline (Set_Includes_Infinities);
daff5ab7 13871 pragma Inline (Set_Incomplete_View);
f104fca1 13872 pragma Inline (Set_Inherited_Discriminant);
996ae0b0 13873 pragma Inline (Set_Instance_Spec);
aab45d22
AC
13874 pragma Inline (Set_Interface_List);
13875 pragma Inline (Set_Interface_Present);
996ae0b0 13876 pragma Inline (Set_Intval);
bb072d1c 13877 pragma Inline (Set_Is_Abort_Block);
75a64833 13878 pragma Inline (Set_Is_Accessibility_Actual);
2ba4f1fb 13879 pragma Inline (Set_Is_Analyzed_Pragma);
996ae0b0 13880 pragma Inline (Set_Is_Asynchronous_Call_Block);
6bb88533 13881 pragma Inline (Set_Is_Boolean_Aspect);
7fe6c026 13882 pragma Inline (Set_Is_Checked);
d65a80fd 13883 pragma Inline (Set_Is_Checked_Ghost_Pragma);
996ae0b0
RK
13884 pragma Inline (Set_Is_Component_Left_Opnd);
13885 pragma Inline (Set_Is_Component_Right_Opnd);
13886 pragma Inline (Set_Is_Controlling_Actual);
90e491a7 13887 pragma Inline (Set_Is_Declaration_Level_Node);
c159409f 13888 pragma Inline (Set_Is_Delayed_Aspect);
aab45d22 13889 pragma Inline (Set_Is_Disabled);
90e491a7 13890 pragma Inline (Set_Is_Dispatching_Call);
33c423c8 13891 pragma Inline (Set_Is_Dynamic_Coextension);
851e9f19 13892 pragma Inline (Set_Is_Effective_Use_Clause);
90e491a7 13893 pragma Inline (Set_Is_Elaboration_Checks_OK_Node);
8dce7371 13894 pragma Inline (Set_Is_Elaboration_Code);
7fb62ca1 13895 pragma Inline (Set_Is_Elaboration_Warnings_OK_Node);
b46be8a2 13896 pragma Inline (Set_Is_Elsif);
e3da30b2 13897 pragma Inline (Set_Is_Entry_Barrier_Function);
fdce4bb7 13898 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
879ac954 13899 pragma Inline (Set_Is_Expanded_Contract);
e98668b1 13900 pragma Inline (Set_Is_Finalization_Wrapper);
dae2b8ea 13901 pragma Inline (Set_Is_Folded_In_Parser);
caf07df9 13902 pragma Inline (Set_Is_Generic_Contract_Pragma);
3c08de34 13903 pragma Inline (Set_Is_Homogeneous_Aggregate);
aab45d22 13904 pragma Inline (Set_Is_Ignored);
d65a80fd 13905 pragma Inline (Set_Is_Ignored_Ghost_Pragma);
fbf5a39b 13906 pragma Inline (Set_Is_In_Discriminant_Check);
2ba4f1fb 13907 pragma Inline (Set_Is_Inherited_Pragma);
90e491a7
PMR
13908 pragma Inline (Set_Is_Initialization_Block);
13909 pragma Inline (Set_Is_Known_Guaranteed_ABE);
996ae0b0 13910 pragma Inline (Set_Is_Machine_Number);
fbf5a39b 13911 pragma Inline (Set_Is_Null_Loop);
95f2be29
OH
13912 pragma Inline (Set_Is_OpenAcc_Environment);
13913 pragma Inline (Set_Is_OpenAcc_Loop);
996ae0b0
RK
13914 pragma Inline (Set_Is_Overloaded);
13915 pragma Inline (Set_Is_Power_Of_2_For_Shift);
4913e24c 13916 pragma Inline (Set_Is_Prefixed_Call);
996ae0b0 13917 pragma Inline (Set_Is_Protected_Subprogram_Body);
06f6c43f 13918 pragma Inline (Set_Is_Qualified_Universal_Literal);
daf82dd8 13919 pragma Inline (Set_Is_Read);
90e491a7
PMR
13920 pragma Inline (Set_Is_Source_Call);
13921 pragma Inline (Set_Is_SPARK_Mode_On_Node);
0712790c 13922 pragma Inline (Set_Is_Static_Coextension);
996ae0b0
RK
13923 pragma Inline (Set_Is_Static_Expression);
13924 pragma Inline (Set_Is_Subprogram_Descriptor);
13925 pragma Inline (Set_Is_Task_Allocation_Block);
877a5a12 13926 pragma Inline (Set_Is_Task_Body_Procedure);
996ae0b0 13927 pragma Inline (Set_Is_Task_Master);
daf82dd8 13928 pragma Inline (Set_Is_Write);
996ae0b0 13929 pragma Inline (Set_Iteration_Scheme);
aab45d22 13930 pragma Inline (Set_Iterator_Specification);
996ae0b0
RK
13931 pragma Inline (Set_Itype);
13932 pragma Inline (Set_Kill_Range_Check);
aab45d22 13933 pragma Inline (Set_Label_Construct);
996ae0b0
RK
13934 pragma Inline (Set_Last_Bit);
13935 pragma Inline (Set_Last_Name);
996ae0b0 13936 pragma Inline (Set_Left_Opnd);
aab45d22 13937 pragma Inline (Set_Library_Unit);
996ae0b0 13938 pragma Inline (Set_Limited_Present);
aab45d22 13939 pragma Inline (Set_Limited_View_Installed);
996ae0b0 13940 pragma Inline (Set_Literals);
f28573f4
ES
13941 pragma Inline (Set_Local_Raise_Not_OK);
13942 pragma Inline (Set_Local_Raise_Statements);
996ae0b0
RK
13943 pragma Inline (Set_Loop_Actions);
13944 pragma Inline (Set_Loop_Parameter_Specification);
13945 pragma Inline (Set_Low_Bound);
13946 pragma Inline (Set_Mod_Clause);
13947 pragma Inline (Set_More_Ids);
07fc65c4 13948 pragma Inline (Set_Must_Be_Byte_Aligned);
996ae0b0 13949 pragma Inline (Set_Must_Not_Freeze);
edd63e9b
ES
13950 pragma Inline (Set_Must_Not_Override);
13951 pragma Inline (Set_Must_Override);
996ae0b0
RK
13952 pragma Inline (Set_Name);
13953 pragma Inline (Set_Names);
13954 pragma Inline (Set_Next_Entity);
51bf9bdf 13955 pragma Inline (Set_Next_Exit_Statement);
9af094a1 13956 pragma Inline (Set_Next_Implicit_With);
996ae0b0 13957 pragma Inline (Set_Next_Named_Actual);
21d27997
RD
13958 pragma Inline (Set_Next_Pragma);
13959 pragma Inline (Set_Next_Rep_Item);
996ae0b0
RK
13960 pragma Inline (Set_Next_Use_Clause);
13961 pragma Inline (Set_No_Ctrl_Actions);
967947ed 13962 pragma Inline (Set_No_Elaboration_Check);
996ae0b0
RK
13963 pragma Inline (Set_No_Entities_Ref_In_Spec);
13964 pragma Inline (Set_No_Initialization);
f6194278 13965 pragma Inline (Set_No_Minimize_Eliminate);
10edebe7 13966 pragma Inline (Set_No_Side_Effect_Removal);
fbf5a39b 13967 pragma Inline (Set_No_Truncation);
7a2c2277 13968 pragma Inline (Set_Null_Excluding_Subtype);
2820d220 13969 pragma Inline (Set_Null_Exclusion_Present);
b66c3ff4 13970 pragma Inline (Set_Null_Exclusion_In_Return_Present);
aab45d22 13971 pragma Inline (Set_Null_Present);
996ae0b0 13972 pragma Inline (Set_Null_Record_Present);
b912db16 13973 pragma Inline (Set_Null_Statement);
996ae0b0 13974 pragma Inline (Set_Object_Definition);
00c7151c 13975 pragma Inline (Set_Of_Present);
996ae0b0 13976 pragma Inline (Set_Original_Discriminant);
fbf5a39b 13977 pragma Inline (Set_Original_Entity);
996ae0b0
RK
13978 pragma Inline (Set_Others_Discrete_Choices);
13979 pragma Inline (Set_Out_Present);
13980 pragma Inline (Set_Parameter_Associations);
aab45d22 13981 pragma Inline (Set_Parameter_Specifications);
996ae0b0
RK
13982 pragma Inline (Set_Parameter_Type);
13983 pragma Inline (Set_Parent_Spec);
94ce4941 13984 pragma Inline (Set_Parent_With);
996ae0b0
RK
13985 pragma Inline (Set_Position);
13986 pragma Inline (Set_Pragma_Argument_Associations);
ac4d6407 13987 pragma Inline (Set_Pragma_Identifier);
996ae0b0
RK
13988 pragma Inline (Set_Pragmas_After);
13989 pragma Inline (Set_Pragmas_Before);
d6095153 13990 pragma Inline (Set_Pre_Post_Conditions);
996ae0b0 13991 pragma Inline (Set_Prefix);
99d520ad 13992 pragma Inline (Set_Premature_Use);
996ae0b0
RK
13993 pragma Inline (Set_Present_Expr);
13994 pragma Inline (Set_Prev_Ids);
851e9f19 13995 pragma Inline (Set_Prev_Use_Clause);
996ae0b0
RK
13996 pragma Inline (Set_Print_In_Hex);
13997 pragma Inline (Set_Private_Declarations);
13998 pragma Inline (Set_Private_Present);
13999 pragma Inline (Set_Procedure_To_Call);
14000 pragma Inline (Set_Proper_Body);
14001 pragma Inline (Set_Protected_Definition);
14002 pragma Inline (Set_Protected_Present);
14003 pragma Inline (Set_Raises_Constraint_Error);
14004 pragma Inline (Set_Range_Constraint);
14005 pragma Inline (Set_Range_Expression);
996ae0b0 14006 pragma Inline (Set_Real_Range_Specification);
07fc65c4
GB
14007 pragma Inline (Set_Realval);
14008 pragma Inline (Set_Reason);
996ae0b0
RK
14009 pragma Inline (Set_Record_Extension_Part);
14010 pragma Inline (Set_Redundant_Use);
0712790c 14011 pragma Inline (Set_Renaming_Exception);
244480db 14012 pragma Inline (Set_Result_Definition);
e3da30b2 14013 pragma Inline (Set_Return_Object_Declarations);
996ae0b0
RK
14014 pragma Inline (Set_Reverse_Present);
14015 pragma Inline (Set_Right_Opnd);
14016 pragma Inline (Set_Rounded_Result);
69e6ee2f 14017 pragma Inline (Set_Save_Invocation_Graph_Of_Body);
327503f1 14018 pragma Inline (Set_SCIL_Controlling_Tag);
1c5c721a 14019 pragma Inline (Set_SCIL_Entity);
82878151 14020 pragma Inline (Set_SCIL_Tag_Value);
1c5c721a 14021 pragma Inline (Set_SCIL_Target_Prim);
996ae0b0
RK
14022 pragma Inline (Set_Scope);
14023 pragma Inline (Set_Select_Alternatives);
14024 pragma Inline (Set_Selector_Name);
14025 pragma Inline (Set_Selector_Names);
14026 pragma Inline (Set_Shift_Count_OK);
14027 pragma Inline (Set_Source_Type);
beacce02 14028 pragma Inline (Set_Split_PPC);
996ae0b0 14029 pragma Inline (Set_Statements);
996ae0b0
RK
14030 pragma Inline (Set_Storage_Pool);
14031 pragma Inline (Set_Strval);
aab45d22 14032 pragma Inline (Set_Subpool_Handle_Name);
996ae0b0
RK
14033 pragma Inline (Set_Subtype_Indication);
14034 pragma Inline (Set_Subtype_Mark);
14035 pragma Inline (Set_Subtype_Marks);
c7532b2d 14036 pragma Inline (Set_Suppress_Assignment_Checks);
c800f862 14037 pragma Inline (Set_Suppress_Loop_Warnings);
a9d8907c 14038 pragma Inline (Set_Synchronized_Present);
aab45d22 14039 pragma Inline (Set_TSS_Elist);
996ae0b0 14040 pragma Inline (Set_Tagged_Present);
90e491a7 14041 pragma Inline (Set_Target);
996ae0b0 14042 pragma Inline (Set_Target_Type);
996ae0b0 14043 pragma Inline (Set_Task_Definition);
a9d8907c 14044 pragma Inline (Set_Task_Present);
996ae0b0
RK
14045 pragma Inline (Set_Then_Actions);
14046 pragma Inline (Set_Then_Statements);
aab45d22 14047 pragma Inline (Set_Treat_Fixed_As_Integer);
996ae0b0
RK
14048 pragma Inline (Set_Triggering_Alternative);
14049 pragma Inline (Set_Triggering_Statement);
996ae0b0 14050 pragma Inline (Set_Type_Definition);
1773d80b
AC
14051 pragma Inline (Set_Uneval_Old_Accept);
14052 pragma Inline (Set_Uneval_Old_Warn);
996ae0b0 14053 pragma Inline (Set_Unit);
2c8d828a 14054 pragma Inline (Set_Uninitialized_Variable);
996ae0b0
RK
14055 pragma Inline (Set_Unknown_Discriminants_Present);
14056 pragma Inline (Set_Unreferenced_In_Spec);
aab45d22 14057 pragma Inline (Set_Used_Operations);
996ae0b0
RK
14058 pragma Inline (Set_Variant_Part);
14059 pragma Inline (Set_Variants);
14060 pragma Inline (Set_Visible_Declarations);
90e491a7 14061 pragma Inline (Set_Was_Attribute_Reference);
549cc9c2 14062 pragma Inline (Set_Was_Expression_Function);
996ae0b0 14063 pragma Inline (Set_Was_Originally_Stub);
996ae0b0
RK
14064
14065end Sinfo;