sinfo.ads (Is_Scil_Node, [...]): Add missing documentation.
[gcc.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in seven places:
63
64 -- The documentation associated with the node
65 -- The spec of the access function in sinfo.ads
66 -- The body of the access function in sinfo.adb
67 -- The pragma Inline at the end of sinfo.ads for the access function
68 -- The spec of the set procedure in sinfo.ads
69 -- The body of the set procedure in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the set procedure
71
72 -- The field chosen must be consistent in all places, and, for a node that
73 -- is a subexpression, must not overlap any of the standard expression
74 -- fields.
75
76 -- In addition, if any of the standard expression fields is changed, then
77 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
78 -- must be updated appropriately, since it special cases expression fields.
79
80 -- If a new tree node is added, then the following changes are made
81
82 -- Add it to the documentation in the appropriate place
83 -- Add its fields to this documentation section
84 -- Define it in the appropriate classification in Node_Kind
85 -- In the body (sinfo), add entries to the access functions for all
86 -- its fields (except standard expression fields) to include the new
87 -- node in the checks.
88 -- Add an appropriate section to the case statement in sprint.adb
89 -- Add an appropriate section to the case statement in sem.adb
90 -- Add an appropriate section to the case statement in exp_util.adb
91 -- (Insert_Actions procedure)
92 -- For a subexpression, add an appropriate section to the case
93 -- statement in sem_eval.adb
94 -- For a subexpression, add an appropriate section to the case
95 -- statement in sem_res.adb
96
97 -- Finally, four utility programs must be run:
98
99 -- Run CSinfo to check that you have made the changes consistently. It
100 -- checks most of the rules given above, with clear error messages. This
101 -- utility reads sinfo.ads and sinfo.adb and generates a report to
102 -- standard output.
103
104 -- Run XSinfo to create sinfo.h, the corresponding C header. This
105 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
106 -- not need to read sinfo.adb, since the contents of the body are
107 -- algorithmically determinable from the spec.
108
109 -- Run XTreeprs to create treeprs.ads, an updated version of the module
110 -- that is used to drive the tree print routine. This utility reads (but
111 -- does not modify) treeprs.adt, the template that provides the basic
112 -- structure of the file, and then fills in the data from the comments
113 -- in sinfo.ads.
114
115 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
116 -- spec of the Nmake package which contains functions for constructing
117 -- nodes.
118
119 -- All of the above steps except CSinfo are done automatically by the
120 -- build scripts when you do a full bootstrap.
121
122 -- Note: sometime we could write a utility that actually generated the body
123 -- of sinfo from the spec instead of simply checking it, since, as noted
124 -- above, the contents of the body can be determined from the spec.
125
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
129
130 -- Generally the structure of the tree very closely follows the grammar as
131 -- defined in the RM. However, certain nodes are omitted to save space and
132 -- simplify semantic processing. Two general classes of such omitted nodes
133 -- are as follows:
134
135 -- If the only possibilities for a non-terminal are one or more other
136 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
137 -- corresponding node is omitted from the tree, and the target construct
138 -- appears directly. For example, a real type definition is either
139 -- floating point definition or a fixed point definition. No explicit node
140 -- appears for real type definition. Instead either the floating point
141 -- definition or fixed point definition appears directly.
142
143 -- If a non-terminal corresponds to a list of some other non-terminal
144 -- (possibly with separating punctuation), then usually it is omitted from
145 -- the tree, and a list of components appears instead. For example,
146 -- sequence of statements does not appear explicitly in the tree. Instead
147 -- a list of statements appears directly.
148
149 -- Some additional cases of omitted nodes occur and are documented
150 -- individually. In particular, many nodes are omitted in the tree
151 -- generated for an expression.
152
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
156
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations, number
159 -- declarations etc.)
160
161 -- The semantics of such statements are equivalent to a series of identical
162 -- declarations of single defining identifiers (except that conformance
163 -- checks require the same grouping of identifiers in the parameter case).
164
165 -- To simplify semantic processing, the parser breaks down such multiple
166 -- declaration cases into sequences of single declarations, duplicating
167 -- type and initialization information as required. The flags More_Ids and
168 -- Prev_Ids are used to record the original form of the source in the case
169 -- where the original source used a list of names, More_Ids being set on
170 -- all but the last name and Prev_Ids being set on all but the first name.
171 -- These flags are used to reconstruct the original source (e.g. in the
172 -- Sprint package), and also are included in the conformance checks, but
173 -- otherwise have no semantic significance.
174
175 -- Note: the reason that we use More_Ids and Prev_Ids rather than
176 -- First_Name and Last_Name flags is so that the flags are off in the
177 -- normal one identifier case, which minimizes tree print output.
178
179 -----------------------
180 -- Use of Node Lists --
181 -----------------------
182
183 -- With a few exceptions, if a construction of the form {non-terminal}
184 -- appears in the tree, lists are used in the corresponding tree node (see
185 -- package Nlists for handling of node lists). In this case a field of the
186 -- parent node points to a list of nodes for the non-terminal. The field
187 -- name for such fields has a plural name which always ends in "s". For
188 -- example, a case statement has a field Alternatives pointing to list of
189 -- case statement alternative nodes.
190
191 -- Only fields pointing to lists have names ending in "s", so generally the
192 -- structure is strongly typed, fields not ending in s point to single
193 -- nodes, and fields ending in s point to lists.
194
195 -- The following example shows how a traversal of a list is written. We
196 -- suppose here that Stmt points to a N_Case_Statement node which has a
197 -- list field called Alternatives:
198
199 -- Alt := First (Alternatives (Stmt));
200 -- while Present (Alt) loop
201 -- ..
202 -- -- processing for case statement alternative Alt
203 -- ..
204 -- Alt := Next (Alt);
205 -- end loop;
206
207 -- The Present function tests for Empty, which in this case signals the end
208 -- of the list. First returns Empty immediately if the list is empty.
209 -- Present is defined in Atree, First and Next are defined in Nlists.
210
211 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
212 -- contexts, which is handled as described in the previous section, and
213 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
214 -- using the First_Name and Last_Name flags, as further detailed in the
215 -- description of the N_With_Clause node.
216
217 -------------
218 -- Pragmas --
219 -------------
220
221 -- Pragmas can appear in many different context, but are not included in
222 -- the grammar. Still they must appear in the tree, so they can be properly
223 -- processed.
224
225 -- Two approaches are used. In some cases, an extra field is defined in an
226 -- appropriate node that contains a list of pragmas appearing in the
227 -- expected context. For example pragmas can appear before an
228 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
229 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
230
231 -- The other approach is to simply allow pragmas to appear in syntactic
232 -- lists where the grammar (of course) does not include the possibility.
233 -- For example, the Variants field of an N_Variant_Part node points to a
234 -- list that can contain both N_Pragma and N_Variant nodes.
235
236 -- To make processing easier in the latter case, the Nlists package
237 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
238 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
239 -- ignoring all pragmas.
240
241 -- In the case of the variants list, we can either write:
242
243 -- Variant := First (Variants (N));
244 -- while Present (Variant) loop
245 -- ...
246 -- Variant := Next (Variant);
247 -- end loop;
248
249 -- or
250
251 -- Variant := First_Non_Pragma (Variants (N));
252 -- while Present (Variant) loop
253 -- ...
254 -- Variant := Next_Non_Pragma (Variant);
255 -- end loop;
256
257 -- In the first form of the loop, Variant can either be an N_Pragma or an
258 -- N_Variant node. In the second form, Variant can only be N_Variant since
259 -- all pragmas are skipped.
260
261 ---------------------
262 -- Optional Fields --
263 ---------------------
264
265 -- Fields which correspond to a section of the syntax enclosed in square
266 -- brackets are generally omitted (and the corresponding field set to Empty
267 -- for a node, or No_List for a list). The documentation of such fields
268 -- notes these cases. One exception to this rule occurs in the case of
269 -- possibly empty statement sequences (such as the sequence of statements
270 -- in an entry call alternative). Such cases appear in the syntax rules as
271 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
272 -- statement sequences always contain an empty list (not No_List) if no
273 -- statements are present.
274
275 -- Note: the utility program that constructs the body and spec of the Nmake
276 -- package relies on the format of the comments to determine if a field
277 -- should have a default value in the corresponding make routine. The rule
278 -- is that if the first line of the description of the field contains the
279 -- string "(set to xxx if", then a default value of xxx is provided for
280 -- this field in the corresponding Make_yyy routine.
281
282 -----------------------------------
283 -- Note on Body/Spec Terminology --
284 -----------------------------------
285
286 -- In informal discussions about Ada, it is customary to refer to package
287 -- and subprogram specs and bodies. However, this is not technically
288 -- correct, what is normally referred to as a spec or specification is in
289 -- fact a package declaration or subprogram declaration. We are careful in
290 -- GNAT to use the correct terminology and in particular, the full word
291 -- specification is never used as an incorrect substitute for declaration.
292 -- The structure and terminology used in the tree also reflects the grammar
293 -- and thus uses declaration and specification in the technically correct
294 -- manner.
295
296 -- However, there are contexts in which the informal terminology is useful.
297 -- We have the word "body" to refer to the Interp_Etype declared by the
298 -- declaration of a unit body, and in some contexts we need similar term to
299 -- refer to the entity declared by the package or subprogram declaration,
300 -- and simply using declaration can be confusing since the body also has a
301 -- declaration.
302
303 -- An example of such a context is the link between the package body and
304 -- its declaration. With_Declaration is confusing, since the package body
305 -- itself is a declaration.
306
307 -- To deal with this problem, we reserve the informal term Spec, i.e. the
308 -- popular abbreviation used in this context, to refer to the entity
309 -- declared by the package or subprogram declaration. So in the above
310 -- example case, the field in the body is called With_Spec.
311
312 -- Another important context for the use of the word Spec is in error
313 -- messages, where a hyper-correct use of declaration would be confusing to
314 -- a typical Ada programmer, and even for an expert programmer can cause
315 -- confusion since the body has a declaration as well.
316
317 -- So, to summarize:
318
319 -- Declaration always refers to the syntactic entity that is called
320 -- a declaration. In particular, subprogram declaration
321 -- and package declaration are used to describe the
322 -- syntactic entity that includes the semicolon.
323
324 -- Specification always refers to the syntactic entity that is called
325 -- a specification. In particular, the terms procedure
326 -- specification, function specification, package
327 -- specification, subprogram specification always refer
328 -- to the syntactic entity that has no semicolon.
329
330 -- Spec is an informal term, used to refer to the entity
331 -- that is declared by a task declaration, protected
332 -- declaration, generic declaration, subprogram
333 -- declaration or package declaration.
334
335 -- This convention is followed throughout the GNAT documentation
336 -- both internal and external, and in all error message text.
337
338 ------------------------
339 -- Internal Use Nodes --
340 ------------------------
341
342 -- These are Node_Kind settings used in the internal implementation which
343 -- are not logically part of the specification.
344
345 -- N_Unused_At_Start
346 -- Completely unused entry at the start of the enumeration type. This
347 -- is inserted so that no legitimate value is zero, which helps to get
348 -- better debugging behavior, since zero is a likely uninitialized value).
349
350 -- N_Unused_At_End
351 -- Completely unused entry at the end of the enumeration type. This is
352 -- handy so that arrays with Node_Kind as the index type have an extra
353 -- entry at the end (see for example the use of the Pchar_Pos_Array in
354 -- Treepr, where the extra entry provides the limit value when dealing with
355 -- the last used entry in the array).
356
357 -----------------------------------------
358 -- Note on the settings of Sloc fields --
359 -----------------------------------------
360
361 -- The Sloc field of nodes that come from the source is set by the parser.
362 -- For internal nodes, and nodes generated during expansion the Sloc is
363 -- usually set in the call to the constructor for the node. In general the
364 -- Sloc value chosen for an internal node is the Sloc of the source node
365 -- whose processing is responsible for the expansion. For example, the Sloc
366 -- of an inherited primitive operation is the Sloc of the corresponding
367 -- derived type declaration.
368
369 -- For the nodes of a generic instantiation, the Sloc value is encoded to
370 -- represent both the original Sloc in the generic unit, and the Sloc of
371 -- the instantiation itself. See Sinput.ads for details.
372
373 -- Subprogram instances create two callable entities: one is the visible
374 -- subprogram instance, and the other is an anonymous subprogram nested
375 -- within a wrapper package that contains the renamings for the actuals.
376 -- Both of these entities have the Sloc of the defining entity in the
377 -- instantiation node. This simplifies some ASIS queries.
378
379 -----------------------
380 -- Field Definitions --
381 -----------------------
382
383 -- In the following node definitions, all fields, both syntactic and
384 -- semantic, are documented. The one exception is in the case of entities
385 -- (defining identifiers, character literals and operator symbols), where
386 -- the usage of the fields depends on the entity kind. Entity fields are
387 -- fully documented in the separate package Einfo.
388
389 -- In the node definitions, three common sets of fields are abbreviated to
390 -- save both space in the documentation, and also space in the string
391 -- (defined in Tree_Print_Strings) used to print trees. The following
392 -- abbreviations are used:
393
394 -- Note: the utility program that creates the Treeprs spec (in the file
395 -- xtreeprs.adb) knows about the special fields here, so it must be
396 -- modified if any change is made to these fields.
397
398 -- "plus fields for binary operator"
399 -- Chars (Name1) Name_Id for the operator
400 -- Left_Opnd (Node2) left operand expression
401 -- Right_Opnd (Node3) right operand expression
402 -- Entity (Node4-Sem) defining entity for operator
403 -- Associated_Node (Node4-Sem) for generic processing
404 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
405 -- Has_Private_View (Flag11-Sem) set in generic units.
406
407 -- "plus fields for unary operator"
408 -- Chars (Name1) Name_Id for the operator
409 -- Right_Opnd (Node3) right operand expression
410 -- Entity (Node4-Sem) defining entity for operator
411 -- Associated_Node (Node4-Sem) for generic processing
412 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
413 -- Has_Private_View (Flag11-Sem) set in generic units.
414
415 -- "plus fields for expression"
416 -- Paren_Count number of parentheses levels
417 -- Etype (Node5-Sem) type of the expression
418 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
419 -- Is_Static_Expression (Flag6-Sem) set for static expression
420 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
421 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
422 -- Do_Range_Check (Flag9-Sem) set if a range check needed
423 -- Assignment_OK (Flag15-Sem) set if modification is OK
424 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
425
426 -- Note: see under (EXPRESSION) for further details on the use of
427 -- the Paren_Count field to record the number of parentheses levels.
428
429 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
430 -- The actual definition of this type is given later (the reason for this
431 -- is that we want the descriptions ordered by logical chapter in the RM,
432 -- but the type definition is reordered to facilitate the definition of
433 -- some subtype ranges. The individual descriptions of the nodes show how
434 -- the various fields are used in each node kind, as well as providing
435 -- logical names for the fields. Functions and procedures are provided for
436 -- accessing and setting these fields using these logical names.
437
438 -----------------------
439 -- Gigi Restrictions --
440 -----------------------
441
442 -- The tree passed to Gigi is more restricted than the general tree form.
443 -- For example, as a result of expansion, most of the tasking nodes can
444 -- never appear. For each node to which either a complete or partial
445 -- restriction applies, a note entitled "Gigi restriction" appears which
446 -- documents the restriction.
447
448 -- Note that most of these restrictions apply only to trees generated when
449 -- code is being generated, since they involved expander actions that
450 -- destroy the tree.
451
452 ------------------------
453 -- Common Flag Fields --
454 ------------------------
455
456 -- The following flag fields appear in all nodes
457
458 -- Analyzed (Flag1)
459 -- This flag is used to indicate that a node (and all its children have
460 -- been analyzed. It is used to avoid reanalysis of a node that has
461 -- already been analyzed, both for efficiency and functional correctness
462 -- reasons.
463
464 -- Comes_From_Source (Flag2)
465 -- This flag is on for any nodes built by the scanner or parser from the
466 -- source program, and off for any nodes built by the analyzer or
467 -- expander. It indicates that a node comes from the original source.
468 -- This flag is defined in Atree.
469
470 -- Error_Posted (Flag3)
471 -- This flag is used to avoid multiple error messages being posted on or
472 -- referring to the same node. This flag is set if an error message
473 -- refers to a node or is posted on its source location, and has the
474 -- effect of inhibiting further messages involving this same node.
475
476 -- Has_Dynamic_Length_Check (Flag10-Sem)
477 -- This flag is present on all nodes. It is set to indicate that one of
478 -- the routines in unit Checks has generated a length check action which
479 -- has been inserted at the flagged node. This is used to avoid the
480 -- generation of duplicate checks.
481
482 -- Has_Dynamic_Range_Check (Flag12-Sem)
483 -- This flag is present on all nodes. It is set to indicate that one of
484 -- the routines in unit Checks has generated a range check action which
485 -- has been inserted at the flagged node. This is used to avoid the
486 -- generation of duplicate checks.
487
488 -- Has_Local_Raise (Flag8-Sem)
489 -- Present in exception handler nodes. Set if the handler can be entered
490 -- via a local raise that gets transformed to a goto statement. This will
491 -- always be set if Local_Raise_Statements is non-empty, but can also be
492 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
493 -- nodes requiring generation of back end checks.
494
495 ------------------------------------
496 -- Description of Semantic Fields --
497 ------------------------------------
498
499 -- The meaning of the syntactic fields is generally clear from their names
500 -- without any further description, since the names are chosen to
501 -- correspond very closely to the syntax in the reference manual. This
502 -- section describes the usage of the semantic fields, which are used to
503 -- contain additional information determined during semantic analysis.
504
505 -- ABE_Is_Certain (Flag18-Sem)
506 -- This flag is set in an instantiation node or a call node is determined
507 -- to be sure to raise an ABE. This is used to trigger special handling
508 -- of such cases, particularly in the instantiation case where we avoid
509 -- instantiating the body if this flag is set. This flag is also present
510 -- in an N_Formal_Package_Declaration_Node since formal package
511 -- declarations are treated like instantiations, but it is always set to
512 -- False in this context.
513
514 -- Accept_Handler_Records (List5-Sem)
515 -- This field is present only in an N_Accept_Alternative node. It is used
516 -- to temporarily hold the exception handler records from an accept
517 -- statement in a selective accept. These exception handlers will
518 -- eventually be placed in the Handler_Records list of the procedure
519 -- built for this accept (see Expand_N_Selective_Accept procedure in
520 -- Exp_Ch9 for further details).
521
522 -- Access_Types_To_Process (Elist2-Sem)
523 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
524 -- Contains the list of access types which may require specific treatment
525 -- when the nature of the type completion is completely known. An example
526 -- of such treatment is the generation of the associated_final_chain.
527
528 -- Actions (List1-Sem)
529 -- This field contains a sequence of actions that are associated with the
530 -- node holding the field. See the individual node types for details of
531 -- how this field is used, as well as the description of the specific use
532 -- for a particular node type.
533
534 -- Activation_Chain_Entity (Node3-Sem)
535 -- This is used in tree nodes representing task activators (blocks,
536 -- subprogram bodies, package declarations, and task bodies). It is
537 -- initially Empty, and then gets set to point to the entity for the
538 -- declared Activation_Chain variable when the first task is declared.
539 -- When tasks are declared in the corresponding declarative region this
540 -- entity is located by name (its name is always _Chain) and the declared
541 -- tasks are added to the chain. Note that N_Extended_Return_Statement
542 -- does not have this attribute, although it does have an activation
543 -- chain. This chain is used to store the tasks temporarily, and is not
544 -- used for activating them. On successful completion of the return
545 -- statement, the tasks are moved to the caller's chain, and the caller
546 -- activates them.
547
548 -- Acts_As_Spec (Flag4-Sem)
549 -- A flag set in the N_Subprogram_Body node for a subprogram body which
550 -- is acting as its own spec, except in the case of a library level
551 -- subprogram, in which case the flag is set on the parent compilation
552 -- unit node instead (see further description in spec of Lib package).
553 -- ??? Above note about Lib is dubious since lib.ads does not mention
554 -- Acts_As_Spec at all.
555
556 -- Actual_Designated_Subtype (Node4-Sem)
557 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
558 -- needs to known the dynamic constrained subtype of the designated
559 -- object, this attribute is set to that type. This is done for
560 -- N_Free_Statements for access-to-classwide types and access to
561 -- unconstrained packed array types, and for N_Explicit_Dereference when
562 -- the designated type is an unconstrained packed array and the
563 -- dereference is the prefix of a 'Size attribute reference.
564
565 -- Address_Warning_Posted (Flag18-Sem)
566 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
567 -- posted a warning for the address clause regarding size or alignment
568 -- issues. Used to inhibit multiple redundant messages.
569
570 -- Aggregate_Bounds (Node3-Sem)
571 -- Present in array N_Aggregate nodes. If the aggregate contains
572 -- component associations this field points to an N_Range node whose
573 -- bounds give the lowest and highest discrete choice values. If the
574 -- named aggregate contains a dynamic or null choice this field is empty.
575 -- If the aggregate contains positional elements this field points to an
576 -- N_Integer_Literal node giving the number of positional elements. Note
577 -- that if the aggregate contains positional elements and an other choice
578 -- the N_Integer_Literal only accounts for the number of positional
579 -- elements.
580
581 -- All_Others (Flag11-Sem)
582 -- Present in an N_Others_Choice node. This flag is set for an others
583 -- exception where all exceptions are to be caught, even those that are
584 -- not normally handled (in particular the tasking abort signal). This
585 -- is used for translation of the at end handler into a normal exception
586 -- handler.
587
588 -- Assignment_OK (Flag15-Sem)
589 -- This flag is set in a subexpression node for an object, indicating
590 -- that the associated object can be modified, even if this would not
591 -- normally be permissible (either by direct assignment, or by being
592 -- passed as an out or in-out parameter). This is used by the expander
593 -- for a number of purposes, including initialization of constants and
594 -- limited type objects (such as tasks), setting discriminant fields,
595 -- setting tag values, etc. N_Object_Declaration nodes also have this
596 -- flag defined. Here it is used to indicate that an initialization
597 -- expression is valid, even where it would normally not be allowed
598 -- (e.g. where the type involved is limited).
599
600 -- Associated_Node (Node4-Sem)
601 -- Present in nodes that can denote an entity: identifiers, character
602 -- literals, operator symbols, expanded names, operator nodes, and
603 -- attribute reference nodes (all these nodes have an Entity field).
604 -- This field is also present in N_Aggregate, N_Selected_Component, and
605 -- N_Extension_Aggregate nodes. This field is used in generic processing
606 -- to create links between the generic template and the generic copy.
607 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
608 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
609 -- the normal function of Entity is not required at the point where the
610 -- Associated_Node is set. Note also, that in generic templates, this
611 -- means that the Entity field does not necessarily point to an Entity.
612 -- Since the back end is expected to ignore generic templates, this is
613 -- harmless.
614
615 -- At_End_Proc (Node1)
616 -- This field is present in an N_Handled_Sequence_Of_Statements node.
617 -- It contains an identifier reference for the cleanup procedure to be
618 -- called. See description of this node for further details.
619
620 -- Backwards_OK (Flag6-Sem)
621 -- A flag present in the N_Assignment_Statement node. It is used only
622 -- if the type being assigned is an array type, and is set if analysis
623 -- determines that it is definitely safe to do the copy backwards, i.e.
624 -- starting at the highest addressed element. This is the case if either
625 -- the operands do not overlap, or they may overlap, but if they do,
626 -- then the left operand is at a higher address than the right operand.
627 --
628 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
629 -- means that the front end could not determine that either direction is
630 -- definitely safe, and a runtime check may be required if the backend
631 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
632 -- set, it means that the front end can assure no overlap of operands.
633
634 -- Body_To_Inline (Node3-Sem)
635 -- present in subprogram declarations. Denotes analyzed but unexpanded
636 -- body of subprogram, to be used when inlining calls. Present when the
637 -- subprogram has an Inline pragma and inlining is enabled. If the
638 -- declaration is completed by a renaming_as_body, and the renamed en-
639 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
640 -- which is used directly in later calls to the original subprogram.
641
642 -- Body_Required (Flag13-Sem)
643 -- A flag that appears in the N_Compilation_Unit node indicating that
644 -- the corresponding unit requires a body. For the package case, this
645 -- indicates that a completion is required. In Ada 95, if the flag is not
646 -- set for the package case, then a body may not be present. In Ada 83,
647 -- if the flag is not set for the package case, then body is optional.
648 -- For a subprogram declaration, the flag is set except in the case where
649 -- a pragma Import or Interface applies, in which case no body is
650 -- permitted (in Ada 83 or Ada 95).
651
652 -- By_Ref (Flag5-Sem)
653 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
654 -- this flag is set when the returned expression is already allocated on
655 -- the secondary stack and thus the result is passed by reference rather
656 -- than copied another time.
657
658 -- Check_Address_Alignment (Flag11-Sem)
659 -- A flag present in N_Attribute_Definition clause for a 'Address
660 -- attribute definition. This flag is set if a dynamic check should be
661 -- generated at the freeze point for the entity to which this address
662 -- clause applies. The reason that we need this flag is that we want to
663 -- check for range checks being suppressed at the point where the
664 -- attribute definition clause is given, rather than testing this at the
665 -- freeze point.
666
667 -- Coextensions (Elist4-Sem)
668 -- Present in allocators nodes. Points to list of allocators for the
669 -- access discriminants of the allocated object.
670
671 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
672 -- Present in N_Simple_Return_Statement nodes. True if this node was
673 -- constructed as part of the N_Extended_Return_Statement expansion.
674
675 -- Compile_Time_Known_Aggregate (Flag18-Sem)
676 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
677 -- evaluated at compile time without raising constraint error. Such
678 -- aggregates can be passed as is to Gigi without any expansion. See
679 -- Sem_Aggr for the specific conditions under which an aggregate has this
680 -- flag set. See also the flag Static_Processing_OK.
681
682 -- Componentwise_Assignment (Flag14-Sem)
683 -- Present in N_Assignment_Statement nodes. Set for a record assignment
684 -- where all that needs doing is to expand it into component-by-component
685 -- assignments. This is used internally for the case of tagged types with
686 -- rep clauses, where we need to avoid recursion (we don't want to try to
687 -- generate a call to the primitive operation, because this is the case
688 -- where we are compiling the primitive operation). Note that when we are
689 -- expanding component assignments in this case, we never assign the _tag
690 -- field, but we recursively assign components of the parent type.
691
692 -- Condition_Actions (List3-Sem)
693 -- This field appears in else-if nodes and in the iteration scheme node
694 -- for while loops. This field is only used during semantic processing to
695 -- temporarily hold actions inserted into the tree. In the tree passed
696 -- to gigi, the condition actions field is always set to No_List. For
697 -- details on how this field is used, see the routine Insert_Actions in
698 -- package Exp_Util, and also the expansion routines for the relevant
699 -- nodes.
700
701 -- Context_Pending (Flag16-Sem)
702 -- This field appears in Compilation_Unit nodes, to indicate that the
703 -- context of the unit is being compiled. Used to detect circularities
704 -- that are not otherwise detected by the loading mechanism. Such
705 -- circularities can occur in the presence of limited and non-limited
706 -- with_clauses that mention the same units.
707
708 -- Controlling_Argument (Node1-Sem)
709 -- This field is set in procedure and function call nodes if the call
710 -- is a dispatching call (it is Empty for a non-dispatching call). It
711 -- indicates the source of the call's controlling tag. For procedure
712 -- calls, the Controlling_Argument is one of the actuals. For function
713 -- that has a dispatching result, it is an entity in the context of the
714 -- call that can provide a tag, or else it is the tag of the root type
715 -- of the class. It can also specify a tag directly rather than being a
716 -- tagged object. The latter is needed by the implementations of AI-239
717 -- and AI-260.
718
719 -- Conversion_OK (Flag14-Sem)
720 -- A flag set on type conversion nodes to indicate that the conversion
721 -- is to be considered as being valid, even though it is the case that
722 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
723 -- Fixed_Value and Integer_Value, for internal conversions done for
724 -- fixed-point operations, and for certain conversions for calls to
725 -- initialization procedures. If Conversion_OK is set, then Etype must be
726 -- set (the analyzer assumes that Etype has been set). For the case of
727 -- fixed-point operands, it also indicates that the conversion is to be
728 -- direct conversion of the underlying integer result, with no regard to
729 -- the small operand.
730
731 -- Corresponding_Body (Node5-Sem)
732 -- This field is set in subprogram declarations, package declarations,
733 -- entry declarations of protected types, and in generic units. It
734 -- points to the defining entity for the corresponding body (NOT the
735 -- node for the body itself).
736
737 -- Corresponding_Formal_Spec (Node3-Sem)
738 -- This field is set in subprogram renaming declarations, where it points
739 -- to the defining entity for a formal subprogram in the case where the
740 -- renaming corresponds to a generic formal subprogram association in an
741 -- instantiation. The field is Empty if the renaming does not correspond
742 -- to such a formal association.
743
744 -- Corresponding_Generic_Association (Node5-Sem)
745 -- This field is defined for object declarations and object renaming
746 -- declarations. It is set for the declarations within an instance that
747 -- map generic formals to their actuals. If set, the field points to
748 -- a generic_association which is the original parent of the expression
749 -- or name appearing in the declaration. This simplifies ASIS queries.
750
751 -- Corresponding_Integer_Value (Uint4-Sem)
752 -- This field is set in real literals of fixed-point types (it is not
753 -- used for floating-point types). It contains the integer value used
754 -- to represent the fixed-point value. It is also set on the universal
755 -- real literals used to represent bounds of fixed-point base types
756 -- and their first named subtypes.
757
758 -- Corresponding_Spec (Node5-Sem)
759 -- This field is set in subprogram, package, task, and protected body
760 -- nodes, where it points to the defining entity in the corresponding
761 -- spec. The attribute is also set in N_With_Clause nodes where it points
762 -- to the defining entity for the with'ed spec, and in a subprogram
763 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
764 -- if there is no corresponding spec, as in the case of a subprogram body
765 -- that serves as its own spec.
766
767 -- Corresponding_Stub (Node3-Sem)
768 -- This field is present in an N_Subunit node. It holds the node in
769 -- the parent unit that is the stub declaration for the subunit. It is
770 -- set when analysis of the stub forces loading of the proper body. If
771 -- expansion of the proper body creates new declarative nodes, they are
772 -- inserted at the point of the corresponding_stub.
773
774 -- Dcheck_Function (Node5-Sem)
775 -- This field is present in an N_Variant node, It references the entity
776 -- for the discriminant checking function for the variant.
777
778 -- Debug_Statement (Node3)
779 -- This field is present in an N_Pragma node. It is used only for a Debug
780 -- pragma. The parameter is of the form of an expression, as required by
781 -- the pragma syntax, but is actually a procedure call. To simplify
782 -- semantic processing, the parser creates a copy of the argument
783 -- rearranged into a procedure call statement and places it in the
784 -- Debug_Statement field. Note that this field is considered syntactic
785 -- field, since it is created by the parser.
786
787 -- Default_Expression (Node5-Sem)
788 -- This field is Empty if there is no default expression. If there is a
789 -- simple default expression (one with no side effects), then this field
790 -- simply contains a copy of the Expression field (both point to the tree
791 -- for the default expression). Default_Expression is used for
792 -- conformance checking.
793
794 -- Discr_Check_Funcs_Built (Flag11-Sem)
795 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
796 -- discriminant checking functions are constructed. The purpose is to
797 -- avoid attempting to set these functions more than once.
798
799 -- Do_Accessibility_Check (Flag13-Sem)
800 -- This flag is set on N_Parameter_Specification nodes to indicate
801 -- that an accessibility check is required for the parameter. It is
802 -- not yet decided who takes care of this check (TBD ???).
803
804 -- Do_Discriminant_Check (Flag13-Sem)
805 -- This flag is set on N_Selected_Component nodes to indicate that a
806 -- discriminant check is required using the discriminant check routine
807 -- associated with the selector. The actual check is generated by the
808 -- expander when processing selected components.
809
810 -- Do_Division_Check (Flag13-Sem)
811 -- This flag is set on a division operator (/ mod rem) to indicate
812 -- that a zero divide check is required. The actual check is dealt
813 -- with by the backend (all the front end does is to set the flag).
814
815 -- Do_Length_Check (Flag4-Sem)
816 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
817 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
818 -- is required. It is not determined who deals with this flag (???).
819
820 -- Do_Overflow_Check (Flag17-Sem)
821 -- This flag is set on an operator where an overflow check is required on
822 -- the operation. The actual check is dealt with by the backend (all the
823 -- front end does is to set the flag). The other cases where this flag is
824 -- used is on a Type_Conversion node and for attribute reference nodes.
825 -- For a type conversion, it means that the conversion is from one base
826 -- type to another, and the value may not fit in the target base type.
827 -- See also the description of Do_Range_Check for this case. The only
828 -- attribute references which use this flag are Pred and Succ, where it
829 -- means that the result should be checked for going outside the base
830 -- range. Note that this flag is not set for modular types.
831
832 -- Do_Range_Check (Flag9-Sem)
833 -- This flag is set on an expression which appears in a context where a
834 -- range check is required. The target type is clear from the context.
835 -- The contexts in which this flag can appear are the following:
836
837 -- Right side of an assignment. In this case the target type is
838 -- taken from the left side of the assignment, which is referenced
839 -- by the Name of the N_Assignment_Statement node.
840
841 -- Subscript expressions in an indexed component. In this case the
842 -- target type is determined from the type of the array, which is
843 -- referenced by the Prefix of the N_Indexed_Component node.
844
845 -- Argument expression for a parameter, appearing either directly in
846 -- the Parameter_Associations list of a call or as the Expression of an
847 -- N_Parameter_Association node that appears in this list. In either
848 -- case, the check is against the type of the formal. Note that the
849 -- flag is relevant only in IN and IN OUT parameters, and will be
850 -- ignored for OUT parameters, where no check is required in the call,
851 -- and if a check is required on the return, it is generated explicitly
852 -- with a type conversion.
853
854 -- Initialization expression for the initial value in an object
855 -- declaration. In this case the Do_Range_Check flag is set on
856 -- the initialization expression, and the check is against the
857 -- range of the type of the object being declared.
858
859 -- The expression of a type conversion. In this case the range check is
860 -- against the target type of the conversion. See also the use of
861 -- Do_Overflow_Check on a type conversion. The distinction is that the
862 -- overflow check protects against a value that is outside the range of
863 -- the target base type, whereas a range check checks that the
864 -- resulting value (which is a value of the base type of the target
865 -- type), satisfies the range constraint of the target type.
866
867 -- Note: when a range check is required in contexts other than those
868 -- listed above (e.g. in a return statement), an additional type
869 -- conversion node is introduced to represent the required check.
870
871 -- Do_Storage_Check (Flag17-Sem)
872 -- This flag is set in an N_Allocator node to indicate that a storage
873 -- check is required for the allocation, or in an N_Subprogram_Body node
874 -- to indicate that a stack check is required in the subprogram prolog.
875 -- The N_Allocator case is handled by the routine that expands the call
876 -- to the runtime routine. The N_Subprogram_Body case is handled by the
877 -- backend, and all the semantics does is set the flag.
878
879 -- Do_Tag_Check (Flag13-Sem)
880 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
881 -- N_Procedure_Call_Statement, N_Type_Conversion,
882 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
883 -- node to indicate that the tag check can be suppressed. It is not
884 -- yet decided how this flag is used (TBD ???).
885
886 -- Elaborate_Present (Flag4-Sem)
887 -- This flag is set in the N_With_Clause node to indicate that pragma
888 -- Elaborate pragma appears for the with'ed units.
889
890 -- Elaborate_All_Desirable (Flag9-Sem)
891 -- This flag is set in the N_With_Clause mode to indicate that the static
892 -- elaboration processing has determined that an Elaborate_All pragma is
893 -- desirable for correct elaboration for this unit.
894
895 -- Elaborate_All_Present (Flag14-Sem)
896 -- This flag is set in the N_With_Clause node to indicate that a
897 -- pragma Elaborate_All pragma appears for the with'ed units.
898
899 -- Elaborate_Desirable (Flag11-Sem)
900 -- This flag is set in the N_With_Clause mode to indicate that the static
901 -- elaboration processing has determined that an Elaborate pragma is
902 -- desirable for correct elaboration for this unit.
903
904 -- Elaboration_Boolean (Node2-Sem)
905 -- This field is present in function and procedure specification nodes.
906 -- If set, it points to the entity for a Boolean flag that must be tested
907 -- for certain calls to check for access before elaboration. See body of
908 -- Sem_Elab for further details. This field is Empty if no elaboration
909 -- boolean is required.
910
911 -- Else_Actions (List3-Sem)
912 -- This field is present in conditional expression nodes. During code
913 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
914 -- actions at an appropriate place in the tree to get elaborated at the
915 -- right time. For conditional expressions, we have to be sure that the
916 -- actions for the Else branch are only elaborated if the condition is
917 -- False. The Else_Actions field is used as a temporary parking place for
918 -- these actions. The final tree is always rewritten to eliminate the
919 -- need for this field, so in the tree passed to Gigi, this field is
920 -- always set to No_List.
921
922 -- Enclosing_Variant (Node2-Sem)
923 -- This field is present in the N_Variant node and identifies the Node_Id
924 -- corresponding to the immediately enclosing variant when the variant is
925 -- nested, and N_Empty otherwise. Set during semantic processing of the
926 -- variant part of a record type.
927
928 -- Entity (Node4-Sem)
929 -- Appears in all direct names (identifiers, character literals, and
930 -- operator symbols), as well as expanded names, and attributes that
931 -- denote entities, such as 'Class. Points to entity for corresponding
932 -- defining occurrence. Set after name resolution. For identifiers in a
933 -- WITH list, the corresponding defining occurrence is in a separately
934 -- compiled file, and Entity must be set by the library Load procedure.
935 --
936 -- Note: During name resolution, the value in Entity may be temporarily
937 -- incorrect (e.g. during overload resolution, Entity is initially set to
938 -- the first possible correct interpretation, and then later modified if
939 -- necessary to contain the correct value after resolution).
940 --
941 -- Note: This field overlaps Associated_Node, which is used during
942 -- generic processing (see Sem_Ch12 for details). Note also that in
943 -- generic templates, this means that the Entity field does not always
944 -- point to an Entity. Since the back end is expected to ignore generic
945 -- templates, this is harmless.
946 --
947 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
948 -- It is used only for stream attributes definition clauses. In this
949 -- case, it denotes a (possibly dummy) subprogram entity that is declared
950 -- conceptually at the point of the clause. Thus the visibility of the
951 -- attribute definition clause (in the sense of 8.3(23) as amended by
952 -- AI-195) can be checked by testing the visibility of that subprogram.
953 --
954 -- Note: Normally the Entity field of an identifier points to the entity
955 -- for the corresponding defining identifier, and hence the Chars field
956 -- of an identifier will match the Chars field of the entity. However,
957 -- there is no requirement that these match, and there are obscure cases
958 -- of generated code where they do not match.
959
960 -- Entity_Or_Associated_Node (Node4-Sem)
961 -- A synonym for both Entity and Associated_Node. Used by convention in
962 -- the code when referencing this field in cases where it is not known
963 -- whether the field contains an Entity or an Associated_Node.
964
965 -- Etype (Node5-Sem)
966 -- Appears in all expression nodes, all direct names, and all entities.
967 -- Points to the entity for the related type. Set after type resolution.
968 -- Normally this is the actual subtype of the expression. However, in
969 -- certain contexts such as the right side of an assignment, subscripts,
970 -- arguments to calls, returned value in a function, initial value etc.
971 -- it is the desired target type. In the event that this is different
972 -- from the actual type, the Do_Range_Check flag will be set if a range
973 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
974 -- points to an essentially arbitrary choice from the possible set of
975 -- types.
976
977 -- Exception_Junk (Flag8-Sem)
978 -- This flag is set in a various nodes appearing in a statement sequence
979 -- to indicate that the corresponding node is an artifact of the
980 -- generated code for exception handling, and should be ignored when
981 -- analyzing the control flow of the relevant sequence of statements
982 -- (e.g. to check that it does not end with a bad return statement).
983
984 -- Exception_Label (Node5-Sem)
985 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
986 -- to be used for transforming the corresponding exception into a goto,
987 -- or contains Empty, if this exception is not to be transformed. Also
988 -- appears in N_Exception_Handler nodes, where, if set, it indicates
989 -- that there may be a local raise for the handler, so that expansion
990 -- to allow a goto is required (and this field contains the label for
991 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
992
993 -- Expansion_Delayed (Flag11-Sem)
994 -- Set on aggregates and extension aggregates that need a top-down rather
995 -- than bottom-up expansion. Typically aggregate expansion happens bottom
996 -- up. For nested aggregates the expansion is delayed until the enclosing
997 -- aggregate itself is expanded, e.g. in the context of a declaration. To
998 -- delay it we set this flag. This is done to avoid creating a temporary
999 -- for each level of a nested aggregates, and also to prevent the
1000 -- premature generation of constraint checks. This is also a requirement
1001 -- if we want to generate the proper attachment to the internal
1002 -- finalization lists (for record with controlled components). Top down
1003 -- expansion of aggregates is also used for in-place array aggregate
1004 -- assignment or initialization. When the full context is known, the
1005 -- target of the assignment or initialization is used to generate the
1006 -- left-hand side of individual assignment to each sub-component.
1007
1008 -- First_Inlined_Subprogram (Node3-Sem)
1009 -- Present in the N_Compilation_Unit node for the main program. Points
1010 -- to a chain of entities for subprograms that are to be inlined. The
1011 -- Next_Inlined_Subprogram field of these entities is used as a link
1012 -- pointer with Empty marking the end of the list. This field is Empty
1013 -- if there are no inlined subprograms or inlining is not active.
1014
1015 -- First_Named_Actual (Node4-Sem)
1016 -- Present in procedure call statement and function call nodes, and also
1017 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1018 -- named parameter where parameters are ordered by declaration order (as
1019 -- opposed to the actual order in the call which may be different due to
1020 -- named associations). Note: this field points to the explicit actual
1021 -- parameter itself, not the N_Parameter_Association node (its parent).
1022
1023 -- First_Real_Statement (Node2-Sem)
1024 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1025 -- Empty. Used only when declarations are moved into the statement part
1026 -- of a construct as a result of wrapping an AT END handler that is
1027 -- required to cover the declarations. In this case, this field is used
1028 -- to remember the location in the statements list of the first real
1029 -- statement, i.e. the statement that used to be first in the statement
1030 -- list before the declarations were prepended.
1031
1032 -- First_Subtype_Link (Node5-Sem)
1033 -- Present in N_Freeze_Entity node for an anonymous base type that is
1034 -- implicitly created by the declaration of a first subtype. It points
1035 -- to the entity for the first subtype.
1036
1037 -- Float_Truncate (Flag11-Sem)
1038 -- A flag present in type conversion nodes. This is used for float to
1039 -- integer conversions where truncation is required rather than rounding.
1040 -- Note that Gigi does not handle type conversions from real to integer
1041 -- with rounding (see Expand_N_Type_Conversion).
1042
1043 -- Forwards_OK (Flag5-Sem)
1044 -- A flag present in the N_Assignment_Statement node. It is used only
1045 -- if the type being assigned is an array type, and is set if analysis
1046 -- determines that it is definitely safe to do the copy forwards, i.e.
1047 -- starting at the lowest addressed element. This is the case if either
1048 -- the operands do not overlap, or they may overlap, but if they do,
1049 -- then the left operand is at a lower address than the right operand.
1050 --
1051 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1052 -- means that the front end could not determine that either direction is
1053 -- definitely safe, and a runtime check may be required if the backend
1054 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1055 -- set, it means that the front end can assure no overlap of operands.
1056
1057 -- From_At_End (Flag4-Sem)
1058 -- This flag is set on an N_Raise_Statement node if it corresponds to
1059 -- the reraise statement generated as the last statement of an AT END
1060 -- handler when SJLJ exception handling is active. It is used to stop
1061 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1062 -- because if the restriction is set, the reraise is not generated.
1063
1064 -- From_At_Mod (Flag4-Sem)
1065 -- This flag is set on the attribute definition clause node that is
1066 -- generated by a transformation of an at mod phrase in a record
1067 -- representation clause. This is used to give slightly different (Ada 83
1068 -- compatible) semantics to such a clause, namely it is used to specify a
1069 -- minimum acceptable alignment for the base type and all subtypes. In
1070 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1071 -- must be a multiple of the given value, and the representation clause
1072 -- is considered to be type specific instead of subtype specific.
1073
1074 -- From_Default (Flag6-Sem)
1075 -- This flag is set on the subprogram renaming declaration created in an
1076 -- instance for a formal subprogram, when the formal is declared with a
1077 -- box, and there is no explicit actual. If the flag is present, the
1078 -- declaration is treated as an implicit reference to the formal in the
1079 -- ali file.
1080
1081 -- Generic_Parent (Node5-Sem)
1082 -- Generic_Parent is defined on declaration nodes that are instances. The
1083 -- value of Generic_Parent is the generic entity from which the instance
1084 -- is obtained. Generic_Parent is also defined for the renaming
1085 -- declarations and object declarations created for the actuals in an
1086 -- instantiation. The generic parent of such a declaration is the
1087 -- corresponding generic association in the Instantiation node.
1088
1089 -- Generic_Parent_Type (Node4-Sem)
1090 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1091 -- actuals of formal private and derived types. Within the instance, the
1092 -- operations on the actual are those inherited from the parent. For a
1093 -- formal private type, the parent type is the generic type itself. The
1094 -- Generic_Parent_Type is also used in an instance to determine whether a
1095 -- private operation overrides an inherited one.
1096
1097 -- Handler_List_Entry (Node2-Sem)
1098 -- This field is present in N_Object_Declaration nodes. It is set only
1099 -- for the Handler_Record entry generated for an exception in zero cost
1100 -- exception handling mode. It references the corresponding item in the
1101 -- handler list, and is used to delete this entry if the corresponding
1102 -- handler is deleted during optimization. For further details on why
1103 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1104
1105 -- Has_No_Elaboration_Code (Flag17-Sem)
1106 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1107 -- or not elaboration code is present for this unit. It is initially set
1108 -- true for subprogram specs and bodies and for all generic units and
1109 -- false for non-generic package specs and bodies. Gigi may set the flag
1110 -- in the non-generic package case if it determines that no elaboration
1111 -- code is generated. Note that this flag is not related to the
1112 -- Is_Preelaborated status, there can be preelaborated packages that
1113 -- generate elaboration code, and non-preelaborated packages which do
1114 -- not generate elaboration code.
1115
1116 -- Has_Priority_Pragma (Flag6-Sem)
1117 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1118 -- N_Protected_Definition nodes to flag the presence of either a Priority
1119 -- or Interrupt_Priority pragma in the declaration sequence (public or
1120 -- private in the task and protected cases)
1121
1122 -- Has_Private_View (Flag11-Sem)
1123 -- A flag present in generic nodes that have an entity, to indicate that
1124 -- the node has a private type. Used to exchange private and full
1125 -- declarations if the visibility at instantiation is different from the
1126 -- visibility at generic definition.
1127
1128 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1129 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1130 -- flag the presence of a pragma Relative_Deadline.
1131
1132 -- Has_Self_Reference (Flag13-Sem)
1133 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1134 -- of the expressions contains an access attribute reference to the
1135 -- enclosing type. Such a self-reference can only appear in default-
1136 -- initialized aggregate for a record type.
1137
1138 -- Has_Storage_Size_Pragma (Flag5-Sem)
1139 -- A flag present in an N_Task_Definition node to flag the presence of a
1140 -- Storage_Size pragma.
1141
1142 -- Has_Task_Info_Pragma (Flag7-Sem)
1143 -- A flag present in an N_Task_Definition node to flag the presence of a
1144 -- Task_Info pragma. Used to detect duplicate pragmas.
1145
1146 -- Has_Task_Name_Pragma (Flag8-Sem)
1147 -- A flag present in N_Task_Definition nodes to flag the presence of a
1148 -- Task_Name pragma in the declaration sequence for the task.
1149
1150 -- Has_Wide_Character (Flag11-Sem)
1151 -- Present in string literals, set if any wide character (i.e. character
1152 -- code outside the Character range) appears in the string.
1153
1154 -- Hidden_By_Use_Clause (Elist4-Sem)
1155 -- An entity list present in use clauses that appear within
1156 -- instantiations. For the resolution of local entities, entities
1157 -- introduced by these use clauses have priority over global ones, and
1158 -- outer entities must be explicitly hidden/restored on exit.
1159
1160 -- Implicit_With (Flag16-Sem)
1161 -- This flag is set in the N_With_Clause node that is implicitly
1162 -- generated for runtime units that are loaded by the expander, and also
1163 -- for package System, if it is loaded implicitly by a use of the
1164 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1165 -- as well.
1166
1167 -- Includes_Infinities (Flag11-Sem)
1168 -- This flag is present in N_Range nodes. It is set for the range of
1169 -- unconstrained float types defined in Standard, which include not only
1170 -- the given range of values, but also legitimately can include infinite
1171 -- values. This flag is false for any float type for which an explicit
1172 -- range is given by the programmer, even if that range is identical to
1173 -- the range for Float.
1174
1175 -- Instance_Spec (Node5-Sem)
1176 -- This field is present in generic instantiation nodes, and also in
1177 -- formal package declaration nodes (formal package declarations are
1178 -- treated in a manner very similar to package instantiations). It points
1179 -- to the node for the spec of the instance, inserted as part of the
1180 -- semantic processing for instantiations in Sem_Ch12.
1181
1182 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1183 -- A flag set in a Block_Statement node to indicate that it is the
1184 -- expansion of an asynchronous entry call. Such a block needs cleanup
1185 -- handler to assure that the call is cancelled.
1186
1187 -- Is_Component_Left_Opnd (Flag13-Sem)
1188 -- Is_Component_Right_Opnd (Flag14-Sem)
1189 -- Present in concatenation nodes, to indicate that the corresponding
1190 -- operand is of the component type of the result. Used in resolving
1191 -- concatenation nodes in instances.
1192
1193 -- Is_Controlling_Actual (Flag16-Sem)
1194 -- This flag is set on in an expression that is a controlling argument in
1195 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1196 -- details of its use.
1197
1198 -- Is_Dynamic_Coextension (Flag18-Sem)
1199 -- Present in allocator nodes, to indicate that this is an allocator
1200 -- for an access discriminant of a dynamically allocated object. The
1201 -- coextension must be deallocated and finalized at the same time as
1202 -- the enclosing object.
1203
1204 -- Is_Entry_Barrier_Function (Flag8-Sem)
1205 -- This flag is set in an N_Subprogram_Body node which is the expansion
1206 -- of an entry barrier from a protected entry body. It is used for the
1207 -- circuitry checking for incorrect use of Current_Task.
1208
1209 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1210 -- This flag is set in an N_Function_Call node to indicate that the extra
1211 -- actuals to support a build-in-place style of call have been added to
1212 -- the call.
1213
1214 -- Is_In_Discriminant_Check (Flag11-Sem)
1215 -- This flag is present in a selected component, and is used to indicate
1216 -- that the reference occurs within a discriminant check. The
1217 -- significance is that optimizations based on assuming that the
1218 -- discriminant check has a correct value cannot be performed in this
1219 -- case (or the discriminant check may be optimized away!)
1220
1221 -- Is_Machine_Number (Flag11-Sem)
1222 -- This flag is set in an N_Real_Literal node to indicate that the value
1223 -- is a machine number. This avoids some unnecessary cases of converting
1224 -- real literals to machine numbers.
1225
1226 -- Is_Null_Loop (Flag16-Sem)
1227 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1228 -- can be determined to be null at compile time. This is used to remove
1229 -- the loop entirely at expansion time.
1230
1231 -- Is_Overloaded (Flag5-Sem)
1232 -- A flag present in all expression nodes. Used temporarily during
1233 -- overloading determination. The setting of this flag is not relevant
1234 -- once overloading analysis is complete.
1235
1236 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1237 -- A flag present only in N_Op_Expon nodes. It is set when the
1238 -- exponentiation is of the form 2 ** N, where the type of N is an
1239 -- unsigned integral subtype whose size does not exceed the size of
1240 -- Standard_Integer (i.e. a type that can be safely converted to
1241 -- Natural), and the exponentiation appears as the right operand of an
1242 -- integer multiplication or an integer division where the dividend is
1243 -- unsigned. It is also required that overflow checking is off for both
1244 -- the exponentiation and the multiply/divide node. If this set of
1245 -- conditions holds, and the flag is set, then the division or
1246 -- multiplication can be (and is) converted to a shift.
1247
1248 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1249 -- A flag set in a Subprogram_Body block to indicate that it is the
1250 -- implementation of a protected subprogram. Such a body needs cleanup
1251 -- handler to make sure that the associated protected object is unlocked
1252 -- when the subprogram completes.
1253
1254 -- Is_Scil_Node (Flag4-Sem)
1255 -- Present in N_Null_Statement nodes. Set to indicate that it is a SCIL
1256 -- node. Scil nodes are special nodes that help the CodePeer backend
1257 -- locating nodes that require special processing. In order to minimize
1258 -- the impact on the compiler and ASIS, and also to maximize flexibility
1259 -- when adding SCIl nodes to the tree, instead of adding new kind of
1260 -- nodes, SCIL nodes are added to the tree as N_Null_Statement nodes on
1261 -- which this attribute is set.
1262
1263 -- Is_Static_Coextension (Flag14-Sem)
1264 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1265 -- of an object allocated on the stack rather than the heap.
1266
1267 -- Is_Static_Expression (Flag6-Sem)
1268 -- Indicates that an expression is a static expression (RM 4.9). See spec
1269 -- of package Sem_Eval for full details on the use of this flag.
1270
1271 -- Is_Subprogram_Descriptor (Flag16-Sem)
1272 -- Present in N_Object_Declaration, and set only for the object
1273 -- declaration generated for a subprogram descriptor in fast exception
1274 -- mode. See Exp_Ch11 for details of use.
1275
1276 -- Is_Task_Allocation_Block (Flag6-Sem)
1277 -- A flag set in a Block_Statement node to indicate that it is the
1278 -- expansion of a task allocator, or the allocator of an object
1279 -- containing tasks. Such a block requires a cleanup handler to call
1280 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1281 -- allocated but not activated when the allocator completes abnormally.
1282
1283 -- Is_Task_Master (Flag5-Sem)
1284 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1285 -- indicate that the construct is a task master (i.e. has declared tasks
1286 -- or declares an access to a task type).
1287
1288 -- Itype (Node1-Sem)
1289 -- Used in N_Itype_Reference node to reference an itype for which it is
1290 -- important to ensure that it is defined. See description of this node
1291 -- for further details.
1292
1293 -- Kill_Range_Check (Flag11-Sem)
1294 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1295 -- result should not be subjected to range checks. This is used for the
1296 -- implementation of Normalize_Scalars.
1297
1298 -- Label_Construct (Node2-Sem)
1299 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1300 -- N_Block_Statement or N_Loop_Statement node to which the label
1301 -- declaration applies. This is not currently used in the compiler
1302 -- itself, but it is useful in the implementation of ASIS queries.
1303 -- This field is left empty for the special labels generated as part
1304 -- of expanding raise statements with a local exception handler.
1305
1306 -- Library_Unit (Node4-Sem)
1307 -- In a stub node, Library_Unit points to the compilation unit node of
1308 -- the corresponding subunit.
1309 --
1310 -- In a with clause node, Library_Unit points to the spec of the with'ed
1311 -- unit.
1312 --
1313 -- In a compilation unit node, the usage depends on the unit type:
1314 --
1315 -- For a library unit body, Library_Unit points to the compilation unit
1316 -- node of the corresponding spec, unless it's a subprogram body with
1317 -- Acts_As_Spec set, in which case it points to itself.
1318 --
1319 -- For a spec, Library_Unit points to the compilation unit node of the
1320 -- corresponding body, if present. The body will be present if the spec
1321 -- is or contains generics that we needed to instantiate. Similarly, the
1322 -- body will be present if we needed it for inlining purposes. Thus, if
1323 -- we have a spec/body pair, both of which are present, they point to
1324 -- each other via Library_Unit.
1325 --
1326 -- For a subunit, Library_Unit points to the compilation unit node of
1327 -- the parent body.
1328 --
1329 -- Note that this field is not used to hold the parent pointer for child
1330 -- unit (which might in any case need to use it for some other purpose as
1331 -- described above). Instead for a child unit, implicit with's are
1332 -- generated for all parents.
1333
1334 -- Local_Raise_Statements (Elist1)
1335 -- This field is present in exception handler nodes. It is set to
1336 -- No_Elist in the normal case. If there is at least one raise statement
1337 -- which can potentially be handled as a local raise, then this field
1338 -- points to a list of raise nodes, which are calls to a routine to raise
1339 -- an exception. These are raise nodes which can be optimized into gotos
1340 -- if the handler turns out to meet the conditions which permit this
1341 -- transformation. Note that this does NOT include instances of the
1342 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1343 -- handled by the back end (using the N_Push/N_Pop mechanism).
1344
1345 -- Loop_Actions (List2-Sem)
1346 -- A list present in Component_Association nodes in array aggregates.
1347 -- Used to collect actions that must be executed within the loop because
1348 -- they may need to be evaluated anew each time through.
1349
1350 -- Limited_View_Installed (Flag18-Sem)
1351 -- Present in With_Clauses and in package specifications. If set on
1352 -- with_clause, it indicates that this clause has created the current
1353 -- limited view of the designated package. On a package specification, it
1354 -- indicates that the limited view has already been created because the
1355 -- package is mentioned in a limited_with_clause in the closure of the
1356 -- unit being compiled.
1357
1358 -- Local_Raise_Not_OK (Flag7-Sem)
1359 -- Present in N_Exception_Handler nodes. Set if the handler contains
1360 -- a construct (reraise statement, or call to subprogram in package
1361 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1362 -- for a local raise (one that could otherwise be converted to a goto).
1363
1364 -- Must_Be_Byte_Aligned (Flag14-Sem)
1365 -- This flag is present in N_Attribute_Reference nodes. It can be set
1366 -- only for the Address and Unrestricted_Access attributes. If set it
1367 -- means that the object for which the address/access is given must be on
1368 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1369 -- of the object is to be made before taking the address (this copy is in
1370 -- the current scope on the stack frame). This is used for certain cases
1371 -- of code generated by the expander that passes parameters by address.
1372 --
1373 -- The reason the copy is not made by the front end is that the back end
1374 -- has more information about type layout and may be able to (but is not
1375 -- guaranteed to) prevent making unnecessary copies.
1376
1377 -- Must_Not_Freeze (Flag8-Sem)
1378 -- A flag present in all expression nodes. Normally expressions cause
1379 -- freezing as described in the RM. If this flag is set, then this is
1380 -- inhibited. This is used by the analyzer and expander to label nodes
1381 -- that are created by semantic analysis or expansion and which must not
1382 -- cause freezing even though they normally would. This flag is also
1383 -- present in an N_Subtype_Indication node, since we also use these in
1384 -- calls to Freeze_Expression.
1385
1386 -- Next_Entity (Node2-Sem)
1387 -- Present in defining identifiers, defining character literals and
1388 -- defining operator symbols (i.e. in all entities). The entities of a
1389 -- scope are chained, and this field is used as the forward pointer for
1390 -- this list. See Einfo for further details.
1391
1392 -- Next_Implicit_With (Node3-Sem)
1393 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1394 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1395 -- to prevent multiple with_clauses for the same unit in a given context.
1396 -- A postorder traversal of the tree whose nodes are units and whose
1397 -- links are with_clauses defines the order in which Inspector must
1398 -- examine a compiled unit and its full context. This ordering ensures
1399 -- that any subprogram call is examined after the subprogram declartion
1400 -- has been seen.
1401
1402 -- Next_Named_Actual (Node4-Sem)
1403 -- Present in parameter association node. Set during semantic analysis to
1404 -- point to the next named parameter, where parameters are ordered by
1405 -- declaration order (as opposed to the actual order in the call, which
1406 -- may be different due to named associations). Not that this field
1407 -- points to the explicit actual parameter itself, not to the
1408 -- N_Parameter_Association node (its parent).
1409
1410 -- Next_Pragma (Node1-Sem)
1411 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1412 -- nodes. Currently used for two purposes:
1413 --
1414 -- Create a list of linked Check_Policy pragmas. The head of this list
1415 -- is stored in Opt.Check_Policy_List (which has further details).
1416 --
1417 -- Used by processing for Pre/Postcondition pragmas to store a list of
1418 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1419 -- details).
1420
1421 -- Next_Rep_Item (Node5-Sem)
1422 -- Present in pragma nodes and attribute definition nodes. Used to link
1423 -- representation items that apply to an entity. See description of
1424 -- First_Rep_Item field in Einfo for full details.
1425
1426 -- Next_Use_Clause (Node3-Sem)
1427 -- While use clauses are active during semantic processing, they are
1428 -- chained from the scope stack entry, using Next_Use_Clause as a link
1429 -- pointer, with Empty marking the end of the list. The head pointer is
1430 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1431 -- processing (i.e. when Gigi sees the tree, the contents of this field
1432 -- is undefined and should not be read).
1433
1434 -- No_Ctrl_Actions (Flag7-Sem)
1435 -- Present in N_Assignment_Statement to indicate that no finalize nor
1436 -- adjust should take place on this assignment even though the rhs is
1437 -- controlled. This is used in init procs and aggregate expansions where
1438 -- the generated assignments are more initialisations than real
1439 -- assignments.
1440
1441 -- No_Elaboration_Check (Flag14-Sem)
1442 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1443 -- that no elaboration check is needed on the call, because it appears in
1444 -- the context of a local Suppress pragma. This is used on calls within
1445 -- task bodies, where the actual elaboration checks are applied after
1446 -- analysis, when the local scope stack is not present.
1447
1448 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1449 -- Present in N_With_Clause nodes. Set if the with clause is on the
1450 -- package or subprogram spec where the main unit is the corresponding
1451 -- body, and no entities of the with'ed unit are referenced by the spec
1452 -- (an entity may still be referenced in the body, so this flag is used
1453 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1454 -- full details)
1455
1456 -- No_Initialization (Flag13-Sem)
1457 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1458 -- object must not be initialized (by Initialize or call to an init
1459 -- proc). This is needed for controlled aggregates. When the Object
1460 -- declaration has an expression, this flag means that this expression
1461 -- should not be taken into account (needed for in place initialization
1462 -- with aggregates).
1463
1464 -- No_Truncation (Flag17-Sem)
1465 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1466 -- only if the RM_Size of the source is greater than the RM_Size of the
1467 -- target for scalar operands. Normally in such a case we truncate some
1468 -- higher order bits of the source, and then sign/zero extend the result
1469 -- to form the output value. But if this flag is set, then we do not do
1470 -- any truncation, so for example, if an 8 bit input is converted to 5
1471 -- bit result which is in fact stored in 8 bits, then the high order
1472 -- three bits of the target result will be copied from the source. This
1473 -- is used for properly setting out of range values for use by pragmas
1474 -- Initialize_Scalars and Normalize_Scalars.
1475
1476 -- Original_Discriminant (Node2-Sem)
1477 -- Present in identifiers. Used in references to discriminants that
1478 -- appear in generic units. Because the names of the discriminants may be
1479 -- different in an instance, we use this field to recover the position of
1480 -- the discriminant in the original type, and replace it with the
1481 -- discriminant at the same position in the instantiated type.
1482
1483 -- Original_Entity (Node2-Sem)
1484 -- Present in numeric literals. Used to denote the named number that has
1485 -- been constant-folded into the given literal. If literal is from
1486 -- source, or the result of some other constant-folding operation, then
1487 -- Original_Entity is empty. This field is needed to handle properly
1488 -- named numbers in generic units, where the Associated_Node field
1489 -- interferes with the Entity field, making it impossible to preserve the
1490 -- original entity at the point of instantiation (ASIS problem).
1491
1492 -- Others_Discrete_Choices (List1-Sem)
1493 -- When a case statement or variant is analyzed, the semantic checks
1494 -- determine the actual list of choices that correspond to an others
1495 -- choice. This list is materialized for later use by the expander and
1496 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1497 -- this materialized list of choices, which is in standard format for a
1498 -- list of discrete choices, except that of course it cannot contain an
1499 -- N_Others_Choice entry.
1500
1501 -- Parameter_List_Truncated (Flag17-Sem)
1502 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1503 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1504 -- a result of a First_Optional_Parameter specification in an
1505 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1506 -- The truncation is done by the expander by removing trailing parameters
1507 -- from the argument list, in accordance with the set of rules allowing
1508 -- such parameter removal. In particular, parameters can be removed
1509 -- working from the end of the parameter list backwards up to and
1510 -- including the entry designated by First_Optional_Parameter in the
1511 -- Import pragma. Parameters can be removed if they are implicit and the
1512 -- default value is a known-at-compile-time value, including the use of
1513 -- the Null_Parameter attribute, or if explicit parameter values are
1514 -- present that match the corresponding defaults.
1515
1516 -- Parent_Spec (Node4-Sem)
1517 -- For a library unit that is a child unit spec (package or subprogram
1518 -- declaration, generic declaration or instantiation, or library level
1519 -- rename, this field points to the compilation unit node for the parent
1520 -- package specification. This field is Empty for library bodies (the
1521 -- parent spec in this case can be found from the corresponding spec).
1522
1523 -- PPC_Enabled (Flag5-Sem)
1524 -- Present in N_Pragma nodes. This flag is relevant only for precondition
1525 -- and postcondition nodes. It is true if the check corresponding to the
1526 -- pragma type is enabled at the point where the pragma appears.
1527
1528 -- Present_Expr (Uint3-Sem)
1529 -- Present in an N_Variant node. This has a meaningful value only after
1530 -- Gigi has back annotated the tree with representation information. At
1531 -- this point, it contains a reference to a gcc expression that depends
1532 -- on the values of one or more discriminants. Give a set of discriminant
1533 -- values, this expression evaluates to False (zero) if variant is not
1534 -- present, and True (non-zero) if it is present. See unit Repinfo for
1535 -- further details on gigi back annotation. This field is used during
1536 -- ASIS processing (data decomposition annex) to determine if a field is
1537 -- present or not.
1538
1539 -- Print_In_Hex (Flag13-Sem)
1540 -- Set on an N_Integer_Literal node to indicate that the value should be
1541 -- printed in hexadecimal in the sprint listing. Has no effect on
1542 -- legality or semantics of program, only on the displayed output. This
1543 -- is used to clarify output from the packed array cases.
1544
1545 -- Procedure_To_Call (Node2-Sem)
1546 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1547 -- and N_Extended_Return_Statement nodes. References the entity for the
1548 -- declaration of the procedure to be called to accomplish the required
1549 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1550 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1551 -- allocating the return value), and for the Deallocate procedure in the
1552 -- case of N_Free_Statement.
1553
1554 -- Raises_Constraint_Error (Flag7-Sem)
1555 -- Set on an expression whose evaluation will definitely fail constraint
1556 -- error check. In the case of static expressions, this flag must be set
1557 -- accurately (and if it is set, the expression is typically illegal
1558 -- unless it appears as a non-elaborated branch of a short-circuit form).
1559 -- For a non-static expression, this flag may be set whenever an
1560 -- expression (e.g. an aggregate) is known to raise constraint error. If
1561 -- set, the expression definitely will raise CE if elaborated at runtime.
1562 -- If not set, the expression may or may not raise CE. In other words, on
1563 -- static expressions, the flag is set accurately, on non-static
1564 -- expressions it is set conservatively.
1565
1566 -- Redundant_Use (Flag13-Sem)
1567 -- Present in nodes that can appear as an operand in a use clause or use
1568 -- type clause (identifiers, expanded names, attribute references). Set
1569 -- to indicate that a use is redundant (and therefore need not be undone
1570 -- on scope exit).
1571
1572 -- Renaming_Exception (Node2-Sem)
1573 -- Present in N_Exception_Declaration node. Used to point back to the
1574 -- exception renaming for an exception declared within a subprogram.
1575 -- What happens is that an exception declared in a subprogram is moved
1576 -- to the library level with a unique name, and the original exception
1577 -- becomes a renaming. This link from the library level exception to the
1578 -- renaming declaration allows registering of the proper exception name.
1579
1580 -- Return_Statement_Entity (Node5-Sem)
1581 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1582 -- Points to an E_Return_Statement representing the return statement.
1583
1584 -- Return_Object_Declarations (List3)
1585 -- Present in N_Extended_Return_Statement.
1586 -- Points to a list initially containing a single
1587 -- N_Object_Declaration representing the return object.
1588 -- We use a list (instead of just a pointer to the object decl)
1589 -- because Analyze wants to insert extra actions on this list.
1590
1591 -- Rounded_Result (Flag18-Sem)
1592 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1593 -- Used in the fixed-point cases to indicate that the result must be
1594 -- rounded as a result of the use of the 'Round attribute. Also used for
1595 -- integer N_Op_Divide nodes to indicate that the result should be
1596 -- rounded to the nearest integer (breaking ties away from zero), rather
1597 -- than truncated towards zero as usual. These rounded integer operations
1598 -- are the result of expansion of rounded fixed-point divide, conversion
1599 -- and multiplication operations.
1600
1601 -- Scil_Nkind (Uint3-Sem)
1602 -- Present in N_Null_Statement nodes that are Scil nodes. Used to
1603 -- indicate the kind of SCIL node (see scil node kinds in exp_disp.ads).
1604
1605 -- Scil_Related_Node (Node1-Sem)
1606 -- Present in N_Null_Statement nodes that are Scil nodes. Used to
1607 -- reference a tree node that requires special processing in the
1608 -- CodePeer backend.
1609
1610 -- Scil_Target_Prim (Node2-Sem)
1611 -- Present in N_Null_Statement nodes. Used to reference the tagged type
1612 -- primitive associated with the SCIL node.
1613
1614 -- Scope (Node3-Sem)
1615 -- Present in defining identifiers, defining character literals and
1616 -- defining operator symbols (i.e. in all entities). The entities of a
1617 -- scope all use this field to reference the corresponding scope entity.
1618 -- See Einfo for further details.
1619
1620 -- Shift_Count_OK (Flag4-Sem)
1621 -- A flag present in shift nodes to indicate that the shift count is
1622 -- known to be in range, i.e. is in the range from zero to word length
1623 -- minus one. If this flag is not set, then the shift count may be
1624 -- outside this range, i.e. larger than the word length, and the code
1625 -- must ensure that such shift counts give the appropriate result.
1626
1627 -- Source_Type (Node1-Sem)
1628 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1629 -- source type entity for the unchecked conversion instantiation
1630 -- which gigi must do size validation for.
1631
1632 -- Static_Processing_OK (Flag4-Sem)
1633 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1634 -- flag is set, the full value of the aggregate can be determined at
1635 -- compile time and the aggregate can be passed as is to the back-end.
1636 -- In this event it is irrelevant whether this flag is set or not.
1637 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1638 -- Static_Processing_OK is set, the aggregate can (but need not) be
1639 -- converted into a compile time known aggregate by the expander. See
1640 -- Sem_Aggr for the specific conditions under which an aggregate has its
1641 -- Static_Processing_OK flag set.
1642
1643 -- Storage_Pool (Node1-Sem)
1644 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1645 -- and N_Extended_Return_Statement nodes. References the entity for the
1646 -- storage pool to be used for the allocate or free call or for the
1647 -- allocation of the returned value from function. Empty indicates that
1648 -- the global default pool is to be used. Note that in the case
1649 -- of a return statement, this field is set only if the function returns
1650 -- value of a type whose size is not known at compile time on the
1651 -- secondary stack.
1652
1653 -- Suppress_Loop_Warnings (Flag17-Sem)
1654 -- Used in N_Loop_Statement node to indicate that warnings within the
1655 -- body of the loop should be suppressed. This is set when the range
1656 -- of a FOR loop is known to be null, or is probably null (loop would
1657 -- only execute if invalid values are present).
1658
1659 -- Target_Type (Node2-Sem)
1660 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1661 -- type entity for the unchecked conversion instantiation which gigi must
1662 -- do size validation for.
1663
1664 -- Then_Actions (List3-Sem)
1665 -- This field is present in conditional expression nodes. During code
1666 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1667 -- actions at an appropriate place in the tree to get elaborated at the
1668 -- right time. For conditional expressions, we have to be sure that the
1669 -- actions for the Then branch are only elaborated if the condition is
1670 -- True. The Then_Actions field is used as a temporary parking place for
1671 -- these actions. The final tree is always rewritten to eliminate the
1672 -- need for this field, so in the tree passed to Gigi, this field is
1673 -- always set to No_List.
1674
1675 -- Treat_Fixed_As_Integer (Flag14-Sem)
1676 -- This flag appears in operator nodes for divide, multiply, mod and rem
1677 -- on fixed-point operands. It indicates that the operands are to be
1678 -- treated as integer values, ignoring small values. This flag is only
1679 -- set as a result of expansion of fixed-point operations. Typically a
1680 -- fixed-point multiplication in the source generates subsidiary
1681 -- multiplication and division operations that work with the underlying
1682 -- integer values and have this flag set. Note that this flag is not
1683 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1684 -- in these cases it is always the case that fixed is treated as integer.
1685 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1686 -- leave such nodes alone, and whoever makes them must set the correct
1687 -- Etype value.
1688
1689 -- TSS_Elist (Elist3-Sem)
1690 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1691 -- entries for each TSS (type support subprogram) associated with the
1692 -- frozen type. The elements of the list are the entities for the
1693 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1694 -- if there are no type support subprograms for the type or if the freeze
1695 -- node is not for a type.
1696
1697 -- Unreferenced_In_Spec (Flag7-Sem)
1698 -- Present in N_With_Clause nodes. Set if the with clause is on the
1699 -- package or subprogram spec where the main unit is the corresponding
1700 -- body, and is not referenced by the spec (it may still be referenced by
1701 -- the body, so this flag is used to generate the proper message (see
1702 -- Sem_Util.Check_Unused_Withs for details)
1703
1704 -- Was_Originally_Stub (Flag13-Sem)
1705 -- This flag is set in the node for a proper body that replaces stub.
1706 -- During the analysis procedure, stubs in some situations get rewritten
1707 -- by the corresponding bodies, and we set this flag to remember that
1708 -- this happened. Note that it is not good enough to rely on the use of
1709 -- Original_Node here because of the case of nested instantiations where
1710 -- the substituted node can be copied.
1711
1712 -- Zero_Cost_Handling (Flag5-Sem)
1713 -- This flag is set in all handled sequence of statement and exception
1714 -- handler nodes if exceptions are to be handled using the zero-cost
1715 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1716 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1717 -- to do for such a handler is simply to put the code in the handler
1718 -- somewhere. The front end has generated all necessary labels.
1719
1720 --------------------------------------------------
1721 -- Note on Use of End_Label and End_Span Fields --
1722 --------------------------------------------------
1723
1724 -- Several constructs have end lines:
1725
1726 -- Loop Statement end loop [loop_IDENTIFIER];
1727 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1728 -- Task Definition end [task_IDENTIFIER]
1729 -- Protected Definition end [protected_IDENTIFIER]
1730 -- Protected Body end [protected_IDENTIFIER]
1731
1732 -- Block Statement end [block_IDENTIFIER];
1733 -- Subprogram Body end [DESIGNATOR];
1734 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1735 -- Task Body end [task_IDENTIFIER];
1736 -- Accept Statement end [entry_IDENTIFIER]];
1737 -- Entry Body end [entry_IDENTIFIER];
1738
1739 -- If Statement end if;
1740 -- Case Statement end case;
1741
1742 -- Record Definition end record;
1743 -- Enumeration Definition );
1744
1745 -- The End_Label and End_Span fields are used to mark the locations of
1746 -- these lines, and also keep track of the label in the case where a label
1747 -- is present.
1748
1749 -- For the first group above, the End_Label field of the corresponding node
1750 -- is used to point to the label identifier. In the case where there is no
1751 -- label in the source, the parser supplies a dummy identifier (with
1752 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1753 -- marks the location of the token following the END token.
1754
1755 -- For the second group, the use of End_Label is similar, but the End_Label
1756 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1757 -- simply because in some cases there is no room in the parent node.
1758
1759 -- For the third group, there is never any label, and instead of using
1760 -- End_Label, we use the End_Span field which gives the location of the
1761 -- token following END, relative to the starting Sloc of the construct,
1762 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1763 -- following the End_Label.
1764
1765 -- The record definition case is handled specially, we treat it as though
1766 -- it required an optional label which is never present, and so the parser
1767 -- always builds a dummy identifier with Comes From Source set False. The
1768 -- reason we do this, rather than using End_Span in this case, is that we
1769 -- want to generate a cross-ref entry for the end of a record, since it
1770 -- represents a scope for name declaration purposes.
1771
1772 -- The enumeration definition case is handled in an exactly similar manner,
1773 -- building a dummy identifier to get a cross-reference.
1774
1775 -- Note: the reason we store the difference as a Uint, instead of storing
1776 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1777 -- distinguished from other types of values, and we count on all general
1778 -- use fields being self describing. To make things easier for clients,
1779 -- note that we provide function End_Location, and procedure
1780 -- Set_End_Location to allow access to the logical value (which is the
1781 -- Source_Ptr value for the end token).
1782
1783 ---------------------
1784 -- Syntactic Nodes --
1785 ---------------------
1786
1787 ---------------------
1788 -- 2.3 Identifier --
1789 ---------------------
1790
1791 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1792 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1793
1794 -- An IDENTIFIER shall not be a reserved word
1795
1796 -- In the Ada grammar identifiers are the bottom level tokens which have
1797 -- very few semantics. Actual program identifiers are direct names. If
1798 -- we were being 100% honest with the grammar, then we would have a node
1799 -- called N_Direct_Name which would point to an identifier. However,
1800 -- that's too many extra nodes, so we just use the N_Identifier node
1801 -- directly as a direct name, and it contains the expression fields and
1802 -- Entity field that correspond to its use as a direct name. In those
1803 -- few cases where identifiers appear in contexts where they are not
1804 -- direct names (pragmas, pragma argument associations, attribute
1805 -- references and attribute definition clauses), the Chars field of the
1806 -- node contains the Name_Id for the identifier name.
1807
1808 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1809 -- cases. First, an incorrect use of a reserved word as an identifier is
1810 -- diagnosed and then treated as a normal identifier. Second, an
1811 -- attribute designator of the form of a reserved word (access, delta,
1812 -- digits, range) is treated as an identifier.
1813
1814 -- Note: The set of letters that is permitted in an identifier depends
1815 -- on the character set in use. See package Csets for full details.
1816
1817 -- N_Identifier
1818 -- Sloc points to identifier
1819 -- Chars (Name1) contains the Name_Id for the identifier
1820 -- Entity (Node4-Sem)
1821 -- Associated_Node (Node4-Sem)
1822 -- Original_Discriminant (Node2-Sem)
1823 -- Redundant_Use (Flag13-Sem)
1824 -- Has_Private_View (Flag11-Sem) (set in generic units)
1825 -- plus fields for expression
1826
1827 --------------------------
1828 -- 2.4 Numeric Literal --
1829 --------------------------
1830
1831 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1832
1833 ----------------------------
1834 -- 2.4.1 Decimal Literal --
1835 ----------------------------
1836
1837 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1838
1839 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1840
1841 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1842
1843 -- Decimal literals appear in the tree as either integer literal nodes
1844 -- or real literal nodes, depending on whether a period is present.
1845
1846 -- Note: literal nodes appear as a result of direct use of literals
1847 -- in the source program, and also as the result of evaluating
1848 -- expressions at compile time. In the latter case, it is possible
1849 -- to construct real literals that have no syntactic representation
1850 -- using the standard literal format. Such literals are listed by
1851 -- Sprint using the notation [numerator / denominator].
1852
1853 -- Note: the value of an integer literal node created by the front end
1854 -- is never outside the range of values of the base type. However, it
1855 -- can be the case that the value is outside the range of the
1856 -- particular subtype. This happens in the case of integer overflows
1857 -- with checks suppressed.
1858
1859 -- N_Integer_Literal
1860 -- Sloc points to literal
1861 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1862 -- has been constant-folded into its literal value.
1863 -- Intval (Uint3) contains integer value of literal
1864 -- plus fields for expression
1865 -- Print_In_Hex (Flag13-Sem)
1866
1867 -- N_Real_Literal
1868 -- Sloc points to literal
1869 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1870 -- has been constant-folded into its literal value.
1871 -- Realval (Ureal3) contains real value of literal
1872 -- Corresponding_Integer_Value (Uint4-Sem)
1873 -- Is_Machine_Number (Flag11-Sem)
1874 -- plus fields for expression
1875
1876 --------------------------
1877 -- 2.4.2 Based Literal --
1878 --------------------------
1879
1880 -- BASED_LITERAL ::=
1881 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1882
1883 -- BASE ::= NUMERAL
1884
1885 -- BASED_NUMERAL ::=
1886 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1887
1888 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1889
1890 -- Based literals appear in the tree as either integer literal nodes
1891 -- or real literal nodes, depending on whether a period is present.
1892
1893 ----------------------------
1894 -- 2.5 Character Literal --
1895 ----------------------------
1896
1897 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1898
1899 -- N_Character_Literal
1900 -- Sloc points to literal
1901 -- Chars (Name1) contains the Name_Id for the identifier
1902 -- Char_Literal_Value (Uint2) contains the literal value
1903 -- Entity (Node4-Sem)
1904 -- Associated_Node (Node4-Sem)
1905 -- Has_Private_View (Flag11-Sem) set in generic units.
1906 -- plus fields for expression
1907
1908 -- Note: the Entity field will be missing (set to Empty) for character
1909 -- literals whose type is Standard.Wide_Character or Standard.Character
1910 -- or a type derived from one of these two. In this case the character
1911 -- literal stands for its own coding. The reason we take this irregular
1912 -- short cut is to avoid the need to build lots of junk defining
1913 -- character literal nodes.
1914
1915 -------------------------
1916 -- 2.6 String Literal --
1917 -------------------------
1918
1919 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1920
1921 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1922 -- single GRAPHIC_CHARACTER other than a quotation mark.
1923 --
1924 -- Is_Folded_In_Parser is True if the parser created this literal by
1925 -- folding a sequence of "&" operators. For example, if the source code
1926 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1927 -- is set. This flag is needed because the parser doesn't know about
1928 -- visibility, so the folded result might be wrong, and semantic
1929 -- analysis needs to check for that.
1930
1931 -- N_String_Literal
1932 -- Sloc points to literal
1933 -- Strval (Str3) contains Id of string value
1934 -- Has_Wide_Character (Flag11-Sem)
1935 -- Is_Folded_In_Parser (Flag4)
1936 -- plus fields for expression
1937
1938 ------------------
1939 -- 2.7 Comment --
1940 ------------------
1941
1942 -- A COMMENT starts with two adjacent hyphens and extends up to the
1943 -- end of the line. A COMMENT may appear on any line of a program.
1944
1945 -- Comments are skipped by the scanner and do not appear in the tree.
1946 -- It is possible to reconstruct the position of comments with respect
1947 -- to the elements of the tree by using the source position (Sloc)
1948 -- pointers that appear in every tree node.
1949
1950 -----------------
1951 -- 2.8 Pragma --
1952 -----------------
1953
1954 -- PRAGMA ::= pragma IDENTIFIER
1955 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1956
1957 -- Note that a pragma may appear in the tree anywhere a declaration
1958 -- or a statement may appear, as well as in some other situations
1959 -- which are explicitly documented.
1960
1961 -- N_Pragma
1962 -- Sloc points to pragma identifier
1963 -- Next_Pragma (Node1-Sem)
1964 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1965 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1966 -- Pragma_Identifier (Node4)
1967 -- Next_Rep_Item (Node5-Sem)
1968 -- PPC_Enabled (Flag5-Sem)
1969
1970 -- Note: we should have a section on what pragmas are passed on to
1971 -- the back end to be processed. This section should note that pragma
1972 -- Psect_Object is always converted to Common_Object, but there are
1973 -- undoubtedly many other similar notes required ???
1974
1975 -- Note: a utility function Pragma_Name may be applied to pragma nodes
1976 -- to conveniently obtain the Chars field of the Pragma_Identifier.
1977
1978 --------------------------------------
1979 -- 2.8 Pragma Argument Association --
1980 --------------------------------------
1981
1982 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1983 -- [pragma_argument_IDENTIFIER =>] NAME
1984 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1985
1986 -- N_Pragma_Argument_Association
1987 -- Sloc points to first token in association
1988 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1989 -- Expression (Node3)
1990
1991 ------------------------
1992 -- 2.9 Reserved Word --
1993 ------------------------
1994
1995 -- Reserved words are parsed by the scanner, and returned as the
1996 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1997
1998 ----------------------------
1999 -- 3.1 Basic Declaration --
2000 ----------------------------
2001
2002 -- BASIC_DECLARATION ::=
2003 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2004 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2005 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2006 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2007 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2008 -- | GENERIC_INSTANTIATION
2009
2010 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2011 -- see further description in section on semantic nodes.
2012
2013 -- Also, in the tree that is constructed, a pragma may appear
2014 -- anywhere that a declaration may appear.
2015
2016 ------------------------------
2017 -- 3.1 Defining Identifier --
2018 ------------------------------
2019
2020 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2021
2022 -- A defining identifier is an entity, which has additional fields
2023 -- depending on the setting of the Ekind field. These additional
2024 -- fields are defined (and access subprograms declared) in package
2025 -- Einfo.
2026
2027 -- Note: N_Defining_Identifier is an extended node whose fields are
2028 -- deliberate layed out to match the layout of fields in an ordinary
2029 -- N_Identifier node allowing for easy alteration of an identifier
2030 -- node into a defining identifier node. For details, see procedure
2031 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2032
2033 -- N_Defining_Identifier
2034 -- Sloc points to identifier
2035 -- Chars (Name1) contains the Name_Id for the identifier
2036 -- Next_Entity (Node2-Sem)
2037 -- Scope (Node3-Sem)
2038 -- Etype (Node5-Sem)
2039
2040 -----------------------------
2041 -- 3.2.1 Type Declaration --
2042 -----------------------------
2043
2044 -- TYPE_DECLARATION ::=
2045 -- FULL_TYPE_DECLARATION
2046 -- | INCOMPLETE_TYPE_DECLARATION
2047 -- | PRIVATE_TYPE_DECLARATION
2048 -- | PRIVATE_EXTENSION_DECLARATION
2049
2050 ----------------------------------
2051 -- 3.2.1 Full Type Declaration --
2052 ----------------------------------
2053
2054 -- FULL_TYPE_DECLARATION ::=
2055 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2056 -- is TYPE_DEFINITION;
2057 -- | TASK_TYPE_DECLARATION
2058 -- | PROTECTED_TYPE_DECLARATION
2059
2060 -- The full type declaration node is used only for the first case. The
2061 -- second case (concurrent type declaration), is represented directly
2062 -- by a task type declaration or a protected type declaration.
2063
2064 -- N_Full_Type_Declaration
2065 -- Sloc points to TYPE
2066 -- Defining_Identifier (Node1)
2067 -- Discriminant_Specifications (List4) (set to No_List if none)
2068 -- Type_Definition (Node3)
2069 -- Discr_Check_Funcs_Built (Flag11-Sem)
2070
2071 ----------------------------
2072 -- 3.2.1 Type Definition --
2073 ----------------------------
2074
2075 -- TYPE_DEFINITION ::=
2076 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2077 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2078 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2079 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2080
2081 --------------------------------
2082 -- 3.2.2 Subtype Declaration --
2083 --------------------------------
2084
2085 -- SUBTYPE_DECLARATION ::=
2086 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2087
2088 -- The subtype indication field is set to Empty for subtypes
2089 -- declared in package Standard (Positive, Natural).
2090
2091 -- N_Subtype_Declaration
2092 -- Sloc points to SUBTYPE
2093 -- Defining_Identifier (Node1)
2094 -- Null_Exclusion_Present (Flag11)
2095 -- Subtype_Indication (Node5)
2096 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2097 -- Exception_Junk (Flag8-Sem)
2098
2099 -------------------------------
2100 -- 3.2.2 Subtype Indication --
2101 -------------------------------
2102
2103 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2104
2105 -- Note: if no constraint is present, the subtype indication appears
2106 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2107 -- node is used only if a constraint is present.
2108
2109 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2110 -- with the null-exclusion part (see AI-231), we had to introduce a new
2111 -- attribute in all the parents of subtype_indication nodes to indicate
2112 -- if the null-exclusion is present.
2113
2114 -- Note: the reason that this node has expression fields is that a
2115 -- subtype indication can appear as an operand of a membership test.
2116
2117 -- N_Subtype_Indication
2118 -- Sloc points to first token of subtype mark
2119 -- Subtype_Mark (Node4)
2120 -- Constraint (Node3)
2121 -- Etype (Node5-Sem)
2122 -- Must_Not_Freeze (Flag8-Sem)
2123
2124 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2125 -- reason for this redundancy is so that in a list of array index types,
2126 -- the Etype can be uniformly accessed to determine the subscript type.
2127 -- This means that no Itype is constructed for the actual subtype that
2128 -- is created by the subtype indication. If such an Itype is required,
2129 -- it is constructed in the context in which the indication appears.
2130
2131 -------------------------
2132 -- 3.2.2 Subtype Mark --
2133 -------------------------
2134
2135 -- SUBTYPE_MARK ::= subtype_NAME
2136
2137 -----------------------
2138 -- 3.2.2 Constraint --
2139 -----------------------
2140
2141 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2142
2143 ------------------------------
2144 -- 3.2.2 Scalar Constraint --
2145 ------------------------------
2146
2147 -- SCALAR_CONSTRAINT ::=
2148 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2149
2150 ---------------------------------
2151 -- 3.2.2 Composite Constraint --
2152 ---------------------------------
2153
2154 -- COMPOSITE_CONSTRAINT ::=
2155 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2156
2157 -------------------------------
2158 -- 3.3.1 Object Declaration --
2159 -------------------------------
2160
2161 -- OBJECT_DECLARATION ::=
2162 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2163 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
2164 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2165 -- ACCESS_DEFINITION [:= EXPRESSION];
2166 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2167 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
2168 -- | SINGLE_TASK_DECLARATION
2169 -- | SINGLE_PROTECTED_DECLARATION
2170
2171 -- Note: aliased is not permitted in Ada 83 mode
2172
2173 -- The N_Object_Declaration node is only for the first two cases.
2174 -- Single task declaration is handled by P_Task (9.1)
2175 -- Single protected declaration is handled by P_protected (9.5)
2176
2177 -- Although the syntax allows multiple identifiers in the list, the
2178 -- semantics is as though successive declarations were given with
2179 -- identical type definition and expression components. To simplify
2180 -- semantic processing, the parser represents a multiple declaration
2181 -- case as a sequence of single declarations, using the More_Ids and
2182 -- Prev_Ids flags to preserve the original source form as described
2183 -- in the section on "Handling of Defining Identifier Lists".
2184
2185 -- The flag Has_Init_Expression is set if an initializing expression
2186 -- is present. Normally it is set if and only if Expression contains
2187 -- a non-empty value, but there is an exception to this. When the
2188 -- initializing expression is an aggregate which requires explicit
2189 -- assignments, the Expression field gets set to Empty, but this flag
2190 -- is still set, so we don't forget we had an initializing expression.
2191
2192 -- Note: if a range check is required for the initialization
2193 -- expression then the Do_Range_Check flag is set in the Expression,
2194 -- with the check being done against the type given by the object
2195 -- definition, which is also the Etype of the defining identifier.
2196
2197 -- Note: the contents of the Expression field must be ignored (i.e.
2198 -- treated as though it were Empty) if No_Initialization is set True.
2199
2200 -- Note: the back end places some restrictions on the form of the
2201 -- Expression field. If the object being declared is Atomic, then
2202 -- the Expression may not have the form of an aggregate (since this
2203 -- might cause the back end to generate separate assignments). In this
2204 -- case the front end must generate an extra temporary and initialize
2205 -- this temporary as required (the temporary itself is not atomic).
2206
2207 -- Note: there is not node kind for object definition. Instead, the
2208 -- corresponding field holds a subtype indication, an array type
2209 -- definition, or (Ada 2005, AI-406) an access definition.
2210
2211 -- N_Object_Declaration
2212 -- Sloc points to first identifier
2213 -- Defining_Identifier (Node1)
2214 -- Aliased_Present (Flag4) set if ALIASED appears
2215 -- Constant_Present (Flag17) set if CONSTANT appears
2216 -- Null_Exclusion_Present (Flag11)
2217 -- Object_Definition (Node4) subtype indic./array type def./access def.
2218 -- Expression (Node3) (set to Empty if not present)
2219 -- Handler_List_Entry (Node2-Sem)
2220 -- Corresponding_Generic_Association (Node5-Sem)
2221 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2222 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2223 -- No_Initialization (Flag13-Sem)
2224 -- Assignment_OK (Flag15-Sem)
2225 -- Exception_Junk (Flag8-Sem)
2226 -- Is_Subprogram_Descriptor (Flag16-Sem)
2227 -- Has_Init_Expression (Flag14)
2228
2229 -------------------------------------
2230 -- 3.3.1 Defining Identifier List --
2231 -------------------------------------
2232
2233 -- DEFINING_IDENTIFIER_LIST ::=
2234 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2235
2236 -------------------------------
2237 -- 3.3.2 Number Declaration --
2238 -------------------------------
2239
2240 -- NUMBER_DECLARATION ::=
2241 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2242
2243 -- Although the syntax allows multiple identifiers in the list, the
2244 -- semantics is as though successive declarations were given with
2245 -- identical expressions. To simplify semantic processing, the parser
2246 -- represents a multiple declaration case as a sequence of single
2247 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2248 -- the original source form as described in the section on "Handling
2249 -- of Defining Identifier Lists".
2250
2251 -- N_Number_Declaration
2252 -- Sloc points to first identifier
2253 -- Defining_Identifier (Node1)
2254 -- Expression (Node3)
2255 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2256 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2257
2258 ----------------------------------
2259 -- 3.4 Derived Type Definition --
2260 ----------------------------------
2261
2262 -- DERIVED_TYPE_DEFINITION ::=
2263 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2264 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2265
2266 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2267 -- in Ada 83 mode
2268
2269 -- Note: a record extension part is required if ABSTRACT is present
2270
2271 -- N_Derived_Type_Definition
2272 -- Sloc points to NEW
2273 -- Abstract_Present (Flag4)
2274 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2275 -- Subtype_Indication (Node5)
2276 -- Record_Extension_Part (Node3) (set to Empty if not present)
2277 -- Limited_Present (Flag17)
2278 -- Task_Present (Flag5) set in task interfaces
2279 -- Protected_Present (Flag6) set in protected interfaces
2280 -- Synchronized_Present (Flag7) set in interfaces
2281 -- Interface_List (List2) (set to No_List if none)
2282 -- Interface_Present (Flag16) set in abstract interfaces
2283
2284 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2285 -- Interface_List, and Interface_Present are used for abstract
2286 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2287
2288 ---------------------------
2289 -- 3.5 Range Constraint --
2290 ---------------------------
2291
2292 -- RANGE_CONSTRAINT ::= range RANGE
2293
2294 -- N_Range_Constraint
2295 -- Sloc points to RANGE
2296 -- Range_Expression (Node4)
2297
2298 ----------------
2299 -- 3.5 Range --
2300 ----------------
2301
2302 -- RANGE ::=
2303 -- RANGE_ATTRIBUTE_REFERENCE
2304 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2305
2306 -- Note: the case of a range given as a range attribute reference
2307 -- appears directly in the tree as an attribute reference.
2308
2309 -- Note: the field name for a reference to a range is Range_Expression
2310 -- rather than Range, because range is a reserved keyword in Ada!
2311
2312 -- Note: the reason that this node has expression fields is that a
2313 -- range can appear as an operand of a membership test. The Etype
2314 -- field is the type of the range (we do NOT construct an implicit
2315 -- subtype to represent the range exactly).
2316
2317 -- N_Range
2318 -- Sloc points to ..
2319 -- Low_Bound (Node1)
2320 -- High_Bound (Node2)
2321 -- Includes_Infinities (Flag11)
2322 -- plus fields for expression
2323
2324 -- Note: if the range appears in a context, such as a subtype
2325 -- declaration, where range checks are required on one or both of
2326 -- the expression fields, then type conversion nodes are inserted
2327 -- to represent the required checks.
2328
2329 ----------------------------------------
2330 -- 3.5.1 Enumeration Type Definition --
2331 ----------------------------------------
2332
2333 -- ENUMERATION_TYPE_DEFINITION ::=
2334 -- (ENUMERATION_LITERAL_SPECIFICATION
2335 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2336
2337 -- Note: the Literals field in the node described below is null for
2338 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2339 -- which special processing handles these types as special cases.
2340
2341 -- N_Enumeration_Type_Definition
2342 -- Sloc points to left parenthesis
2343 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2344 -- End_Label (Node4) (set to Empty if internally generated record)
2345
2346 ----------------------------------------------
2347 -- 3.5.1 Enumeration Literal Specification --
2348 ----------------------------------------------
2349
2350 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2351 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2352
2353 ---------------------------------------
2354 -- 3.5.1 Defining Character Literal --
2355 ---------------------------------------
2356
2357 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2358
2359 -- A defining character literal is an entity, which has additional
2360 -- fields depending on the setting of the Ekind field. These
2361 -- additional fields are defined (and access subprograms declared)
2362 -- in package Einfo.
2363
2364 -- Note: N_Defining_Character_Literal is an extended node whose fields
2365 -- are deliberate layed out to match the layout of fields in an ordinary
2366 -- N_Character_Literal node allowing for easy alteration of a character
2367 -- literal node into a defining character literal node. For details, see
2368 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2369
2370 -- N_Defining_Character_Literal
2371 -- Sloc points to literal
2372 -- Chars (Name1) contains the Name_Id for the identifier
2373 -- Next_Entity (Node2-Sem)
2374 -- Scope (Node3-Sem)
2375 -- Etype (Node5-Sem)
2376
2377 ------------------------------------
2378 -- 3.5.4 Integer Type Definition --
2379 ------------------------------------
2380
2381 -- Note: there is an error in this rule in the latest version of the
2382 -- grammar, so we have retained the old rule pending clarification.
2383
2384 -- INTEGER_TYPE_DEFINITION ::=
2385 -- SIGNED_INTEGER_TYPE_DEFINITION
2386 -- | MODULAR_TYPE_DEFINITION
2387
2388 -------------------------------------------
2389 -- 3.5.4 Signed Integer Type Definition --
2390 -------------------------------------------
2391
2392 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2393 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2394
2395 -- Note: the Low_Bound and High_Bound fields are set to Empty
2396 -- for integer types defined in package Standard.
2397
2398 -- N_Signed_Integer_Type_Definition
2399 -- Sloc points to RANGE
2400 -- Low_Bound (Node1)
2401 -- High_Bound (Node2)
2402
2403 ------------------------------------
2404 -- 3.5.4 Modular Type Definition --
2405 ------------------------------------
2406
2407 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2408
2409 -- N_Modular_Type_Definition
2410 -- Sloc points to MOD
2411 -- Expression (Node3)
2412
2413 ---------------------------------
2414 -- 3.5.6 Real Type Definition --
2415 ---------------------------------
2416
2417 -- REAL_TYPE_DEFINITION ::=
2418 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2419
2420 --------------------------------------
2421 -- 3.5.7 Floating Point Definition --
2422 --------------------------------------
2423
2424 -- FLOATING_POINT_DEFINITION ::=
2425 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2426
2427 -- Note: The Digits_Expression and Real_Range_Specifications fields
2428 -- are set to Empty for floating-point types declared in Standard.
2429
2430 -- N_Floating_Point_Definition
2431 -- Sloc points to DIGITS
2432 -- Digits_Expression (Node2)
2433 -- Real_Range_Specification (Node4) (set to Empty if not present)
2434
2435 -------------------------------------
2436 -- 3.5.7 Real Range Specification --
2437 -------------------------------------
2438
2439 -- REAL_RANGE_SPECIFICATION ::=
2440 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2441
2442 -- N_Real_Range_Specification
2443 -- Sloc points to RANGE
2444 -- Low_Bound (Node1)
2445 -- High_Bound (Node2)
2446
2447 -----------------------------------
2448 -- 3.5.9 Fixed Point Definition --
2449 -----------------------------------
2450
2451 -- FIXED_POINT_DEFINITION ::=
2452 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2453
2454 --------------------------------------------
2455 -- 3.5.9 Ordinary Fixed Point Definition --
2456 --------------------------------------------
2457
2458 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2459 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2460
2461 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2462
2463 -- N_Ordinary_Fixed_Point_Definition
2464 -- Sloc points to DELTA
2465 -- Delta_Expression (Node3)
2466 -- Real_Range_Specification (Node4)
2467
2468 -------------------------------------------
2469 -- 3.5.9 Decimal Fixed Point Definition --
2470 -------------------------------------------
2471
2472 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2473 -- delta static_EXPRESSION
2474 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2475
2476 -- Note: decimal types are not permitted in Ada 83 mode
2477
2478 -- N_Decimal_Fixed_Point_Definition
2479 -- Sloc points to DELTA
2480 -- Delta_Expression (Node3)
2481 -- Digits_Expression (Node2)
2482 -- Real_Range_Specification (Node4) (set to Empty if not present)
2483
2484 ------------------------------
2485 -- 3.5.9 Digits Constraint --
2486 ------------------------------
2487
2488 -- DIGITS_CONSTRAINT ::=
2489 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2490
2491 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2492 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2493
2494 -- N_Digits_Constraint
2495 -- Sloc points to DIGITS
2496 -- Digits_Expression (Node2)
2497 -- Range_Constraint (Node4) (set to Empty if not present)
2498
2499 --------------------------------
2500 -- 3.6 Array Type Definition --
2501 --------------------------------
2502
2503 -- ARRAY_TYPE_DEFINITION ::=
2504 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2505
2506 -----------------------------------------
2507 -- 3.6 Unconstrained Array Definition --
2508 -----------------------------------------
2509
2510 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2511 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2512 -- COMPONENT_DEFINITION
2513
2514 -- Note: dimensionality of array is indicated by number of entries in
2515 -- the Subtype_Marks list, which has one entry for each dimension.
2516
2517 -- N_Unconstrained_Array_Definition
2518 -- Sloc points to ARRAY
2519 -- Subtype_Marks (List2)
2520 -- Component_Definition (Node4)
2521
2522 -----------------------------------
2523 -- 3.6 Index Subtype Definition --
2524 -----------------------------------
2525
2526 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2527
2528 -- There is no explicit node in the tree for an index subtype
2529 -- definition since the N_Unconstrained_Array_Definition node
2530 -- incorporates the type marks which appear in this context.
2531
2532 ---------------------------------------
2533 -- 3.6 Constrained Array Definition --
2534 ---------------------------------------
2535
2536 -- CONSTRAINED_ARRAY_DEFINITION ::=
2537 -- array (DISCRETE_SUBTYPE_DEFINITION
2538 -- {, DISCRETE_SUBTYPE_DEFINITION})
2539 -- of COMPONENT_DEFINITION
2540
2541 -- Note: dimensionality of array is indicated by number of entries
2542 -- in the Discrete_Subtype_Definitions list, which has one entry
2543 -- for each dimension.
2544
2545 -- N_Constrained_Array_Definition
2546 -- Sloc points to ARRAY
2547 -- Discrete_Subtype_Definitions (List2)
2548 -- Component_Definition (Node4)
2549
2550 --------------------------------------
2551 -- 3.6 Discrete Subtype Definition --
2552 --------------------------------------
2553
2554 -- DISCRETE_SUBTYPE_DEFINITION ::=
2555 -- discrete_SUBTYPE_INDICATION | RANGE
2556
2557 -------------------------------
2558 -- 3.6 Component Definition --
2559 -------------------------------
2560
2561 -- COMPONENT_DEFINITION ::=
2562 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2563
2564 -- Note: although the syntax does not permit a component definition to
2565 -- be an anonymous array (and the parser will diagnose such an attempt
2566 -- with an appropriate message), it is possible for anonymous arrays
2567 -- to appear as component definitions. The semantics and back end handle
2568 -- this case properly, and the expander in fact generates such cases.
2569 -- Access_Definition is an optional field that gives support to
2570 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2571 -- Subtype_Indication field or else the Access_Definition field.
2572
2573 -- N_Component_Definition
2574 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2575 -- Aliased_Present (Flag4)
2576 -- Null_Exclusion_Present (Flag11)
2577 -- Subtype_Indication (Node5) (set to Empty if not present)
2578 -- Access_Definition (Node3) (set to Empty if not present)
2579
2580 -----------------------------
2581 -- 3.6.1 Index Constraint --
2582 -----------------------------
2583
2584 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2585
2586 -- It is not in general possible to distinguish between discriminant
2587 -- constraints and index constraints at parse time, since a simple
2588 -- name could be either the subtype mark of a discrete range, or an
2589 -- expression in a discriminant association with no name. Either
2590 -- entry appears simply as the name, and the semantic parse must
2591 -- distinguish between the two cases. Thus we use a common tree
2592 -- node format for both of these constraint types.
2593
2594 -- See Discriminant_Constraint for format of node
2595
2596 ---------------------------
2597 -- 3.6.1 Discrete Range --
2598 ---------------------------
2599
2600 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2601
2602 ----------------------------
2603 -- 3.7 Discriminant Part --
2604 ----------------------------
2605
2606 -- DISCRIMINANT_PART ::=
2607 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2608
2609 ------------------------------------
2610 -- 3.7 Unknown Discriminant Part --
2611 ------------------------------------
2612
2613 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2614
2615 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2616
2617 -- There is no explicit node in the tree for an unknown discriminant
2618 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2619 -- parent node.
2620
2621 ----------------------------------
2622 -- 3.7 Known Discriminant Part --
2623 ----------------------------------
2624
2625 -- KNOWN_DISCRIMINANT_PART ::=
2626 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2627
2628 -------------------------------------
2629 -- 3.7 Discriminant Specification --
2630 -------------------------------------
2631
2632 -- DISCRIMINANT_SPECIFICATION ::=
2633 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2634 -- [:= DEFAULT_EXPRESSION]
2635 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2636 -- [:= DEFAULT_EXPRESSION]
2637
2638 -- Although the syntax allows multiple identifiers in the list, the
2639 -- semantics is as though successive specifications were given with
2640 -- identical type definition and expression components. To simplify
2641 -- semantic processing, the parser represents a multiple declaration
2642 -- case as a sequence of single specifications, using the More_Ids and
2643 -- Prev_Ids flags to preserve the original source form as described
2644 -- in the section on "Handling of Defining Identifier Lists".
2645
2646 -- N_Discriminant_Specification
2647 -- Sloc points to first identifier
2648 -- Defining_Identifier (Node1)
2649 -- Null_Exclusion_Present (Flag11)
2650 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2651 -- Expression (Node3) (set to Empty if no default expression)
2652 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2653 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2654
2655 -----------------------------
2656 -- 3.7 Default Expression --
2657 -----------------------------
2658
2659 -- DEFAULT_EXPRESSION ::= EXPRESSION
2660
2661 ------------------------------------
2662 -- 3.7.1 Discriminant Constraint --
2663 ------------------------------------
2664
2665 -- DISCRIMINANT_CONSTRAINT ::=
2666 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2667
2668 -- It is not in general possible to distinguish between discriminant
2669 -- constraints and index constraints at parse time, since a simple
2670 -- name could be either the subtype mark of a discrete range, or an
2671 -- expression in a discriminant association with no name. Either
2672 -- entry appears simply as the name, and the semantic parse must
2673 -- distinguish between the two cases. Thus we use a common tree
2674 -- node format for both of these constraint types.
2675
2676 -- N_Index_Or_Discriminant_Constraint
2677 -- Sloc points to left paren
2678 -- Constraints (List1) points to list of discrete ranges or
2679 -- discriminant associations
2680
2681 -------------------------------------
2682 -- 3.7.1 Discriminant Association --
2683 -------------------------------------
2684
2685 -- DISCRIMINANT_ASSOCIATION ::=
2686 -- [discriminant_SELECTOR_NAME
2687 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2688
2689 -- Note: a discriminant association that has no selector name list
2690 -- appears directly as an expression in the tree.
2691
2692 -- N_Discriminant_Association
2693 -- Sloc points to first token of discriminant association
2694 -- Selector_Names (List1) (always non-empty, since if no selector
2695 -- names are present, this node is not used, see comment above)
2696 -- Expression (Node3)
2697
2698 ---------------------------------
2699 -- 3.8 Record Type Definition --
2700 ---------------------------------
2701
2702 -- RECORD_TYPE_DEFINITION ::=
2703 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2704
2705 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2706
2707 -- There is no explicit node in the tree for a record type definition.
2708 -- Instead the flags for Tagged_Present and Limited_Present appear in
2709 -- the N_Record_Definition node for a record definition appearing in
2710 -- the context of a record type definition.
2711
2712 ----------------------------
2713 -- 3.8 Record Definition --
2714 ----------------------------
2715
2716 -- RECORD_DEFINITION ::=
2717 -- record
2718 -- COMPONENT_LIST
2719 -- end record
2720 -- | null record
2721
2722 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2723 -- flags appear only for a record definition appearing in a record
2724 -- type definition.
2725
2726 -- Note: the NULL RECORD case is not permitted in Ada 83
2727
2728 -- N_Record_Definition
2729 -- Sloc points to RECORD or NULL
2730 -- End_Label (Node4) (set to Empty if internally generated record)
2731 -- Abstract_Present (Flag4)
2732 -- Tagged_Present (Flag15)
2733 -- Limited_Present (Flag17)
2734 -- Component_List (Node1) empty in null record case
2735 -- Null_Present (Flag13) set in null record case
2736 -- Task_Present (Flag5) set in task interfaces
2737 -- Protected_Present (Flag6) set in protected interfaces
2738 -- Synchronized_Present (Flag7) set in interfaces
2739 -- Interface_Present (Flag16) set in abstract interfaces
2740 -- Interface_List (List2) (set to No_List if none)
2741
2742 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2743 -- Interface_List and Interface_Present are used for abstract
2744 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2745
2746 -------------------------
2747 -- 3.8 Component List --
2748 -------------------------
2749
2750 -- COMPONENT_LIST ::=
2751 -- COMPONENT_ITEM {COMPONENT_ITEM}
2752 -- | {COMPONENT_ITEM} VARIANT_PART
2753 -- | null;
2754
2755 -- N_Component_List
2756 -- Sloc points to first token of component list
2757 -- Component_Items (List3)
2758 -- Variant_Part (Node4) (set to Empty if no variant part)
2759 -- Null_Present (Flag13)
2760
2761 -------------------------
2762 -- 3.8 Component Item --
2763 -------------------------
2764
2765 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2766
2767 -- Note: A component item can also be a pragma, and in the tree
2768 -- that is obtained after semantic processing, a component item
2769 -- can be an N_Null node resulting from a non-recognized pragma.
2770
2771 --------------------------------
2772 -- 3.8 Component Declaration --
2773 --------------------------------
2774
2775 -- COMPONENT_DECLARATION ::=
2776 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2777 -- [:= DEFAULT_EXPRESSION]
2778
2779 -- Note: although the syntax does not permit a component definition to
2780 -- be an anonymous array (and the parser will diagnose such an attempt
2781 -- with an appropriate message), it is possible for anonymous arrays
2782 -- to appear as component definitions. The semantics and back end handle
2783 -- this case properly, and the expander in fact generates such cases.
2784
2785 -- Although the syntax allows multiple identifiers in the list, the
2786 -- semantics is as though successive declarations were given with the
2787 -- same component definition and expression components. To simplify
2788 -- semantic processing, the parser represents a multiple declaration
2789 -- case as a sequence of single declarations, using the More_Ids and
2790 -- Prev_Ids flags to preserve the original source form as described
2791 -- in the section on "Handling of Defining Identifier Lists".
2792
2793 -- N_Component_Declaration
2794 -- Sloc points to first identifier
2795 -- Defining_Identifier (Node1)
2796 -- Component_Definition (Node4)
2797 -- Expression (Node3) (set to Empty if no default expression)
2798 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2799 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2800
2801 -------------------------
2802 -- 3.8.1 Variant Part --
2803 -------------------------
2804
2805 -- VARIANT_PART ::=
2806 -- case discriminant_DIRECT_NAME is
2807 -- VARIANT
2808 -- {VARIANT}
2809 -- end case;
2810
2811 -- Note: the variants list can contain pragmas as well as variants.
2812 -- In a properly formed program there is at least one variant.
2813
2814 -- N_Variant_Part
2815 -- Sloc points to CASE
2816 -- Name (Node2)
2817 -- Variants (List1)
2818
2819 --------------------
2820 -- 3.8.1 Variant --
2821 --------------------
2822
2823 -- VARIANT ::=
2824 -- when DISCRETE_CHOICE_LIST =>
2825 -- COMPONENT_LIST
2826
2827 -- N_Variant
2828 -- Sloc points to WHEN
2829 -- Discrete_Choices (List4)
2830 -- Component_List (Node1)
2831 -- Enclosing_Variant (Node2-Sem)
2832 -- Present_Expr (Uint3-Sem)
2833 -- Dcheck_Function (Node5-Sem)
2834
2835 ---------------------------------
2836 -- 3.8.1 Discrete Choice List --
2837 ---------------------------------
2838
2839 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2840
2841 ----------------------------
2842 -- 3.8.1 Discrete Choice --
2843 ----------------------------
2844
2845 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2846
2847 -- Note: in Ada 83 mode, the expression must be a simple expression
2848
2849 -- The only choice that appears explicitly is the OTHERS choice, as
2850 -- defined here. Other cases of discrete choice (expression and
2851 -- discrete range) appear directly. This production is also used
2852 -- for the OTHERS possibility of an exception choice.
2853
2854 -- Note: in accordance with the syntax, the parser does not check that
2855 -- OTHERS appears at the end on its own in a choice list context. This
2856 -- is a semantic check.
2857
2858 -- N_Others_Choice
2859 -- Sloc points to OTHERS
2860 -- Others_Discrete_Choices (List1-Sem)
2861 -- All_Others (Flag11-Sem)
2862
2863 ----------------------------------
2864 -- 3.9.1 Record Extension Part --
2865 ----------------------------------
2866
2867 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2868
2869 -- Note: record extension parts are not permitted in Ada 83 mode
2870
2871 --------------------------------------
2872 -- 3.9.4 Interface Type Definition --
2873 --------------------------------------
2874
2875 -- INTERFACE_TYPE_DEFINITION ::=
2876 -- [limited | task | protected | synchronized]
2877 -- interface [interface_list]
2878
2879 -- Note: Interfaces are implemented with N_Record_Definition and
2880 -- N_Derived_Type_Definition nodes because most of the support
2881 -- for the analysis of abstract types has been reused to
2882 -- analyze abstract interfaces.
2883
2884 ----------------------------------
2885 -- 3.10 Access Type Definition --
2886 ----------------------------------
2887
2888 -- ACCESS_TYPE_DEFINITION ::=
2889 -- ACCESS_TO_OBJECT_DEFINITION
2890 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2891
2892 --------------------------
2893 -- 3.10 Null Exclusion --
2894 --------------------------
2895
2896 -- NULL_EXCLUSION ::= not null
2897
2898 ---------------------------------------
2899 -- 3.10 Access To Object Definition --
2900 ---------------------------------------
2901
2902 -- ACCESS_TO_OBJECT_DEFINITION ::=
2903 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2904 -- SUBTYPE_INDICATION
2905
2906 -- N_Access_To_Object_Definition
2907 -- Sloc points to ACCESS
2908 -- All_Present (Flag15)
2909 -- Null_Exclusion_Present (Flag11)
2910 -- Subtype_Indication (Node5)
2911 -- Constant_Present (Flag17)
2912
2913 -----------------------------------
2914 -- 3.10 General Access Modifier --
2915 -----------------------------------
2916
2917 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2918
2919 -- Note: general access modifiers are not permitted in Ada 83 mode
2920
2921 -- There is no explicit node in the tree for general access modifier.
2922 -- Instead the All_Present or Constant_Present flags are set in the
2923 -- parent node.
2924
2925 -------------------------------------------
2926 -- 3.10 Access To Subprogram Definition --
2927 -------------------------------------------
2928
2929 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2930 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2931 -- | [NULL_EXCLUSION] access [protected] function
2932 -- PARAMETER_AND_RESULT_PROFILE
2933
2934 -- Note: access to subprograms are not permitted in Ada 83 mode
2935
2936 -- N_Access_Function_Definition
2937 -- Sloc points to ACCESS
2938 -- Null_Exclusion_Present (Flag11)
2939 -- Null_Exclusion_In_Return_Present (Flag14)
2940 -- Protected_Present (Flag6)
2941 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2942 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2943
2944 -- N_Access_Procedure_Definition
2945 -- Sloc points to ACCESS
2946 -- Null_Exclusion_Present (Flag11)
2947 -- Protected_Present (Flag6)
2948 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2949
2950 -----------------------------
2951 -- 3.10 Access Definition --
2952 -----------------------------
2953
2954 -- ACCESS_DEFINITION ::=
2955 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2956 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2957
2958 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2959
2960 -- N_Access_Definition
2961 -- Sloc points to ACCESS
2962 -- Null_Exclusion_Present (Flag11)
2963 -- All_Present (Flag15)
2964 -- Constant_Present (Flag17)
2965 -- Subtype_Mark (Node4)
2966 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2967
2968 -----------------------------------------
2969 -- 3.10.1 Incomplete Type Declaration --
2970 -----------------------------------------
2971
2972 -- INCOMPLETE_TYPE_DECLARATION ::=
2973 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2974
2975 -- N_Incomplete_Type_Declaration
2976 -- Sloc points to TYPE
2977 -- Defining_Identifier (Node1)
2978 -- Discriminant_Specifications (List4) (set to No_List if no
2979 -- discriminant part, or if the discriminant part is an
2980 -- unknown discriminant part)
2981 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2982 -- Tagged_Present (Flag15)
2983
2984 ----------------------------
2985 -- 3.11 Declarative Part --
2986 ----------------------------
2987
2988 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2989
2990 -- Note: although the parser enforces the syntactic requirement that
2991 -- a declarative part can contain only declarations, the semantic
2992 -- processing may add statements to the list of actions in a
2993 -- declarative part, so the code generator should be prepared
2994 -- to accept a statement in this position.
2995
2996 ----------------------------
2997 -- 3.11 Declarative Item --
2998 ----------------------------
2999
3000 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3001
3002 ----------------------------------
3003 -- 3.11 Basic Declarative Item --
3004 ----------------------------------
3005
3006 -- BASIC_DECLARATIVE_ITEM ::=
3007 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3008
3009 ----------------
3010 -- 3.11 Body --
3011 ----------------
3012
3013 -- BODY ::= PROPER_BODY | BODY_STUB
3014
3015 -----------------------
3016 -- 3.11 Proper Body --
3017 -----------------------
3018
3019 -- PROPER_BODY ::=
3020 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3021
3022 ---------------
3023 -- 4.1 Name --
3024 ---------------
3025
3026 -- NAME ::=
3027 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3028 -- | INDEXED_COMPONENT | SLICE
3029 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3030 -- | TYPE_CONVERSION | FUNCTION_CALL
3031 -- | CHARACTER_LITERAL
3032
3033 ----------------------
3034 -- 4.1 Direct Name --
3035 ----------------------
3036
3037 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3038
3039 -----------------
3040 -- 4.1 Prefix --
3041 -----------------
3042
3043 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3044
3045 -------------------------------
3046 -- 4.1 Explicit Dereference --
3047 -------------------------------
3048
3049 -- EXPLICIT_DEREFERENCE ::= NAME . all
3050
3051 -- N_Explicit_Dereference
3052 -- Sloc points to ALL
3053 -- Prefix (Node3)
3054 -- Actual_Designated_Subtype (Node4-Sem)
3055 -- plus fields for expression
3056
3057 -------------------------------
3058 -- 4.1 Implicit Dereference --
3059 -------------------------------
3060
3061 -- IMPLICIT_DEREFERENCE ::= NAME
3062
3063 ------------------------------
3064 -- 4.1.1 Indexed Component --
3065 ------------------------------
3066
3067 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3068
3069 -- Note: the parser may generate this node in some situations where it
3070 -- should be a function call. The semantic pass must correct this
3071 -- misidentification (which is inevitable at the parser level).
3072
3073 -- N_Indexed_Component
3074 -- Sloc contains a copy of the Sloc value of the Prefix
3075 -- Prefix (Node3)
3076 -- Expressions (List1)
3077 -- plus fields for expression
3078
3079 -- Note: if any of the subscripts requires a range check, then the
3080 -- Do_Range_Check flag is set on the corresponding expression, with
3081 -- the index type being determined from the type of the Prefix, which
3082 -- references the array being indexed.
3083
3084 -- Note: in a fully analyzed and expanded indexed component node, and
3085 -- hence in any such node that gigi sees, if the prefix is an access
3086 -- type, then an explicit dereference operation has been inserted.
3087
3088 ------------------
3089 -- 4.1.2 Slice --
3090 ------------------
3091
3092 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3093
3094 -- Note: an implicit subtype is created to describe the resulting
3095 -- type, so that the bounds of this type are the bounds of the slice.
3096
3097 -- N_Slice
3098 -- Sloc points to first token of prefix
3099 -- Prefix (Node3)
3100 -- Discrete_Range (Node4)
3101 -- plus fields for expression
3102
3103 -------------------------------
3104 -- 4.1.3 Selected Component --
3105 -------------------------------
3106
3107 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3108
3109 -- Note: selected components that are semantically expanded names get
3110 -- changed during semantic processing into the separate N_Expanded_Name
3111 -- node. See description of this node in the section on semantic nodes.
3112
3113 -- N_Selected_Component
3114 -- Sloc points to period
3115 -- Prefix (Node3)
3116 -- Selector_Name (Node2)
3117 -- Associated_Node (Node4-Sem)
3118 -- Do_Discriminant_Check (Flag13-Sem)
3119 -- Is_In_Discriminant_Check (Flag11-Sem)
3120 -- plus fields for expression
3121
3122 --------------------------
3123 -- 4.1.3 Selector Name --
3124 --------------------------
3125
3126 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3127
3128 --------------------------------
3129 -- 4.1.4 Attribute Reference --
3130 --------------------------------
3131
3132 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3133
3134 -- Note: the syntax is quite ambiguous at this point. Consider:
3135
3136 -- A'Length (X) X is part of the attribute designator
3137 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3138 -- A'Class (X) X is the expression of a type conversion
3139
3140 -- It would be possible for the parser to distinguish these cases
3141 -- by looking at the attribute identifier. However, that would mean
3142 -- more work in introducing new implementation defined attributes,
3143 -- and also it would mean that special processing for attributes
3144 -- would be scattered around, instead of being centralized in the
3145 -- semantic routine that handles an N_Attribute_Reference node.
3146 -- Consequently, the parser in all the above cases stores the
3147 -- expression (X in these examples) as a single element list in
3148 -- in the Expressions field of the N_Attribute_Reference node.
3149
3150 -- Similarly, for attributes like Max which take two arguments,
3151 -- we store the two arguments as a two element list in the
3152 -- Expressions field. Of course it is clear at parse time that
3153 -- this case is really a function call with an attribute as the
3154 -- prefix, but it turns out to be convenient to handle the two
3155 -- argument case in a similar manner to the one argument case,
3156 -- and indeed in general the parser will accept any number of
3157 -- expressions in this position and store them as a list in the
3158 -- attribute reference node. This allows for future addition of
3159 -- attributes that take more than two arguments.
3160
3161 -- Note: named associates are not permitted in function calls where
3162 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3163 -- to skip the normal subprogram argument processing.
3164
3165 -- Note: for the attributes whose designators are technically keywords,
3166 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3167 -- the corresponding name, even though no identifier is involved.
3168
3169 -- Note: the generated code may contain stream attributes applied to
3170 -- limited types for which no stream routines exist officially. In such
3171 -- case, the result is to use the stream attribute for the underlying
3172 -- full type, or in the case of a protected type, the components
3173 -- (including any discriminants) are merely streamed in order.
3174
3175 -- See Exp_Attr for a complete description of which attributes are
3176 -- passed onto Gigi, and which are handled entirely by the front end.
3177
3178 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3179 -- a non-standard enumeration type or a nonzero/zero semantics
3180 -- boolean type, so the value is simply the stored representation.
3181
3182 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3183 -- references a subprogram that is a renaming, then the front end must
3184 -- rewrite the attribute to refer directly to the renamed entity.
3185
3186 -- Note: In generated code, the Address and Unrestricted_Access
3187 -- attributes can be applied to any expression, and the meaning is
3188 -- to create an object containing the value (the object is in the
3189 -- current stack frame), and pass the address of this value. If the
3190 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3191 -- is taken must be on a byte (storage unit) boundary, and if it is
3192 -- not (or may not be), then the generated code must create a copy
3193 -- that is byte aligned, and pass the address of this copy.
3194
3195 -- N_Attribute_Reference
3196 -- Sloc points to apostrophe
3197 -- Prefix (Node3)
3198 -- Attribute_Name (Name2) identifier name from attribute designator
3199 -- Expressions (List1) (set to No_List if no associated expressions)
3200 -- Entity (Node4-Sem) used if the attribute yields a type
3201 -- Associated_Node (Node4-Sem)
3202 -- Do_Overflow_Check (Flag17-Sem)
3203 -- Redundant_Use (Flag13-Sem)
3204 -- Must_Be_Byte_Aligned (Flag14)
3205 -- plus fields for expression
3206
3207 ---------------------------------
3208 -- 4.1.4 Attribute Designator --
3209 ---------------------------------
3210
3211 -- ATTRIBUTE_DESIGNATOR ::=
3212 -- IDENTIFIER [(static_EXPRESSION)]
3213 -- | access | delta | digits
3214
3215 -- There is no explicit node in the tree for an attribute designator.
3216 -- Instead the Attribute_Name and Expressions fields of the parent
3217 -- node (N_Attribute_Reference node) hold the information.
3218
3219 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3220 -- designator, then they are treated as identifiers internally
3221 -- rather than the keywords of the same name.
3222
3223 --------------------------------------
3224 -- 4.1.4 Range Attribute Reference --
3225 --------------------------------------
3226
3227 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3228
3229 -- A range attribute reference is represented in the tree using the
3230 -- normal N_Attribute_Reference node.
3231
3232 ---------------------------------------
3233 -- 4.1.4 Range Attribute Designator --
3234 ---------------------------------------
3235
3236 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3237
3238 -- A range attribute designator is represented in the tree using the
3239 -- normal N_Attribute_Reference node.
3240
3241 --------------------
3242 -- 4.3 Aggregate --
3243 --------------------
3244
3245 -- AGGREGATE ::=
3246 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3247
3248 -----------------------------
3249 -- 4.3.1 Record Aggregate --
3250 -----------------------------
3251
3252 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3253
3254 -- N_Aggregate
3255 -- Sloc points to left parenthesis
3256 -- Expressions (List1) (set to No_List if none or null record case)
3257 -- Component_Associations (List2) (set to No_List if none)
3258 -- Null_Record_Present (Flag17)
3259 -- Aggregate_Bounds (Node3-Sem)
3260 -- Associated_Node (Node4-Sem)
3261 -- Static_Processing_OK (Flag4-Sem)
3262 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3263 -- Expansion_Delayed (Flag11-Sem)
3264 -- Has_Self_Reference (Flag13-Sem)
3265 -- plus fields for expression
3266
3267 -- Note: this structure is used for both record and array aggregates
3268 -- since the two cases are not separable by the parser. The parser
3269 -- makes no attempt to enforce consistency here, so it is up to the
3270 -- semantic phase to make sure that the aggregate is consistent (i.e.
3271 -- that it is not a "half-and-half" case that mixes record and array
3272 -- syntax. In particular, for a record aggregate, the expressions
3273 -- field will be set if there are positional associations.
3274
3275 -- Note: N_Aggregate is not used for all aggregates; in particular,
3276 -- there is a separate node kind for extension aggregates.
3277
3278 -- Note: gigi/gcc can handle array aggregates correctly providing that
3279 -- they are entirely positional, and the array subtype involved has a
3280 -- known at compile time length and is not bit packed, or a convention
3281 -- Fortran array with more than one dimension. If these conditions
3282 -- are not met, then the front end must translate the aggregate into
3283 -- an appropriate set of assignments into a temporary.
3284
3285 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3286 -- of record aggregates, including those for packed, and rep-claused
3287 -- records, and also variant records, providing that there are no
3288 -- variable length fields whose size is not known at runtime, and
3289 -- providing that the aggregate is presented in fully named form.
3290
3291 ----------------------------------------------
3292 -- 4.3.1 Record Component Association List --
3293 ----------------------------------------------
3294
3295 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3296 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3297 -- | null record
3298
3299 -- There is no explicit node in the tree for a record component
3300 -- association list. Instead the Null_Record_Present flag is set in
3301 -- the parent node for the NULL RECORD case.
3302
3303 ------------------------------------------------------
3304 -- 4.3.1 Record Component Association (also 4.3.3) --
3305 ------------------------------------------------------
3306
3307 -- RECORD_COMPONENT_ASSOCIATION ::=
3308 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3309
3310 -- N_Component_Association
3311 -- Sloc points to first selector name
3312 -- Choices (List1)
3313 -- Loop_Actions (List2-Sem)
3314 -- Expression (Node3)
3315 -- Box_Present (Flag15)
3316
3317 -- Note: this structure is used for both record component associations
3318 -- and array component associations, since the two cases aren't always
3319 -- separable by the parser. The choices list may represent either a
3320 -- list of selector names in the record aggregate case, or a list of
3321 -- discrete choices in the array aggregate case or an N_Others_Choice
3322 -- node (which appears as a singleton list). Box_Present gives support
3323 -- to Ada 2005 (AI-287).
3324
3325 ----------------------------------
3326 -- 4.3.1 Component Choice List --
3327 ----------------------------------
3328
3329 -- COMPONENT_CHOICE_LIST ::=
3330 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3331 -- | others
3332
3333 -- The entries of a component choice list appear in the Choices list of
3334 -- the associated N_Component_Association, as either selector names, or
3335 -- as an N_Others_Choice node.
3336
3337 --------------------------------
3338 -- 4.3.2 Extension Aggregate --
3339 --------------------------------
3340
3341 -- EXTENSION_AGGREGATE ::=
3342 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3343
3344 -- Note: extension aggregates are not permitted in Ada 83 mode
3345
3346 -- N_Extension_Aggregate
3347 -- Sloc points to left parenthesis
3348 -- Ancestor_Part (Node3)
3349 -- Associated_Node (Node4-Sem)
3350 -- Expressions (List1) (set to No_List if none or null record case)
3351 -- Component_Associations (List2) (set to No_List if none)
3352 -- Null_Record_Present (Flag17)
3353 -- Expansion_Delayed (Flag11-Sem)
3354 -- Has_Self_Reference (Flag13-Sem)
3355 -- plus fields for expression
3356
3357 --------------------------
3358 -- 4.3.2 Ancestor Part --
3359 --------------------------
3360
3361 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3362
3363 ----------------------------
3364 -- 4.3.3 Array Aggregate --
3365 ----------------------------
3366
3367 -- ARRAY_AGGREGATE ::=
3368 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3369
3370 ---------------------------------------
3371 -- 4.3.3 Positional Array Aggregate --
3372 ---------------------------------------
3373
3374 -- POSITIONAL_ARRAY_AGGREGATE ::=
3375 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3376 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3377
3378 -- See Record_Aggregate (4.3.1) for node structure
3379
3380 ----------------------------------
3381 -- 4.3.3 Named Array Aggregate --
3382 ----------------------------------
3383
3384 -- NAMED_ARRAY_AGGREGATE ::=
3385 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3386
3387 -- See Record_Aggregate (4.3.1) for node structure
3388
3389 ----------------------------------------
3390 -- 4.3.3 Array Component Association --
3391 ----------------------------------------
3392
3393 -- ARRAY_COMPONENT_ASSOCIATION ::=
3394 -- DISCRETE_CHOICE_LIST => EXPRESSION
3395
3396 -- See Record_Component_Association (4.3.1) for node structure
3397
3398 --------------------------------------------------
3399 -- 4.4 Expression/Relation/Term/Factor/Primary --
3400 --------------------------------------------------
3401
3402 -- EXPRESSION ::=
3403 -- RELATION {and RELATION} | RELATION {and then RELATION}
3404 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3405 -- | RELATION {xor RELATION}
3406
3407 -- RELATION ::=
3408 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3409 -- | SIMPLE_EXPRESSION [not] in RANGE
3410 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3411
3412 -- SIMPLE_EXPRESSION ::=
3413 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3414
3415 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3416
3417 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3418
3419 -- No nodes are generated for any of these constructs. Instead, the
3420 -- node for the operator appears directly. When we refer to an
3421 -- expression in this description, we mean any of the possible
3422 -- constituent components of an expression (e.g. identifier is
3423 -- an example of an expression).
3424
3425 ------------------
3426 -- 4.4 Primary --
3427 ------------------
3428
3429 -- PRIMARY ::=
3430 -- NUMERIC_LITERAL | null
3431 -- | STRING_LITERAL | AGGREGATE
3432 -- | NAME | QUALIFIED_EXPRESSION
3433 -- | ALLOCATOR | (EXPRESSION)
3434
3435 -- Usually there is no explicit node in the tree for primary. Instead
3436 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3437 -- exceptions. First, there is an explicit node for a null primary.
3438
3439 -- N_Null
3440 -- Sloc points to NULL
3441 -- plus fields for expression
3442
3443 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3444 -- that the parser keep track of which subexpressions are enclosed
3445 -- in parentheses, and how many levels of parentheses are used. This
3446 -- information is required for optimization purposes, and also for
3447 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3448 -- conform with ((((1)))) in the body).
3449
3450 -- The parentheses are recorded by keeping a Paren_Count field in every
3451 -- subexpression node (it is actually present in all nodes, but only
3452 -- used in subexpression nodes). This count records the number of
3453 -- levels of parentheses. If the number of levels in the source exceeds
3454 -- the maximum accommodated by this count, then the count is simply left
3455 -- at the maximum value. This means that there are some pathological
3456 -- cases of failure to detect conformance failures (e.g. an expression
3457 -- with 500 levels of parens will conform with one with 501 levels),
3458 -- but we do not need to lose sleep over this.
3459
3460 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3461 -- type N_Parenthesized_Expression used to accurately record unlimited
3462 -- numbers of levels of parentheses. However, it turned out to be a
3463 -- real nuisance to have to take into account the possible presence of
3464 -- this node during semantic analysis, since basically parentheses have
3465 -- zero relevance to semantic analysis.
3466
3467 -- Note: the level of parentheses always present in things like
3468 -- aggregates does not count, only the parentheses in the primary
3469 -- (EXPRESSION) affect the setting of the Paren_Count field.
3470
3471 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3472 -- treated as though it were Empty) if No_Initialization is set True.
3473
3474 --------------------------------------
3475 -- 4.5 Short Circuit Control Forms --
3476 --------------------------------------
3477
3478 -- EXPRESSION ::=
3479 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3480
3481 -- Gigi restriction: For both these control forms, the operand and
3482 -- result types are always Standard.Boolean. The expander inserts the
3483 -- required conversion operations where needed to ensure this is the
3484 -- case.
3485
3486 -- N_And_Then
3487 -- Sloc points to AND of AND THEN
3488 -- Left_Opnd (Node2)
3489 -- Right_Opnd (Node3)
3490 -- Actions (List1-Sem)
3491 -- plus fields for expression
3492
3493 -- N_Or_Else
3494 -- Sloc points to OR of OR ELSE
3495 -- Left_Opnd (Node2)
3496 -- Right_Opnd (Node3)
3497 -- Actions (List1-Sem)
3498 -- plus fields for expression
3499
3500 -- Note: The Actions field is used to hold actions associated with
3501 -- the right hand operand. These have to be treated specially since
3502 -- they are not unconditionally executed. See Insert_Actions for a
3503 -- more detailed description of how these actions are handled.
3504
3505 ---------------------------
3506 -- 4.5 Membership Tests --
3507 ---------------------------
3508
3509 -- RELATION ::=
3510 -- SIMPLE_EXPRESSION [not] in RANGE
3511 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3512
3513 -- Note: although the grammar above allows only a range or a subtype
3514 -- mark, the parser in fact will accept any simple expression in place
3515 -- of a subtype mark. This means that the semantic analyzer must be able
3516 -- to deal with, and diagnose a simple expression other than a name for
3517 -- the right operand. This simplifies error recovery in the parser.
3518
3519 -- If extensions are enabled, the grammar is as follows:
3520
3521 -- RELATION ::=
3522 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3523
3524 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3525
3526 -- The Alternatives field below is present only if there is more than
3527 -- one Set_Alternative present, in which case Right_Opnd is set to
3528 -- Empty, and Alternatives contains the list of alternatives. In the
3529 -- tree passed to the back end, Alternatives is always No_List, and
3530 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3531 -- complex set membership case using simple membership operations).
3532
3533 -- N_In
3534 -- Sloc points to IN
3535 -- Left_Opnd (Node2)
3536 -- Right_Opnd (Node3)
3537 -- Alternatives (List4) (set to No_List if only one set alternative)
3538 -- plus fields for expression
3539
3540 -- N_Not_In
3541 -- Sloc points to NOT of NOT IN
3542 -- Left_Opnd (Node2)
3543 -- Right_Opnd (Node3)
3544 -- Alternatives (List4) (set to No_List if only one set alternative)
3545 -- plus fields for expression
3546
3547 --------------------
3548 -- 4.5 Operators --
3549 --------------------
3550
3551 -- LOGICAL_OPERATOR ::= and | or | xor
3552
3553 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3554
3555 -- BINARY_ADDING_OPERATOR ::= + | - | &
3556
3557 -- UNARY_ADDING_OPERATOR ::= + | -
3558
3559 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3560
3561 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3562
3563 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3564
3565 -- x #* y
3566 -- x #/ y
3567 -- x #mod y
3568 -- x #rem y
3569
3570 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3571 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3572 -- All handling of smalls for multiplication and division is handled
3573 -- by the front end (mod and rem result only from expansion). Gigi
3574 -- thus never needs to worry about small values (for other operators
3575 -- operating on fixed-point, e.g. addition, the small value does not
3576 -- have any semantic effect anyway, these are always integer operations.
3577
3578 -- Gigi restriction: For all operators taking Boolean operands, the
3579 -- type is always Standard.Boolean. The expander inserts the required
3580 -- conversion operations where needed to ensure this is the case.
3581
3582 -- N_Op_And
3583 -- Sloc points to AND
3584 -- Do_Length_Check (Flag4-Sem)
3585 -- plus fields for binary operator
3586 -- plus fields for expression
3587
3588 -- N_Op_Or
3589 -- Sloc points to OR
3590 -- Do_Length_Check (Flag4-Sem)
3591 -- plus fields for binary operator
3592 -- plus fields for expression
3593
3594 -- N_Op_Xor
3595 -- Sloc points to XOR
3596 -- Do_Length_Check (Flag4-Sem)
3597 -- plus fields for binary operator
3598 -- plus fields for expression
3599
3600 -- N_Op_Eq
3601 -- Sloc points to =
3602 -- plus fields for binary operator
3603 -- plus fields for expression
3604
3605 -- N_Op_Ne
3606 -- Sloc points to /=
3607 -- plus fields for binary operator
3608 -- plus fields for expression
3609
3610 -- N_Op_Lt
3611 -- Sloc points to <
3612 -- plus fields for binary operator
3613 -- plus fields for expression
3614
3615 -- N_Op_Le
3616 -- Sloc points to <=
3617 -- plus fields for binary operator
3618 -- plus fields for expression
3619
3620 -- N_Op_Gt
3621 -- Sloc points to >
3622 -- plus fields for binary operator
3623 -- plus fields for expression
3624
3625 -- N_Op_Ge
3626 -- Sloc points to >=
3627 -- plus fields for binary operator
3628 -- plus fields for expression
3629
3630 -- N_Op_Add
3631 -- Sloc points to + (binary)
3632 -- plus fields for binary operator
3633 -- plus fields for expression
3634
3635 -- N_Op_Subtract
3636 -- Sloc points to - (binary)
3637 -- plus fields for binary operator
3638 -- plus fields for expression
3639
3640 -- N_Op_Concat
3641 -- Sloc points to &
3642 -- Is_Component_Left_Opnd (Flag13-Sem)
3643 -- Is_Component_Right_Opnd (Flag14-Sem)
3644 -- plus fields for binary operator
3645 -- plus fields for expression
3646
3647 -- N_Op_Multiply
3648 -- Sloc points to *
3649 -- Treat_Fixed_As_Integer (Flag14-Sem)
3650 -- Rounded_Result (Flag18-Sem)
3651 -- plus fields for binary operator
3652 -- plus fields for expression
3653
3654 -- N_Op_Divide
3655 -- Sloc points to /
3656 -- Treat_Fixed_As_Integer (Flag14-Sem)
3657 -- Do_Division_Check (Flag13-Sem)
3658 -- Rounded_Result (Flag18-Sem)
3659 -- plus fields for binary operator
3660 -- plus fields for expression
3661
3662 -- N_Op_Mod
3663 -- Sloc points to MOD
3664 -- Treat_Fixed_As_Integer (Flag14-Sem)
3665 -- Do_Division_Check (Flag13-Sem)
3666 -- plus fields for binary operator
3667 -- plus fields for expression
3668
3669 -- N_Op_Rem
3670 -- Sloc points to REM
3671 -- Treat_Fixed_As_Integer (Flag14-Sem)
3672 -- Do_Division_Check (Flag13-Sem)
3673 -- plus fields for binary operator
3674 -- plus fields for expression
3675
3676 -- N_Op_Expon
3677 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3678 -- Sloc points to **
3679 -- plus fields for binary operator
3680 -- plus fields for expression
3681
3682 -- N_Op_Plus
3683 -- Sloc points to + (unary)
3684 -- plus fields for unary operator
3685 -- plus fields for expression
3686
3687 -- N_Op_Minus
3688 -- Sloc points to - (unary)
3689 -- plus fields for unary operator
3690 -- plus fields for expression
3691
3692 -- N_Op_Abs
3693 -- Sloc points to ABS
3694 -- plus fields for unary operator
3695 -- plus fields for expression
3696
3697 -- N_Op_Not
3698 -- Sloc points to NOT
3699 -- plus fields for unary operator
3700 -- plus fields for expression
3701
3702 -- See also shift operators in section B.2
3703
3704 -- Note on fixed-point operations passed to Gigi: For adding operators,
3705 -- the semantics is to treat these simply as integer operations, with
3706 -- the small values being ignored (the bounds are already stored in
3707 -- units of small, so that constraint checking works as usual). For the
3708 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3709 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3710 -- thus treat these nodes in identical manner, ignoring small values.
3711
3712 --------------------------
3713 -- 4.6 Type Conversion --
3714 --------------------------
3715
3716 -- TYPE_CONVERSION ::=
3717 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3718
3719 -- In the (NAME) case, the name is stored as the expression
3720
3721 -- Note: the parser never generates a type conversion node, since it
3722 -- looks like an indexed component which is generated by preference.
3723 -- The semantic pass must correct this misidentification.
3724
3725 -- Gigi handles conversions that involve no change in the root type,
3726 -- and also all conversions from integer to floating-point types.
3727 -- Conversions from floating-point to integer are only handled in
3728 -- the case where Float_Truncate flag set. Other conversions from
3729 -- floating-point to integer (involving rounding) and all conversions
3730 -- involving fixed-point types are handled by the expander.
3731
3732 -- Sprint syntax if Float_Truncate set: X^(Y)
3733 -- Sprint syntax if Conversion_OK set X?(Y)
3734 -- Sprint syntax if both flags set X?^(Y)
3735
3736 -- Note: If either the operand or result type is fixed-point, Gigi will
3737 -- only see a type conversion node with Conversion_OK set. The front end
3738 -- takes care of all handling of small's for fixed-point conversions.
3739
3740 -- N_Type_Conversion
3741 -- Sloc points to first token of subtype mark
3742 -- Subtype_Mark (Node4)
3743 -- Expression (Node3)
3744 -- Do_Tag_Check (Flag13-Sem)
3745 -- Do_Length_Check (Flag4-Sem)
3746 -- Do_Overflow_Check (Flag17-Sem)
3747 -- Float_Truncate (Flag11-Sem)
3748 -- Rounded_Result (Flag18-Sem)
3749 -- Conversion_OK (Flag14-Sem)
3750 -- plus fields for expression
3751
3752 -- Note: if a range check is required, then the Do_Range_Check flag
3753 -- is set in the Expression with the check being done against the
3754 -- target type range (after the base type conversion, if any).
3755
3756 -------------------------------
3757 -- 4.7 Qualified Expression --
3758 -------------------------------
3759
3760 -- QUALIFIED_EXPRESSION ::=
3761 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3762
3763 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3764 -- the expression, so the Expression field of this node always points
3765 -- to a parenthesized expression in this case (i.e. Paren_Count will
3766 -- always be non-zero for the referenced expression if it is not an
3767 -- aggregate).
3768
3769 -- N_Qualified_Expression
3770 -- Sloc points to apostrophe
3771 -- Subtype_Mark (Node4)
3772 -- Expression (Node3) expression or aggregate
3773 -- plus fields for expression
3774
3775 --------------------
3776 -- 4.8 Allocator --
3777 --------------------
3778
3779 -- ALLOCATOR ::=
3780 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3781
3782 -- Sprint syntax (when storage pool present)
3783 -- new xxx (storage_pool = pool)
3784
3785 -- N_Allocator
3786 -- Sloc points to NEW
3787 -- Expression (Node3) subtype indication or qualified expression
3788 -- Storage_Pool (Node1-Sem)
3789 -- Procedure_To_Call (Node2-Sem)
3790 -- Coextensions (Elist4-Sem)
3791 -- Null_Exclusion_Present (Flag11)
3792 -- No_Initialization (Flag13-Sem)
3793 -- Is_Static_Coextension (Flag14-Sem)
3794 -- Do_Storage_Check (Flag17-Sem)
3795 -- Is_Dynamic_Coextension (Flag18-Sem)
3796 -- plus fields for expression
3797
3798 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3799 -- This flag has a special function in conjunction with the restriction
3800 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3801 -- is not set. This means that if a source allocator is replaced with
3802 -- a constructed allocator, the Comes_From_Source flag should be copied
3803 -- to the newly created allocator.
3804
3805 ---------------------------------
3806 -- 5.1 Sequence Of Statements --
3807 ---------------------------------
3808
3809 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3810
3811 -- Note: Although the parser will not accept a declaration as a
3812 -- statement, the semantic analyzer may insert declarations (e.g.
3813 -- declarations of implicit types needed for execution of other
3814 -- statements) into a sequence of statements, so the code generator
3815 -- should be prepared to accept a declaration where a statement is
3816 -- expected. Note also that pragmas can appear as statements.
3817
3818 --------------------
3819 -- 5.1 Statement --
3820 --------------------
3821
3822 -- STATEMENT ::=
3823 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3824
3825 -- There is no explicit node in the tree for a statement. Instead, the
3826 -- individual statement appears directly. Labels are treated as a
3827 -- kind of statement, i.e. they are linked into a statement list at
3828 -- the point they appear, so the labeled statement appears following
3829 -- the label or labels in the statement list.
3830
3831 ---------------------------
3832 -- 5.1 Simple Statement --
3833 ---------------------------
3834
3835 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3836 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3837 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3838 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3839 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3840 -- | ABORT_STATEMENT | RAISE_STATEMENT
3841 -- | CODE_STATEMENT
3842
3843 -----------------------------
3844 -- 5.1 Compound Statement --
3845 -----------------------------
3846
3847 -- COMPOUND_STATEMENT ::=
3848 -- IF_STATEMENT | CASE_STATEMENT
3849 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3850 -- | EXTENDED_RETURN_STATEMENT
3851 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3852
3853 -------------------------
3854 -- 5.1 Null Statement --
3855 -------------------------
3856
3857 -- NULL_STATEMENT ::= null;
3858
3859 -- N_Null_Statement
3860 -- Sloc points to NULL
3861 -- Is_Scil_Node (Flag4-Sem)
3862 -- Scil_Nkind (Uint3-Sem)
3863 -- Scil_Related_Node (Node1-Sem)
3864 -- Entity (Node4-Sem)
3865 -- Scil_Target_Prim (Node2-Sem)
3866
3867 -- Note that in SCIL nodes (N_Null_Statement nodes with Is_Scil_Node
3868 -- set to True), Entity references the tagged type associated with
3869 -- the SCIL node.
3870
3871 ----------------
3872 -- 5.1 Label --
3873 ----------------
3874
3875 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3876
3877 -- Note that the occurrence of a label is not a defining identifier,
3878 -- but rather a referencing occurrence. The defining occurrence is
3879 -- in the implicit label declaration which occurs in the innermost
3880 -- enclosing block.
3881
3882 -- N_Label
3883 -- Sloc points to <<
3884 -- Identifier (Node1) direct name of statement identifier
3885 -- Exception_Junk (Flag8-Sem)
3886
3887 -------------------------------
3888 -- 5.1 Statement Identifier --
3889 -------------------------------
3890
3891 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3892
3893 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3894 -- (not an OPERATOR_SYMBOL)
3895
3896 -------------------------------
3897 -- 5.2 Assignment Statement --
3898 -------------------------------
3899
3900 -- ASSIGNMENT_STATEMENT ::=
3901 -- variable_NAME := EXPRESSION;
3902
3903 -- N_Assignment_Statement
3904 -- Sloc points to :=
3905 -- Name (Node2)
3906 -- Expression (Node3)
3907 -- Do_Tag_Check (Flag13-Sem)
3908 -- Do_Length_Check (Flag4-Sem)
3909 -- Forwards_OK (Flag5-Sem)
3910 -- Backwards_OK (Flag6-Sem)
3911 -- No_Ctrl_Actions (Flag7-Sem)
3912 -- Componentwise_Assignment (Flag14-Sem)
3913
3914 -- Note: if a range check is required, then the Do_Range_Check flag
3915 -- is set in the Expression (right hand side), with the check being
3916 -- done against the type of the Name (left hand side).
3917
3918 -- Note: the back end places some restrictions on the form of the
3919 -- Expression field. If the object being assigned to is Atomic, then
3920 -- the Expression may not have the form of an aggregate (since this
3921 -- might cause the back end to generate separate assignments). In this
3922 -- case the front end must generate an extra temporary and initialize
3923 -- this temporary as required (the temporary itself is not atomic).
3924
3925 -----------------------
3926 -- 5.3 If Statement --
3927 -----------------------
3928
3929 -- IF_STATEMENT ::=
3930 -- if CONDITION then
3931 -- SEQUENCE_OF_STATEMENTS
3932 -- {elsif CONDITION then
3933 -- SEQUENCE_OF_STATEMENTS}
3934 -- [else
3935 -- SEQUENCE_OF_STATEMENTS]
3936 -- end if;
3937
3938 -- Gigi restriction: This expander ensures that the type of the
3939 -- Condition fields is always Standard.Boolean, even if the type
3940 -- in the source is some non-standard boolean type.
3941
3942 -- N_If_Statement
3943 -- Sloc points to IF
3944 -- Condition (Node1)
3945 -- Then_Statements (List2)
3946 -- Elsif_Parts (List3) (set to No_List if none present)
3947 -- Else_Statements (List4) (set to No_List if no else part present)
3948 -- End_Span (Uint5) (set to No_Uint if expander generated)
3949
3950 -- N_Elsif_Part
3951 -- Sloc points to ELSIF
3952 -- Condition (Node1)
3953 -- Then_Statements (List2)
3954 -- Condition_Actions (List3-Sem)
3955
3956 --------------------
3957 -- 5.3 Condition --
3958 --------------------
3959
3960 -- CONDITION ::= boolean_EXPRESSION
3961
3962 -------------------------
3963 -- 5.4 Case Statement --
3964 -------------------------
3965
3966 -- CASE_STATEMENT ::=
3967 -- case EXPRESSION is
3968 -- CASE_STATEMENT_ALTERNATIVE
3969 -- {CASE_STATEMENT_ALTERNATIVE}
3970 -- end case;
3971
3972 -- Note: the Alternatives can contain pragmas. These only occur at
3973 -- the start of the list, since any pragmas occurring after the first
3974 -- alternative are absorbed into the corresponding statement sequence.
3975
3976 -- N_Case_Statement
3977 -- Sloc points to CASE
3978 -- Expression (Node3)
3979 -- Alternatives (List4)
3980 -- End_Span (Uint5) (set to No_Uint if expander generated)
3981
3982 -------------------------------------
3983 -- 5.4 Case Statement Alternative --
3984 -------------------------------------
3985
3986 -- CASE_STATEMENT_ALTERNATIVE ::=
3987 -- when DISCRETE_CHOICE_LIST =>
3988 -- SEQUENCE_OF_STATEMENTS
3989
3990 -- N_Case_Statement_Alternative
3991 -- Sloc points to WHEN
3992 -- Discrete_Choices (List4)
3993 -- Statements (List3)
3994
3995 -------------------------
3996 -- 5.5 Loop Statement --
3997 -------------------------
3998
3999 -- LOOP_STATEMENT ::=
4000 -- [loop_STATEMENT_IDENTIFIER :]
4001 -- [ITERATION_SCHEME] loop
4002 -- SEQUENCE_OF_STATEMENTS
4003 -- end loop [loop_IDENTIFIER];
4004
4005 -- Note: The occurrence of a loop label is not a defining identifier
4006 -- but rather a referencing occurrence. The defining occurrence is in
4007 -- the implicit label declaration which occurs in the innermost
4008 -- enclosing block.
4009
4010 -- Note: there is always a loop statement identifier present in
4011 -- the tree, even if none was given in the source. In the case where
4012 -- no loop identifier is given in the source, the parser creates
4013 -- a name of the form _Loop_n, where n is a decimal integer (the
4014 -- two underlines ensure that the loop names created in this manner
4015 -- do not conflict with any user defined identifiers), and the flag
4016 -- Has_Created_Identifier is set to True. The only exception to the
4017 -- rule that all loop statement nodes have identifiers occurs for
4018 -- loops constructed by the expander, and the semantic analyzer will
4019 -- create and supply dummy loop identifiers in these cases.
4020
4021 -- N_Loop_Statement
4022 -- Sloc points to LOOP
4023 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4024 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4025 -- Statements (List3)
4026 -- End_Label (Node4)
4027 -- Has_Created_Identifier (Flag15)
4028 -- Is_Null_Loop (Flag16)
4029 -- Suppress_Loop_Warnings (Flag17)
4030
4031 --------------------------
4032 -- 5.5 Iteration Scheme --
4033 --------------------------
4034
4035 -- ITERATION_SCHEME ::=
4036 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
4037
4038 -- Gigi restriction: This expander ensures that the type of the
4039 -- Condition field is always Standard.Boolean, even if the type
4040 -- in the source is some non-standard boolean type.
4041
4042 -- N_Iteration_Scheme
4043 -- Sloc points to WHILE or FOR
4044 -- Condition (Node1) (set to Empty if FOR case)
4045 -- Condition_Actions (List3-Sem)
4046 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4047
4048 ---------------------------------------
4049 -- 5.5 Loop parameter specification --
4050 ---------------------------------------
4051
4052 -- LOOP_PARAMETER_SPECIFICATION ::=
4053 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4054
4055 -- N_Loop_Parameter_Specification
4056 -- Sloc points to first identifier
4057 -- Defining_Identifier (Node1)
4058 -- Reverse_Present (Flag15)
4059 -- Discrete_Subtype_Definition (Node4)
4060
4061 --------------------------
4062 -- 5.6 Block Statement --
4063 --------------------------
4064
4065 -- BLOCK_STATEMENT ::=
4066 -- [block_STATEMENT_IDENTIFIER:]
4067 -- [declare
4068 -- DECLARATIVE_PART]
4069 -- begin
4070 -- HANDLED_SEQUENCE_OF_STATEMENTS
4071 -- end [block_IDENTIFIER];
4072
4073 -- Note that the occurrence of a block identifier is not a defining
4074 -- identifier, but rather a referencing occurrence. The defining
4075 -- occurrence is an E_Block entity declared by the implicit label
4076 -- declaration which occurs in the innermost enclosing block statement
4077 -- or body; the block identifier denotes that E_Block.
4078
4079 -- For block statements that come from source code, there is always a
4080 -- block statement identifier present in the tree, denoting an
4081 -- E_Block. In the case where no block identifier is given in the
4082 -- source, the parser creates a name of the form B_n, where n is a
4083 -- decimal integer, and the flag Has_Created_Identifier is set to
4084 -- True. Blocks constructed by the expander usually have no identifier,
4085 -- and no corresponding entity.
4086
4087 -- Note: the block statement created for an extended return statement
4088 -- has an entity, and this entity is an E_Return_Statement, rather than
4089 -- the usual E_Block.
4090
4091 -- Note: Exception_Junk is set for the wrapping blocks created during
4092 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4093
4094 -- N_Block_Statement
4095 -- Sloc points to DECLARE or BEGIN
4096 -- Identifier (Node1) block direct name (set to Empty if not present)
4097 -- Declarations (List2) (set to No_List if no DECLARE part)
4098 -- Handled_Statement_Sequence (Node4)
4099 -- Is_Task_Master (Flag5-Sem)
4100 -- Activation_Chain_Entity (Node3-Sem)
4101 -- Has_Created_Identifier (Flag15)
4102 -- Is_Task_Allocation_Block (Flag6)
4103 -- Is_Asynchronous_Call_Block (Flag7)
4104 -- Exception_Junk (Flag8-Sem)
4105
4106 -------------------------
4107 -- 5.7 Exit Statement --
4108 -------------------------
4109
4110 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4111
4112 -- Gigi restriction: This expander ensures that the type of the
4113 -- Condition field is always Standard.Boolean, even if the type
4114 -- in the source is some non-standard boolean type.
4115
4116 -- N_Exit_Statement
4117 -- Sloc points to EXIT
4118 -- Name (Node2) (set to Empty if no loop name present)
4119 -- Condition (Node1) (set to Empty if no when part present)
4120
4121 -------------------------
4122 -- 5.9 Goto Statement --
4123 -------------------------
4124
4125 -- GOTO_STATEMENT ::= goto label_NAME;
4126
4127 -- N_Goto_Statement
4128 -- Sloc points to GOTO
4129 -- Name (Node2)
4130 -- Exception_Junk (Flag8-Sem)
4131
4132 ---------------------------------
4133 -- 6.1 Subprogram Declaration --
4134 ---------------------------------
4135
4136 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
4137
4138 -- N_Subprogram_Declaration
4139 -- Sloc points to FUNCTION or PROCEDURE
4140 -- Specification (Node1)
4141 -- Body_To_Inline (Node3-Sem)
4142 -- Corresponding_Body (Node5-Sem)
4143 -- Parent_Spec (Node4-Sem)
4144
4145 ------------------------------------------
4146 -- 6.1 Abstract Subprogram Declaration --
4147 ------------------------------------------
4148
4149 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4150 -- SUBPROGRAM_SPECIFICATION is abstract;
4151
4152 -- N_Abstract_Subprogram_Declaration
4153 -- Sloc points to ABSTRACT
4154 -- Specification (Node1)
4155
4156 -----------------------------------
4157 -- 6.1 Subprogram Specification --
4158 -----------------------------------
4159
4160 -- SUBPROGRAM_SPECIFICATION ::=
4161 -- [[not] overriding]
4162 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4163 -- | [[not] overriding]
4164 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4165
4166 -- Note: there are no separate nodes for the profiles, instead the
4167 -- information appears directly in the following nodes.
4168
4169 -- N_Function_Specification
4170 -- Sloc points to FUNCTION
4171 -- Defining_Unit_Name (Node1) (the designator)
4172 -- Elaboration_Boolean (Node2-Sem)
4173 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4174 -- Null_Exclusion_Present (Flag11)
4175 -- Result_Definition (Node4) for result subtype
4176 -- Generic_Parent (Node5-Sem)
4177 -- Must_Override (Flag14) set if overriding indicator present
4178 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4179
4180 -- N_Procedure_Specification
4181 -- Sloc points to PROCEDURE
4182 -- Defining_Unit_Name (Node1)
4183 -- Elaboration_Boolean (Node2-Sem)
4184 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4185 -- Generic_Parent (Node5-Sem)
4186 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4187 -- Must_Override (Flag14) set if overriding indicator present
4188 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4189
4190 -- Note: overriding indicator is an Ada 2005 feature
4191
4192 ---------------------
4193 -- 6.1 Designator --
4194 ---------------------
4195
4196 -- DESIGNATOR ::=
4197 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4198
4199 -- Designators that are simply identifiers or operator symbols appear
4200 -- directly in the tree in this form. The following node is used only
4201 -- in the case where the designator has a parent unit name component.
4202
4203 -- N_Designator
4204 -- Sloc points to period
4205 -- Name (Node2) holds the parent unit name. Note that this is always
4206 -- non-Empty, since this node is only used for the case where a
4207 -- parent library unit package name is present.
4208 -- Identifier (Node1)
4209
4210 -- Note that the identifier can also be an operator symbol here
4211
4212 ------------------------------
4213 -- 6.1 Defining Designator --
4214 ------------------------------
4215
4216 -- DEFINING_DESIGNATOR ::=
4217 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4218
4219 -------------------------------------
4220 -- 6.1 Defining Program Unit Name --
4221 -------------------------------------
4222
4223 -- DEFINING_PROGRAM_UNIT_NAME ::=
4224 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4225
4226 -- The parent unit name is present only in the case of a child unit
4227 -- name (permissible only for Ada 95 for a library level unit, i.e.
4228 -- a unit at scope level one). If no such name is present, the defining
4229 -- program unit name is represented simply as the defining identifier.
4230 -- In the child unit case, the following node is used to represent the
4231 -- child unit name.
4232
4233 -- N_Defining_Program_Unit_Name
4234 -- Sloc points to period
4235 -- Name (Node2) holds the parent unit name. Note that this is always
4236 -- non-Empty, since this node is only used for the case where a
4237 -- parent unit name is present.
4238 -- Defining_Identifier (Node1)
4239
4240 --------------------------
4241 -- 6.1 Operator Symbol --
4242 --------------------------
4243
4244 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4245
4246 -- Note: the fields of the N_Operator_Symbol node are laid out to
4247 -- match the corresponding fields of an N_Character_Literal node. This
4248 -- allows easy conversion of the operator symbol node into a character
4249 -- literal node in the case where a string constant of the form of an
4250 -- operator symbol is scanned out as such, but turns out semantically
4251 -- to be a string literal that is not an operator. For details see
4252 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4253
4254 -- N_Operator_Symbol
4255 -- Sloc points to literal
4256 -- Chars (Name1) contains the Name_Id for the operator symbol
4257 -- Strval (Str3) Id of string value. This is used if the operator
4258 -- symbol turns out to be a normal string after all.
4259 -- Entity (Node4-Sem)
4260 -- Associated_Node (Node4-Sem)
4261 -- Has_Private_View (Flag11-Sem) set in generic units.
4262 -- Etype (Node5-Sem)
4263
4264 -- Note: the Strval field may be set to No_String for generated
4265 -- operator symbols that are known not to be string literals
4266 -- semantically.
4267
4268 -----------------------------------
4269 -- 6.1 Defining Operator Symbol --
4270 -----------------------------------
4271
4272 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4273
4274 -- A defining operator symbol is an entity, which has additional
4275 -- fields depending on the setting of the Ekind field. These
4276 -- additional fields are defined (and access subprograms declared)
4277 -- in package Einfo.
4278
4279 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4280 -- are deliberately layed out to match the layout of fields in an
4281 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4282 -- an operator symbol node into a defining operator symbol node.
4283 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4284 -- for further details.
4285
4286 -- N_Defining_Operator_Symbol
4287 -- Sloc points to literal
4288 -- Chars (Name1) contains the Name_Id for the operator symbol
4289 -- Next_Entity (Node2-Sem)
4290 -- Scope (Node3-Sem)
4291 -- Etype (Node5-Sem)
4292
4293 ----------------------------
4294 -- 6.1 Parameter Profile --
4295 ----------------------------
4296
4297 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4298
4299 ---------------------------------------
4300 -- 6.1 Parameter and Result Profile --
4301 ---------------------------------------
4302
4303 -- PARAMETER_AND_RESULT_PROFILE ::=
4304 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4305 -- | [FORMAL_PART] return ACCESS_DEFINITION
4306
4307 -- There is no explicit node in the tree for a parameter and result
4308 -- profile. Instead the information appears directly in the parent.
4309
4310 ----------------------
4311 -- 6.1 Formal part --
4312 ----------------------
4313
4314 -- FORMAL_PART ::=
4315 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4316
4317 ----------------------------------
4318 -- 6.1 Parameter specification --
4319 ----------------------------------
4320
4321 -- PARAMETER_SPECIFICATION ::=
4322 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4323 -- [:= DEFAULT_EXPRESSION]
4324 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4325 -- [:= DEFAULT_EXPRESSION]
4326
4327 -- Although the syntax allows multiple identifiers in the list, the
4328 -- semantics is as though successive specifications were given with
4329 -- identical type definition and expression components. To simplify
4330 -- semantic processing, the parser represents a multiple declaration
4331 -- case as a sequence of single Specifications, using the More_Ids and
4332 -- Prev_Ids flags to preserve the original source form as described
4333 -- in the section on "Handling of Defining Identifier Lists".
4334
4335 -- N_Parameter_Specification
4336 -- Sloc points to first identifier
4337 -- Defining_Identifier (Node1)
4338 -- In_Present (Flag15)
4339 -- Out_Present (Flag17)
4340 -- Null_Exclusion_Present (Flag11)
4341 -- Parameter_Type (Node2) subtype mark or access definition
4342 -- Expression (Node3) (set to Empty if no default expression present)
4343 -- Do_Accessibility_Check (Flag13-Sem)
4344 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4345 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4346 -- Default_Expression (Node5-Sem)
4347
4348 ---------------
4349 -- 6.1 Mode --
4350 ---------------
4351
4352 -- MODE ::= [in] | in out | out
4353
4354 -- There is no explicit node in the tree for the Mode. Instead the
4355 -- In_Present and Out_Present flags are set in the parent node to
4356 -- record the presence of keywords specifying the mode.
4357
4358 --------------------------
4359 -- 6.3 Subprogram Body --
4360 --------------------------
4361
4362 -- SUBPROGRAM_BODY ::=
4363 -- SUBPROGRAM_SPECIFICATION is
4364 -- DECLARATIVE_PART
4365 -- begin
4366 -- HANDLED_SEQUENCE_OF_STATEMENTS
4367 -- end [DESIGNATOR];
4368
4369 -- N_Subprogram_Body
4370 -- Sloc points to FUNCTION or PROCEDURE
4371 -- Specification (Node1)
4372 -- Declarations (List2)
4373 -- Handled_Statement_Sequence (Node4)
4374 -- Activation_Chain_Entity (Node3-Sem)
4375 -- Corresponding_Spec (Node5-Sem)
4376 -- Acts_As_Spec (Flag4-Sem)
4377 -- Bad_Is_Detected (Flag15) used only by parser
4378 -- Do_Storage_Check (Flag17-Sem)
4379 -- Has_Priority_Pragma (Flag6-Sem)
4380 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4381 -- Is_Entry_Barrier_Function (Flag8-Sem)
4382 -- Is_Task_Master (Flag5-Sem)
4383 -- Was_Originally_Stub (Flag13-Sem)
4384 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4385
4386 -----------------------------------
4387 -- 6.4 Procedure Call Statement --
4388 -----------------------------------
4389
4390 -- PROCEDURE_CALL_STATEMENT ::=
4391 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4392
4393 -- Note: the reason that a procedure call has expression fields is
4394 -- that it semantically resembles an expression, e.g. overloading is
4395 -- allowed and a type is concocted for semantic processing purposes.
4396 -- Certain of these fields, such as Parens are not relevant, but it
4397 -- is easier to just supply all of them together!
4398
4399 -- N_Procedure_Call_Statement
4400 -- Sloc points to first token of name or prefix
4401 -- Name (Node2) stores name or prefix
4402 -- Parameter_Associations (List3) (set to No_List if no
4403 -- actual parameter part)
4404 -- First_Named_Actual (Node4-Sem)
4405 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4406 -- Do_Tag_Check (Flag13-Sem)
4407 -- No_Elaboration_Check (Flag14-Sem)
4408 -- Parameter_List_Truncated (Flag17-Sem)
4409 -- ABE_Is_Certain (Flag18-Sem)
4410 -- plus fields for expression
4411
4412 -- If any IN parameter requires a range check, then the corresponding
4413 -- argument expression has the Do_Range_Check flag set, and the range
4414 -- check is done against the formal type. Note that this argument
4415 -- expression may appear directly in the Parameter_Associations list,
4416 -- or may be a descendent of an N_Parameter_Association node that
4417 -- appears in this list.
4418
4419 ------------------------
4420 -- 6.4 Function Call --
4421 ------------------------
4422
4423 -- FUNCTION_CALL ::=
4424 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4425
4426 -- Note: the parser may generate an indexed component node or simply
4427 -- a name node instead of a function call node. The semantic pass must
4428 -- correct this misidentification.
4429
4430 -- N_Function_Call
4431 -- Sloc points to first token of name or prefix
4432 -- Name (Node2) stores name or prefix
4433 -- Parameter_Associations (List3) (set to No_List if no
4434 -- actual parameter part)
4435 -- First_Named_Actual (Node4-Sem)
4436 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4437 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4438 -- Do_Tag_Check (Flag13-Sem)
4439 -- No_Elaboration_Check (Flag14-Sem)
4440 -- Parameter_List_Truncated (Flag17-Sem)
4441 -- ABE_Is_Certain (Flag18-Sem)
4442 -- plus fields for expression
4443
4444 --------------------------------
4445 -- 6.4 Actual Parameter Part --
4446 --------------------------------
4447
4448 -- ACTUAL_PARAMETER_PART ::=
4449 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4450
4451 --------------------------------
4452 -- 6.4 Parameter Association --
4453 --------------------------------
4454
4455 -- PARAMETER_ASSOCIATION ::=
4456 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4457
4458 -- Note: the N_Parameter_Association node is built only if a formal
4459 -- parameter selector name is present, otherwise the parameter
4460 -- association appears in the tree simply as the node for the
4461 -- explicit actual parameter.
4462
4463 -- N_Parameter_Association
4464 -- Sloc points to formal parameter
4465 -- Selector_Name (Node2) (always non-Empty)
4466 -- Explicit_Actual_Parameter (Node3)
4467 -- Next_Named_Actual (Node4-Sem)
4468
4469 ---------------------------
4470 -- 6.4 Actual Parameter --
4471 ---------------------------
4472
4473 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4474
4475 ---------------------------
4476 -- 6.5 Return Statement --
4477 ---------------------------
4478
4479 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4480
4481 -- In Ada 2005, we have:
4482
4483 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4484
4485 -- EXTENDED_RETURN_STATEMENT ::=
4486 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4487 -- [:= EXPRESSION] [do
4488 -- HANDLED_SEQUENCE_OF_STATEMENTS
4489 -- end return];
4490
4491 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4492
4493 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4494 -- "return statement" is defined in 6.5 to mean a
4495 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4496
4497 -- N_Return_Statement
4498 -- Sloc points to RETURN
4499 -- Return_Statement_Entity (Node5-Sem)
4500 -- Expression (Node3) (set to Empty if no expression present)
4501 -- Storage_Pool (Node1-Sem)
4502 -- Procedure_To_Call (Node2-Sem)
4503 -- Do_Tag_Check (Flag13-Sem)
4504 -- By_Ref (Flag5-Sem)
4505 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4506
4507 -- N_Return_Statement represents a simple_return_statement, and is
4508 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4509 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4510 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4511 -- as Make_Simple_Return_Statement in Sem_Util.
4512
4513 -- Note: Return_Statement_Entity points to an E_Return_Statement
4514
4515 -- If a range check is required, then Do_Range_Check is set on the
4516 -- Expression. The check is against the return subtype of the function.
4517
4518 -- N_Extended_Return_Statement
4519 -- Sloc points to RETURN
4520 -- Return_Statement_Entity (Node5-Sem)
4521 -- Return_Object_Declarations (List3)
4522 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4523 -- Storage_Pool (Node1-Sem)
4524 -- Procedure_To_Call (Node2-Sem)
4525 -- Do_Tag_Check (Flag13-Sem)
4526 -- By_Ref (Flag5-Sem)
4527
4528 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4529 -- Note that Return_Object_Declarations is a list containing the
4530 -- N_Object_Declaration -- see comment on this field above.
4531 -- The declared object will have Is_Return_Object = True.
4532 -- There is no such syntactic category as return_object_declaration
4533 -- in the RM. Return_Object_Declarations represents this portion of
4534 -- the syntax for EXTENDED_RETURN_STATEMENT:
4535 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4536 -- [:= EXPRESSION]
4537
4538 -- There are two entities associated with an extended_return_statement:
4539 -- the Return_Statement_Entity represents the statement itself, and the
4540 -- Defining_Identifier of the Object_Declaration in
4541 -- Return_Object_Declarations represents the object being
4542 -- returned. N_Simple_Return_Statement has only the former.
4543
4544 ------------------------------
4545 -- 7.1 Package Declaration --
4546 ------------------------------
4547
4548 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4549
4550 -- Note: the activation chain entity for a package spec is used for
4551 -- all tasks declared in the package spec, or in the package body.
4552
4553 -- N_Package_Declaration
4554 -- Sloc points to PACKAGE
4555 -- Specification (Node1)
4556 -- Corresponding_Body (Node5-Sem)
4557 -- Parent_Spec (Node4-Sem)
4558 -- Activation_Chain_Entity (Node3-Sem)
4559
4560 --------------------------------
4561 -- 7.1 Package Specification --
4562 --------------------------------
4563
4564 -- PACKAGE_SPECIFICATION ::=
4565 -- package DEFINING_PROGRAM_UNIT_NAME is
4566 -- {BASIC_DECLARATIVE_ITEM}
4567 -- [private
4568 -- {BASIC_DECLARATIVE_ITEM}]
4569 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4570
4571 -- N_Package_Specification
4572 -- Sloc points to PACKAGE
4573 -- Defining_Unit_Name (Node1)
4574 -- Visible_Declarations (List2)
4575 -- Private_Declarations (List3) (set to No_List if no private
4576 -- part present)
4577 -- End_Label (Node4)
4578 -- Generic_Parent (Node5-Sem)
4579 -- Limited_View_Installed (Flag18-Sem)
4580
4581 -----------------------
4582 -- 7.1 Package Body --
4583 -----------------------
4584
4585 -- PACKAGE_BODY ::=
4586 -- package body DEFINING_PROGRAM_UNIT_NAME is
4587 -- DECLARATIVE_PART
4588 -- [begin
4589 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4590 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4591
4592 -- N_Package_Body
4593 -- Sloc points to PACKAGE
4594 -- Defining_Unit_Name (Node1)
4595 -- Declarations (List2)
4596 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4597 -- Corresponding_Spec (Node5-Sem)
4598 -- Was_Originally_Stub (Flag13-Sem)
4599
4600 -- Note: if a source level package does not contain a handled sequence
4601 -- of statements, then the parser supplies a dummy one with a null
4602 -- sequence of statements. Comes_From_Source will be False in this
4603 -- constructed sequence. The reason we need this is for the End_Label
4604 -- field in the HSS.
4605
4606 -----------------------------------
4607 -- 7.4 Private Type Declaration --
4608 -----------------------------------
4609
4610 -- PRIVATE_TYPE_DECLARATION ::=
4611 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4612 -- is [[abstract] tagged] [limited] private;
4613
4614 -- Note: TAGGED is not permitted in Ada 83 mode
4615
4616 -- N_Private_Type_Declaration
4617 -- Sloc points to TYPE
4618 -- Defining_Identifier (Node1)
4619 -- Discriminant_Specifications (List4) (set to No_List if no
4620 -- discriminant part)
4621 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4622 -- Abstract_Present (Flag4)
4623 -- Tagged_Present (Flag15)
4624 -- Limited_Present (Flag17)
4625
4626 ----------------------------------------
4627 -- 7.4 Private Extension Declaration --
4628 ----------------------------------------
4629
4630 -- PRIVATE_EXTENSION_DECLARATION ::=
4631 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4632 -- [abstract] [limited | synchronized]
4633 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4634 -- with private;
4635
4636 -- Note: LIMITED, and private extension declarations are not allowed
4637 -- in Ada 83 mode.
4638
4639 -- N_Private_Extension_Declaration
4640 -- Sloc points to TYPE
4641 -- Defining_Identifier (Node1)
4642 -- Discriminant_Specifications (List4) (set to No_List if no
4643 -- discriminant part)
4644 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4645 -- Abstract_Present (Flag4)
4646 -- Limited_Present (Flag17)
4647 -- Synchronized_Present (Flag7)
4648 -- Subtype_Indication (Node5)
4649 -- Interface_List (List2) (set to No_List if none)
4650
4651 ---------------------
4652 -- 8.4 Use Clause --
4653 ---------------------
4654
4655 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4656
4657 -----------------------------
4658 -- 8.4 Use Package Clause --
4659 -----------------------------
4660
4661 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4662
4663 -- N_Use_Package_Clause
4664 -- Sloc points to USE
4665 -- Names (List2)
4666 -- Next_Use_Clause (Node3-Sem)
4667 -- Hidden_By_Use_Clause (Elist4-Sem)
4668
4669 --------------------------
4670 -- 8.4 Use Type Clause --
4671 --------------------------
4672
4673 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4674
4675 -- Note: use type clause is not permitted in Ada 83 mode
4676
4677 -- N_Use_Type_Clause
4678 -- Sloc points to USE
4679 -- Subtype_Marks (List2)
4680 -- Next_Use_Clause (Node3-Sem)
4681 -- Hidden_By_Use_Clause (Elist4-Sem)
4682
4683 -------------------------------
4684 -- 8.5 Renaming Declaration --
4685 -------------------------------
4686
4687 -- RENAMING_DECLARATION ::=
4688 -- OBJECT_RENAMING_DECLARATION
4689 -- | EXCEPTION_RENAMING_DECLARATION
4690 -- | PACKAGE_RENAMING_DECLARATION
4691 -- | SUBPROGRAM_RENAMING_DECLARATION
4692 -- | GENERIC_RENAMING_DECLARATION
4693
4694 --------------------------------------
4695 -- 8.5 Object Renaming Declaration --
4696 --------------------------------------
4697
4698 -- OBJECT_RENAMING_DECLARATION ::=
4699 -- DEFINING_IDENTIFIER :
4700 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4701 -- | DEFINING_IDENTIFIER :
4702 -- ACCESS_DEFINITION renames object_NAME;
4703
4704 -- Note: Access_Definition is an optional field that gives support to
4705 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4706 -- Subtype_Indication field or else the Access_Definition field.
4707
4708 -- N_Object_Renaming_Declaration
4709 -- Sloc points to first identifier
4710 -- Defining_Identifier (Node1)
4711 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4712 -- Subtype_Mark (Node4) (set to Empty if not present)
4713 -- Access_Definition (Node3) (set to Empty if not present)
4714 -- Name (Node2)
4715 -- Corresponding_Generic_Association (Node5-Sem)
4716
4717 -----------------------------------------
4718 -- 8.5 Exception Renaming Declaration --
4719 -----------------------------------------
4720
4721 -- EXCEPTION_RENAMING_DECLARATION ::=
4722 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4723
4724 -- N_Exception_Renaming_Declaration
4725 -- Sloc points to first identifier
4726 -- Defining_Identifier (Node1)
4727 -- Name (Node2)
4728
4729 ---------------------------------------
4730 -- 8.5 Package Renaming Declaration --
4731 ---------------------------------------
4732
4733 -- PACKAGE_RENAMING_DECLARATION ::=
4734 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4735
4736 -- N_Package_Renaming_Declaration
4737 -- Sloc points to PACKAGE
4738 -- Defining_Unit_Name (Node1)
4739 -- Name (Node2)
4740 -- Parent_Spec (Node4-Sem)
4741
4742 ------------------------------------------
4743 -- 8.5 Subprogram Renaming Declaration --
4744 ------------------------------------------
4745
4746 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4747 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4748
4749 -- N_Subprogram_Renaming_Declaration
4750 -- Sloc points to RENAMES
4751 -- Specification (Node1)
4752 -- Name (Node2)
4753 -- Parent_Spec (Node4-Sem)
4754 -- Corresponding_Spec (Node5-Sem)
4755 -- Corresponding_Formal_Spec (Node3-Sem)
4756 -- From_Default (Flag6-Sem)
4757
4758 -----------------------------------------
4759 -- 8.5.5 Generic Renaming Declaration --
4760 -----------------------------------------
4761
4762 -- GENERIC_RENAMING_DECLARATION ::=
4763 -- generic package DEFINING_PROGRAM_UNIT_NAME
4764 -- renames generic_package_NAME
4765 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4766 -- renames generic_procedure_NAME
4767 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4768 -- renames generic_function_NAME
4769
4770 -- N_Generic_Package_Renaming_Declaration
4771 -- Sloc points to GENERIC
4772 -- Defining_Unit_Name (Node1)
4773 -- Name (Node2)
4774 -- Parent_Spec (Node4-Sem)
4775
4776 -- N_Generic_Procedure_Renaming_Declaration
4777 -- Sloc points to GENERIC
4778 -- Defining_Unit_Name (Node1)
4779 -- Name (Node2)
4780 -- Parent_Spec (Node4-Sem)
4781
4782 -- N_Generic_Function_Renaming_Declaration
4783 -- Sloc points to GENERIC
4784 -- Defining_Unit_Name (Node1)
4785 -- Name (Node2)
4786 -- Parent_Spec (Node4-Sem)
4787
4788 --------------------------------
4789 -- 9.1 Task Type Declaration --
4790 --------------------------------
4791
4792 -- TASK_TYPE_DECLARATION ::=
4793 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4794 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4795
4796 -- N_Task_Type_Declaration
4797 -- Sloc points to TASK
4798 -- Defining_Identifier (Node1)
4799 -- Discriminant_Specifications (List4) (set to No_List if no
4800 -- discriminant part)
4801 -- Interface_List (List2) (set to No_List if none)
4802 -- Task_Definition (Node3) (set to Empty if not present)
4803 -- Corresponding_Body (Node5-Sem)
4804
4805 ----------------------------------
4806 -- 9.1 Single Task Declaration --
4807 ----------------------------------
4808
4809 -- SINGLE_TASK_DECLARATION ::=
4810 -- task DEFINING_IDENTIFIER
4811 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4812
4813 -- N_Single_Task_Declaration
4814 -- Sloc points to TASK
4815 -- Defining_Identifier (Node1)
4816 -- Interface_List (List2) (set to No_List if none)
4817 -- Task_Definition (Node3) (set to Empty if not present)
4818
4819 --------------------------
4820 -- 9.1 Task Definition --
4821 --------------------------
4822
4823 -- TASK_DEFINITION ::=
4824 -- {TASK_ITEM}
4825 -- [private
4826 -- {TASK_ITEM}]
4827 -- end [task_IDENTIFIER]
4828
4829 -- Note: as a result of semantic analysis, the list of task items can
4830 -- include implicit type declarations resulting from entry families.
4831
4832 -- N_Task_Definition
4833 -- Sloc points to first token of task definition
4834 -- Visible_Declarations (List2)
4835 -- Private_Declarations (List3) (set to No_List if no private part)
4836 -- End_Label (Node4)
4837 -- Has_Priority_Pragma (Flag6-Sem)
4838 -- Has_Storage_Size_Pragma (Flag5-Sem)
4839 -- Has_Task_Info_Pragma (Flag7-Sem)
4840 -- Has_Task_Name_Pragma (Flag8-Sem)
4841 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4842
4843 --------------------
4844 -- 9.1 Task Item --
4845 --------------------
4846
4847 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4848
4849 --------------------
4850 -- 9.1 Task Body --
4851 --------------------
4852
4853 -- TASK_BODY ::=
4854 -- task body task_DEFINING_IDENTIFIER is
4855 -- DECLARATIVE_PART
4856 -- begin
4857 -- HANDLED_SEQUENCE_OF_STATEMENTS
4858 -- end [task_IDENTIFIER];
4859
4860 -- Gigi restriction: This node never appears
4861
4862 -- N_Task_Body
4863 -- Sloc points to TASK
4864 -- Defining_Identifier (Node1)
4865 -- Declarations (List2)
4866 -- Handled_Statement_Sequence (Node4)
4867 -- Is_Task_Master (Flag5-Sem)
4868 -- Activation_Chain_Entity (Node3-Sem)
4869 -- Corresponding_Spec (Node5-Sem)
4870 -- Was_Originally_Stub (Flag13-Sem)
4871
4872 -------------------------------------
4873 -- 9.4 Protected Type Declaration --
4874 -------------------------------------
4875
4876 -- PROTECTED_TYPE_DECLARATION ::=
4877 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4878 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4879
4880 -- Note: protected type declarations are not permitted in Ada 83 mode
4881
4882 -- N_Protected_Type_Declaration
4883 -- Sloc points to PROTECTED
4884 -- Defining_Identifier (Node1)
4885 -- Discriminant_Specifications (List4) (set to No_List if no
4886 -- discriminant part)
4887 -- Interface_List (List2) (set to No_List if none)
4888 -- Protected_Definition (Node3)
4889 -- Corresponding_Body (Node5-Sem)
4890
4891 ---------------------------------------
4892 -- 9.4 Single Protected Declaration --
4893 ---------------------------------------
4894
4895 -- SINGLE_PROTECTED_DECLARATION ::=
4896 -- protected DEFINING_IDENTIFIER
4897 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4898
4899 -- Note: single protected declarations are not allowed in Ada 83 mode
4900
4901 -- N_Single_Protected_Declaration
4902 -- Sloc points to PROTECTED
4903 -- Defining_Identifier (Node1)
4904 -- Interface_List (List2) (set to No_List if none)
4905 -- Protected_Definition (Node3)
4906
4907 -------------------------------
4908 -- 9.4 Protected Definition --
4909 -------------------------------
4910
4911 -- PROTECTED_DEFINITION ::=
4912 -- {PROTECTED_OPERATION_DECLARATION}
4913 -- [private
4914 -- {PROTECTED_ELEMENT_DECLARATION}]
4915 -- end [protected_IDENTIFIER]
4916
4917 -- N_Protected_Definition
4918 -- Sloc points to first token of protected definition
4919 -- Visible_Declarations (List2)
4920 -- Private_Declarations (List3) (set to No_List if no private part)
4921 -- End_Label (Node4)
4922 -- Has_Priority_Pragma (Flag6-Sem)
4923
4924 ------------------------------------------
4925 -- 9.4 Protected Operation Declaration --
4926 ------------------------------------------
4927
4928 -- PROTECTED_OPERATION_DECLARATION ::=
4929 -- SUBPROGRAM_DECLARATION
4930 -- | ENTRY_DECLARATION
4931 -- | REPRESENTATION_CLAUSE
4932
4933 ----------------------------------------
4934 -- 9.4 Protected Element Declaration --
4935 ----------------------------------------
4936
4937 -- PROTECTED_ELEMENT_DECLARATION ::=
4938 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4939
4940 -------------------------
4941 -- 9.4 Protected Body --
4942 -------------------------
4943
4944 -- PROTECTED_BODY ::=
4945 -- protected body DEFINING_IDENTIFIER is
4946 -- {PROTECTED_OPERATION_ITEM}
4947 -- end [protected_IDENTIFIER];
4948
4949 -- Note: protected bodies are not allowed in Ada 83 mode
4950
4951 -- Gigi restriction: This node never appears
4952
4953 -- N_Protected_Body
4954 -- Sloc points to PROTECTED
4955 -- Defining_Identifier (Node1)
4956 -- Declarations (List2) protected operation items (and pragmas)
4957 -- End_Label (Node4)
4958 -- Corresponding_Spec (Node5-Sem)
4959 -- Was_Originally_Stub (Flag13-Sem)
4960
4961 -----------------------------------
4962 -- 9.4 Protected Operation Item --
4963 -----------------------------------
4964
4965 -- PROTECTED_OPERATION_ITEM ::=
4966 -- SUBPROGRAM_DECLARATION
4967 -- | SUBPROGRAM_BODY
4968 -- | ENTRY_BODY
4969 -- | REPRESENTATION_CLAUSE
4970
4971 ------------------------------
4972 -- 9.5.2 Entry Declaration --
4973 ------------------------------
4974
4975 -- ENTRY_DECLARATION ::=
4976 -- [[not] overriding]
4977 -- entry DEFINING_IDENTIFIER
4978 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4979
4980 -- N_Entry_Declaration
4981 -- Sloc points to ENTRY
4982 -- Defining_Identifier (Node1)
4983 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4984 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4985 -- Corresponding_Body (Node5-Sem)
4986 -- Must_Override (Flag14) set if overriding indicator present
4987 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4988
4989 -- Note: overriding indicator is an Ada 2005 feature
4990
4991 -----------------------------
4992 -- 9.5.2 Accept statement --
4993 -----------------------------
4994
4995 -- ACCEPT_STATEMENT ::=
4996 -- accept entry_DIRECT_NAME
4997 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4998 -- HANDLED_SEQUENCE_OF_STATEMENTS
4999 -- end [entry_IDENTIFIER]];
5000
5001 -- Gigi restriction: This node never appears
5002
5003 -- Note: there are no explicit declarations allowed in an accept
5004 -- statement. However, the implicit declarations for any statement
5005 -- identifiers (labels and block/loop identifiers) are declarations
5006 -- that belong logically to the accept statement, and that is why
5007 -- there is a Declarations field in this node.
5008
5009 -- N_Accept_Statement
5010 -- Sloc points to ACCEPT
5011 -- Entry_Direct_Name (Node1)
5012 -- Entry_Index (Node5) (set to Empty if not present)
5013 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5014 -- Handled_Statement_Sequence (Node4)
5015 -- Declarations (List2) (set to No_List if no declarations)
5016
5017 ------------------------
5018 -- 9.5.2 Entry Index --
5019 ------------------------
5020
5021 -- ENTRY_INDEX ::= EXPRESSION
5022
5023 -----------------------
5024 -- 9.5.2 Entry Body --
5025 -----------------------
5026
5027 -- ENTRY_BODY ::=
5028 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5029 -- DECLARATIVE_PART
5030 -- begin
5031 -- HANDLED_SEQUENCE_OF_STATEMENTS
5032 -- end [entry_IDENTIFIER];
5033
5034 -- ENTRY_BARRIER ::= when CONDITION
5035
5036 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5037 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5038 -- too full (it would otherwise have too many fields)
5039
5040 -- Gigi restriction: This node never appears
5041
5042 -- N_Entry_Body
5043 -- Sloc points to ENTRY
5044 -- Defining_Identifier (Node1)
5045 -- Entry_Body_Formal_Part (Node5)
5046 -- Declarations (List2)
5047 -- Handled_Statement_Sequence (Node4)
5048 -- Activation_Chain_Entity (Node3-Sem)
5049
5050 -----------------------------------
5051 -- 9.5.2 Entry Body Formal Part --
5052 -----------------------------------
5053
5054 -- ENTRY_BODY_FORMAL_PART ::=
5055 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5056
5057 -- Note that an entry body formal part node is present even if it is
5058 -- empty. This reflects the grammar, in which it is the components of
5059 -- the entry body formal part that are optional, not the entry body
5060 -- formal part itself. Also this means that the barrier condition
5061 -- always has somewhere to be stored.
5062
5063 -- Gigi restriction: This node never appears
5064
5065 -- N_Entry_Body_Formal_Part
5066 -- Sloc points to first token
5067 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5068 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5069 -- Condition (Node1) from entry barrier of entry body
5070
5071 --------------------------
5072 -- 9.5.2 Entry Barrier --
5073 --------------------------
5074
5075 -- ENTRY_BARRIER ::= when CONDITION
5076
5077 --------------------------------------
5078 -- 9.5.2 Entry Index Specification --
5079 --------------------------------------
5080
5081 -- ENTRY_INDEX_SPECIFICATION ::=
5082 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5083
5084 -- Gigi restriction: This node never appears
5085
5086 -- N_Entry_Index_Specification
5087 -- Sloc points to FOR
5088 -- Defining_Identifier (Node1)
5089 -- Discrete_Subtype_Definition (Node4)
5090
5091 ---------------------------------
5092 -- 9.5.3 Entry Call Statement --
5093 ---------------------------------
5094
5095 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5096
5097 -- The parser may generate a procedure call for this construct. The
5098 -- semantic pass must correct this misidentification where needed.
5099
5100 -- Gigi restriction: This node never appears
5101
5102 -- N_Entry_Call_Statement
5103 -- Sloc points to first token of name
5104 -- Name (Node2)
5105 -- Parameter_Associations (List3) (set to No_List if no
5106 -- actual parameter part)
5107 -- First_Named_Actual (Node4-Sem)
5108
5109 ------------------------------
5110 -- 9.5.4 Requeue Statement --
5111 ------------------------------
5112
5113 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5114
5115 -- Note: requeue statements are not permitted in Ada 83 mode
5116
5117 -- Gigi restriction: This node never appears
5118
5119 -- N_Requeue_Statement
5120 -- Sloc points to REQUEUE
5121 -- Name (Node2)
5122 -- Abort_Present (Flag15)
5123
5124 --------------------------
5125 -- 9.6 Delay Statement --
5126 --------------------------
5127
5128 -- DELAY_STATEMENT ::=
5129 -- DELAY_UNTIL_STATEMENT
5130 -- | DELAY_RELATIVE_STATEMENT
5131
5132 --------------------------------
5133 -- 9.6 Delay Until Statement --
5134 --------------------------------
5135
5136 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5137
5138 -- Note: delay until statements are not permitted in Ada 83 mode
5139
5140 -- Gigi restriction: This node never appears
5141
5142 -- N_Delay_Until_Statement
5143 -- Sloc points to DELAY
5144 -- Expression (Node3)
5145
5146 -----------------------------------
5147 -- 9.6 Delay Relative Statement --
5148 -----------------------------------
5149
5150 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5151
5152 -- Gigi restriction: This node never appears
5153
5154 -- N_Delay_Relative_Statement
5155 -- Sloc points to DELAY
5156 -- Expression (Node3)
5157
5158 ---------------------------
5159 -- 9.7 Select Statement --
5160 ---------------------------
5161
5162 -- SELECT_STATEMENT ::=
5163 -- SELECTIVE_ACCEPT
5164 -- | TIMED_ENTRY_CALL
5165 -- | CONDITIONAL_ENTRY_CALL
5166 -- | ASYNCHRONOUS_SELECT
5167
5168 -----------------------------
5169 -- 9.7.1 Selective Accept --
5170 -----------------------------
5171
5172 -- SELECTIVE_ACCEPT ::=
5173 -- select
5174 -- [GUARD]
5175 -- SELECT_ALTERNATIVE
5176 -- {or
5177 -- [GUARD]
5178 -- SELECT_ALTERNATIVE}
5179 -- [else
5180 -- SEQUENCE_OF_STATEMENTS]
5181 -- end select;
5182
5183 -- Gigi restriction: This node never appears
5184
5185 -- Note: the guard expression, if present, appears in the node for
5186 -- the select alternative.
5187
5188 -- N_Selective_Accept
5189 -- Sloc points to SELECT
5190 -- Select_Alternatives (List1)
5191 -- Else_Statements (List4) (set to No_List if no else part)
5192
5193 ------------------
5194 -- 9.7.1 Guard --
5195 ------------------
5196
5197 -- GUARD ::= when CONDITION =>
5198
5199 -- As noted above, the CONDITION that is part of a GUARD is included
5200 -- in the node for the select alternative for convenience.
5201
5202 -------------------------------
5203 -- 9.7.1 Select Alternative --
5204 -------------------------------
5205
5206 -- SELECT_ALTERNATIVE ::=
5207 -- ACCEPT_ALTERNATIVE
5208 -- | DELAY_ALTERNATIVE
5209 -- | TERMINATE_ALTERNATIVE
5210
5211 -------------------------------
5212 -- 9.7.1 Accept Alternative --
5213 -------------------------------
5214
5215 -- ACCEPT_ALTERNATIVE ::=
5216 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5217
5218 -- Gigi restriction: This node never appears
5219
5220 -- N_Accept_Alternative
5221 -- Sloc points to ACCEPT
5222 -- Accept_Statement (Node2)
5223 -- Condition (Node1) from the guard (set to Empty if no guard present)
5224 -- Statements (List3) (set to Empty_List if no statements)
5225 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5226 -- Accept_Handler_Records (List5-Sem)
5227
5228 ------------------------------
5229 -- 9.7.1 Delay Alternative --
5230 ------------------------------
5231
5232 -- DELAY_ALTERNATIVE ::=
5233 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5234
5235 -- Gigi restriction: This node never appears
5236
5237 -- N_Delay_Alternative
5238 -- Sloc points to DELAY
5239 -- Delay_Statement (Node2)
5240 -- Condition (Node1) from the guard (set to Empty if no guard present)
5241 -- Statements (List3) (set to Empty_List if no statements)
5242 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5243
5244 ----------------------------------
5245 -- 9.7.1 Terminate Alternative --
5246 ----------------------------------
5247
5248 -- TERMINATE_ALTERNATIVE ::= terminate;
5249
5250 -- Gigi restriction: This node never appears
5251
5252 -- N_Terminate_Alternative
5253 -- Sloc points to TERMINATE
5254 -- Condition (Node1) from the guard (set to Empty if no guard present)
5255 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5256 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5257
5258 -----------------------------
5259 -- 9.7.2 Timed Entry Call --
5260 -----------------------------
5261
5262 -- TIMED_ENTRY_CALL ::=
5263 -- select
5264 -- ENTRY_CALL_ALTERNATIVE
5265 -- or
5266 -- DELAY_ALTERNATIVE
5267 -- end select;
5268
5269 -- Gigi restriction: This node never appears
5270
5271 -- N_Timed_Entry_Call
5272 -- Sloc points to SELECT
5273 -- Entry_Call_Alternative (Node1)
5274 -- Delay_Alternative (Node4)
5275
5276 -----------------------------------
5277 -- 9.7.2 Entry Call Alternative --
5278 -----------------------------------
5279
5280 -- ENTRY_CALL_ALTERNATIVE ::=
5281 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5282
5283 -- PROCEDURE_OR_ENTRY_CALL ::=
5284 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5285
5286 -- Gigi restriction: This node never appears
5287
5288 -- N_Entry_Call_Alternative
5289 -- Sloc points to first token of entry call statement
5290 -- Entry_Call_Statement (Node1)
5291 -- Statements (List3) (set to Empty_List if no statements)
5292 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5293
5294 -----------------------------------
5295 -- 9.7.3 Conditional Entry Call --
5296 -----------------------------------
5297
5298 -- CONDITIONAL_ENTRY_CALL ::=
5299 -- select
5300 -- ENTRY_CALL_ALTERNATIVE
5301 -- else
5302 -- SEQUENCE_OF_STATEMENTS
5303 -- end select;
5304
5305 -- Gigi restriction: This node never appears
5306
5307 -- N_Conditional_Entry_Call
5308 -- Sloc points to SELECT
5309 -- Entry_Call_Alternative (Node1)
5310 -- Else_Statements (List4)
5311
5312 --------------------------------
5313 -- 9.7.4 Asynchronous Select --
5314 --------------------------------
5315
5316 -- ASYNCHRONOUS_SELECT ::=
5317 -- select
5318 -- TRIGGERING_ALTERNATIVE
5319 -- then abort
5320 -- ABORTABLE_PART
5321 -- end select;
5322
5323 -- Note: asynchronous select is not permitted in Ada 83 mode
5324
5325 -- Gigi restriction: This node never appears
5326
5327 -- N_Asynchronous_Select
5328 -- Sloc points to SELECT
5329 -- Triggering_Alternative (Node1)
5330 -- Abortable_Part (Node2)
5331
5332 -----------------------------------
5333 -- 9.7.4 Triggering Alternative --
5334 -----------------------------------
5335
5336 -- TRIGGERING_ALTERNATIVE ::=
5337 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5338
5339 -- Gigi restriction: This node never appears
5340
5341 -- N_Triggering_Alternative
5342 -- Sloc points to first token of triggering statement
5343 -- Triggering_Statement (Node1)
5344 -- Statements (List3) (set to Empty_List if no statements)
5345 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5346
5347 ---------------------------------
5348 -- 9.7.4 Triggering Statement --
5349 ---------------------------------
5350
5351 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5352
5353 ---------------------------
5354 -- 9.7.4 Abortable Part --
5355 ---------------------------
5356
5357 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5358
5359 -- Gigi restriction: This node never appears
5360
5361 -- N_Abortable_Part
5362 -- Sloc points to ABORT
5363 -- Statements (List3)
5364
5365 --------------------------
5366 -- 9.8 Abort Statement --
5367 --------------------------
5368
5369 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5370
5371 -- Gigi restriction: This node never appears
5372
5373 -- N_Abort_Statement
5374 -- Sloc points to ABORT
5375 -- Names (List2)
5376
5377 -------------------------
5378 -- 10.1.1 Compilation --
5379 -------------------------
5380
5381 -- COMPILATION ::= {COMPILATION_UNIT}
5382
5383 -- There is no explicit node in the tree for a compilation, since in
5384 -- general the compiler is processing only a single compilation unit
5385 -- at a time. It is possible to parse multiple units in syntax check
5386 -- only mode, but the trees are discarded in that case.
5387
5388 ------------------------------
5389 -- 10.1.1 Compilation Unit --
5390 ------------------------------
5391
5392 -- COMPILATION_UNIT ::=
5393 -- CONTEXT_CLAUSE LIBRARY_ITEM
5394 -- | CONTEXT_CLAUSE SUBUNIT
5395
5396 -- The N_Compilation_Unit node itself represents the above syntax.
5397 -- However, there are two additional items not reflected in the above
5398 -- syntax. First we have the global declarations that are added by the
5399 -- code generator. These are outer level declarations (so they cannot
5400 -- be represented as being inside the units). An example is the wrapper
5401 -- subprograms that are created to do ABE checking. As always a list of
5402 -- declarations can contain actions as well (i.e. statements), and such
5403 -- statements are executed as part of the elaboration of the unit. Note
5404 -- that all such declarations are elaborated before the library unit.
5405
5406 -- Similarly, certain actions need to be elaborated at the completion
5407 -- of elaboration of the library unit (notably the statement that sets
5408 -- the Boolean flag indicating that elaboration is complete).
5409
5410 -- The third item not reflected in the syntax is pragmas that appear
5411 -- after the compilation unit. As always pragmas are a problem since
5412 -- they are not part of the formal syntax, but can be stuck into the
5413 -- source following a set of ad hoc rules, and we have to find an ad
5414 -- hoc way of sticking them into the tree. For pragmas that appear
5415 -- before the library unit, we just consider them to be part of the
5416 -- context clause, and pragmas can appear in the Context_Items list
5417 -- of the compilation unit. However, pragmas can also appear after
5418 -- the library item.
5419
5420 -- To deal with all these problems, we create an auxiliary node for
5421 -- a compilation unit, referenced from the N_Compilation_Unit node
5422 -- that contains these three items.
5423
5424 -- N_Compilation_Unit
5425 -- Sloc points to first token of defining unit name
5426 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5427 -- Context_Items (List1) context items and pragmas preceding unit
5428 -- Private_Present (Flag15) set if library unit has private keyword
5429 -- Unit (Node2) library item or subunit
5430 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5431 -- Has_No_Elaboration_Code (Flag17-Sem)
5432 -- Body_Required (Flag13-Sem) set for spec if body is required
5433 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5434 -- Context_Pending (Flag16-Sem)
5435 -- First_Inlined_Subprogram (Node3-Sem)
5436
5437 -- N_Compilation_Unit_Aux
5438 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5439 -- Declarations (List2) (set to No_List if no global declarations)
5440 -- Actions (List1) (set to No_List if no actions)
5441 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5442 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5443
5444 --------------------------
5445 -- 10.1.1 Library Item --
5446 --------------------------
5447
5448 -- LIBRARY_ITEM ::=
5449 -- [private] LIBRARY_UNIT_DECLARATION
5450 -- | LIBRARY_UNIT_BODY
5451 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5452
5453 -- Note: PRIVATE is not allowed in Ada 83 mode
5454
5455 -- There is no explicit node in the tree for library item, instead
5456 -- the declaration or body, and the flag for private if present,
5457 -- appear in the N_Compilation_Unit node.
5458
5459 --------------------------------------
5460 -- 10.1.1 Library Unit Declaration --
5461 --------------------------------------
5462
5463 -- LIBRARY_UNIT_DECLARATION ::=
5464 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5465 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5466
5467 -----------------------------------------------
5468 -- 10.1.1 Library Unit Renaming Declaration --
5469 -----------------------------------------------
5470
5471 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5472 -- PACKAGE_RENAMING_DECLARATION
5473 -- | GENERIC_RENAMING_DECLARATION
5474 -- | SUBPROGRAM_RENAMING_DECLARATION
5475
5476 -------------------------------
5477 -- 10.1.1 Library unit body --
5478 -------------------------------
5479
5480 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5481
5482 ------------------------------
5483 -- 10.1.1 Parent Unit Name --
5484 ------------------------------
5485
5486 -- PARENT_UNIT_NAME ::= NAME
5487
5488 ----------------------------
5489 -- 10.1.2 Context clause --
5490 ----------------------------
5491
5492 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5493
5494 -- The context clause can include pragmas, and any pragmas that appear
5495 -- before the context clause proper (i.e. all configuration pragmas,
5496 -- also appear at the front of this list).
5497
5498 --------------------------
5499 -- 10.1.2 Context_Item --
5500 --------------------------
5501
5502 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5503
5504 -------------------------
5505 -- 10.1.2 With clause --
5506 -------------------------
5507
5508 -- WITH_CLAUSE ::=
5509 -- with library_unit_NAME {,library_unit_NAME};
5510
5511 -- A separate With clause is built for each name, so that we have
5512 -- a Corresponding_Spec field for each with'ed spec. The flags
5513 -- First_Name and Last_Name are used to reconstruct the exact
5514 -- source form. When a list of names appears in one with clause,
5515 -- the first name in the list has First_Name set, and the last
5516 -- has Last_Name set. If the with clause has only one name, then
5517 -- both of the flags First_Name and Last_Name are set in this name.
5518
5519 -- Note: in the case of implicit with's that are installed by the
5520 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5521 -- set to Standard_Location, but it is incorrect to test the Sloc
5522 -- to find out if a with clause is implicit, test the flag instead.
5523
5524 -- N_With_Clause
5525 -- Sloc points to first token of library unit name
5526 -- Name (Node2)
5527 -- Next_Implicit_With (Node3-Sem)
5528 -- Library_Unit (Node4-Sem)
5529 -- Corresponding_Spec (Node5-Sem)
5530 -- First_Name (Flag5) (set to True if first name or only one name)
5531 -- Last_Name (Flag6) (set to True if last name or only one name)
5532 -- Context_Installed (Flag13-Sem)
5533 -- Elaborate_Present (Flag4-Sem)
5534 -- Elaborate_All_Present (Flag14-Sem)
5535 -- Elaborate_All_Desirable (Flag9-Sem)
5536 -- Elaborate_Desirable (Flag11-Sem)
5537 -- Private_Present (Flag15) set if with_clause has private keyword
5538 -- Implicit_With (Flag16-Sem)
5539 -- Limited_Present (Flag17) set if LIMITED is present
5540 -- Limited_View_Installed (Flag18-Sem)
5541 -- Unreferenced_In_Spec (Flag7-Sem)
5542 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5543
5544 -- Note: Limited_Present and Limited_View_Installed give support to
5545 -- Ada 2005 (AI-50217).
5546 -- Similarly, Private_Present gives support to AI-50262.
5547
5548 ----------------------
5549 -- With_Type clause --
5550 ----------------------
5551
5552 -- This is a GNAT extension, used to implement mutually recursive
5553 -- types declared in different packages.
5554 -- Note: this is now obsolete. The functionality of this construct
5555 -- is now implemented by the Ada 2005 Limited_with_Clause.
5556
5557 ---------------------
5558 -- 10.2 Body stub --
5559 ---------------------
5560
5561 -- BODY_STUB ::=
5562 -- SUBPROGRAM_BODY_STUB
5563 -- | PACKAGE_BODY_STUB
5564 -- | TASK_BODY_STUB
5565 -- | PROTECTED_BODY_STUB
5566
5567 ----------------------------------
5568 -- 10.1.3 Subprogram Body Stub --
5569 ----------------------------------
5570
5571 -- SUBPROGRAM_BODY_STUB ::=
5572 -- SUBPROGRAM_SPECIFICATION is separate;
5573
5574 -- N_Subprogram_Body_Stub
5575 -- Sloc points to FUNCTION or PROCEDURE
5576 -- Specification (Node1)
5577 -- Library_Unit (Node4-Sem) points to the subunit
5578 -- Corresponding_Body (Node5-Sem)
5579
5580 -------------------------------
5581 -- 10.1.3 Package Body Stub --
5582 -------------------------------
5583
5584 -- PACKAGE_BODY_STUB ::=
5585 -- package body DEFINING_IDENTIFIER is separate;
5586
5587 -- N_Package_Body_Stub
5588 -- Sloc points to PACKAGE
5589 -- Defining_Identifier (Node1)
5590 -- Library_Unit (Node4-Sem) points to the subunit
5591 -- Corresponding_Body (Node5-Sem)
5592
5593 ----------------------------
5594 -- 10.1.3 Task Body Stub --
5595 ----------------------------
5596
5597 -- TASK_BODY_STUB ::=
5598 -- task body DEFINING_IDENTIFIER is separate;
5599
5600 -- N_Task_Body_Stub
5601 -- Sloc points to TASK
5602 -- Defining_Identifier (Node1)
5603 -- Library_Unit (Node4-Sem) points to the subunit
5604 -- Corresponding_Body (Node5-Sem)
5605
5606 ---------------------------------
5607 -- 10.1.3 Protected Body Stub --
5608 ---------------------------------
5609
5610 -- PROTECTED_BODY_STUB ::=
5611 -- protected body DEFINING_IDENTIFIER is separate;
5612
5613 -- Note: protected body stubs are not allowed in Ada 83 mode
5614
5615 -- N_Protected_Body_Stub
5616 -- Sloc points to PROTECTED
5617 -- Defining_Identifier (Node1)
5618 -- Library_Unit (Node4-Sem) points to the subunit
5619 -- Corresponding_Body (Node5-Sem)
5620
5621 ---------------------
5622 -- 10.1.3 Subunit --
5623 ---------------------
5624
5625 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5626
5627 -- N_Subunit
5628 -- Sloc points to SEPARATE
5629 -- Name (Node2) is the name of the parent unit
5630 -- Proper_Body (Node1) is the subunit body
5631 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5632
5633 ---------------------------------
5634 -- 11.1 Exception Declaration --
5635 ---------------------------------
5636
5637 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5638
5639 -- For consistency with object declarations etc., the parser converts
5640 -- the case of multiple identifiers being declared to a series of
5641 -- declarations in which the expression is copied, using the More_Ids
5642 -- and Prev_Ids flags to remember the source form as described in the
5643 -- section on "Handling of Defining Identifier Lists".
5644
5645 -- N_Exception_Declaration
5646 -- Sloc points to EXCEPTION
5647 -- Defining_Identifier (Node1)
5648 -- Expression (Node3-Sem)
5649 -- Renaming_Exception (Node2-Sem)
5650 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5651 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5652
5653 ------------------------------------------
5654 -- 11.2 Handled Sequence Of Statements --
5655 ------------------------------------------
5656
5657 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5658 -- SEQUENCE_OF_STATEMENTS
5659 -- [exception
5660 -- EXCEPTION_HANDLER
5661 -- {EXCEPTION_HANDLER}]
5662 -- [at end
5663 -- cleanup_procedure_call (param, param, param, ...);]
5664
5665 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5666 -- used only internally currently, but is considered to be syntactic.
5667 -- At the moment, the only cleanup action allowed is a single call to
5668 -- a parameterless procedure, and the Identifier field of the node is
5669 -- the procedure to be called. Also there is a current restriction
5670 -- that exception handles and a cleanup cannot be present in the same
5671 -- frame, so at least one of Exception_Handlers or the Identifier must
5672 -- be missing.
5673
5674 -- Actually, more accurately, this restriction applies to the original
5675 -- source program. In the expanded tree, if the At_End_Proc field is
5676 -- present, then there will also be an exception handler of the form:
5677
5678 -- when all others =>
5679 -- cleanup;
5680 -- raise;
5681
5682 -- where cleanup is the procedure to be generated. The reason we do
5683 -- this is so that the front end can handle the necessary entries in
5684 -- the exception tables, and other exception handler actions required
5685 -- as part of the normal handling for exception handlers.
5686
5687 -- The AT END cleanup handler protects only the sequence of statements
5688 -- (not the associated declarations of the parent), just like exception
5689 -- handlers. The big difference is that the cleanup procedure is called
5690 -- on either a normal or an abnormal exit from the statement sequence.
5691
5692 -- Note: the list of Exception_Handlers can contain pragmas as well
5693 -- as actual handlers. In practice these pragmas can only occur at
5694 -- the start of the list, since any pragmas occurring later on will
5695 -- be included in the statement list of the corresponding handler.
5696
5697 -- Note: although in the Ada syntax, the sequence of statements in
5698 -- a handled sequence of statements can only contain statements, we
5699 -- allow free mixing of declarations and statements in the resulting
5700 -- expanded tree. This is for example used to deal with the case of
5701 -- a cleanup procedure that must handle declarations as well as the
5702 -- statements of a block.
5703
5704 -- N_Handled_Sequence_Of_Statements
5705 -- Sloc points to first token of first statement
5706 -- Statements (List3)
5707 -- End_Label (Node4) (set to Empty if expander generated)
5708 -- Exception_Handlers (List5) (set to No_List if none present)
5709 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5710 -- First_Real_Statement (Node2-Sem)
5711 -- Zero_Cost_Handling (Flag5-Sem)
5712
5713 -- Note: the parent always contains a Declarations field which contains
5714 -- declarations associated with the handled sequence of statements. This
5715 -- is true even in the case of an accept statement (see description of
5716 -- the N_Accept_Statement node).
5717
5718 -- End_Label refers to the containing construct
5719
5720 -----------------------------
5721 -- 11.2 Exception Handler --
5722 -----------------------------
5723
5724 -- EXCEPTION_HANDLER ::=
5725 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5726 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5727 -- SEQUENCE_OF_STATEMENTS
5728
5729 -- Note: choice parameter specification is not allowed in Ada 83 mode
5730
5731 -- N_Exception_Handler
5732 -- Sloc points to WHEN
5733 -- Choice_Parameter (Node2) (set to Empty if not present)
5734 -- Exception_Choices (List4)
5735 -- Statements (List3)
5736 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5737 -- Zero_Cost_Handling (Flag5-Sem)
5738 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5739 -- Local_Raise_Not_OK (Flag7-Sem)
5740 -- Has_Local_Raise (Flag8-Sem)
5741
5742 ------------------------------------------
5743 -- 11.2 Choice parameter specification --
5744 ------------------------------------------
5745
5746 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5747
5748 ----------------------------
5749 -- 11.2 Exception Choice --
5750 ----------------------------
5751
5752 -- EXCEPTION_CHOICE ::= exception_NAME | others
5753
5754 -- Except in the case of OTHERS, no explicit node appears in the tree
5755 -- for exception choice. Instead the exception name appears directly.
5756 -- An OTHERS choice is represented by a N_Others_Choice node (see
5757 -- section 3.8.1.
5758
5759 -- Note: for the exception choice created for an at end handler, the
5760 -- exception choice is an N_Others_Choice node with All_Others set.
5761
5762 ---------------------------
5763 -- 11.3 Raise Statement --
5764 ---------------------------
5765
5766 -- RAISE_STATEMENT ::= raise [exception_NAME];
5767
5768 -- In Ada 2005, we have
5769
5770 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5771
5772 -- N_Raise_Statement
5773 -- Sloc points to RAISE
5774 -- Name (Node2) (set to Empty if no exception name present)
5775 -- Expression (Node3) (set to Empty if no expression present)
5776 -- From_At_End (Flag4-Sem)
5777
5778 -------------------------------
5779 -- 12.1 Generic Declaration --
5780 -------------------------------
5781
5782 -- GENERIC_DECLARATION ::=
5783 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5784
5785 ------------------------------------------
5786 -- 12.1 Generic Subprogram Declaration --
5787 ------------------------------------------
5788
5789 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5790 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5791
5792 -- Note: Generic_Formal_Declarations can include pragmas
5793
5794 -- N_Generic_Subprogram_Declaration
5795 -- Sloc points to GENERIC
5796 -- Specification (Node1) subprogram specification
5797 -- Corresponding_Body (Node5-Sem)
5798 -- Generic_Formal_Declarations (List2) from generic formal part
5799 -- Parent_Spec (Node4-Sem)
5800
5801 ---------------------------------------
5802 -- 12.1 Generic Package Declaration --
5803 ---------------------------------------
5804
5805 -- GENERIC_PACKAGE_DECLARATION ::=
5806 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5807
5808 -- Note: when we do generics right, the Activation_Chain_Entity entry
5809 -- for this node can be removed (since the expander won't see generic
5810 -- units any more)???.
5811
5812 -- Note: Generic_Formal_Declarations can include pragmas
5813
5814 -- N_Generic_Package_Declaration
5815 -- Sloc points to GENERIC
5816 -- Specification (Node1) package specification
5817 -- Corresponding_Body (Node5-Sem)
5818 -- Generic_Formal_Declarations (List2) from generic formal part
5819 -- Parent_Spec (Node4-Sem)
5820 -- Activation_Chain_Entity (Node3-Sem)
5821
5822 -------------------------------
5823 -- 12.1 Generic Formal Part --
5824 -------------------------------
5825
5826 -- GENERIC_FORMAL_PART ::=
5827 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5828
5829 ------------------------------------------------
5830 -- 12.1 Generic Formal Parameter Declaration --
5831 ------------------------------------------------
5832
5833 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5834 -- FORMAL_OBJECT_DECLARATION
5835 -- | FORMAL_TYPE_DECLARATION
5836 -- | FORMAL_SUBPROGRAM_DECLARATION
5837 -- | FORMAL_PACKAGE_DECLARATION
5838
5839 ---------------------------------
5840 -- 12.3 Generic Instantiation --
5841 ---------------------------------
5842
5843 -- GENERIC_INSTANTIATION ::=
5844 -- package DEFINING_PROGRAM_UNIT_NAME is
5845 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5846 -- | [[not] overriding]
5847 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5848 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5849 -- | [[not] overriding]
5850 -- function DEFINING_DESIGNATOR is
5851 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5852
5853 -- N_Package_Instantiation
5854 -- Sloc points to PACKAGE
5855 -- Defining_Unit_Name (Node1)
5856 -- Name (Node2)
5857 -- Generic_Associations (List3) (set to No_List if no
5858 -- generic actual part)
5859 -- Parent_Spec (Node4-Sem)
5860 -- Instance_Spec (Node5-Sem)
5861 -- ABE_Is_Certain (Flag18-Sem)
5862
5863 -- N_Procedure_Instantiation
5864 -- Sloc points to PROCEDURE
5865 -- Defining_Unit_Name (Node1)
5866 -- Name (Node2)
5867 -- Parent_Spec (Node4-Sem)
5868 -- Generic_Associations (List3) (set to No_List if no
5869 -- generic actual part)
5870 -- Instance_Spec (Node5-Sem)
5871 -- Must_Override (Flag14) set if overriding indicator present
5872 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5873 -- ABE_Is_Certain (Flag18-Sem)
5874
5875 -- N_Function_Instantiation
5876 -- Sloc points to FUNCTION
5877 -- Defining_Unit_Name (Node1)
5878 -- Name (Node2)
5879 -- Generic_Associations (List3) (set to No_List if no
5880 -- generic actual part)
5881 -- Parent_Spec (Node4-Sem)
5882 -- Instance_Spec (Node5-Sem)
5883 -- Must_Override (Flag14) set if overriding indicator present
5884 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5885 -- ABE_Is_Certain (Flag18-Sem)
5886
5887 -- Note: overriding indicator is an Ada 2005 feature
5888
5889 -------------------------------
5890 -- 12.3 Generic Actual Part --
5891 -------------------------------
5892
5893 -- GENERIC_ACTUAL_PART ::=
5894 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5895
5896 -------------------------------
5897 -- 12.3 Generic Association --
5898 -------------------------------
5899
5900 -- GENERIC_ASSOCIATION ::=
5901 -- [generic_formal_parameter_SELECTOR_NAME =>]
5902
5903 -- Note: unlike the procedure call case, a generic association node
5904 -- is generated for every association, even if no formal parameter
5905 -- selector name is present. In this case the parser will leave the
5906 -- Selector_Name field set to Empty, to be filled in later by the
5907 -- semantic pass.
5908
5909 -- In Ada 2005, a formal may be associated with a box, if the
5910 -- association is part of the list of actuals for a formal package.
5911 -- If the association is given by OTHERS => <>, the association is
5912 -- an N_Others_Choice.
5913
5914 -- N_Generic_Association
5915 -- Sloc points to first token of generic association
5916 -- Selector_Name (Node2) (set to Empty if no formal
5917 -- parameter selector name)
5918 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
5919 -- Box_Present (Flag15) (for formal_package associations with a box)
5920
5921 ---------------------------------------------
5922 -- 12.3 Explicit Generic Actual Parameter --
5923 ---------------------------------------------
5924
5925 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5926 -- EXPRESSION | variable_NAME | subprogram_NAME
5927 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5928
5929 -------------------------------------
5930 -- 12.4 Formal Object Declaration --
5931 -------------------------------------
5932
5933 -- FORMAL_OBJECT_DECLARATION ::=
5934 -- DEFINING_IDENTIFIER_LIST :
5935 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5936 -- | DEFINING_IDENTIFIER_LIST :
5937 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION];
5938
5939 -- Although the syntax allows multiple identifiers in the list, the
5940 -- semantics is as though successive declarations were given with
5941 -- identical type definition and expression components. To simplify
5942 -- semantic processing, the parser represents a multiple declaration
5943 -- case as a sequence of single declarations, using the More_Ids and
5944 -- Prev_Ids flags to preserve the original source form as described
5945 -- in the section on "Handling of Defining Identifier Lists".
5946
5947 -- N_Formal_Object_Declaration
5948 -- Sloc points to first identifier
5949 -- Defining_Identifier (Node1)
5950 -- In_Present (Flag15)
5951 -- Out_Present (Flag17)
5952 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5953 -- Subtype_Mark (Node4) (set to Empty if not present)
5954 -- Access_Definition (Node3) (set to Empty if not present)
5955 -- Default_Expression (Node5) (set to Empty if no default expression)
5956 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5957 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5958
5959 -----------------------------------
5960 -- 12.5 Formal Type Declaration --
5961 -----------------------------------
5962
5963 -- FORMAL_TYPE_DECLARATION ::=
5964 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5965 -- is FORMAL_TYPE_DEFINITION;
5966
5967 -- N_Formal_Type_Declaration
5968 -- Sloc points to TYPE
5969 -- Defining_Identifier (Node1)
5970 -- Formal_Type_Definition (Node3)
5971 -- Discriminant_Specifications (List4) (set to No_List if no
5972 -- discriminant part)
5973 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5974
5975 ----------------------------------
5976 -- 12.5 Formal type definition --
5977 ----------------------------------
5978
5979 -- FORMAL_TYPE_DEFINITION ::=
5980 -- FORMAL_PRIVATE_TYPE_DEFINITION
5981 -- | FORMAL_DERIVED_TYPE_DEFINITION
5982 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5983 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5984 -- | FORMAL_MODULAR_TYPE_DEFINITION
5985 -- | FORMAL_FLOATING_POINT_DEFINITION
5986 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5987 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5988 -- | FORMAL_ARRAY_TYPE_DEFINITION
5989 -- | FORMAL_ACCESS_TYPE_DEFINITION
5990 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5991
5992 ---------------------------------------------
5993 -- 12.5.1 Formal Private Type Definition --
5994 ---------------------------------------------
5995
5996 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5997 -- [[abstract] tagged] [limited] private
5998
5999 -- Note: TAGGED is not allowed in Ada 83 mode
6000
6001 -- N_Formal_Private_Type_Definition
6002 -- Sloc points to PRIVATE
6003 -- Abstract_Present (Flag4)
6004 -- Tagged_Present (Flag15)
6005 -- Limited_Present (Flag17)
6006
6007 --------------------------------------------
6008 -- 12.5.1 Formal Derived Type Definition --
6009 --------------------------------------------
6010
6011 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6012 -- [abstract] [limited | synchronized]
6013 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6014 -- Note: this construct is not allowed in Ada 83 mode
6015
6016 -- N_Formal_Derived_Type_Definition
6017 -- Sloc points to NEW
6018 -- Subtype_Mark (Node4)
6019 -- Private_Present (Flag15)
6020 -- Abstract_Present (Flag4)
6021 -- Limited_Present (Flag17)
6022 -- Synchronized_Present (Flag7)
6023 -- Interface_List (List2) (set to No_List if none)
6024
6025 ---------------------------------------------
6026 -- 12.5.2 Formal Discrete Type Definition --
6027 ---------------------------------------------
6028
6029 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6030
6031 -- N_Formal_Discrete_Type_Definition
6032 -- Sloc points to (
6033
6034 ---------------------------------------------------
6035 -- 12.5.2 Formal Signed Integer Type Definition --
6036 ---------------------------------------------------
6037
6038 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6039
6040 -- N_Formal_Signed_Integer_Type_Definition
6041 -- Sloc points to RANGE
6042
6043 --------------------------------------------
6044 -- 12.5.2 Formal Modular Type Definition --
6045 --------------------------------------------
6046
6047 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6048
6049 -- N_Formal_Modular_Type_Definition
6050 -- Sloc points to MOD
6051
6052 ----------------------------------------------
6053 -- 12.5.2 Formal Floating Point Definition --
6054 ----------------------------------------------
6055
6056 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6057
6058 -- N_Formal_Floating_Point_Definition
6059 -- Sloc points to DIGITS
6060
6061 ----------------------------------------------------
6062 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6063 ----------------------------------------------------
6064
6065 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6066
6067 -- N_Formal_Ordinary_Fixed_Point_Definition
6068 -- Sloc points to DELTA
6069
6070 ---------------------------------------------------
6071 -- 12.5.2 Formal Decimal Fixed Point Definition --
6072 ---------------------------------------------------
6073
6074 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6075
6076 -- Note: formal decimal fixed point definition not allowed in Ada 83
6077
6078 -- N_Formal_Decimal_Fixed_Point_Definition
6079 -- Sloc points to DELTA
6080
6081 ------------------------------------------
6082 -- 12.5.3 Formal Array Type Definition --
6083 ------------------------------------------
6084
6085 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6086
6087 -------------------------------------------
6088 -- 12.5.4 Formal Access Type Definition --
6089 -------------------------------------------
6090
6091 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6092
6093 ----------------------------------------------
6094 -- 12.5.5 Formal Interface Type Definition --
6095 ----------------------------------------------
6096
6097 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6098
6099 -----------------------------------------
6100 -- 12.6 Formal Subprogram Declaration --
6101 -----------------------------------------
6102
6103 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6104 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6105 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6106
6107 --------------------------------------------------
6108 -- 12.6 Formal Concrete Subprogram Declaration --
6109 --------------------------------------------------
6110
6111 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6112 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
6113
6114 -- N_Formal_Concrete_Subprogram_Declaration
6115 -- Sloc points to WITH
6116 -- Specification (Node1)
6117 -- Default_Name (Node2) (set to Empty if no subprogram default)
6118 -- Box_Present (Flag15)
6119
6120 -- Note: if no subprogram default is present, then Name is set
6121 -- to Empty, and Box_Present is False.
6122
6123 --------------------------------------------------
6124 -- 12.6 Formal Abstract Subprogram Declaration --
6125 --------------------------------------------------
6126
6127 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6128 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
6129
6130 -- N_Formal_Abstract_Subprogram_Declaration
6131 -- Sloc points to WITH
6132 -- Specification (Node1)
6133 -- Default_Name (Node2) (set to Empty if no subprogram default)
6134 -- Box_Present (Flag15)
6135
6136 -- Note: if no subprogram default is present, then Name is set
6137 -- to Empty, and Box_Present is False.
6138
6139 ------------------------------
6140 -- 12.6 Subprogram Default --
6141 ------------------------------
6142
6143 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6144
6145 -- There is no separate node in the tree for a subprogram default.
6146 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6147 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6148 -- default name or box indication, as needed.
6149
6150 ------------------------
6151 -- 12.6 Default Name --
6152 ------------------------
6153
6154 -- DEFAULT_NAME ::= NAME
6155
6156 --------------------------------------
6157 -- 12.7 Formal Package Declaration --
6158 --------------------------------------
6159
6160 -- FORMAL_PACKAGE_DECLARATION ::=
6161 -- with package DEFINING_IDENTIFIER
6162 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
6163
6164 -- Note: formal package declarations not allowed in Ada 83 mode
6165
6166 -- N_Formal_Package_Declaration
6167 -- Sloc points to WITH
6168 -- Defining_Identifier (Node1)
6169 -- Name (Node2)
6170 -- Generic_Associations (List3) (set to No_List if (<>) case or
6171 -- empty generic actual part)
6172 -- Box_Present (Flag15)
6173 -- Instance_Spec (Node5-Sem)
6174 -- ABE_Is_Certain (Flag18-Sem)
6175
6176 --------------------------------------
6177 -- 12.7 Formal Package Actual Part --
6178 --------------------------------------
6179
6180 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6181 -- ([OTHERS] => <>)
6182 -- | [GENERIC_ACTUAL_PART]
6183 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6184
6185 -- FORMAL_PACKAGE_ASSOCIATION ::=
6186 -- GENERIC_ASSOCIATION
6187 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6188
6189 -- There is no explicit node in the tree for a formal package actual
6190 -- part. Instead the information appears in the parent node (i.e. the
6191 -- formal package declaration node itself).
6192
6193 -- There is no explicit node for a formal package association. All of
6194 -- them are represented either by a generic association, possibly with
6195 -- Box_Present, or by an N_Others_Choice.
6196
6197 ---------------------------------
6198 -- 13.1 Representation clause --
6199 ---------------------------------
6200
6201 -- REPRESENTATION_CLAUSE ::=
6202 -- ATTRIBUTE_DEFINITION_CLAUSE
6203 -- | ENUMERATION_REPRESENTATION_CLAUSE
6204 -- | RECORD_REPRESENTATION_CLAUSE
6205 -- | AT_CLAUSE
6206
6207 ----------------------
6208 -- 13.1 Local Name --
6209 ----------------------
6210
6211 -- LOCAL_NAME :=
6212 -- DIRECT_NAME
6213 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6214 -- | library_unit_NAME
6215
6216 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6217 -- as an attribute reference, which has essentially the same form.
6218
6219 ---------------------------------------
6220 -- 13.3 Attribute definition clause --
6221 ---------------------------------------
6222
6223 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6224 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6225 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6226
6227 -- In Ada 83, the expression must be a simple expression and the
6228 -- local name must be a direct name.
6229
6230 -- Note: the only attribute definition clause that is processed by
6231 -- gigi is an address clause. For all other cases, the information
6232 -- is extracted by the front end and either results in setting entity
6233 -- information, e.g. Esize for the Size clause, or in appropriate
6234 -- expansion actions (e.g. in the case of Storage_Size).
6235
6236 -- For an address clause, Gigi constructs the appropriate addressing
6237 -- code. It also ensures that no aliasing optimizations are made
6238 -- for the object for which the address clause appears.
6239
6240 -- Note: for an address clause used to achieve an overlay:
6241
6242 -- A : Integer;
6243 -- B : Integer;
6244 -- for B'Address use A'Address;
6245
6246 -- the above rule means that Gigi will ensure that no optimizations
6247 -- will be made for B that would violate the implementation advice
6248 -- of RM 13.3(19). However, this advice applies only to B and not
6249 -- to A, which seems unfortunate. The GNAT front end will mark the
6250 -- object A as volatile to also prevent unwanted optimization
6251 -- assumptions based on no aliasing being made for B.
6252
6253 -- N_Attribute_Definition_Clause
6254 -- Sloc points to FOR
6255 -- Name (Node2) the local name
6256 -- Chars (Name1) the identifier name from the attribute designator
6257 -- Expression (Node3) the expression or name
6258 -- Entity (Node4-Sem)
6259 -- Next_Rep_Item (Node5-Sem)
6260 -- From_At_Mod (Flag4-Sem)
6261 -- Check_Address_Alignment (Flag11-Sem)
6262 -- Address_Warning_Posted (Flag18-Sem)
6263
6264 ---------------------------------------------
6265 -- 13.4 Enumeration representation clause --
6266 ---------------------------------------------
6267
6268 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6269 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6270
6271 -- In Ada 83, the name must be a direct name
6272
6273 -- N_Enumeration_Representation_Clause
6274 -- Sloc points to FOR
6275 -- Identifier (Node1) direct name
6276 -- Array_Aggregate (Node3)
6277 -- Next_Rep_Item (Node5-Sem)
6278
6279 ---------------------------------
6280 -- 13.4 Enumeration aggregate --
6281 ---------------------------------
6282
6283 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6284
6285 ------------------------------------------
6286 -- 13.5.1 Record representation clause --
6287 ------------------------------------------
6288
6289 -- RECORD_REPRESENTATION_CLAUSE ::=
6290 -- for first_subtype_LOCAL_NAME use
6291 -- record [MOD_CLAUSE]
6292 -- {COMPONENT_CLAUSE}
6293 -- end record;
6294
6295 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6296 -- replaced by a corresponding Alignment attribute definition clause).
6297
6298 -- Note: Component_Clauses can include pragmas
6299
6300 -- N_Record_Representation_Clause
6301 -- Sloc points to FOR
6302 -- Identifier (Node1) direct name
6303 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6304 -- Component_Clauses (List3)
6305 -- Next_Rep_Item (Node5-Sem)
6306
6307 ------------------------------
6308 -- 13.5.1 Component clause --
6309 ------------------------------
6310
6311 -- COMPONENT_CLAUSE ::=
6312 -- component_LOCAL_NAME at POSITION
6313 -- range FIRST_BIT .. LAST_BIT;
6314
6315 -- N_Component_Clause
6316 -- Sloc points to AT
6317 -- Component_Name (Node1) points to Name or Attribute_Reference
6318 -- Position (Node2)
6319 -- First_Bit (Node3)
6320 -- Last_Bit (Node4)
6321
6322 ----------------------
6323 -- 13.5.1 Position --
6324 ----------------------
6325
6326 -- POSITION ::= static_EXPRESSION
6327
6328 -----------------------
6329 -- 13.5.1 First_Bit --
6330 -----------------------
6331
6332 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6333
6334 ----------------------
6335 -- 13.5.1 Last_Bit --
6336 ----------------------
6337
6338 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6339
6340 --------------------------
6341 -- 13.8 Code statement --
6342 --------------------------
6343
6344 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6345
6346 -- Note: in GNAT, the qualified expression has the form
6347
6348 -- Asm_Insn'(Asm (...));
6349
6350 -- See package System.Machine_Code in file s-maccod.ads for details on
6351 -- the allowed parameters to Asm. There are two ways this node can
6352 -- arise, as a code statement, in which case the expression is the
6353 -- qualified expression, or as a result of the expansion of an intrinsic
6354 -- call to the Asm or Asm_Input procedure.
6355
6356 -- N_Code_Statement
6357 -- Sloc points to first token of the expression
6358 -- Expression (Node3)
6359
6360 -- Note: package Exp_Code contains an abstract functional interface
6361 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6362
6363 ------------------------
6364 -- 13.12 Restriction --
6365 ------------------------
6366
6367 -- RESTRICTION ::=
6368 -- restriction_IDENTIFIER
6369 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6370
6371 -- There is no explicit node for restrictions. Instead the restriction
6372 -- appears in normal pragma syntax as a pragma argument association,
6373 -- which has the same syntactic form.
6374
6375 --------------------------
6376 -- B.2 Shift Operators --
6377 --------------------------
6378
6379 -- Calls to the intrinsic shift functions are converted to one of
6380 -- the following shift nodes, which have the form of normal binary
6381 -- operator names. Note that for a given shift operation, one node
6382 -- covers all possible types, as for normal operators.
6383
6384 -- Note: it is perfectly permissible for the expander to generate
6385 -- shift operation nodes directly, in which case they will be analyzed
6386 -- and parsed in the usual manner.
6387
6388 -- Sprint syntax: shift-function-name!(expr, count)
6389
6390 -- Note: the Left_Opnd field holds the first argument (the value to
6391 -- be shifted). The Right_Opnd field holds the second argument (the
6392 -- shift count). The Chars field is the name of the intrinsic function.
6393
6394 -- N_Op_Rotate_Left
6395 -- Sloc points to the function name
6396 -- plus fields for binary operator
6397 -- plus fields for expression
6398 -- Shift_Count_OK (Flag4-Sem)
6399
6400 -- N_Op_Rotate_Right
6401 -- Sloc points to the function name
6402 -- plus fields for binary operator
6403 -- plus fields for expression
6404 -- Shift_Count_OK (Flag4-Sem)
6405
6406 -- N_Op_Shift_Left
6407 -- Sloc points to the function name
6408 -- plus fields for binary operator
6409 -- plus fields for expression
6410 -- Shift_Count_OK (Flag4-Sem)
6411
6412 -- N_Op_Shift_Right_Arithmetic
6413 -- Sloc points to the function name
6414 -- plus fields for binary operator
6415 -- plus fields for expression
6416 -- Shift_Count_OK (Flag4-Sem)
6417
6418 -- N_Op_Shift_Right
6419 -- Sloc points to the function name
6420 -- plus fields for binary operator
6421 -- plus fields for expression
6422 -- Shift_Count_OK (Flag4-Sem)
6423
6424 --------------------------
6425 -- Obsolescent Features --
6426 --------------------------
6427
6428 -- The syntax descriptions and tree nodes for obsolescent features are
6429 -- grouped together, corresponding to their location in appendix I in
6430 -- the RM. However, parsing and semantic analysis for these constructs
6431 -- is located in an appropriate chapter (see individual notes).
6432
6433 ---------------------------
6434 -- J.3 Delta Constraint --
6435 ---------------------------
6436
6437 -- Note: the parse routine for this construct is located in section
6438 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6439 -- where delta constraint logically belongs.
6440
6441 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6442
6443 -- N_Delta_Constraint
6444 -- Sloc points to DELTA
6445 -- Delta_Expression (Node3)
6446 -- Range_Constraint (Node4) (set to Empty if not present)
6447
6448 --------------------
6449 -- J.7 At Clause --
6450 --------------------
6451
6452 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6453
6454 -- Note: the parse routine for this construct is located in Par-Ch13,
6455 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6456 -- belongs if it were not obsolescent.
6457
6458 -- Note: in Ada 83 the expression must be a simple expression
6459
6460 -- Gigi restriction: This node never appears, it is rewritten as an
6461 -- address attribute definition clause.
6462
6463 -- N_At_Clause
6464 -- Sloc points to FOR
6465 -- Identifier (Node1)
6466 -- Expression (Node3)
6467
6468 ---------------------
6469 -- J.8 Mod clause --
6470 ---------------------
6471
6472 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6473
6474 -- Note: the parse routine for this construct is located in Par-Ch13,
6475 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6476 -- belongs if it were not obsolescent.
6477
6478 -- Note: in Ada 83, the expression must be a simple expression
6479
6480 -- Gigi restriction: this node never appears. It is replaced
6481 -- by a corresponding Alignment attribute definition clause.
6482
6483 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6484 -- its name has "clause" in it. This is rather strange, but is quite
6485 -- definitely specified. The pragmas before are collected in the
6486 -- Pragmas_Before field of the mod clause node itself, and pragmas
6487 -- after are simply swallowed up in the list of component clauses.
6488
6489 -- N_Mod_Clause
6490 -- Sloc points to AT
6491 -- Expression (Node3)
6492 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6493
6494 --------------------
6495 -- Semantic Nodes --
6496 --------------------
6497
6498 -- These semantic nodes are used to hold additional semantic information.
6499 -- They are inserted into the tree as a result of semantic processing.
6500 -- Although there are no legitimate source syntax constructions that
6501 -- correspond directly to these nodes, we need a source syntax for the
6502 -- reconstructed tree printed by Sprint, and the node descriptions here
6503 -- show this syntax.
6504
6505 -- Note: Conditional_Expression is in this section for historical reasons.
6506 -- We will move it to its appropriate place when it is officially approved
6507 -- as an extension (and then we will know what the exact grammar and place
6508 -- in the Reference Manual is!)
6509
6510 ----------------------------
6511 -- Conditional Expression --
6512 ----------------------------
6513
6514 -- This node is used to represent an expression corresponding to the
6515 -- C construct (condition ? then-expression : else_expression), where
6516 -- Expressions is a three element list, whose first expression is the
6517 -- condition, and whose second and third expressions are the then and
6518 -- else expressions respectively.
6519
6520 -- Note: the Then_Actions and Else_Actions fields are always set to
6521 -- No_List in the tree passed to Gigi. These fields are used only
6522 -- for temporary processing purposes in the expander.
6523
6524 -- The Ada language does not permit conditional expressions, however
6525 -- this is under discussion as a possible extension by the ARG, and we
6526 -- have implemented a form of this capability in GNAT under control of
6527 -- the -gnatX switch. The syntax is:
6528
6529 -- CONDITIONAL_EXPRESSION ::=
6530 -- if EXPRESSION then EXPRESSION
6531 -- {elsif EXPRESSION then EXPRESSION}
6532 -- [else EXPRESSION]
6533
6534 -- And we add the additional constructs
6535
6536 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6537 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6538
6539 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6540 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6541 -- the Is_Elsif flag is set on the inner conditional expression.
6542
6543 -- N_Conditional_Expression
6544 -- Sloc points to IF or ELSIF keyword
6545 -- Expressions (List1)
6546 -- Then_Actions (List2-Sem)
6547 -- Else_Actions (List3-Sem)
6548 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6549 -- plus fields for expression
6550
6551 -------------------
6552 -- Expanded_Name --
6553 -------------------
6554
6555 -- The N_Expanded_Name node is used to represent a selected component
6556 -- name that has been resolved to an expanded name. The semantic phase
6557 -- replaces N_Selected_Component nodes that represent names by the use
6558 -- of this node, leaving the N_Selected_Component node used only when
6559 -- the prefix is a record or protected type.
6560
6561 -- The fields of the N_Expanded_Name node are layed out identically
6562 -- to those of the N_Selected_Component node, allowing conversion of
6563 -- an expanded name node to a selected component node to be done
6564 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6565
6566 -- There is no special sprint syntax for an expanded name
6567
6568 -- N_Expanded_Name
6569 -- Sloc points to the period
6570 -- Chars (Name1) copy of Chars field of selector name
6571 -- Prefix (Node3)
6572 -- Selector_Name (Node2)
6573 -- Entity (Node4-Sem)
6574 -- Associated_Node (Node4-Sem)
6575 -- Redundant_Use (Flag13-Sem)
6576 -- Has_Private_View (Flag11-Sem) set in generic units.
6577 -- plus fields for expression
6578
6579 --------------------
6580 -- Free Statement --
6581 --------------------
6582
6583 -- The N_Free_Statement node is generated as a result of a call to an
6584 -- instantiation of Unchecked_Deallocation. The instantiation of this
6585 -- generic is handled specially and generates this node directly.
6586
6587 -- Sprint syntax: free expression
6588
6589 -- N_Free_Statement
6590 -- Sloc is copied from the unchecked deallocation call
6591 -- Expression (Node3) argument to unchecked deallocation call
6592 -- Storage_Pool (Node1-Sem)
6593 -- Procedure_To_Call (Node2-Sem)
6594 -- Actual_Designated_Subtype (Node4-Sem)
6595
6596 -- Note: in the case where a debug source file is generated, the Sloc
6597 -- for this node points to the FREE keyword in the Sprint file output.
6598
6599 -------------------
6600 -- Freeze Entity --
6601 -------------------
6602
6603 -- This node marks the point in a declarative part at which an entity
6604 -- declared therein becomes frozen. The expander places initialization
6605 -- procedures for types at those points. Gigi uses the freezing point
6606 -- to elaborate entities that may depend on previous private types.
6607
6608 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6609 -- a full description of the use of this node.
6610
6611 -- The Entity field points back to the entity for the type (whose
6612 -- Freeze_Node field points back to this freeze node).
6613
6614 -- The Actions field contains a list of declarations and statements
6615 -- generated by the expander which are associated with the freeze
6616 -- node, and are elaborated as though the freeze node were replaced
6617 -- by this sequence of actions.
6618
6619 -- Note: the Sloc field in the freeze node references a construct
6620 -- associated with the freezing point. This is used for posting
6621 -- messages in some error/warning situations, e.g. the case where
6622 -- a primitive operation of a tagged type is declared too late.
6623
6624 -- Sprint syntax: freeze entity-name [
6625 -- freeze actions
6626 -- ]
6627
6628 -- N_Freeze_Entity
6629 -- Sloc points near freeze point (see above special note)
6630 -- Entity (Node4-Sem)
6631 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6632 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6633 -- Actions (List1) (set to No_List if no freeze actions)
6634 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6635
6636 -- The Actions field holds actions associated with the freeze. These
6637 -- actions are elaborated at the point where the type is frozen.
6638
6639 -- Note: in the case where a debug source file is generated, the Sloc
6640 -- for this node points to the FREEZE keyword in the Sprint file output.
6641
6642 --------------------------------
6643 -- Implicit Label Declaration --
6644 --------------------------------
6645
6646 -- An implicit label declaration is created for every occurrence of a
6647 -- label on a statement or a label on a block or loop. It is chained
6648 -- in the declarations of the innermost enclosing block as specified
6649 -- in RM section 5.1 (3).
6650
6651 -- The Defining_Identifier is the actual identifier for the statement
6652 -- identifier. Note that the occurrence of the label is a reference, NOT
6653 -- the defining occurrence. The defining occurrence occurs at the head
6654 -- of the innermost enclosing block, and is represented by this node.
6655
6656 -- Note: from the grammar, this might better be called an implicit
6657 -- statement identifier declaration, but the term we choose seems
6658 -- friendlier, since at least informally statement identifiers are
6659 -- called labels in both cases (i.e. when used in labels, and when
6660 -- used as the identifiers of blocks and loops).
6661
6662 -- Note: although this is logically a semantic node, since it does not
6663 -- correspond directly to a source syntax construction, these nodes are
6664 -- actually created by the parser in a post pass done just after parsing
6665 -- is complete, before semantic analysis is started (see Par.Labl).
6666
6667 -- Sprint syntax: labelname : label;
6668
6669 -- N_Implicit_Label_Declaration
6670 -- Sloc points to the << of the label
6671 -- Defining_Identifier (Node1)
6672 -- Label_Construct (Node2-Sem)
6673
6674 -- Note: in the case where a debug source file is generated, the Sloc
6675 -- for this node points to the label name in the generated declaration.
6676
6677 ---------------------
6678 -- Itype_Reference --
6679 ---------------------
6680
6681 -- This node is used to create a reference to an Itype. The only purpose
6682 -- is to make sure the Itype is defined if this is the first reference.
6683
6684 -- A typical use of this node is when an Itype is to be referenced in
6685 -- two branches of an IF statement. In this case it is important that
6686 -- the first use of the Itype not be inside the conditional, since then
6687 -- it might not be defined if the other branch of the IF is taken, in
6688 -- the case where the definition generates elaboration code.
6689
6690 -- The Itype field points to the referenced Itype
6691
6692 -- Sprint syntax: reference itype-name
6693
6694 -- N_Itype_Reference
6695 -- Sloc points to the node generating the reference
6696 -- Itype (Node1-Sem)
6697
6698 -- Note: in the case where a debug source file is generated, the Sloc
6699 -- for this node points to the REFERENCE keyword in the file output.
6700
6701 ---------------------
6702 -- Raise_xxx_Error --
6703 ---------------------
6704
6705 -- One of these nodes is created during semantic analysis to replace
6706 -- a node for an expression that is determined to definitely raise
6707 -- the corresponding exception.
6708
6709 -- The N_Raise_xxx_Error node may also stand alone in place
6710 -- of a declaration or statement, in which case it simply causes
6711 -- the exception to be raised (i.e. it is equivalent to a raise
6712 -- statement that raises the corresponding exception). This use
6713 -- is distinguished by the fact that the Etype in this case is
6714 -- Standard_Void_Type, In the subexpression case, the Etype is the
6715 -- same as the type of the subexpression which it replaces.
6716
6717 -- If Condition is empty, then the raise is unconditional. If the
6718 -- Condition field is non-empty, it is a boolean expression which
6719 -- is first evaluated, and the exception is raised only if the
6720 -- value of the expression is True. In the unconditional case, the
6721 -- creation of this node is usually accompanied by a warning message
6722 -- error. The creation of this node will usually be accompanied by a
6723 -- message (unless it appears within the right operand of a short
6724 -- circuit form whose left argument is static and decisively
6725 -- eliminates elaboration of the raise operation. The condition field
6726 -- can ONLY be present when the node is used as a statement form, it
6727 -- may NOT be present in the case where the node appears within an
6728 -- expression.
6729
6730 -- The exception is generated with a message that contains the
6731 -- file name and line number, and then appended text. The Reason
6732 -- code shows the text to be added. The Reason code is an element
6733 -- of the type Types.RT_Exception_Code, and indicates both the
6734 -- message to be added, and the exception to be raised (which must
6735 -- match the node type). The value is stored by storing a Uint which
6736 -- is the Pos value of the enumeration element in this type.
6737
6738 -- Gigi restriction: This expander ensures that the type of the
6739 -- Condition field is always Standard.Boolean, even if the type
6740 -- in the source is some non-standard boolean type.
6741
6742 -- Sprint syntax: [xxx_error "msg"]
6743 -- or: [xxx_error when condition "msg"]
6744
6745 -- N_Raise_Constraint_Error
6746 -- Sloc references related construct
6747 -- Condition (Node1) (set to Empty if no condition)
6748 -- Reason (Uint3)
6749 -- plus fields for expression
6750
6751 -- N_Raise_Program_Error
6752 -- Sloc references related construct
6753 -- Condition (Node1) (set to Empty if no condition)
6754 -- Reason (Uint3)
6755 -- plus fields for expression
6756
6757 -- N_Raise_Storage_Error
6758 -- Sloc references related construct
6759 -- Condition (Node1) (set to Empty if no condition)
6760 -- Reason (Uint3)
6761 -- plus fields for expression
6762
6763 -- Note: Sloc is copied from the expression generating the exception.
6764 -- In the case where a debug source file is generated, the Sloc for
6765 -- this node points to the left bracket in the Sprint file output.
6766
6767 -- Note: the back end may be required to translate these nodes into
6768 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
6769
6770 ---------------------------------------------
6771 -- Optimization of Exception Raise to Goto --
6772 ---------------------------------------------
6773
6774 -- In some cases, the front end will determine that any exception raised
6775 -- by the back end for a certain exception should be transformed into a
6776 -- goto statement.
6777
6778 -- There are three kinds of exceptions raised by the back end (note that
6779 -- for this purpose we consider gigi to be part of the back end in the
6780 -- gcc case):
6781
6782 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
6783 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
6784 -- 3. Other cases not specifically marked by the front end
6785
6786 -- Normally all such exceptions are translated into calls to the proper
6787 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
6788 -- and the exception message.
6789
6790 -- The front end may determine that for a particular sequence of code,
6791 -- exceptions in any of these three categories for a particular builtin
6792 -- exception should result in a goto, rather than a call to Rcheck_xx.
6793 -- The exact sequence to be generated is:
6794
6795 -- Local_Raise (exception'Identity);
6796 -- goto Label
6797
6798 -- The front end marks such a sequence of code by bracketing it with
6799 -- push and pop nodes:
6800
6801 -- N_Push_xxx_Label (referencing the label)
6802 -- ...
6803 -- (code where transformation is expected for exception xxx)
6804 -- ...
6805 -- N_Pop_xxx_Label
6806
6807 -- The use of push/pop reflects the fact that such regions can properly
6808 -- nest, and one special case is a subregion in which no transformation
6809 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
6810 -- Exception_Label field is Empty.
6811
6812 -- N_Push_Constraint_Error_Label
6813 -- Sloc references first statement in region covered
6814 -- Exception_Label (Node5-Sem)
6815
6816 -- N_Push_Program_Error_Label
6817 -- Sloc references first statement in region covered
6818 -- Exception_Label (Node5-Sem)
6819
6820 -- N_Push_Storage_Error_Label
6821 -- Sloc references first statement in region covered
6822 -- Exception_Label (Node5-Sem)
6823
6824 -- N_Pop_Constraint_Error_Label
6825 -- Sloc references last statement in region covered
6826
6827 -- N_Pop_Program_Error_Label
6828 -- Sloc references last statement in region covered
6829
6830 -- N_Pop_Storage_Error_Label
6831 -- Sloc references last statement in region covered
6832
6833 ---------------
6834 -- Reference --
6835 ---------------
6836
6837 -- For a number of purposes, we need to construct references to objects.
6838 -- These references are subsequently treated as normal access values.
6839 -- An example is the construction of the parameter block passed to a
6840 -- task entry. The N_Reference node is provided for this purpose. It is
6841 -- similar in effect to the use of the Unrestricted_Access attribute,
6842 -- and like Unrestricted_Access can be applied to objects which would
6843 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6844 -- objects which are not aliased, and slices). In addition it can be
6845 -- applied to composite type values as well as objects, including string
6846 -- values and aggregates.
6847
6848 -- Note: we use the Prefix field for this expression so that the
6849 -- resulting node can be treated using common code with the attribute
6850 -- nodes for the 'Access and related attributes. Logically it would make
6851 -- more sense to call it an Expression field, but then we would have to
6852 -- special case the treatment of the N_Reference node.
6853
6854 -- Sprint syntax: prefix'reference
6855
6856 -- N_Reference
6857 -- Sloc is copied from the expression
6858 -- Prefix (Node3)
6859 -- plus fields for expression
6860
6861 -- Note: in the case where a debug source file is generated, the Sloc
6862 -- for this node points to the quote in the Sprint file output.
6863
6864 ---------------------
6865 -- Subprogram_Info --
6866 ---------------------
6867
6868 -- This node generates the appropriate Subprogram_Info value for a
6869 -- given procedure. See Ada.Exceptions for further details
6870
6871 -- Sprint syntax: subprog'subprogram_info
6872
6873 -- N_Subprogram_Info
6874 -- Sloc points to the entity for the procedure
6875 -- Identifier (Node1) identifier referencing the procedure
6876 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6877
6878 -- Note: in the case where a debug source file is generated, the Sloc
6879 -- for this node points to the quote in the Sprint file output.
6880
6881 --------------------------
6882 -- Unchecked Expression --
6883 --------------------------
6884
6885 -- An unchecked expression is one that must be analyzed and resolved
6886 -- with all checks off, regardless of the current setting of scope
6887 -- suppress flags.
6888
6889 -- Sprint syntax: `(expression)
6890
6891 -- Note: this node is always removed from the tree (and replaced by
6892 -- its constituent expression) on completion of analysis, so it only
6893 -- appears in intermediate trees, and will never be seen by Gigi.
6894
6895 -- N_Unchecked_Expression
6896 -- Sloc is a copy of the Sloc of the expression
6897 -- Expression (Node3)
6898 -- plus fields for expression
6899
6900 -- Note: in the case where a debug source file is generated, the Sloc
6901 -- for this node points to the back quote in the Sprint file output.
6902
6903 -------------------------------
6904 -- Unchecked Type Conversion --
6905 -------------------------------
6906
6907 -- An unchecked type conversion node represents the semantic action
6908 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6909 -- It is generated as a result of actual use of Unchecked_Conversion
6910 -- and also the expander generates unchecked type conversion nodes
6911 -- directly for expansion of complex semantic actions.
6912
6913 -- Note: an unchecked type conversion is a variable as far as the
6914 -- semantics are concerned, which is convenient for the expander.
6915 -- This does not change what Ada source programs are legal, since
6916 -- clearly a function call to an instantiation of Unchecked_Conversion
6917 -- is not a variable in any case.
6918
6919 -- Sprint syntax: subtype-mark!(expression)
6920
6921 -- N_Unchecked_Type_Conversion
6922 -- Sloc points to related node in source
6923 -- Subtype_Mark (Node4)
6924 -- Expression (Node3)
6925 -- Kill_Range_Check (Flag11-Sem)
6926 -- No_Truncation (Flag17-Sem)
6927 -- plus fields for expression
6928
6929 -- Note: in the case where a debug source file is generated, the Sloc
6930 -- for this node points to the exclamation in the Sprint file output.
6931
6932 -----------------------------------
6933 -- Validate_Unchecked_Conversion --
6934 -----------------------------------
6935
6936 -- The front end does most of the validation of unchecked conversion,
6937 -- including checking sizes (this is done after the back end is called
6938 -- to take advantage of back-annotation of calculated sizes).
6939
6940 -- The front end also deals with specific cases that are not allowed
6941 -- e.g. involving unconstrained array types.
6942
6943 -- For the case of the standard gigi backend, this means that all
6944 -- checks are done in the front-end.
6945
6946 -- However, in the case of specialized back-ends, notably the JVM
6947 -- backend for JGNAT, additional requirements and restrictions apply
6948 -- to unchecked conversion, and these are most conveniently performed
6949 -- in the specialized back-end.
6950
6951 -- To accommodate this requirement, for such back ends, the following
6952 -- special node is generated recording an unchecked conversion that
6953 -- needs to be validated. The back end should post an appropriate
6954 -- error message if the unchecked conversion is invalid or warrants
6955 -- a special warning message.
6956
6957 -- Source_Type and Target_Type point to the entities for the two
6958 -- types involved in the unchecked conversion instantiation that
6959 -- is to be validated.
6960
6961 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6962
6963 -- N_Validate_Unchecked_Conversion
6964 -- Sloc points to instantiation (location for warning message)
6965 -- Source_Type (Node1-Sem)
6966 -- Target_Type (Node2-Sem)
6967
6968 -- Note: in the case where a debug source file is generated, the Sloc
6969 -- for this node points to the VALIDATE keyword in the file output.
6970
6971 -----------
6972 -- Empty --
6973 -----------
6974
6975 -- Used as the contents of the Nkind field of the dummy Empty node
6976 -- and in some other situations to indicate an uninitialized value.
6977
6978 -- N_Empty
6979 -- Chars (Name1) is set to No_Name
6980
6981 -----------
6982 -- Error --
6983 -----------
6984
6985 -- Used as the contents of the Nkind field of the dummy Error node.
6986 -- Has an Etype field, which gets set to Any_Type later on, to help
6987 -- error recovery (Error_Posted is also set in the Error node).
6988
6989 -- N_Error
6990 -- Chars (Name1) is set to Error_Name
6991 -- Etype (Node5-Sem)
6992
6993 --------------------------
6994 -- Node Type Definition --
6995 --------------------------
6996
6997 -- The following is the definition of the Node_Kind type. As previously
6998 -- discussed, this is separated off to allow rearrangement of the order
6999 -- to facilitate definition of subtype ranges. The comments show the
7000 -- subtype classes which apply to each set of node kinds. The first
7001 -- entry in the comment characterizes the following list of nodes.
7002
7003 type Node_Kind is (
7004 N_Unused_At_Start,
7005
7006 -- N_Representation_Clause
7007
7008 N_At_Clause,
7009 N_Component_Clause,
7010 N_Enumeration_Representation_Clause,
7011 N_Mod_Clause,
7012 N_Record_Representation_Clause,
7013
7014 -- N_Representation_Clause, N_Has_Chars
7015
7016 N_Attribute_Definition_Clause,
7017
7018 -- N_Has_Chars
7019
7020 N_Empty,
7021 N_Pragma_Argument_Association,
7022
7023 -- N_Has_Etype
7024
7025 N_Error,
7026
7027 -- N_Entity, N_Has_Etype, N_Has_Chars
7028
7029 N_Defining_Character_Literal,
7030 N_Defining_Identifier,
7031 N_Defining_Operator_Symbol,
7032
7033 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7034
7035 N_Expanded_Name,
7036
7037 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7038 -- N_Has_Chars, N_Has_Entity
7039
7040 N_Identifier,
7041 N_Operator_Symbol,
7042
7043 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7044 -- N_Has_Chars, N_Has_Entity
7045
7046 N_Character_Literal,
7047
7048 -- N_Binary_Op, N_Op, N_Subexpr,
7049 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7050
7051 N_Op_Add,
7052 N_Op_Concat,
7053 N_Op_Expon,
7054 N_Op_Subtract,
7055
7056 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7057 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7058
7059 N_Op_Divide,
7060 N_Op_Mod,
7061 N_Op_Multiply,
7062 N_Op_Rem,
7063
7064 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7065 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7066
7067 N_Op_And,
7068
7069 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7070 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7071
7072 N_Op_Eq,
7073 N_Op_Ge,
7074 N_Op_Gt,
7075 N_Op_Le,
7076 N_Op_Lt,
7077 N_Op_Ne,
7078
7079 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7080 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7081
7082 N_Op_Or,
7083 N_Op_Xor,
7084
7085 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7086 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7087
7088 N_Op_Rotate_Left,
7089 N_Op_Rotate_Right,
7090 N_Op_Shift_Left,
7091 N_Op_Shift_Right,
7092 N_Op_Shift_Right_Arithmetic,
7093
7094 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7095 -- N_Has_Chars, N_Has_Entity
7096
7097 N_Op_Abs,
7098 N_Op_Minus,
7099 N_Op_Not,
7100 N_Op_Plus,
7101
7102 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7103
7104 N_Attribute_Reference,
7105
7106 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7107
7108 N_In,
7109 N_Not_In,
7110
7111 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7112
7113 N_And_Then,
7114 N_Or_Else,
7115
7116 -- N_Subexpr, N_Has_Etype
7117
7118 N_Conditional_Expression,
7119 N_Explicit_Dereference,
7120 N_Function_Call,
7121 N_Indexed_Component,
7122 N_Integer_Literal,
7123 N_Null,
7124 N_Procedure_Call_Statement,
7125 N_Qualified_Expression,
7126
7127 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7128
7129 N_Raise_Constraint_Error,
7130 N_Raise_Program_Error,
7131 N_Raise_Storage_Error,
7132
7133 -- N_Subexpr, N_Has_Etype
7134
7135 N_Aggregate,
7136 N_Allocator,
7137 N_Extension_Aggregate,
7138 N_Range,
7139 N_Real_Literal,
7140 N_Reference,
7141 N_Selected_Component,
7142 N_Slice,
7143 N_String_Literal,
7144 N_Subprogram_Info,
7145 N_Type_Conversion,
7146 N_Unchecked_Expression,
7147 N_Unchecked_Type_Conversion,
7148
7149 -- N_Has_Etype
7150
7151 N_Subtype_Indication,
7152
7153 -- N_Declaration
7154
7155 N_Component_Declaration,
7156 N_Entry_Declaration,
7157 N_Formal_Object_Declaration,
7158 N_Formal_Type_Declaration,
7159 N_Full_Type_Declaration,
7160 N_Incomplete_Type_Declaration,
7161 N_Loop_Parameter_Specification,
7162 N_Object_Declaration,
7163 N_Protected_Type_Declaration,
7164 N_Private_Extension_Declaration,
7165 N_Private_Type_Declaration,
7166 N_Subtype_Declaration,
7167
7168 -- N_Subprogram_Specification, N_Declaration
7169
7170 N_Function_Specification,
7171 N_Procedure_Specification,
7172
7173 -- N_Access_To_Subprogram_Definition
7174
7175 N_Access_Function_Definition,
7176 N_Access_Procedure_Definition,
7177
7178 -- N_Later_Decl_Item
7179
7180 N_Task_Type_Declaration,
7181
7182 -- N_Body_Stub, N_Later_Decl_Item
7183
7184 N_Package_Body_Stub,
7185 N_Protected_Body_Stub,
7186 N_Subprogram_Body_Stub,
7187 N_Task_Body_Stub,
7188
7189 -- N_Generic_Instantiation, N_Later_Decl_Item
7190 -- N_Subprogram_Instantiation
7191
7192 N_Function_Instantiation,
7193 N_Procedure_Instantiation,
7194
7195 -- N_Generic_Instantiation, N_Later_Decl_Item
7196
7197 N_Package_Instantiation,
7198
7199 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7200
7201 N_Package_Body,
7202 N_Subprogram_Body,
7203
7204 -- N_Later_Decl_Item, N_Proper_Body
7205
7206 N_Protected_Body,
7207 N_Task_Body,
7208
7209 -- N_Later_Decl_Item
7210
7211 N_Implicit_Label_Declaration,
7212 N_Package_Declaration,
7213 N_Single_Task_Declaration,
7214 N_Subprogram_Declaration,
7215 N_Use_Package_Clause,
7216
7217 -- N_Generic_Declaration, N_Later_Decl_Item
7218
7219 N_Generic_Package_Declaration,
7220 N_Generic_Subprogram_Declaration,
7221
7222 -- N_Array_Type_Definition
7223
7224 N_Constrained_Array_Definition,
7225 N_Unconstrained_Array_Definition,
7226
7227 -- N_Renaming_Declaration
7228
7229 N_Exception_Renaming_Declaration,
7230 N_Object_Renaming_Declaration,
7231 N_Package_Renaming_Declaration,
7232 N_Subprogram_Renaming_Declaration,
7233
7234 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7235
7236 N_Generic_Function_Renaming_Declaration,
7237 N_Generic_Package_Renaming_Declaration,
7238 N_Generic_Procedure_Renaming_Declaration,
7239
7240 -- N_Statement_Other_Than_Procedure_Call
7241
7242 N_Abort_Statement,
7243 N_Accept_Statement,
7244 N_Assignment_Statement,
7245 N_Asynchronous_Select,
7246 N_Block_Statement,
7247 N_Case_Statement,
7248 N_Code_Statement,
7249 N_Conditional_Entry_Call,
7250
7251 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7252
7253 N_Delay_Relative_Statement,
7254 N_Delay_Until_Statement,
7255
7256 -- N_Statement_Other_Than_Procedure_Call
7257
7258 N_Entry_Call_Statement,
7259 N_Free_Statement,
7260 N_Goto_Statement,
7261 N_Loop_Statement,
7262 N_Null_Statement,
7263 N_Raise_Statement,
7264 N_Requeue_Statement,
7265 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7266 N_Extended_Return_Statement,
7267 N_Selective_Accept,
7268 N_Timed_Entry_Call,
7269
7270 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7271
7272 N_Exit_Statement,
7273 N_If_Statement,
7274
7275 -- N_Has_Condition
7276
7277 N_Accept_Alternative,
7278 N_Delay_Alternative,
7279 N_Elsif_Part,
7280 N_Entry_Body_Formal_Part,
7281 N_Iteration_Scheme,
7282 N_Terminate_Alternative,
7283
7284 -- N_Formal_Subprogram_Declaration
7285
7286 N_Formal_Abstract_Subprogram_Declaration,
7287 N_Formal_Concrete_Subprogram_Declaration,
7288
7289 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7290
7291 N_Push_Constraint_Error_Label,
7292 N_Push_Program_Error_Label,
7293 N_Push_Storage_Error_Label,
7294
7295 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7296
7297 N_Pop_Constraint_Error_Label,
7298 N_Pop_Program_Error_Label,
7299 N_Pop_Storage_Error_Label,
7300
7301 -- Other nodes (not part of any subtype class)
7302
7303 N_Abortable_Part,
7304 N_Abstract_Subprogram_Declaration,
7305 N_Access_Definition,
7306 N_Access_To_Object_Definition,
7307 N_Case_Statement_Alternative,
7308 N_Compilation_Unit,
7309 N_Compilation_Unit_Aux,
7310 N_Component_Association,
7311 N_Component_Definition,
7312 N_Component_List,
7313 N_Derived_Type_Definition,
7314 N_Decimal_Fixed_Point_Definition,
7315 N_Defining_Program_Unit_Name,
7316 N_Delta_Constraint,
7317 N_Designator,
7318 N_Digits_Constraint,
7319 N_Discriminant_Association,
7320 N_Discriminant_Specification,
7321 N_Enumeration_Type_Definition,
7322 N_Entry_Body,
7323 N_Entry_Call_Alternative,
7324 N_Entry_Index_Specification,
7325 N_Exception_Declaration,
7326 N_Exception_Handler,
7327 N_Floating_Point_Definition,
7328 N_Formal_Decimal_Fixed_Point_Definition,
7329 N_Formal_Derived_Type_Definition,
7330 N_Formal_Discrete_Type_Definition,
7331 N_Formal_Floating_Point_Definition,
7332 N_Formal_Modular_Type_Definition,
7333 N_Formal_Ordinary_Fixed_Point_Definition,
7334 N_Formal_Package_Declaration,
7335 N_Formal_Private_Type_Definition,
7336 N_Formal_Signed_Integer_Type_Definition,
7337 N_Freeze_Entity,
7338 N_Generic_Association,
7339 N_Handled_Sequence_Of_Statements,
7340 N_Index_Or_Discriminant_Constraint,
7341 N_Itype_Reference,
7342 N_Label,
7343 N_Modular_Type_Definition,
7344 N_Number_Declaration,
7345 N_Ordinary_Fixed_Point_Definition,
7346 N_Others_Choice,
7347 N_Package_Specification,
7348 N_Parameter_Association,
7349 N_Parameter_Specification,
7350 N_Pragma,
7351 N_Protected_Definition,
7352 N_Range_Constraint,
7353 N_Real_Range_Specification,
7354 N_Record_Definition,
7355 N_Signed_Integer_Type_Definition,
7356 N_Single_Protected_Declaration,
7357 N_Subunit,
7358 N_Task_Definition,
7359 N_Triggering_Alternative,
7360 N_Use_Type_Clause,
7361 N_Validate_Unchecked_Conversion,
7362 N_Variant,
7363 N_Variant_Part,
7364 N_With_Clause,
7365 N_Unused_At_End);
7366
7367 for Node_Kind'Size use 8;
7368 -- The data structures in Atree assume this!
7369
7370 ----------------------------
7371 -- Node Class Definitions --
7372 ----------------------------
7373
7374 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7375 N_Access_Function_Definition ..
7376 N_Access_Procedure_Definition;
7377
7378 subtype N_Array_Type_Definition is Node_Kind range
7379 N_Constrained_Array_Definition ..
7380 N_Unconstrained_Array_Definition;
7381
7382 subtype N_Binary_Op is Node_Kind range
7383 N_Op_Add ..
7384 N_Op_Shift_Right_Arithmetic;
7385
7386 subtype N_Body_Stub is Node_Kind range
7387 N_Package_Body_Stub ..
7388 N_Task_Body_Stub;
7389
7390 subtype N_Declaration is Node_Kind range
7391 N_Component_Declaration ..
7392 N_Procedure_Specification;
7393 -- Note: this includes all constructs normally thought of as declarations
7394 -- except those which are separately grouped as later declarations.
7395
7396 subtype N_Delay_Statement is Node_Kind range
7397 N_Delay_Relative_Statement ..
7398 N_Delay_Until_Statement;
7399
7400 subtype N_Direct_Name is Node_Kind range
7401 N_Identifier ..
7402 N_Character_Literal;
7403
7404 subtype N_Entity is Node_Kind range
7405 N_Defining_Character_Literal ..
7406 N_Defining_Operator_Symbol;
7407
7408 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7409 N_Formal_Abstract_Subprogram_Declaration ..
7410 N_Formal_Concrete_Subprogram_Declaration;
7411
7412 subtype N_Generic_Declaration is Node_Kind range
7413 N_Generic_Package_Declaration ..
7414 N_Generic_Subprogram_Declaration;
7415
7416 subtype N_Generic_Instantiation is Node_Kind range
7417 N_Function_Instantiation ..
7418 N_Package_Instantiation;
7419
7420 subtype N_Generic_Renaming_Declaration is Node_Kind range
7421 N_Generic_Function_Renaming_Declaration ..
7422 N_Generic_Procedure_Renaming_Declaration;
7423
7424 subtype N_Has_Chars is Node_Kind range
7425 N_Attribute_Definition_Clause ..
7426 N_Op_Plus;
7427
7428 subtype N_Has_Entity is Node_Kind range
7429 N_Expanded_Name ..
7430 N_Attribute_Reference;
7431 -- Nodes that have Entity fields
7432 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7433
7434 -- Warning: DOES NOT INCLUDE N_Null_Assignment because it not always
7435 -- available. The Entity attribute is only available in Scil nodes
7436 -- (that is, N_Null_Assignment nodes that have Is_Scil_Node set to true).
7437 -- Processing such nodes never requires testing if the node is in
7438 -- N_Has_Entity node kind.
7439
7440 subtype N_Has_Etype is Node_Kind range
7441 N_Error ..
7442 N_Subtype_Indication;
7443
7444 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7445 N_Op_Divide ..
7446 N_Op_Rem;
7447
7448 subtype N_Multiplying_Operator is Node_Kind range
7449 N_Op_Divide ..
7450 N_Op_Rem;
7451
7452 subtype N_Later_Decl_Item is Node_Kind range
7453 N_Task_Type_Declaration ..
7454 N_Generic_Subprogram_Declaration;
7455 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7456 -- includes only those items which can appear as later declarative
7457 -- items. This also includes N_Implicit_Label_Declaration which is
7458 -- not specifically in the grammar but may appear as a valid later
7459 -- declarative items. It does NOT include N_Pragma which can also
7460 -- appear among later declarative items. It does however include
7461 -- N_Protected_Body, which is a bit peculiar, but harmless since
7462 -- this cannot appear in Ada 83 mode anyway.
7463
7464 subtype N_Membership_Test is Node_Kind range
7465 N_In ..
7466 N_Not_In;
7467
7468 subtype N_Op is Node_Kind range
7469 N_Op_Add ..
7470 N_Op_Plus;
7471
7472 subtype N_Op_Boolean is Node_Kind range
7473 N_Op_And ..
7474 N_Op_Xor;
7475 -- Binary operators which take operands of a boolean type, and yield
7476 -- a result of a boolean type.
7477
7478 subtype N_Op_Compare is Node_Kind range
7479 N_Op_Eq ..
7480 N_Op_Ne;
7481
7482 subtype N_Op_Shift is Node_Kind range
7483 N_Op_Rotate_Left ..
7484 N_Op_Shift_Right_Arithmetic;
7485
7486 subtype N_Proper_Body is Node_Kind range
7487 N_Package_Body ..
7488 N_Task_Body;
7489
7490 subtype N_Push_xxx_Label is Node_Kind range
7491 N_Push_Constraint_Error_Label ..
7492 N_Push_Storage_Error_Label;
7493
7494 subtype N_Pop_xxx_Label is Node_Kind range
7495 N_Pop_Constraint_Error_Label ..
7496 N_Pop_Storage_Error_Label;
7497
7498 subtype N_Push_Pop_xxx_Label is Node_Kind range
7499 N_Push_Constraint_Error_Label ..
7500 N_Pop_Storage_Error_Label;
7501
7502 subtype N_Raise_xxx_Error is Node_Kind range
7503 N_Raise_Constraint_Error ..
7504 N_Raise_Storage_Error;
7505
7506 subtype N_Renaming_Declaration is Node_Kind range
7507 N_Exception_Renaming_Declaration ..
7508 N_Generic_Procedure_Renaming_Declaration;
7509
7510 subtype N_Representation_Clause is Node_Kind range
7511 N_At_Clause ..
7512 N_Attribute_Definition_Clause;
7513
7514 subtype N_Short_Circuit is Node_Kind range
7515 N_And_Then ..
7516 N_Or_Else;
7517
7518 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7519 N_Abort_Statement ..
7520 N_If_Statement;
7521 -- Note that this includes all statement types except for the cases of the
7522 -- N_Procedure_Call_Statement which is considered to be a subexpression
7523 -- (since overloading is possible, so it needs to go through the normal
7524 -- overloading resolution for expressions).
7525
7526 subtype N_Subprogram_Instantiation is Node_Kind range
7527 N_Function_Instantiation ..
7528 N_Procedure_Instantiation;
7529
7530 subtype N_Has_Condition is Node_Kind range
7531 N_Exit_Statement ..
7532 N_Terminate_Alternative;
7533 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7534
7535 subtype N_Subexpr is Node_Kind range
7536 N_Expanded_Name ..
7537 N_Unchecked_Type_Conversion;
7538 -- Nodes with expression fields
7539
7540 subtype N_Subprogram_Specification is Node_Kind range
7541 N_Function_Specification ..
7542 N_Procedure_Specification;
7543
7544 subtype N_Unary_Op is Node_Kind range
7545 N_Op_Abs ..
7546 N_Op_Plus;
7547
7548 subtype N_Unit_Body is Node_Kind range
7549 N_Package_Body ..
7550 N_Subprogram_Body;
7551
7552 ---------------------------
7553 -- Node Access Functions --
7554 ---------------------------
7555
7556 -- The following functions return the contents of the indicated field of
7557 -- the node referenced by the argument, which is a Node_Id. They provide
7558 -- logical access to fields in the node which could be accessed using the
7559 -- Atree.Unchecked_Access package, but the idea is always to use these
7560 -- higher level routines which preserve strong typing. In debug mode,
7561 -- these routines check that they are being applied to an appropriate
7562 -- node, as well as checking that the node is in range.
7563
7564 function ABE_Is_Certain
7565 (N : Node_Id) return Boolean; -- Flag18
7566
7567 function Abort_Present
7568 (N : Node_Id) return Boolean; -- Flag15
7569
7570 function Abortable_Part
7571 (N : Node_Id) return Node_Id; -- Node2
7572
7573 function Abstract_Present
7574 (N : Node_Id) return Boolean; -- Flag4
7575
7576 function Accept_Handler_Records
7577 (N : Node_Id) return List_Id; -- List5
7578
7579 function Accept_Statement
7580 (N : Node_Id) return Node_Id; -- Node2
7581
7582 function Access_Definition
7583 (N : Node_Id) return Node_Id; -- Node3
7584
7585 function Access_To_Subprogram_Definition
7586 (N : Node_Id) return Node_Id; -- Node3
7587
7588 function Access_Types_To_Process
7589 (N : Node_Id) return Elist_Id; -- Elist2
7590
7591 function Actions
7592 (N : Node_Id) return List_Id; -- List1
7593
7594 function Activation_Chain_Entity
7595 (N : Node_Id) return Node_Id; -- Node3
7596
7597 function Acts_As_Spec
7598 (N : Node_Id) return Boolean; -- Flag4
7599
7600 function Actual_Designated_Subtype
7601 (N : Node_Id) return Node_Id; -- Node4
7602
7603 function Address_Warning_Posted
7604 (N : Node_Id) return Boolean; -- Flag18
7605
7606 function Aggregate_Bounds
7607 (N : Node_Id) return Node_Id; -- Node3
7608
7609 function Aliased_Present
7610 (N : Node_Id) return Boolean; -- Flag4
7611
7612 function All_Others
7613 (N : Node_Id) return Boolean; -- Flag11
7614
7615 function All_Present
7616 (N : Node_Id) return Boolean; -- Flag15
7617
7618 function Alternatives
7619 (N : Node_Id) return List_Id; -- List4
7620
7621 function Ancestor_Part
7622 (N : Node_Id) return Node_Id; -- Node3
7623
7624 function Array_Aggregate
7625 (N : Node_Id) return Node_Id; -- Node3
7626
7627 function Assignment_OK
7628 (N : Node_Id) return Boolean; -- Flag15
7629
7630 function Associated_Node
7631 (N : Node_Id) return Node_Id; -- Node4
7632
7633 function At_End_Proc
7634 (N : Node_Id) return Node_Id; -- Node1
7635
7636 function Attribute_Name
7637 (N : Node_Id) return Name_Id; -- Name2
7638
7639 function Aux_Decls_Node
7640 (N : Node_Id) return Node_Id; -- Node5
7641
7642 function Backwards_OK
7643 (N : Node_Id) return Boolean; -- Flag6
7644
7645 function Bad_Is_Detected
7646 (N : Node_Id) return Boolean; -- Flag15
7647
7648 function By_Ref
7649 (N : Node_Id) return Boolean; -- Flag5
7650
7651 function Body_Required
7652 (N : Node_Id) return Boolean; -- Flag13
7653
7654 function Body_To_Inline
7655 (N : Node_Id) return Node_Id; -- Node3
7656
7657 function Box_Present
7658 (N : Node_Id) return Boolean; -- Flag15
7659
7660 function Char_Literal_Value
7661 (N : Node_Id) return Uint; -- Uint2
7662
7663 function Chars
7664 (N : Node_Id) return Name_Id; -- Name1
7665
7666 function Check_Address_Alignment
7667 (N : Node_Id) return Boolean; -- Flag11
7668
7669 function Choice_Parameter
7670 (N : Node_Id) return Node_Id; -- Node2
7671
7672 function Choices
7673 (N : Node_Id) return List_Id; -- List1
7674
7675 function Coextensions
7676 (N : Node_Id) return Elist_Id; -- Elist4
7677
7678 function Comes_From_Extended_Return_Statement
7679 (N : Node_Id) return Boolean; -- Flag18
7680
7681 function Compile_Time_Known_Aggregate
7682 (N : Node_Id) return Boolean; -- Flag18
7683
7684 function Component_Associations
7685 (N : Node_Id) return List_Id; -- List2
7686
7687 function Component_Clauses
7688 (N : Node_Id) return List_Id; -- List3
7689
7690 function Component_Definition
7691 (N : Node_Id) return Node_Id; -- Node4
7692
7693 function Component_Items
7694 (N : Node_Id) return List_Id; -- List3
7695
7696 function Component_List
7697 (N : Node_Id) return Node_Id; -- Node1
7698
7699 function Component_Name
7700 (N : Node_Id) return Node_Id; -- Node1
7701
7702 function Componentwise_Assignment
7703 (N : Node_Id) return Boolean; -- Flag14
7704
7705 function Condition
7706 (N : Node_Id) return Node_Id; -- Node1
7707
7708 function Condition_Actions
7709 (N : Node_Id) return List_Id; -- List3
7710
7711 function Config_Pragmas
7712 (N : Node_Id) return List_Id; -- List4
7713
7714 function Constant_Present
7715 (N : Node_Id) return Boolean; -- Flag17
7716
7717 function Constraint
7718 (N : Node_Id) return Node_Id; -- Node3
7719
7720 function Constraints
7721 (N : Node_Id) return List_Id; -- List1
7722
7723 function Context_Installed
7724 (N : Node_Id) return Boolean; -- Flag13
7725
7726 function Context_Pending
7727 (N : Node_Id) return Boolean; -- Flag16
7728
7729 function Context_Items
7730 (N : Node_Id) return List_Id; -- List1
7731
7732 function Controlling_Argument
7733 (N : Node_Id) return Node_Id; -- Node1
7734
7735 function Conversion_OK
7736 (N : Node_Id) return Boolean; -- Flag14
7737
7738 function Corresponding_Body
7739 (N : Node_Id) return Node_Id; -- Node5
7740
7741 function Corresponding_Formal_Spec
7742 (N : Node_Id) return Node_Id; -- Node3
7743
7744 function Corresponding_Generic_Association
7745 (N : Node_Id) return Node_Id; -- Node5
7746
7747 function Corresponding_Integer_Value
7748 (N : Node_Id) return Uint; -- Uint4
7749
7750 function Corresponding_Spec
7751 (N : Node_Id) return Node_Id; -- Node5
7752
7753 function Corresponding_Stub
7754 (N : Node_Id) return Node_Id; -- Node3
7755
7756 function Dcheck_Function
7757 (N : Node_Id) return Entity_Id; -- Node5
7758
7759 function Debug_Statement
7760 (N : Node_Id) return Node_Id; -- Node3
7761
7762 function Declarations
7763 (N : Node_Id) return List_Id; -- List2
7764
7765 function Default_Expression
7766 (N : Node_Id) return Node_Id; -- Node5
7767
7768 function Default_Name
7769 (N : Node_Id) return Node_Id; -- Node2
7770
7771 function Defining_Identifier
7772 (N : Node_Id) return Entity_Id; -- Node1
7773
7774 function Defining_Unit_Name
7775 (N : Node_Id) return Node_Id; -- Node1
7776
7777 function Delay_Alternative
7778 (N : Node_Id) return Node_Id; -- Node4
7779
7780 function Delay_Statement
7781 (N : Node_Id) return Node_Id; -- Node2
7782
7783 function Delta_Expression
7784 (N : Node_Id) return Node_Id; -- Node3
7785
7786 function Digits_Expression
7787 (N : Node_Id) return Node_Id; -- Node2
7788
7789 function Discr_Check_Funcs_Built
7790 (N : Node_Id) return Boolean; -- Flag11
7791
7792 function Discrete_Choices
7793 (N : Node_Id) return List_Id; -- List4
7794
7795 function Discrete_Range
7796 (N : Node_Id) return Node_Id; -- Node4
7797
7798 function Discrete_Subtype_Definition
7799 (N : Node_Id) return Node_Id; -- Node4
7800
7801 function Discrete_Subtype_Definitions
7802 (N : Node_Id) return List_Id; -- List2
7803
7804 function Discriminant_Specifications
7805 (N : Node_Id) return List_Id; -- List4
7806
7807 function Discriminant_Type
7808 (N : Node_Id) return Node_Id; -- Node5
7809
7810 function Do_Accessibility_Check
7811 (N : Node_Id) return Boolean; -- Flag13
7812
7813 function Do_Discriminant_Check
7814 (N : Node_Id) return Boolean; -- Flag13
7815
7816 function Do_Division_Check
7817 (N : Node_Id) return Boolean; -- Flag13
7818
7819 function Do_Length_Check
7820 (N : Node_Id) return Boolean; -- Flag4
7821
7822 function Do_Overflow_Check
7823 (N : Node_Id) return Boolean; -- Flag17
7824
7825 function Do_Range_Check
7826 (N : Node_Id) return Boolean; -- Flag9
7827
7828 function Do_Storage_Check
7829 (N : Node_Id) return Boolean; -- Flag17
7830
7831 function Do_Tag_Check
7832 (N : Node_Id) return Boolean; -- Flag13
7833
7834 function Elaborate_All_Desirable
7835 (N : Node_Id) return Boolean; -- Flag9
7836
7837 function Elaborate_All_Present
7838 (N : Node_Id) return Boolean; -- Flag14
7839
7840 function Elaborate_Desirable
7841 (N : Node_Id) return Boolean; -- Flag11
7842
7843 function Elaborate_Present
7844 (N : Node_Id) return Boolean; -- Flag4
7845
7846 function Elaboration_Boolean
7847 (N : Node_Id) return Node_Id; -- Node2
7848
7849 function Else_Actions
7850 (N : Node_Id) return List_Id; -- List3
7851
7852 function Else_Statements
7853 (N : Node_Id) return List_Id; -- List4
7854
7855 function Elsif_Parts
7856 (N : Node_Id) return List_Id; -- List3
7857
7858 function Enclosing_Variant
7859 (N : Node_Id) return Node_Id; -- Node2
7860
7861 function End_Label
7862 (N : Node_Id) return Node_Id; -- Node4
7863
7864 function End_Span
7865 (N : Node_Id) return Uint; -- Uint5
7866
7867 function Entity
7868 (N : Node_Id) return Node_Id; -- Node4
7869
7870 function Entity_Or_Associated_Node
7871 (N : Node_Id) return Node_Id; -- Node4
7872
7873 function Entry_Body_Formal_Part
7874 (N : Node_Id) return Node_Id; -- Node5
7875
7876 function Entry_Call_Alternative
7877 (N : Node_Id) return Node_Id; -- Node1
7878
7879 function Entry_Call_Statement
7880 (N : Node_Id) return Node_Id; -- Node1
7881
7882 function Entry_Direct_Name
7883 (N : Node_Id) return Node_Id; -- Node1
7884
7885 function Entry_Index
7886 (N : Node_Id) return Node_Id; -- Node5
7887
7888 function Entry_Index_Specification
7889 (N : Node_Id) return Node_Id; -- Node4
7890
7891 function Etype
7892 (N : Node_Id) return Node_Id; -- Node5
7893
7894 function Exception_Choices
7895 (N : Node_Id) return List_Id; -- List4
7896
7897 function Exception_Handlers
7898 (N : Node_Id) return List_Id; -- List5
7899
7900 function Exception_Junk
7901 (N : Node_Id) return Boolean; -- Flag8
7902
7903 function Exception_Label
7904 (N : Node_Id) return Node_Id; -- Node5
7905
7906 function Explicit_Actual_Parameter
7907 (N : Node_Id) return Node_Id; -- Node3
7908
7909 function Expansion_Delayed
7910 (N : Node_Id) return Boolean; -- Flag11
7911
7912 function Explicit_Generic_Actual_Parameter
7913 (N : Node_Id) return Node_Id; -- Node1
7914
7915 function Expression
7916 (N : Node_Id) return Node_Id; -- Node3
7917
7918 function Expressions
7919 (N : Node_Id) return List_Id; -- List1
7920
7921 function First_Bit
7922 (N : Node_Id) return Node_Id; -- Node3
7923
7924 function First_Inlined_Subprogram
7925 (N : Node_Id) return Entity_Id; -- Node3
7926
7927 function First_Name
7928 (N : Node_Id) return Boolean; -- Flag5
7929
7930 function First_Named_Actual
7931 (N : Node_Id) return Node_Id; -- Node4
7932
7933 function First_Real_Statement
7934 (N : Node_Id) return Node_Id; -- Node2
7935
7936 function First_Subtype_Link
7937 (N : Node_Id) return Entity_Id; -- Node5
7938
7939 function Float_Truncate
7940 (N : Node_Id) return Boolean; -- Flag11
7941
7942 function Formal_Type_Definition
7943 (N : Node_Id) return Node_Id; -- Node3
7944
7945 function Forwards_OK
7946 (N : Node_Id) return Boolean; -- Flag5
7947
7948 function From_At_End
7949 (N : Node_Id) return Boolean; -- Flag4
7950
7951 function From_At_Mod
7952 (N : Node_Id) return Boolean; -- Flag4
7953
7954 function From_Default
7955 (N : Node_Id) return Boolean; -- Flag6
7956
7957 function Generic_Associations
7958 (N : Node_Id) return List_Id; -- List3
7959
7960 function Generic_Formal_Declarations
7961 (N : Node_Id) return List_Id; -- List2
7962
7963 function Generic_Parent
7964 (N : Node_Id) return Node_Id; -- Node5
7965
7966 function Generic_Parent_Type
7967 (N : Node_Id) return Node_Id; -- Node4
7968
7969 function Handled_Statement_Sequence
7970 (N : Node_Id) return Node_Id; -- Node4
7971
7972 function Handler_List_Entry
7973 (N : Node_Id) return Node_Id; -- Node2
7974
7975 function Has_Created_Identifier
7976 (N : Node_Id) return Boolean; -- Flag15
7977
7978 function Has_Dynamic_Length_Check
7979 (N : Node_Id) return Boolean; -- Flag10
7980
7981 function Has_Dynamic_Range_Check
7982 (N : Node_Id) return Boolean; -- Flag12
7983
7984 function Has_Init_Expression
7985 (N : Node_Id) return Boolean; -- Flag14
7986
7987 function Has_Local_Raise
7988 (N : Node_Id) return Boolean; -- Flag8
7989
7990 function Has_No_Elaboration_Code
7991 (N : Node_Id) return Boolean; -- Flag17
7992
7993 function Has_Priority_Pragma
7994 (N : Node_Id) return Boolean; -- Flag6
7995
7996 function Has_Private_View
7997 (N : Node_Id) return Boolean; -- Flag11
7998
7999 function Has_Relative_Deadline_Pragma
8000 (N : Node_Id) return Boolean; -- Flag9
8001
8002 function Has_Self_Reference
8003 (N : Node_Id) return Boolean; -- Flag13
8004
8005 function Has_Storage_Size_Pragma
8006 (N : Node_Id) return Boolean; -- Flag5
8007
8008 function Has_Task_Info_Pragma
8009 (N : Node_Id) return Boolean; -- Flag7
8010
8011 function Has_Task_Name_Pragma
8012 (N : Node_Id) return Boolean; -- Flag8
8013
8014 function Has_Wide_Character
8015 (N : Node_Id) return Boolean; -- Flag11
8016
8017 function Hidden_By_Use_Clause
8018 (N : Node_Id) return Elist_Id; -- Elist4
8019
8020 function High_Bound
8021 (N : Node_Id) return Node_Id; -- Node2
8022
8023 function Identifier
8024 (N : Node_Id) return Node_Id; -- Node1
8025
8026 function Interface_List
8027 (N : Node_Id) return List_Id; -- List2
8028
8029 function Interface_Present
8030 (N : Node_Id) return Boolean; -- Flag16
8031
8032 function Implicit_With
8033 (N : Node_Id) return Boolean; -- Flag16
8034
8035 function In_Present
8036 (N : Node_Id) return Boolean; -- Flag15
8037
8038 function Includes_Infinities
8039 (N : Node_Id) return Boolean; -- Flag11
8040
8041 function Instance_Spec
8042 (N : Node_Id) return Node_Id; -- Node5
8043
8044 function Intval
8045 (N : Node_Id) return Uint; -- Uint3
8046
8047 function Is_Asynchronous_Call_Block
8048 (N : Node_Id) return Boolean; -- Flag7
8049
8050 function Is_Component_Left_Opnd
8051 (N : Node_Id) return Boolean; -- Flag13
8052
8053 function Is_Component_Right_Opnd
8054 (N : Node_Id) return Boolean; -- Flag14
8055
8056 function Is_Controlling_Actual
8057 (N : Node_Id) return Boolean; -- Flag16
8058
8059 function Is_Dynamic_Coextension
8060 (N : Node_Id) return Boolean; -- Flag18
8061
8062 function Is_Elsif
8063 (N : Node_Id) return Boolean; -- Flag13
8064
8065 function Is_Entry_Barrier_Function
8066 (N : Node_Id) return Boolean; -- Flag8
8067
8068 function Is_Expanded_Build_In_Place_Call
8069 (N : Node_Id) return Boolean; -- Flag11
8070
8071 function Is_Folded_In_Parser
8072 (N : Node_Id) return Boolean; -- Flag4
8073
8074 function Is_In_Discriminant_Check
8075 (N : Node_Id) return Boolean; -- Flag11
8076
8077 function Is_Machine_Number
8078 (N : Node_Id) return Boolean; -- Flag11
8079
8080 function Is_Null_Loop
8081 (N : Node_Id) return Boolean; -- Flag16
8082
8083 function Is_Overloaded
8084 (N : Node_Id) return Boolean; -- Flag5
8085
8086 function Is_Power_Of_2_For_Shift
8087 (N : Node_Id) return Boolean; -- Flag13
8088
8089 function Is_Protected_Subprogram_Body
8090 (N : Node_Id) return Boolean; -- Flag7
8091
8092 function Is_Scil_Node
8093 (N : Node_Id) return Boolean; -- Flag4
8094
8095 function Is_Static_Coextension
8096 (N : Node_Id) return Boolean; -- Flag14
8097
8098 function Is_Static_Expression
8099 (N : Node_Id) return Boolean; -- Flag6
8100
8101 function Is_Subprogram_Descriptor
8102 (N : Node_Id) return Boolean; -- Flag16
8103
8104 function Is_Task_Allocation_Block
8105 (N : Node_Id) return Boolean; -- Flag6
8106
8107 function Is_Task_Master
8108 (N : Node_Id) return Boolean; -- Flag5
8109
8110 function Iteration_Scheme
8111 (N : Node_Id) return Node_Id; -- Node2
8112
8113 function Itype
8114 (N : Node_Id) return Entity_Id; -- Node1
8115
8116 function Kill_Range_Check
8117 (N : Node_Id) return Boolean; -- Flag11
8118
8119 function Label_Construct
8120 (N : Node_Id) return Node_Id; -- Node2
8121
8122 function Left_Opnd
8123 (N : Node_Id) return Node_Id; -- Node2
8124
8125 function Last_Bit
8126 (N : Node_Id) return Node_Id; -- Node4
8127
8128 function Last_Name
8129 (N : Node_Id) return Boolean; -- Flag6
8130
8131 function Library_Unit
8132 (N : Node_Id) return Node_Id; -- Node4
8133
8134 function Limited_View_Installed
8135 (N : Node_Id) return Boolean; -- Flag18
8136
8137 function Limited_Present
8138 (N : Node_Id) return Boolean; -- Flag17
8139
8140 function Literals
8141 (N : Node_Id) return List_Id; -- List1
8142
8143 function Local_Raise_Not_OK
8144 (N : Node_Id) return Boolean; -- Flag7
8145
8146 function Local_Raise_Statements
8147 (N : Node_Id) return Elist_Id; -- Elist1
8148
8149 function Loop_Actions
8150 (N : Node_Id) return List_Id; -- List2
8151
8152 function Loop_Parameter_Specification
8153 (N : Node_Id) return Node_Id; -- Node4
8154
8155 function Low_Bound
8156 (N : Node_Id) return Node_Id; -- Node1
8157
8158 function Mod_Clause
8159 (N : Node_Id) return Node_Id; -- Node2
8160
8161 function More_Ids
8162 (N : Node_Id) return Boolean; -- Flag5
8163
8164 function Must_Be_Byte_Aligned
8165 (N : Node_Id) return Boolean; -- Flag14
8166
8167 function Must_Not_Freeze
8168 (N : Node_Id) return Boolean; -- Flag8
8169
8170 function Must_Not_Override
8171 (N : Node_Id) return Boolean; -- Flag15
8172
8173 function Must_Override
8174 (N : Node_Id) return Boolean; -- Flag14
8175
8176 function Name
8177 (N : Node_Id) return Node_Id; -- Node2
8178
8179 function Names
8180 (N : Node_Id) return List_Id; -- List2
8181
8182 function Next_Entity
8183 (N : Node_Id) return Node_Id; -- Node2
8184
8185 function Next_Implicit_With
8186 (N : Node_Id) return Node_Id; -- Node3
8187
8188 function Next_Named_Actual
8189 (N : Node_Id) return Node_Id; -- Node4
8190
8191 function Next_Pragma
8192 (N : Node_Id) return Node_Id; -- Node1
8193
8194 function Next_Rep_Item
8195 (N : Node_Id) return Node_Id; -- Node5
8196
8197 function Next_Use_Clause
8198 (N : Node_Id) return Node_Id; -- Node3
8199
8200 function No_Ctrl_Actions
8201 (N : Node_Id) return Boolean; -- Flag7
8202
8203 function No_Elaboration_Check
8204 (N : Node_Id) return Boolean; -- Flag14
8205
8206 function No_Entities_Ref_In_Spec
8207 (N : Node_Id) return Boolean; -- Flag8
8208
8209 function No_Initialization
8210 (N : Node_Id) return Boolean; -- Flag13
8211
8212 function No_Truncation
8213 (N : Node_Id) return Boolean; -- Flag17
8214
8215 function Null_Present
8216 (N : Node_Id) return Boolean; -- Flag13
8217
8218 function Null_Exclusion_Present
8219 (N : Node_Id) return Boolean; -- Flag11
8220
8221 function Null_Exclusion_In_Return_Present
8222 (N : Node_Id) return Boolean; -- Flag14
8223
8224 function Null_Record_Present
8225 (N : Node_Id) return Boolean; -- Flag17
8226
8227 function Object_Definition
8228 (N : Node_Id) return Node_Id; -- Node4
8229
8230 function Original_Discriminant
8231 (N : Node_Id) return Node_Id; -- Node2
8232
8233 function Original_Entity
8234 (N : Node_Id) return Entity_Id; -- Node2
8235
8236 function Others_Discrete_Choices
8237 (N : Node_Id) return List_Id; -- List1
8238
8239 function Out_Present
8240 (N : Node_Id) return Boolean; -- Flag17
8241
8242 function Parameter_Associations
8243 (N : Node_Id) return List_Id; -- List3
8244
8245 function Parameter_List_Truncated
8246 (N : Node_Id) return Boolean; -- Flag17
8247
8248 function Parameter_Specifications
8249 (N : Node_Id) return List_Id; -- List3
8250
8251 function Parameter_Type
8252 (N : Node_Id) return Node_Id; -- Node2
8253
8254 function Parent_Spec
8255 (N : Node_Id) return Node_Id; -- Node4
8256
8257 function PPC_Enabled
8258 (N : Node_Id) return Boolean; -- Flag5
8259
8260 function Position
8261 (N : Node_Id) return Node_Id; -- Node2
8262
8263 function Pragma_Argument_Associations
8264 (N : Node_Id) return List_Id; -- List2
8265
8266 function Pragma_Identifier
8267 (N : Node_Id) return Node_Id; -- Node4
8268
8269 function Pragmas_After
8270 (N : Node_Id) return List_Id; -- List5
8271
8272 function Pragmas_Before
8273 (N : Node_Id) return List_Id; -- List4
8274
8275 function Prefix
8276 (N : Node_Id) return Node_Id; -- Node3
8277
8278 function Present_Expr
8279 (N : Node_Id) return Uint; -- Uint3
8280
8281 function Prev_Ids
8282 (N : Node_Id) return Boolean; -- Flag6
8283
8284 function Print_In_Hex
8285 (N : Node_Id) return Boolean; -- Flag13
8286
8287 function Private_Declarations
8288 (N : Node_Id) return List_Id; -- List3
8289
8290 function Private_Present
8291 (N : Node_Id) return Boolean; -- Flag15
8292
8293 function Procedure_To_Call
8294 (N : Node_Id) return Node_Id; -- Node2
8295
8296 function Proper_Body
8297 (N : Node_Id) return Node_Id; -- Node1
8298
8299 function Protected_Definition
8300 (N : Node_Id) return Node_Id; -- Node3
8301
8302 function Protected_Present
8303 (N : Node_Id) return Boolean; -- Flag6
8304
8305 function Raises_Constraint_Error
8306 (N : Node_Id) return Boolean; -- Flag7
8307
8308 function Range_Constraint
8309 (N : Node_Id) return Node_Id; -- Node4
8310
8311 function Range_Expression
8312 (N : Node_Id) return Node_Id; -- Node4
8313
8314 function Real_Range_Specification
8315 (N : Node_Id) return Node_Id; -- Node4
8316
8317 function Realval
8318 (N : Node_Id) return Ureal; -- Ureal3
8319
8320 function Reason
8321 (N : Node_Id) return Uint; -- Uint3
8322
8323 function Record_Extension_Part
8324 (N : Node_Id) return Node_Id; -- Node3
8325
8326 function Redundant_Use
8327 (N : Node_Id) return Boolean; -- Flag13
8328
8329 function Renaming_Exception
8330 (N : Node_Id) return Node_Id; -- Node2
8331
8332 function Result_Definition
8333 (N : Node_Id) return Node_Id; -- Node4
8334
8335 function Return_Object_Declarations
8336 (N : Node_Id) return List_Id; -- List3
8337
8338 function Return_Statement_Entity
8339 (N : Node_Id) return Node_Id; -- Node5
8340
8341 function Reverse_Present
8342 (N : Node_Id) return Boolean; -- Flag15
8343
8344 function Right_Opnd
8345 (N : Node_Id) return Node_Id; -- Node3
8346
8347 function Rounded_Result
8348 (N : Node_Id) return Boolean; -- Flag18
8349
8350 function Scil_Nkind
8351 (N : Node_Id) return Uint; -- Uint3
8352
8353 function Scil_Related_Node
8354 (N : Node_Id) return Node_Id; -- Node1
8355
8356 function Scil_Target_Prim
8357 (N : Node_Id) return Node_Id; -- Node2
8358
8359 function Scope
8360 (N : Node_Id) return Node_Id; -- Node3
8361
8362 function Select_Alternatives
8363 (N : Node_Id) return List_Id; -- List1
8364
8365 function Selector_Name
8366 (N : Node_Id) return Node_Id; -- Node2
8367
8368 function Selector_Names
8369 (N : Node_Id) return List_Id; -- List1
8370
8371 function Shift_Count_OK
8372 (N : Node_Id) return Boolean; -- Flag4
8373
8374 function Source_Type
8375 (N : Node_Id) return Entity_Id; -- Node1
8376
8377 function Specification
8378 (N : Node_Id) return Node_Id; -- Node1
8379
8380 function Statements
8381 (N : Node_Id) return List_Id; -- List3
8382
8383 function Static_Processing_OK
8384 (N : Node_Id) return Boolean; -- Flag4
8385
8386 function Storage_Pool
8387 (N : Node_Id) return Node_Id; -- Node1
8388
8389 function Strval
8390 (N : Node_Id) return String_Id; -- Str3
8391
8392 function Subtype_Indication
8393 (N : Node_Id) return Node_Id; -- Node5
8394
8395 function Subtype_Mark
8396 (N : Node_Id) return Node_Id; -- Node4
8397
8398 function Subtype_Marks
8399 (N : Node_Id) return List_Id; -- List2
8400
8401 function Suppress_Loop_Warnings
8402 (N : Node_Id) return Boolean; -- Flag17
8403
8404 function Synchronized_Present
8405 (N : Node_Id) return Boolean; -- Flag7
8406
8407 function Tagged_Present
8408 (N : Node_Id) return Boolean; -- Flag15
8409
8410 function Target_Type
8411 (N : Node_Id) return Entity_Id; -- Node2
8412
8413 function Task_Definition
8414 (N : Node_Id) return Node_Id; -- Node3
8415
8416 function Task_Present
8417 (N : Node_Id) return Boolean; -- Flag5
8418
8419 function Then_Actions
8420 (N : Node_Id) return List_Id; -- List2
8421
8422 function Then_Statements
8423 (N : Node_Id) return List_Id; -- List2
8424
8425 function Treat_Fixed_As_Integer
8426 (N : Node_Id) return Boolean; -- Flag14
8427
8428 function Triggering_Alternative
8429 (N : Node_Id) return Node_Id; -- Node1
8430
8431 function Triggering_Statement
8432 (N : Node_Id) return Node_Id; -- Node1
8433
8434 function TSS_Elist
8435 (N : Node_Id) return Elist_Id; -- Elist3
8436
8437 function Type_Definition
8438 (N : Node_Id) return Node_Id; -- Node3
8439
8440 function Unit
8441 (N : Node_Id) return Node_Id; -- Node2
8442
8443 function Unknown_Discriminants_Present
8444 (N : Node_Id) return Boolean; -- Flag13
8445
8446 function Unreferenced_In_Spec
8447 (N : Node_Id) return Boolean; -- Flag7
8448
8449 function Variant_Part
8450 (N : Node_Id) return Node_Id; -- Node4
8451
8452 function Variants
8453 (N : Node_Id) return List_Id; -- List1
8454
8455 function Visible_Declarations
8456 (N : Node_Id) return List_Id; -- List2
8457
8458 function Was_Originally_Stub
8459 (N : Node_Id) return Boolean; -- Flag13
8460
8461 function Zero_Cost_Handling
8462 (N : Node_Id) return Boolean; -- Flag5
8463
8464 -- End functions (note used by xsinfo utility program to end processing)
8465
8466 ----------------------------
8467 -- Node Update Procedures --
8468 ----------------------------
8469
8470 -- These are the corresponding node update routines, which again provide
8471 -- a high level logical access with type checking. In addition to setting
8472 -- the indicated field of the node N to the given Val, in the case of
8473 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8474 -- point back to node N. This automates the setting of the parent pointer.
8475
8476 procedure Set_ABE_Is_Certain
8477 (N : Node_Id; Val : Boolean := True); -- Flag18
8478
8479 procedure Set_Abort_Present
8480 (N : Node_Id; Val : Boolean := True); -- Flag15
8481
8482 procedure Set_Abortable_Part
8483 (N : Node_Id; Val : Node_Id); -- Node2
8484
8485 procedure Set_Abstract_Present
8486 (N : Node_Id; Val : Boolean := True); -- Flag4
8487
8488 procedure Set_Accept_Handler_Records
8489 (N : Node_Id; Val : List_Id); -- List5
8490
8491 procedure Set_Accept_Statement
8492 (N : Node_Id; Val : Node_Id); -- Node2
8493
8494 procedure Set_Access_Definition
8495 (N : Node_Id; Val : Node_Id); -- Node3
8496
8497 procedure Set_Access_To_Subprogram_Definition
8498 (N : Node_Id; Val : Node_Id); -- Node3
8499
8500 procedure Set_Access_Types_To_Process
8501 (N : Node_Id; Val : Elist_Id); -- Elist2
8502
8503 procedure Set_Actions
8504 (N : Node_Id; Val : List_Id); -- List1
8505
8506 procedure Set_Activation_Chain_Entity
8507 (N : Node_Id; Val : Node_Id); -- Node3
8508
8509 procedure Set_Acts_As_Spec
8510 (N : Node_Id; Val : Boolean := True); -- Flag4
8511
8512 procedure Set_Actual_Designated_Subtype
8513 (N : Node_Id; Val : Node_Id); -- Node4
8514
8515 procedure Set_Address_Warning_Posted
8516 (N : Node_Id; Val : Boolean := True); -- Flag18
8517
8518 procedure Set_Aggregate_Bounds
8519 (N : Node_Id; Val : Node_Id); -- Node3
8520
8521 procedure Set_Aliased_Present
8522 (N : Node_Id; Val : Boolean := True); -- Flag4
8523
8524 procedure Set_All_Others
8525 (N : Node_Id; Val : Boolean := True); -- Flag11
8526
8527 procedure Set_All_Present
8528 (N : Node_Id; Val : Boolean := True); -- Flag15
8529
8530 procedure Set_Alternatives
8531 (N : Node_Id; Val : List_Id); -- List4
8532
8533 procedure Set_Ancestor_Part
8534 (N : Node_Id; Val : Node_Id); -- Node3
8535
8536 procedure Set_Array_Aggregate
8537 (N : Node_Id; Val : Node_Id); -- Node3
8538
8539 procedure Set_Assignment_OK
8540 (N : Node_Id; Val : Boolean := True); -- Flag15
8541
8542 procedure Set_Associated_Node
8543 (N : Node_Id; Val : Node_Id); -- Node4
8544
8545 procedure Set_Attribute_Name
8546 (N : Node_Id; Val : Name_Id); -- Name2
8547
8548 procedure Set_At_End_Proc
8549 (N : Node_Id; Val : Node_Id); -- Node1
8550
8551 procedure Set_Aux_Decls_Node
8552 (N : Node_Id; Val : Node_Id); -- Node5
8553
8554 procedure Set_Backwards_OK
8555 (N : Node_Id; Val : Boolean := True); -- Flag6
8556
8557 procedure Set_Bad_Is_Detected
8558 (N : Node_Id; Val : Boolean := True); -- Flag15
8559
8560 procedure Set_Body_Required
8561 (N : Node_Id; Val : Boolean := True); -- Flag13
8562
8563 procedure Set_Body_To_Inline
8564 (N : Node_Id; Val : Node_Id); -- Node3
8565
8566 procedure Set_Box_Present
8567 (N : Node_Id; Val : Boolean := True); -- Flag15
8568
8569 procedure Set_By_Ref
8570 (N : Node_Id; Val : Boolean := True); -- Flag5
8571
8572 procedure Set_Char_Literal_Value
8573 (N : Node_Id; Val : Uint); -- Uint2
8574
8575 procedure Set_Chars
8576 (N : Node_Id; Val : Name_Id); -- Name1
8577
8578 procedure Set_Check_Address_Alignment
8579 (N : Node_Id; Val : Boolean := True); -- Flag11
8580
8581 procedure Set_Choice_Parameter
8582 (N : Node_Id; Val : Node_Id); -- Node2
8583
8584 procedure Set_Coextensions
8585 (N : Node_Id; Val : Elist_Id); -- Elist4
8586
8587 procedure Set_Choices
8588 (N : Node_Id; Val : List_Id); -- List1
8589
8590 procedure Set_Comes_From_Extended_Return_Statement
8591 (N : Node_Id; Val : Boolean := True); -- Flag18
8592
8593 procedure Set_Compile_Time_Known_Aggregate
8594 (N : Node_Id; Val : Boolean := True); -- Flag18
8595
8596 procedure Set_Component_Associations
8597 (N : Node_Id; Val : List_Id); -- List2
8598
8599 procedure Set_Component_Clauses
8600 (N : Node_Id; Val : List_Id); -- List3
8601
8602 procedure Set_Component_Definition
8603 (N : Node_Id; Val : Node_Id); -- Node4
8604
8605 procedure Set_Component_Items
8606 (N : Node_Id; Val : List_Id); -- List3
8607
8608 procedure Set_Component_List
8609 (N : Node_Id; Val : Node_Id); -- Node1
8610
8611 procedure Set_Component_Name
8612 (N : Node_Id; Val : Node_Id); -- Node1
8613
8614 procedure Set_Componentwise_Assignment
8615 (N : Node_Id; Val : Boolean := True); -- Flag14
8616
8617 procedure Set_Condition
8618 (N : Node_Id; Val : Node_Id); -- Node1
8619
8620 procedure Set_Condition_Actions
8621 (N : Node_Id; Val : List_Id); -- List3
8622
8623 procedure Set_Config_Pragmas
8624 (N : Node_Id; Val : List_Id); -- List4
8625
8626 procedure Set_Constant_Present
8627 (N : Node_Id; Val : Boolean := True); -- Flag17
8628
8629 procedure Set_Constraint
8630 (N : Node_Id; Val : Node_Id); -- Node3
8631
8632 procedure Set_Constraints
8633 (N : Node_Id; Val : List_Id); -- List1
8634
8635 procedure Set_Context_Installed
8636 (N : Node_Id; Val : Boolean := True); -- Flag13
8637
8638 procedure Set_Context_Items
8639 (N : Node_Id; Val : List_Id); -- List1
8640
8641 procedure Set_Context_Pending
8642 (N : Node_Id; Val : Boolean := True); -- Flag16
8643
8644 procedure Set_Controlling_Argument
8645 (N : Node_Id; Val : Node_Id); -- Node1
8646
8647 procedure Set_Conversion_OK
8648 (N : Node_Id; Val : Boolean := True); -- Flag14
8649
8650 procedure Set_Corresponding_Body
8651 (N : Node_Id; Val : Node_Id); -- Node5
8652
8653 procedure Set_Corresponding_Formal_Spec
8654 (N : Node_Id; Val : Node_Id); -- Node3
8655
8656 procedure Set_Corresponding_Generic_Association
8657 (N : Node_Id; Val : Node_Id); -- Node5
8658
8659 procedure Set_Corresponding_Integer_Value
8660 (N : Node_Id; Val : Uint); -- Uint4
8661
8662 procedure Set_Corresponding_Spec
8663 (N : Node_Id; Val : Node_Id); -- Node5
8664
8665 procedure Set_Corresponding_Stub
8666 (N : Node_Id; Val : Node_Id); -- Node3
8667
8668 procedure Set_Dcheck_Function
8669 (N : Node_Id; Val : Entity_Id); -- Node5
8670
8671 procedure Set_Debug_Statement
8672 (N : Node_Id; Val : Node_Id); -- Node3
8673
8674 procedure Set_Declarations
8675 (N : Node_Id; Val : List_Id); -- List2
8676
8677 procedure Set_Default_Expression
8678 (N : Node_Id; Val : Node_Id); -- Node5
8679
8680 procedure Set_Default_Name
8681 (N : Node_Id; Val : Node_Id); -- Node2
8682
8683 procedure Set_Defining_Identifier
8684 (N : Node_Id; Val : Entity_Id); -- Node1
8685
8686 procedure Set_Defining_Unit_Name
8687 (N : Node_Id; Val : Node_Id); -- Node1
8688
8689 procedure Set_Delay_Alternative
8690 (N : Node_Id; Val : Node_Id); -- Node4
8691
8692 procedure Set_Delay_Statement
8693 (N : Node_Id; Val : Node_Id); -- Node2
8694
8695 procedure Set_Delta_Expression
8696 (N : Node_Id; Val : Node_Id); -- Node3
8697
8698 procedure Set_Digits_Expression
8699 (N : Node_Id; Val : Node_Id); -- Node2
8700
8701 procedure Set_Discr_Check_Funcs_Built
8702 (N : Node_Id; Val : Boolean := True); -- Flag11
8703
8704 procedure Set_Discrete_Choices
8705 (N : Node_Id; Val : List_Id); -- List4
8706
8707 procedure Set_Discrete_Range
8708 (N : Node_Id; Val : Node_Id); -- Node4
8709
8710 procedure Set_Discrete_Subtype_Definition
8711 (N : Node_Id; Val : Node_Id); -- Node4
8712
8713 procedure Set_Discrete_Subtype_Definitions
8714 (N : Node_Id; Val : List_Id); -- List2
8715
8716 procedure Set_Discriminant_Specifications
8717 (N : Node_Id; Val : List_Id); -- List4
8718
8719 procedure Set_Discriminant_Type
8720 (N : Node_Id; Val : Node_Id); -- Node5
8721
8722 procedure Set_Do_Accessibility_Check
8723 (N : Node_Id; Val : Boolean := True); -- Flag13
8724
8725 procedure Set_Do_Discriminant_Check
8726 (N : Node_Id; Val : Boolean := True); -- Flag13
8727
8728 procedure Set_Do_Division_Check
8729 (N : Node_Id; Val : Boolean := True); -- Flag13
8730
8731 procedure Set_Do_Length_Check
8732 (N : Node_Id; Val : Boolean := True); -- Flag4
8733
8734 procedure Set_Do_Overflow_Check
8735 (N : Node_Id; Val : Boolean := True); -- Flag17
8736
8737 procedure Set_Do_Range_Check
8738 (N : Node_Id; Val : Boolean := True); -- Flag9
8739
8740 procedure Set_Do_Storage_Check
8741 (N : Node_Id; Val : Boolean := True); -- Flag17
8742
8743 procedure Set_Do_Tag_Check
8744 (N : Node_Id; Val : Boolean := True); -- Flag13
8745
8746 procedure Set_Elaborate_All_Desirable
8747 (N : Node_Id; Val : Boolean := True); -- Flag9
8748
8749 procedure Set_Elaborate_All_Present
8750 (N : Node_Id; Val : Boolean := True); -- Flag14
8751
8752 procedure Set_Elaborate_Desirable
8753 (N : Node_Id; Val : Boolean := True); -- Flag11
8754
8755 procedure Set_Elaborate_Present
8756 (N : Node_Id; Val : Boolean := True); -- Flag4
8757
8758 procedure Set_Elaboration_Boolean
8759 (N : Node_Id; Val : Node_Id); -- Node2
8760
8761 procedure Set_Else_Actions
8762 (N : Node_Id; Val : List_Id); -- List3
8763
8764 procedure Set_Else_Statements
8765 (N : Node_Id; Val : List_Id); -- List4
8766
8767 procedure Set_Elsif_Parts
8768 (N : Node_Id; Val : List_Id); -- List3
8769
8770 procedure Set_Enclosing_Variant
8771 (N : Node_Id; Val : Node_Id); -- Node2
8772
8773 procedure Set_End_Label
8774 (N : Node_Id; Val : Node_Id); -- Node4
8775
8776 procedure Set_End_Span
8777 (N : Node_Id; Val : Uint); -- Uint5
8778
8779 procedure Set_Entity
8780 (N : Node_Id; Val : Node_Id); -- Node4
8781
8782 procedure Set_Entry_Body_Formal_Part
8783 (N : Node_Id; Val : Node_Id); -- Node5
8784
8785 procedure Set_Entry_Call_Alternative
8786 (N : Node_Id; Val : Node_Id); -- Node1
8787
8788 procedure Set_Entry_Call_Statement
8789 (N : Node_Id; Val : Node_Id); -- Node1
8790
8791 procedure Set_Entry_Direct_Name
8792 (N : Node_Id; Val : Node_Id); -- Node1
8793
8794 procedure Set_Entry_Index
8795 (N : Node_Id; Val : Node_Id); -- Node5
8796
8797 procedure Set_Entry_Index_Specification
8798 (N : Node_Id; Val : Node_Id); -- Node4
8799
8800 procedure Set_Etype
8801 (N : Node_Id; Val : Node_Id); -- Node5
8802
8803 procedure Set_Exception_Choices
8804 (N : Node_Id; Val : List_Id); -- List4
8805
8806 procedure Set_Exception_Handlers
8807 (N : Node_Id; Val : List_Id); -- List5
8808
8809 procedure Set_Exception_Junk
8810 (N : Node_Id; Val : Boolean := True); -- Flag8
8811
8812 procedure Set_Exception_Label
8813 (N : Node_Id; Val : Node_Id); -- Node5
8814
8815 procedure Set_Expansion_Delayed
8816 (N : Node_Id; Val : Boolean := True); -- Flag11
8817
8818 procedure Set_Explicit_Actual_Parameter
8819 (N : Node_Id; Val : Node_Id); -- Node3
8820
8821 procedure Set_Explicit_Generic_Actual_Parameter
8822 (N : Node_Id; Val : Node_Id); -- Node1
8823
8824 procedure Set_Expression
8825 (N : Node_Id; Val : Node_Id); -- Node3
8826
8827 procedure Set_Expressions
8828 (N : Node_Id; Val : List_Id); -- List1
8829
8830 procedure Set_First_Bit
8831 (N : Node_Id; Val : Node_Id); -- Node3
8832
8833 procedure Set_First_Inlined_Subprogram
8834 (N : Node_Id; Val : Entity_Id); -- Node3
8835
8836 procedure Set_First_Name
8837 (N : Node_Id; Val : Boolean := True); -- Flag5
8838
8839 procedure Set_First_Named_Actual
8840 (N : Node_Id; Val : Node_Id); -- Node4
8841
8842 procedure Set_First_Real_Statement
8843 (N : Node_Id; Val : Node_Id); -- Node2
8844
8845 procedure Set_First_Subtype_Link
8846 (N : Node_Id; Val : Entity_Id); -- Node5
8847
8848 procedure Set_Float_Truncate
8849 (N : Node_Id; Val : Boolean := True); -- Flag11
8850
8851 procedure Set_Formal_Type_Definition
8852 (N : Node_Id; Val : Node_Id); -- Node3
8853
8854 procedure Set_Forwards_OK
8855 (N : Node_Id; Val : Boolean := True); -- Flag5
8856
8857 procedure Set_From_At_Mod
8858 (N : Node_Id; Val : Boolean := True); -- Flag4
8859
8860 procedure Set_From_At_End
8861 (N : Node_Id; Val : Boolean := True); -- Flag4
8862
8863 procedure Set_From_Default
8864 (N : Node_Id; Val : Boolean := True); -- Flag6
8865
8866 procedure Set_Generic_Associations
8867 (N : Node_Id; Val : List_Id); -- List3
8868
8869 procedure Set_Generic_Formal_Declarations
8870 (N : Node_Id; Val : List_Id); -- List2
8871
8872 procedure Set_Generic_Parent
8873 (N : Node_Id; Val : Node_Id); -- Node5
8874
8875 procedure Set_Generic_Parent_Type
8876 (N : Node_Id; Val : Node_Id); -- Node4
8877
8878 procedure Set_Handled_Statement_Sequence
8879 (N : Node_Id; Val : Node_Id); -- Node4
8880
8881 procedure Set_Handler_List_Entry
8882 (N : Node_Id; Val : Node_Id); -- Node2
8883
8884 procedure Set_Has_Created_Identifier
8885 (N : Node_Id; Val : Boolean := True); -- Flag15
8886
8887 procedure Set_Has_Dynamic_Length_Check
8888 (N : Node_Id; Val : Boolean := True); -- Flag10
8889
8890 procedure Set_Has_Dynamic_Range_Check
8891 (N : Node_Id; Val : Boolean := True); -- Flag12
8892
8893 procedure Set_Has_Init_Expression
8894 (N : Node_Id; Val : Boolean := True); -- Flag14
8895
8896 procedure Set_Has_Local_Raise
8897 (N : Node_Id; Val : Boolean := True); -- Flag8
8898
8899 procedure Set_Has_No_Elaboration_Code
8900 (N : Node_Id; Val : Boolean := True); -- Flag17
8901
8902 procedure Set_Has_Priority_Pragma
8903 (N : Node_Id; Val : Boolean := True); -- Flag6
8904
8905 procedure Set_Has_Private_View
8906 (N : Node_Id; Val : Boolean := True); -- Flag11
8907
8908 procedure Set_Has_Relative_Deadline_Pragma
8909 (N : Node_Id; Val : Boolean := True); -- Flag9
8910
8911 procedure Set_Has_Self_Reference
8912 (N : Node_Id; Val : Boolean := True); -- Flag13
8913
8914 procedure Set_Has_Storage_Size_Pragma
8915 (N : Node_Id; Val : Boolean := True); -- Flag5
8916
8917 procedure Set_Has_Task_Info_Pragma
8918 (N : Node_Id; Val : Boolean := True); -- Flag7
8919
8920 procedure Set_Has_Task_Name_Pragma
8921 (N : Node_Id; Val : Boolean := True); -- Flag8
8922
8923 procedure Set_Has_Wide_Character
8924 (N : Node_Id; Val : Boolean := True); -- Flag11
8925
8926 procedure Set_Hidden_By_Use_Clause
8927 (N : Node_Id; Val : Elist_Id); -- Elist4
8928
8929 procedure Set_High_Bound
8930 (N : Node_Id; Val : Node_Id); -- Node2
8931
8932 procedure Set_Identifier
8933 (N : Node_Id; Val : Node_Id); -- Node1
8934
8935 procedure Set_Interface_List
8936 (N : Node_Id; Val : List_Id); -- List2
8937
8938 procedure Set_Interface_Present
8939 (N : Node_Id; Val : Boolean := True); -- Flag16
8940
8941 procedure Set_Implicit_With
8942 (N : Node_Id; Val : Boolean := True); -- Flag16
8943
8944 procedure Set_In_Present
8945 (N : Node_Id; Val : Boolean := True); -- Flag15
8946
8947 procedure Set_Includes_Infinities
8948 (N : Node_Id; Val : Boolean := True); -- Flag11
8949
8950 procedure Set_Instance_Spec
8951 (N : Node_Id; Val : Node_Id); -- Node5
8952
8953 procedure Set_Intval
8954 (N : Node_Id; Val : Uint); -- Uint3
8955
8956 procedure Set_Is_Asynchronous_Call_Block
8957 (N : Node_Id; Val : Boolean := True); -- Flag7
8958
8959 procedure Set_Is_Component_Left_Opnd
8960 (N : Node_Id; Val : Boolean := True); -- Flag13
8961
8962 procedure Set_Is_Component_Right_Opnd
8963 (N : Node_Id; Val : Boolean := True); -- Flag14
8964
8965 procedure Set_Is_Controlling_Actual
8966 (N : Node_Id; Val : Boolean := True); -- Flag16
8967
8968 procedure Set_Is_Dynamic_Coextension
8969 (N : Node_Id; Val : Boolean := True); -- Flag18
8970
8971 procedure Set_Is_Elsif
8972 (N : Node_Id; Val : Boolean := True); -- Flag13
8973
8974 procedure Set_Is_Entry_Barrier_Function
8975 (N : Node_Id; Val : Boolean := True); -- Flag8
8976
8977 procedure Set_Is_Expanded_Build_In_Place_Call
8978 (N : Node_Id; Val : Boolean := True); -- Flag11
8979
8980 procedure Set_Is_Folded_In_Parser
8981 (N : Node_Id; Val : Boolean := True); -- Flag4
8982
8983 procedure Set_Is_In_Discriminant_Check
8984 (N : Node_Id; Val : Boolean := True); -- Flag11
8985
8986 procedure Set_Is_Machine_Number
8987 (N : Node_Id; Val : Boolean := True); -- Flag11
8988
8989 procedure Set_Is_Null_Loop
8990 (N : Node_Id; Val : Boolean := True); -- Flag16
8991
8992 procedure Set_Is_Overloaded
8993 (N : Node_Id; Val : Boolean := True); -- Flag5
8994
8995 procedure Set_Is_Power_Of_2_For_Shift
8996 (N : Node_Id; Val : Boolean := True); -- Flag13
8997
8998 procedure Set_Is_Protected_Subprogram_Body
8999 (N : Node_Id; Val : Boolean := True); -- Flag7
9000
9001 procedure Set_Is_Scil_Node
9002 (N : Node_Id; Val : Boolean := True); -- Flag4
9003
9004 procedure Set_Is_Static_Coextension
9005 (N : Node_Id; Val : Boolean := True); -- Flag14
9006
9007 procedure Set_Is_Static_Expression
9008 (N : Node_Id; Val : Boolean := True); -- Flag6
9009
9010 procedure Set_Is_Subprogram_Descriptor
9011 (N : Node_Id; Val : Boolean := True); -- Flag16
9012
9013 procedure Set_Is_Task_Allocation_Block
9014 (N : Node_Id; Val : Boolean := True); -- Flag6
9015
9016 procedure Set_Is_Task_Master
9017 (N : Node_Id; Val : Boolean := True); -- Flag5
9018
9019 procedure Set_Iteration_Scheme
9020 (N : Node_Id; Val : Node_Id); -- Node2
9021
9022 procedure Set_Itype
9023 (N : Node_Id; Val : Entity_Id); -- Node1
9024
9025 procedure Set_Kill_Range_Check
9026 (N : Node_Id; Val : Boolean := True); -- Flag11
9027
9028 procedure Set_Last_Bit
9029 (N : Node_Id; Val : Node_Id); -- Node4
9030
9031 procedure Set_Last_Name
9032 (N : Node_Id; Val : Boolean := True); -- Flag6
9033
9034 procedure Set_Library_Unit
9035 (N : Node_Id; Val : Node_Id); -- Node4
9036
9037 procedure Set_Label_Construct
9038 (N : Node_Id; Val : Node_Id); -- Node2
9039
9040 procedure Set_Left_Opnd
9041 (N : Node_Id; Val : Node_Id); -- Node2
9042
9043 procedure Set_Limited_View_Installed
9044 (N : Node_Id; Val : Boolean := True); -- Flag18
9045
9046 procedure Set_Limited_Present
9047 (N : Node_Id; Val : Boolean := True); -- Flag17
9048
9049 procedure Set_Literals
9050 (N : Node_Id; Val : List_Id); -- List1
9051
9052 procedure Set_Local_Raise_Not_OK
9053 (N : Node_Id; Val : Boolean := True); -- Flag7
9054
9055 procedure Set_Local_Raise_Statements
9056 (N : Node_Id; Val : Elist_Id); -- Elist1
9057
9058 procedure Set_Loop_Actions
9059 (N : Node_Id; Val : List_Id); -- List2
9060
9061 procedure Set_Loop_Parameter_Specification
9062 (N : Node_Id; Val : Node_Id); -- Node4
9063
9064 procedure Set_Low_Bound
9065 (N : Node_Id; Val : Node_Id); -- Node1
9066
9067 procedure Set_Mod_Clause
9068 (N : Node_Id; Val : Node_Id); -- Node2
9069
9070 procedure Set_More_Ids
9071 (N : Node_Id; Val : Boolean := True); -- Flag5
9072
9073 procedure Set_Must_Be_Byte_Aligned
9074 (N : Node_Id; Val : Boolean := True); -- Flag14
9075
9076 procedure Set_Must_Not_Freeze
9077 (N : Node_Id; Val : Boolean := True); -- Flag8
9078
9079 procedure Set_Must_Not_Override
9080 (N : Node_Id; Val : Boolean := True); -- Flag15
9081
9082 procedure Set_Must_Override
9083 (N : Node_Id; Val : Boolean := True); -- Flag14
9084
9085 procedure Set_Name
9086 (N : Node_Id; Val : Node_Id); -- Node2
9087
9088 procedure Set_Names
9089 (N : Node_Id; Val : List_Id); -- List2
9090
9091 procedure Set_Next_Entity
9092 (N : Node_Id; Val : Node_Id); -- Node2
9093
9094 procedure Set_Next_Implicit_With
9095 (N : Node_Id; Val : Node_Id); -- Node3
9096
9097 procedure Set_Next_Named_Actual
9098 (N : Node_Id; Val : Node_Id); -- Node4
9099
9100 procedure Set_Next_Pragma
9101 (N : Node_Id; Val : Node_Id); -- Node1
9102
9103 procedure Set_Next_Rep_Item
9104 (N : Node_Id; Val : Node_Id); -- Node5
9105
9106 procedure Set_Next_Use_Clause
9107 (N : Node_Id; Val : Node_Id); -- Node3
9108
9109 procedure Set_No_Ctrl_Actions
9110 (N : Node_Id; Val : Boolean := True); -- Flag7
9111
9112 procedure Set_No_Elaboration_Check
9113 (N : Node_Id; Val : Boolean := True); -- Flag14
9114
9115 procedure Set_No_Entities_Ref_In_Spec
9116 (N : Node_Id; Val : Boolean := True); -- Flag8
9117
9118 procedure Set_No_Initialization
9119 (N : Node_Id; Val : Boolean := True); -- Flag13
9120
9121 procedure Set_No_Truncation
9122 (N : Node_Id; Val : Boolean := True); -- Flag17
9123
9124 procedure Set_Null_Present
9125 (N : Node_Id; Val : Boolean := True); -- Flag13
9126
9127 procedure Set_Null_Exclusion_Present
9128 (N : Node_Id; Val : Boolean := True); -- Flag11
9129
9130 procedure Set_Null_Exclusion_In_Return_Present
9131 (N : Node_Id; Val : Boolean := True); -- Flag14
9132
9133 procedure Set_Null_Record_Present
9134 (N : Node_Id; Val : Boolean := True); -- Flag17
9135
9136 procedure Set_Object_Definition
9137 (N : Node_Id; Val : Node_Id); -- Node4
9138
9139 procedure Set_Original_Discriminant
9140 (N : Node_Id; Val : Node_Id); -- Node2
9141
9142 procedure Set_Original_Entity
9143 (N : Node_Id; Val : Entity_Id); -- Node2
9144
9145 procedure Set_Others_Discrete_Choices
9146 (N : Node_Id; Val : List_Id); -- List1
9147
9148 procedure Set_Out_Present
9149 (N : Node_Id; Val : Boolean := True); -- Flag17
9150
9151 procedure Set_Parameter_Associations
9152 (N : Node_Id; Val : List_Id); -- List3
9153
9154 procedure Set_Parameter_List_Truncated
9155 (N : Node_Id; Val : Boolean := True); -- Flag17
9156
9157 procedure Set_Parameter_Specifications
9158 (N : Node_Id; Val : List_Id); -- List3
9159
9160 procedure Set_Parameter_Type
9161 (N : Node_Id; Val : Node_Id); -- Node2
9162
9163 procedure Set_Parent_Spec
9164 (N : Node_Id; Val : Node_Id); -- Node4
9165
9166 procedure Set_PPC_Enabled
9167 (N : Node_Id; Val : Boolean := True); -- Flag5
9168
9169 procedure Set_Position
9170 (N : Node_Id; Val : Node_Id); -- Node2
9171
9172 procedure Set_Pragma_Argument_Associations
9173 (N : Node_Id; Val : List_Id); -- List2
9174
9175 procedure Set_Pragma_Identifier
9176 (N : Node_Id; Val : Node_Id); -- Node4
9177
9178 procedure Set_Pragmas_After
9179 (N : Node_Id; Val : List_Id); -- List5
9180
9181 procedure Set_Pragmas_Before
9182 (N : Node_Id; Val : List_Id); -- List4
9183
9184 procedure Set_Prefix
9185 (N : Node_Id; Val : Node_Id); -- Node3
9186
9187 procedure Set_Present_Expr
9188 (N : Node_Id; Val : Uint); -- Uint3
9189
9190 procedure Set_Prev_Ids
9191 (N : Node_Id; Val : Boolean := True); -- Flag6
9192
9193 procedure Set_Print_In_Hex
9194 (N : Node_Id; Val : Boolean := True); -- Flag13
9195
9196 procedure Set_Private_Declarations
9197 (N : Node_Id; Val : List_Id); -- List3
9198
9199 procedure Set_Private_Present
9200 (N : Node_Id; Val : Boolean := True); -- Flag15
9201
9202 procedure Set_Procedure_To_Call
9203 (N : Node_Id; Val : Node_Id); -- Node2
9204
9205 procedure Set_Proper_Body
9206 (N : Node_Id; Val : Node_Id); -- Node1
9207
9208 procedure Set_Protected_Definition
9209 (N : Node_Id; Val : Node_Id); -- Node3
9210
9211 procedure Set_Protected_Present
9212 (N : Node_Id; Val : Boolean := True); -- Flag6
9213
9214 procedure Set_Raises_Constraint_Error
9215 (N : Node_Id; Val : Boolean := True); -- Flag7
9216
9217 procedure Set_Range_Constraint
9218 (N : Node_Id; Val : Node_Id); -- Node4
9219
9220 procedure Set_Range_Expression
9221 (N : Node_Id; Val : Node_Id); -- Node4
9222
9223 procedure Set_Real_Range_Specification
9224 (N : Node_Id; Val : Node_Id); -- Node4
9225
9226 procedure Set_Realval
9227 (N : Node_Id; Val : Ureal); -- Ureal3
9228
9229 procedure Set_Reason
9230 (N : Node_Id; Val : Uint); -- Uint3
9231
9232 procedure Set_Record_Extension_Part
9233 (N : Node_Id; Val : Node_Id); -- Node3
9234
9235 procedure Set_Redundant_Use
9236 (N : Node_Id; Val : Boolean := True); -- Flag13
9237
9238 procedure Set_Renaming_Exception
9239 (N : Node_Id; Val : Node_Id); -- Node2
9240
9241 procedure Set_Result_Definition
9242 (N : Node_Id; Val : Node_Id); -- Node4
9243
9244 procedure Set_Return_Object_Declarations
9245 (N : Node_Id; Val : List_Id); -- List3
9246
9247 procedure Set_Return_Statement_Entity
9248 (N : Node_Id; Val : Node_Id); -- Node5
9249
9250 procedure Set_Reverse_Present
9251 (N : Node_Id; Val : Boolean := True); -- Flag15
9252
9253 procedure Set_Right_Opnd
9254 (N : Node_Id; Val : Node_Id); -- Node3
9255
9256 procedure Set_Rounded_Result
9257 (N : Node_Id; Val : Boolean := True); -- Flag18
9258
9259 procedure Set_Scil_Nkind
9260 (N : Node_Id; Val : Uint); -- Uint3
9261
9262 procedure Set_Scil_Related_Node
9263 (N : Node_Id; Val : Node_Id); -- Node1
9264
9265 procedure Set_Scil_Target_Prim
9266 (N : Node_Id; Val : Node_Id); -- Node2
9267
9268 procedure Set_Scope
9269 (N : Node_Id; Val : Node_Id); -- Node3
9270
9271 procedure Set_Select_Alternatives
9272 (N : Node_Id; Val : List_Id); -- List1
9273
9274 procedure Set_Selector_Name
9275 (N : Node_Id; Val : Node_Id); -- Node2
9276
9277 procedure Set_Selector_Names
9278 (N : Node_Id; Val : List_Id); -- List1
9279
9280 procedure Set_Shift_Count_OK
9281 (N : Node_Id; Val : Boolean := True); -- Flag4
9282
9283 procedure Set_Source_Type
9284 (N : Node_Id; Val : Entity_Id); -- Node1
9285
9286 procedure Set_Specification
9287 (N : Node_Id; Val : Node_Id); -- Node1
9288
9289 procedure Set_Statements
9290 (N : Node_Id; Val : List_Id); -- List3
9291
9292 procedure Set_Static_Processing_OK
9293 (N : Node_Id; Val : Boolean); -- Flag4
9294
9295 procedure Set_Storage_Pool
9296 (N : Node_Id; Val : Node_Id); -- Node1
9297
9298 procedure Set_Strval
9299 (N : Node_Id; Val : String_Id); -- Str3
9300
9301 procedure Set_Subtype_Indication
9302 (N : Node_Id; Val : Node_Id); -- Node5
9303
9304 procedure Set_Subtype_Mark
9305 (N : Node_Id; Val : Node_Id); -- Node4
9306
9307 procedure Set_Subtype_Marks
9308 (N : Node_Id; Val : List_Id); -- List2
9309
9310 procedure Set_Suppress_Loop_Warnings
9311 (N : Node_Id; Val : Boolean := True); -- Flag17
9312
9313 procedure Set_Synchronized_Present
9314 (N : Node_Id; Val : Boolean := True); -- Flag7
9315
9316 procedure Set_Tagged_Present
9317 (N : Node_Id; Val : Boolean := True); -- Flag15
9318
9319 procedure Set_Target_Type
9320 (N : Node_Id; Val : Entity_Id); -- Node2
9321
9322 procedure Set_Task_Definition
9323 (N : Node_Id; Val : Node_Id); -- Node3
9324
9325 procedure Set_Task_Present
9326 (N : Node_Id; Val : Boolean := True); -- Flag5
9327
9328 procedure Set_Then_Actions
9329 (N : Node_Id; Val : List_Id); -- List2
9330
9331 procedure Set_Then_Statements
9332 (N : Node_Id; Val : List_Id); -- List2
9333
9334 procedure Set_Treat_Fixed_As_Integer
9335 (N : Node_Id; Val : Boolean := True); -- Flag14
9336
9337 procedure Set_Triggering_Alternative
9338 (N : Node_Id; Val : Node_Id); -- Node1
9339
9340 procedure Set_Triggering_Statement
9341 (N : Node_Id; Val : Node_Id); -- Node1
9342
9343 procedure Set_TSS_Elist
9344 (N : Node_Id; Val : Elist_Id); -- Elist3
9345
9346 procedure Set_Type_Definition
9347 (N : Node_Id; Val : Node_Id); -- Node3
9348
9349 procedure Set_Unit
9350 (N : Node_Id; Val : Node_Id); -- Node2
9351
9352 procedure Set_Unknown_Discriminants_Present
9353 (N : Node_Id; Val : Boolean := True); -- Flag13
9354
9355 procedure Set_Unreferenced_In_Spec
9356 (N : Node_Id; Val : Boolean := True); -- Flag7
9357
9358 procedure Set_Variant_Part
9359 (N : Node_Id; Val : Node_Id); -- Node4
9360
9361 procedure Set_Variants
9362 (N : Node_Id; Val : List_Id); -- List1
9363
9364 procedure Set_Visible_Declarations
9365 (N : Node_Id; Val : List_Id); -- List2
9366
9367 procedure Set_Was_Originally_Stub
9368 (N : Node_Id; Val : Boolean := True); -- Flag13
9369
9370 procedure Set_Zero_Cost_Handling
9371 (N : Node_Id; Val : Boolean := True); -- Flag5
9372
9373 -------------------------
9374 -- Iterator Procedures --
9375 -------------------------
9376
9377 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9378
9379 procedure Next_Entity (N : in out Node_Id);
9380 procedure Next_Named_Actual (N : in out Node_Id);
9381 procedure Next_Rep_Item (N : in out Node_Id);
9382 procedure Next_Use_Clause (N : in out Node_Id);
9383
9384 --------------------------------------
9385 -- Logical Access to End_Span Field --
9386 --------------------------------------
9387
9388 function End_Location (N : Node_Id) return Source_Ptr;
9389 -- N is an N_If_Statement or N_Case_Statement node, and this
9390 -- function returns the location of the IF token in the END IF
9391 -- sequence by translating the value of the End_Span field.
9392
9393 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9394 -- N is an N_If_Statement or N_Case_Statement node. This procedure
9395 -- sets the End_Span field to correspond to the given value S. In
9396 -- other words, End_Span is set to the difference between S and
9397 -- Sloc (N), the starting location.
9398
9399 --------------------------------
9400 -- Node_Kind Membership Tests --
9401 --------------------------------
9402
9403 -- The following functions allow a convenient notation for testing whether
9404 -- a Node_Kind value matches any one of a list of possible values. In each
9405 -- case True is returned if the given T argument is equal to any of the V
9406 -- arguments. Note that there is a similar set of functions defined in
9407 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9408
9409 function Nkind_In
9410 (T : Node_Kind;
9411 V1 : Node_Kind;
9412 V2 : Node_Kind) return Boolean;
9413
9414 function Nkind_In
9415 (T : Node_Kind;
9416 V1 : Node_Kind;
9417 V2 : Node_Kind;
9418 V3 : Node_Kind) return Boolean;
9419
9420 function Nkind_In
9421 (T : Node_Kind;
9422 V1 : Node_Kind;
9423 V2 : Node_Kind;
9424 V3 : Node_Kind;
9425 V4 : Node_Kind) return Boolean;
9426
9427 function Nkind_In
9428 (T : Node_Kind;
9429 V1 : Node_Kind;
9430 V2 : Node_Kind;
9431 V3 : Node_Kind;
9432 V4 : Node_Kind;
9433 V5 : Node_Kind) return Boolean;
9434
9435 function Nkind_In
9436 (T : Node_Kind;
9437 V1 : Node_Kind;
9438 V2 : Node_Kind;
9439 V3 : Node_Kind;
9440 V4 : Node_Kind;
9441 V5 : Node_Kind;
9442 V6 : Node_Kind) return Boolean;
9443
9444 function Nkind_In
9445 (T : Node_Kind;
9446 V1 : Node_Kind;
9447 V2 : Node_Kind;
9448 V3 : Node_Kind;
9449 V4 : Node_Kind;
9450 V5 : Node_Kind;
9451 V6 : Node_Kind;
9452 V7 : Node_Kind) return Boolean;
9453
9454 function Nkind_In
9455 (T : Node_Kind;
9456 V1 : Node_Kind;
9457 V2 : Node_Kind;
9458 V3 : Node_Kind;
9459 V4 : Node_Kind;
9460 V5 : Node_Kind;
9461 V6 : Node_Kind;
9462 V7 : Node_Kind;
9463 V8 : Node_Kind) return Boolean;
9464
9465 function Nkind_In
9466 (T : Node_Kind;
9467 V1 : Node_Kind;
9468 V2 : Node_Kind;
9469 V3 : Node_Kind;
9470 V4 : Node_Kind;
9471 V5 : Node_Kind;
9472 V6 : Node_Kind;
9473 V7 : Node_Kind;
9474 V8 : Node_Kind;
9475 V9 : Node_Kind) return Boolean;
9476
9477 pragma Inline (Nkind_In);
9478 -- Inline all above functions
9479
9480 -----------------------
9481 -- Utility Functions --
9482 -----------------------
9483
9484 function Pragma_Name (N : Node_Id) return Name_Id;
9485 pragma Inline (Pragma_Name);
9486 -- Convenient function to obtain Chars field of Pragma_Identifier
9487
9488 -----------------------------
9489 -- Syntactic Parent Tables --
9490 -----------------------------
9491
9492 -- These tables show for each node, and for each of the five fields,
9493 -- whether the corresponding field is syntactic (True) or semantic (False).
9494 -- Unused entries are also set to False.
9495
9496 subtype Field_Num is Natural range 1 .. 5;
9497
9498 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9499
9500 -- Following entries can be built automatically from the sinfo sources
9501 -- using the makeisf utility (currently this program is in spitbol).
9502
9503 N_Identifier =>
9504 (1 => True, -- Chars (Name1)
9505 2 => False, -- Original_Discriminant (Node2-Sem)
9506 3 => False, -- unused
9507 4 => False, -- Entity (Node4-Sem)
9508 5 => False), -- Etype (Node5-Sem)
9509
9510 N_Integer_Literal =>
9511 (1 => False, -- unused
9512 2 => False, -- Original_Entity (Node2-Sem)
9513 3 => True, -- Intval (Uint3)
9514 4 => False, -- unused
9515 5 => False), -- Etype (Node5-Sem)
9516
9517 N_Real_Literal =>
9518 (1 => False, -- unused
9519 2 => False, -- Original_Entity (Node2-Sem)
9520 3 => True, -- Realval (Ureal3)
9521 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9522 5 => False), -- Etype (Node5-Sem)
9523
9524 N_Character_Literal =>
9525 (1 => True, -- Chars (Name1)
9526 2 => True, -- Char_Literal_Value (Uint2)
9527 3 => False, -- unused
9528 4 => False, -- Entity (Node4-Sem)
9529 5 => False), -- Etype (Node5-Sem)
9530
9531 N_String_Literal =>
9532 (1 => False, -- unused
9533 2 => False, -- unused
9534 3 => True, -- Strval (Str3)
9535 4 => False, -- unused
9536 5 => False), -- Etype (Node5-Sem)
9537
9538 N_Pragma =>
9539 (1 => False, -- Next_Pragma (Node1-Sem)
9540 2 => True, -- Pragma_Argument_Associations (List2)
9541 3 => True, -- Debug_Statement (Node3)
9542 4 => True, -- Pragma_Identifier (Node4)
9543 5 => False), -- Next_Rep_Item (Node5-Sem)
9544
9545 N_Pragma_Argument_Association =>
9546 (1 => True, -- Chars (Name1)
9547 2 => False, -- unused
9548 3 => True, -- Expression (Node3)
9549 4 => False, -- unused
9550 5 => False), -- unused
9551
9552 N_Defining_Identifier =>
9553 (1 => True, -- Chars (Name1)
9554 2 => False, -- Next_Entity (Node2-Sem)
9555 3 => False, -- Scope (Node3-Sem)
9556 4 => False, -- unused
9557 5 => False), -- Etype (Node5-Sem)
9558
9559 N_Full_Type_Declaration =>
9560 (1 => True, -- Defining_Identifier (Node1)
9561 2 => False, -- unused
9562 3 => True, -- Type_Definition (Node3)
9563 4 => True, -- Discriminant_Specifications (List4)
9564 5 => False), -- unused
9565
9566 N_Subtype_Declaration =>
9567 (1 => True, -- Defining_Identifier (Node1)
9568 2 => False, -- unused
9569 3 => False, -- unused
9570 4 => False, -- Generic_Parent_Type (Node4-Sem)
9571 5 => True), -- Subtype_Indication (Node5)
9572
9573 N_Subtype_Indication =>
9574 (1 => False, -- unused
9575 2 => False, -- unused
9576 3 => True, -- Constraint (Node3)
9577 4 => True, -- Subtype_Mark (Node4)
9578 5 => False), -- Etype (Node5-Sem)
9579
9580 N_Object_Declaration =>
9581 (1 => True, -- Defining_Identifier (Node1)
9582 2 => False, -- Handler_List_Entry (Node2-Sem)
9583 3 => True, -- Expression (Node3)
9584 4 => True, -- Object_Definition (Node4)
9585 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9586
9587 N_Number_Declaration =>
9588 (1 => True, -- Defining_Identifier (Node1)
9589 2 => False, -- unused
9590 3 => True, -- Expression (Node3)
9591 4 => False, -- unused
9592 5 => False), -- unused
9593
9594 N_Derived_Type_Definition =>
9595 (1 => False, -- unused
9596 2 => True, -- Interface_List (List2)
9597 3 => True, -- Record_Extension_Part (Node3)
9598 4 => False, -- unused
9599 5 => True), -- Subtype_Indication (Node5)
9600
9601 N_Range_Constraint =>
9602 (1 => False, -- unused
9603 2 => False, -- unused
9604 3 => False, -- unused
9605 4 => True, -- Range_Expression (Node4)
9606 5 => False), -- unused
9607
9608 N_Range =>
9609 (1 => True, -- Low_Bound (Node1)
9610 2 => True, -- High_Bound (Node2)
9611 3 => False, -- unused
9612 4 => False, -- unused
9613 5 => False), -- Etype (Node5-Sem)
9614
9615 N_Enumeration_Type_Definition =>
9616 (1 => True, -- Literals (List1)
9617 2 => False, -- unused
9618 3 => False, -- unused
9619 4 => True, -- End_Label (Node4)
9620 5 => False), -- unused
9621
9622 N_Defining_Character_Literal =>
9623 (1 => True, -- Chars (Name1)
9624 2 => False, -- Next_Entity (Node2-Sem)
9625 3 => False, -- Scope (Node3-Sem)
9626 4 => False, -- unused
9627 5 => False), -- Etype (Node5-Sem)
9628
9629 N_Signed_Integer_Type_Definition =>
9630 (1 => True, -- Low_Bound (Node1)
9631 2 => True, -- High_Bound (Node2)
9632 3 => False, -- unused
9633 4 => False, -- unused
9634 5 => False), -- unused
9635
9636 N_Modular_Type_Definition =>
9637 (1 => False, -- unused
9638 2 => False, -- unused
9639 3 => True, -- Expression (Node3)
9640 4 => False, -- unused
9641 5 => False), -- unused
9642
9643 N_Floating_Point_Definition =>
9644 (1 => False, -- unused
9645 2 => True, -- Digits_Expression (Node2)
9646 3 => False, -- unused
9647 4 => True, -- Real_Range_Specification (Node4)
9648 5 => False), -- unused
9649
9650 N_Real_Range_Specification =>
9651 (1 => True, -- Low_Bound (Node1)
9652 2 => True, -- High_Bound (Node2)
9653 3 => False, -- unused
9654 4 => False, -- unused
9655 5 => False), -- unused
9656
9657 N_Ordinary_Fixed_Point_Definition =>
9658 (1 => False, -- unused
9659 2 => False, -- unused
9660 3 => True, -- Delta_Expression (Node3)
9661 4 => True, -- Real_Range_Specification (Node4)
9662 5 => False), -- unused
9663
9664 N_Decimal_Fixed_Point_Definition =>
9665 (1 => False, -- unused
9666 2 => True, -- Digits_Expression (Node2)
9667 3 => True, -- Delta_Expression (Node3)
9668 4 => True, -- Real_Range_Specification (Node4)
9669 5 => False), -- unused
9670
9671 N_Digits_Constraint =>
9672 (1 => False, -- unused
9673 2 => True, -- Digits_Expression (Node2)
9674 3 => False, -- unused
9675 4 => True, -- Range_Constraint (Node4)
9676 5 => False), -- unused
9677
9678 N_Unconstrained_Array_Definition =>
9679 (1 => False, -- unused
9680 2 => True, -- Subtype_Marks (List2)
9681 3 => False, -- unused
9682 4 => True, -- Component_Definition (Node4)
9683 5 => False), -- unused
9684
9685 N_Constrained_Array_Definition =>
9686 (1 => False, -- unused
9687 2 => True, -- Discrete_Subtype_Definitions (List2)
9688 3 => False, -- unused
9689 4 => True, -- Component_Definition (Node4)
9690 5 => False), -- unused
9691
9692 N_Component_Definition =>
9693 (1 => False, -- unused
9694 2 => False, -- unused
9695 3 => True, -- Access_Definition (Node3)
9696 4 => False, -- unused
9697 5 => True), -- Subtype_Indication (Node5)
9698
9699 N_Discriminant_Specification =>
9700 (1 => True, -- Defining_Identifier (Node1)
9701 2 => False, -- unused
9702 3 => True, -- Expression (Node3)
9703 4 => False, -- unused
9704 5 => True), -- Discriminant_Type (Node5)
9705
9706 N_Index_Or_Discriminant_Constraint =>
9707 (1 => True, -- Constraints (List1)
9708 2 => False, -- unused
9709 3 => False, -- unused
9710 4 => False, -- unused
9711 5 => False), -- unused
9712
9713 N_Discriminant_Association =>
9714 (1 => True, -- Selector_Names (List1)
9715 2 => False, -- unused
9716 3 => True, -- Expression (Node3)
9717 4 => False, -- unused
9718 5 => False), -- unused
9719
9720 N_Record_Definition =>
9721 (1 => True, -- Component_List (Node1)
9722 2 => True, -- Interface_List (List2)
9723 3 => False, -- unused
9724 4 => True, -- End_Label (Node4)
9725 5 => False), -- unused
9726
9727 N_Component_List =>
9728 (1 => False, -- unused
9729 2 => False, -- unused
9730 3 => True, -- Component_Items (List3)
9731 4 => True, -- Variant_Part (Node4)
9732 5 => False), -- unused
9733
9734 N_Component_Declaration =>
9735 (1 => True, -- Defining_Identifier (Node1)
9736 2 => False, -- unused
9737 3 => True, -- Expression (Node3)
9738 4 => True, -- Component_Definition (Node4)
9739 5 => False), -- unused
9740
9741 N_Variant_Part =>
9742 (1 => True, -- Variants (List1)
9743 2 => True, -- Name (Node2)
9744 3 => False, -- unused
9745 4 => False, -- unused
9746 5 => False), -- unused
9747
9748 N_Variant =>
9749 (1 => True, -- Component_List (Node1)
9750 2 => False, -- Enclosing_Variant (Node2-Sem)
9751 3 => False, -- Present_Expr (Uint3-Sem)
9752 4 => True, -- Discrete_Choices (List4)
9753 5 => False), -- Dcheck_Function (Node5-Sem)
9754
9755 N_Others_Choice =>
9756 (1 => False, -- Others_Discrete_Choices (List1-Sem)
9757 2 => False, -- unused
9758 3 => False, -- unused
9759 4 => False, -- unused
9760 5 => False), -- unused
9761
9762 N_Access_To_Object_Definition =>
9763 (1 => False, -- unused
9764 2 => False, -- unused
9765 3 => False, -- unused
9766 4 => False, -- unused
9767 5 => True), -- Subtype_Indication (Node5)
9768
9769 N_Access_Function_Definition =>
9770 (1 => False, -- unused
9771 2 => False, -- unused
9772 3 => True, -- Parameter_Specifications (List3)
9773 4 => True, -- Result_Definition (Node4)
9774 5 => False), -- unused
9775
9776 N_Access_Procedure_Definition =>
9777 (1 => False, -- unused
9778 2 => False, -- unused
9779 3 => True, -- Parameter_Specifications (List3)
9780 4 => False, -- unused
9781 5 => False), -- unused
9782
9783 N_Access_Definition =>
9784 (1 => False, -- unused
9785 2 => False, -- unused
9786 3 => True, -- Access_To_Subprogram_Definition (Node3)
9787 4 => True, -- Subtype_Mark (Node4)
9788 5 => False), -- unused
9789
9790 N_Incomplete_Type_Declaration =>
9791 (1 => True, -- Defining_Identifier (Node1)
9792 2 => False, -- unused
9793 3 => False, -- unused
9794 4 => True, -- Discriminant_Specifications (List4)
9795 5 => False), -- unused
9796
9797 N_Explicit_Dereference =>
9798 (1 => False, -- unused
9799 2 => False, -- unused
9800 3 => True, -- Prefix (Node3)
9801 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
9802 5 => False), -- Etype (Node5-Sem)
9803
9804 N_Indexed_Component =>
9805 (1 => True, -- Expressions (List1)
9806 2 => False, -- unused
9807 3 => True, -- Prefix (Node3)
9808 4 => False, -- unused
9809 5 => False), -- Etype (Node5-Sem)
9810
9811 N_Slice =>
9812 (1 => False, -- unused
9813 2 => False, -- unused
9814 3 => True, -- Prefix (Node3)
9815 4 => True, -- Discrete_Range (Node4)
9816 5 => False), -- Etype (Node5-Sem)
9817
9818 N_Selected_Component =>
9819 (1 => False, -- unused
9820 2 => True, -- Selector_Name (Node2)
9821 3 => True, -- Prefix (Node3)
9822 4 => False, -- unused
9823 5 => False), -- Etype (Node5-Sem)
9824
9825 N_Attribute_Reference =>
9826 (1 => True, -- Expressions (List1)
9827 2 => True, -- Attribute_Name (Name2)
9828 3 => True, -- Prefix (Node3)
9829 4 => False, -- Entity (Node4-Sem)
9830 5 => False), -- Etype (Node5-Sem)
9831
9832 N_Aggregate =>
9833 (1 => True, -- Expressions (List1)
9834 2 => True, -- Component_Associations (List2)
9835 3 => False, -- Aggregate_Bounds (Node3-Sem)
9836 4 => False, -- unused
9837 5 => False), -- Etype (Node5-Sem)
9838
9839 N_Component_Association =>
9840 (1 => True, -- Choices (List1)
9841 2 => False, -- Loop_Actions (List2-Sem)
9842 3 => True, -- Expression (Node3)
9843 4 => False, -- unused
9844 5 => False), -- unused
9845
9846 N_Extension_Aggregate =>
9847 (1 => True, -- Expressions (List1)
9848 2 => True, -- Component_Associations (List2)
9849 3 => True, -- Ancestor_Part (Node3)
9850 4 => False, -- unused
9851 5 => False), -- Etype (Node5-Sem)
9852
9853 N_Null =>
9854 (1 => False, -- unused
9855 2 => False, -- unused
9856 3 => False, -- unused
9857 4 => False, -- unused
9858 5 => False), -- Etype (Node5-Sem)
9859
9860 N_And_Then =>
9861 (1 => False, -- Actions (List1-Sem)
9862 2 => True, -- Left_Opnd (Node2)
9863 3 => True, -- Right_Opnd (Node3)
9864 4 => False, -- unused
9865 5 => False), -- Etype (Node5-Sem)
9866
9867 N_Or_Else =>
9868 (1 => False, -- Actions (List1-Sem)
9869 2 => True, -- Left_Opnd (Node2)
9870 3 => True, -- Right_Opnd (Node3)
9871 4 => False, -- unused
9872 5 => False), -- Etype (Node5-Sem)
9873
9874 N_In =>
9875 (1 => False, -- unused
9876 2 => True, -- Left_Opnd (Node2)
9877 3 => True, -- Right_Opnd (Node3)
9878 4 => True, -- Alternatives (List4)
9879 5 => False), -- Etype (Node5-Sem)
9880
9881 N_Not_In =>
9882 (1 => False, -- unused
9883 2 => True, -- Left_Opnd (Node2)
9884 3 => True, -- Right_Opnd (Node3)
9885 4 => True, -- Alternatives (List4)
9886 5 => False), -- Etype (Node5-Sem)
9887
9888 N_Op_And =>
9889 (1 => True, -- Chars (Name1)
9890 2 => True, -- Left_Opnd (Node2)
9891 3 => True, -- Right_Opnd (Node3)
9892 4 => False, -- Entity (Node4-Sem)
9893 5 => False), -- Etype (Node5-Sem)
9894
9895 N_Op_Or =>
9896 (1 => True, -- Chars (Name1)
9897 2 => True, -- Left_Opnd (Node2)
9898 3 => True, -- Right_Opnd (Node3)
9899 4 => False, -- Entity (Node4-Sem)
9900 5 => False), -- Etype (Node5-Sem)
9901
9902 N_Op_Xor =>
9903 (1 => True, -- Chars (Name1)
9904 2 => True, -- Left_Opnd (Node2)
9905 3 => True, -- Right_Opnd (Node3)
9906 4 => False, -- Entity (Node4-Sem)
9907 5 => False), -- Etype (Node5-Sem)
9908
9909 N_Op_Eq =>
9910 (1 => True, -- Chars (Name1)
9911 2 => True, -- Left_Opnd (Node2)
9912 3 => True, -- Right_Opnd (Node3)
9913 4 => False, -- Entity (Node4-Sem)
9914 5 => False), -- Etype (Node5-Sem)
9915
9916 N_Op_Ne =>
9917 (1 => True, -- Chars (Name1)
9918 2 => True, -- Left_Opnd (Node2)
9919 3 => True, -- Right_Opnd (Node3)
9920 4 => False, -- Entity (Node4-Sem)
9921 5 => False), -- Etype (Node5-Sem)
9922
9923 N_Op_Lt =>
9924 (1 => True, -- Chars (Name1)
9925 2 => True, -- Left_Opnd (Node2)
9926 3 => True, -- Right_Opnd (Node3)
9927 4 => False, -- Entity (Node4-Sem)
9928 5 => False), -- Etype (Node5-Sem)
9929
9930 N_Op_Le =>
9931 (1 => True, -- Chars (Name1)
9932 2 => True, -- Left_Opnd (Node2)
9933 3 => True, -- Right_Opnd (Node3)
9934 4 => False, -- Entity (Node4-Sem)
9935 5 => False), -- Etype (Node5-Sem)
9936
9937 N_Op_Gt =>
9938 (1 => True, -- Chars (Name1)
9939 2 => True, -- Left_Opnd (Node2)
9940 3 => True, -- Right_Opnd (Node3)
9941 4 => False, -- Entity (Node4-Sem)
9942 5 => False), -- Etype (Node5-Sem)
9943
9944 N_Op_Ge =>
9945 (1 => True, -- Chars (Name1)
9946 2 => True, -- Left_Opnd (Node2)
9947 3 => True, -- Right_Opnd (Node3)
9948 4 => False, -- Entity (Node4-Sem)
9949 5 => False), -- Etype (Node5-Sem)
9950
9951 N_Op_Add =>
9952 (1 => True, -- Chars (Name1)
9953 2 => True, -- Left_Opnd (Node2)
9954 3 => True, -- Right_Opnd (Node3)
9955 4 => False, -- Entity (Node4-Sem)
9956 5 => False), -- Etype (Node5-Sem)
9957
9958 N_Op_Subtract =>
9959 (1 => True, -- Chars (Name1)
9960 2 => True, -- Left_Opnd (Node2)
9961 3 => True, -- Right_Opnd (Node3)
9962 4 => False, -- Entity (Node4-Sem)
9963 5 => False), -- Etype (Node5-Sem)
9964
9965 N_Op_Concat =>
9966 (1 => True, -- Chars (Name1)
9967 2 => True, -- Left_Opnd (Node2)
9968 3 => True, -- Right_Opnd (Node3)
9969 4 => False, -- Entity (Node4-Sem)
9970 5 => False), -- Etype (Node5-Sem)
9971
9972 N_Op_Multiply =>
9973 (1 => True, -- Chars (Name1)
9974 2 => True, -- Left_Opnd (Node2)
9975 3 => True, -- Right_Opnd (Node3)
9976 4 => False, -- Entity (Node4-Sem)
9977 5 => False), -- Etype (Node5-Sem)
9978
9979 N_Op_Divide =>
9980 (1 => True, -- Chars (Name1)
9981 2 => True, -- Left_Opnd (Node2)
9982 3 => True, -- Right_Opnd (Node3)
9983 4 => False, -- Entity (Node4-Sem)
9984 5 => False), -- Etype (Node5-Sem)
9985
9986 N_Op_Mod =>
9987 (1 => True, -- Chars (Name1)
9988 2 => True, -- Left_Opnd (Node2)
9989 3 => True, -- Right_Opnd (Node3)
9990 4 => False, -- Entity (Node4-Sem)
9991 5 => False), -- Etype (Node5-Sem)
9992
9993 N_Op_Rem =>
9994 (1 => True, -- Chars (Name1)
9995 2 => True, -- Left_Opnd (Node2)
9996 3 => True, -- Right_Opnd (Node3)
9997 4 => False, -- Entity (Node4-Sem)
9998 5 => False), -- Etype (Node5-Sem)
9999
10000 N_Op_Expon =>
10001 (1 => True, -- Chars (Name1)
10002 2 => True, -- Left_Opnd (Node2)
10003 3 => True, -- Right_Opnd (Node3)
10004 4 => False, -- Entity (Node4-Sem)
10005 5 => False), -- Etype (Node5-Sem)
10006
10007 N_Op_Plus =>
10008 (1 => True, -- Chars (Name1)
10009 2 => False, -- unused
10010 3 => True, -- Right_Opnd (Node3)
10011 4 => False, -- Entity (Node4-Sem)
10012 5 => False), -- Etype (Node5-Sem)
10013
10014 N_Op_Minus =>
10015 (1 => True, -- Chars (Name1)
10016 2 => False, -- unused
10017 3 => True, -- Right_Opnd (Node3)
10018 4 => False, -- Entity (Node4-Sem)
10019 5 => False), -- Etype (Node5-Sem)
10020
10021 N_Op_Abs =>
10022 (1 => True, -- Chars (Name1)
10023 2 => False, -- unused
10024 3 => True, -- Right_Opnd (Node3)
10025 4 => False, -- Entity (Node4-Sem)
10026 5 => False), -- Etype (Node5-Sem)
10027
10028 N_Op_Not =>
10029 (1 => True, -- Chars (Name1)
10030 2 => False, -- unused
10031 3 => True, -- Right_Opnd (Node3)
10032 4 => False, -- Entity (Node4-Sem)
10033 5 => False), -- Etype (Node5-Sem)
10034
10035 N_Type_Conversion =>
10036 (1 => False, -- unused
10037 2 => False, -- unused
10038 3 => True, -- Expression (Node3)
10039 4 => True, -- Subtype_Mark (Node4)
10040 5 => False), -- Etype (Node5-Sem)
10041
10042 N_Qualified_Expression =>
10043 (1 => False, -- unused
10044 2 => False, -- unused
10045 3 => True, -- Expression (Node3)
10046 4 => True, -- Subtype_Mark (Node4)
10047 5 => False), -- Etype (Node5-Sem)
10048
10049 N_Allocator =>
10050 (1 => False, -- Storage_Pool (Node1-Sem)
10051 2 => False, -- Procedure_To_Call (Node2-Sem)
10052 3 => True, -- Expression (Node3)
10053 4 => False, -- Coextensions (Elist4-Sem)
10054 5 => False), -- Etype (Node5-Sem)
10055
10056 N_Null_Statement =>
10057 (1 => False, -- unused
10058 2 => False, -- unused
10059 3 => False, -- unused
10060 4 => False, -- unused
10061 5 => False), -- unused
10062
10063 N_Label =>
10064 (1 => True, -- Identifier (Node1)
10065 2 => False, -- unused
10066 3 => False, -- unused
10067 4 => False, -- unused
10068 5 => False), -- unused
10069
10070 N_Assignment_Statement =>
10071 (1 => False, -- unused
10072 2 => True, -- Name (Node2)
10073 3 => True, -- Expression (Node3)
10074 4 => False, -- unused
10075 5 => False), -- unused
10076
10077 N_If_Statement =>
10078 (1 => True, -- Condition (Node1)
10079 2 => True, -- Then_Statements (List2)
10080 3 => True, -- Elsif_Parts (List3)
10081 4 => True, -- Else_Statements (List4)
10082 5 => True), -- End_Span (Uint5)
10083
10084 N_Elsif_Part =>
10085 (1 => True, -- Condition (Node1)
10086 2 => True, -- Then_Statements (List2)
10087 3 => False, -- Condition_Actions (List3-Sem)
10088 4 => False, -- unused
10089 5 => False), -- unused
10090
10091 N_Case_Statement =>
10092 (1 => False, -- unused
10093 2 => False, -- unused
10094 3 => True, -- Expression (Node3)
10095 4 => True, -- Alternatives (List4)
10096 5 => True), -- End_Span (Uint5)
10097
10098 N_Case_Statement_Alternative =>
10099 (1 => False, -- unused
10100 2 => False, -- unused
10101 3 => True, -- Statements (List3)
10102 4 => True, -- Discrete_Choices (List4)
10103 5 => False), -- unused
10104
10105 N_Loop_Statement =>
10106 (1 => True, -- Identifier (Node1)
10107 2 => True, -- Iteration_Scheme (Node2)
10108 3 => True, -- Statements (List3)
10109 4 => True, -- End_Label (Node4)
10110 5 => False), -- unused
10111
10112 N_Iteration_Scheme =>
10113 (1 => True, -- Condition (Node1)
10114 2 => False, -- unused
10115 3 => False, -- Condition_Actions (List3-Sem)
10116 4 => True, -- Loop_Parameter_Specification (Node4)
10117 5 => False), -- unused
10118
10119 N_Loop_Parameter_Specification =>
10120 (1 => True, -- Defining_Identifier (Node1)
10121 2 => False, -- unused
10122 3 => False, -- unused
10123 4 => True, -- Discrete_Subtype_Definition (Node4)
10124 5 => False), -- unused
10125
10126 N_Block_Statement =>
10127 (1 => True, -- Identifier (Node1)
10128 2 => True, -- Declarations (List2)
10129 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10130 4 => True, -- Handled_Statement_Sequence (Node4)
10131 5 => False), -- unused
10132
10133 N_Exit_Statement =>
10134 (1 => True, -- Condition (Node1)
10135 2 => True, -- Name (Node2)
10136 3 => False, -- unused
10137 4 => False, -- unused
10138 5 => False), -- unused
10139
10140 N_Goto_Statement =>
10141 (1 => False, -- unused
10142 2 => True, -- Name (Node2)
10143 3 => False, -- unused
10144 4 => False, -- unused
10145 5 => False), -- unused
10146
10147 N_Subprogram_Declaration =>
10148 (1 => True, -- Specification (Node1)
10149 2 => False, -- unused
10150 3 => False, -- Body_To_Inline (Node3-Sem)
10151 4 => False, -- Parent_Spec (Node4-Sem)
10152 5 => False), -- Corresponding_Body (Node5-Sem)
10153
10154 N_Abstract_Subprogram_Declaration =>
10155 (1 => True, -- Specification (Node1)
10156 2 => False, -- unused
10157 3 => False, -- unused
10158 4 => False, -- unused
10159 5 => False), -- unused
10160
10161 N_Function_Specification =>
10162 (1 => True, -- Defining_Unit_Name (Node1)
10163 2 => False, -- Elaboration_Boolean (Node2-Sem)
10164 3 => True, -- Parameter_Specifications (List3)
10165 4 => True, -- Result_Definition (Node4)
10166 5 => False), -- Generic_Parent (Node5-Sem)
10167
10168 N_Procedure_Specification =>
10169 (1 => True, -- Defining_Unit_Name (Node1)
10170 2 => False, -- Elaboration_Boolean (Node2-Sem)
10171 3 => True, -- Parameter_Specifications (List3)
10172 4 => False, -- unused
10173 5 => False), -- Generic_Parent (Node5-Sem)
10174
10175 N_Designator =>
10176 (1 => True, -- Identifier (Node1)
10177 2 => True, -- Name (Node2)
10178 3 => False, -- unused
10179 4 => False, -- unused
10180 5 => False), -- unused
10181
10182 N_Defining_Program_Unit_Name =>
10183 (1 => True, -- Defining_Identifier (Node1)
10184 2 => True, -- Name (Node2)
10185 3 => False, -- unused
10186 4 => False, -- unused
10187 5 => False), -- unused
10188
10189 N_Operator_Symbol =>
10190 (1 => True, -- Chars (Name1)
10191 2 => False, -- unused
10192 3 => True, -- Strval (Str3)
10193 4 => False, -- Entity (Node4-Sem)
10194 5 => False), -- Etype (Node5-Sem)
10195
10196 N_Defining_Operator_Symbol =>
10197 (1 => True, -- Chars (Name1)
10198 2 => False, -- Next_Entity (Node2-Sem)
10199 3 => False, -- Scope (Node3-Sem)
10200 4 => False, -- unused
10201 5 => False), -- Etype (Node5-Sem)
10202
10203 N_Parameter_Specification =>
10204 (1 => True, -- Defining_Identifier (Node1)
10205 2 => True, -- Parameter_Type (Node2)
10206 3 => True, -- Expression (Node3)
10207 4 => False, -- unused
10208 5 => False), -- Default_Expression (Node5-Sem)
10209
10210 N_Subprogram_Body =>
10211 (1 => True, -- Specification (Node1)
10212 2 => True, -- Declarations (List2)
10213 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10214 4 => True, -- Handled_Statement_Sequence (Node4)
10215 5 => False), -- Corresponding_Spec (Node5-Sem)
10216
10217 N_Procedure_Call_Statement =>
10218 (1 => False, -- Controlling_Argument (Node1-Sem)
10219 2 => True, -- Name (Node2)
10220 3 => True, -- Parameter_Associations (List3)
10221 4 => False, -- First_Named_Actual (Node4-Sem)
10222 5 => False), -- Etype (Node5-Sem)
10223
10224 N_Function_Call =>
10225 (1 => False, -- Controlling_Argument (Node1-Sem)
10226 2 => True, -- Name (Node2)
10227 3 => True, -- Parameter_Associations (List3)
10228 4 => False, -- First_Named_Actual (Node4-Sem)
10229 5 => False), -- Etype (Node5-Sem)
10230
10231 N_Parameter_Association =>
10232 (1 => False, -- unused
10233 2 => True, -- Selector_Name (Node2)
10234 3 => True, -- Explicit_Actual_Parameter (Node3)
10235 4 => False, -- Next_Named_Actual (Node4-Sem)
10236 5 => False), -- unused
10237
10238 N_Return_Statement =>
10239 (1 => False, -- Storage_Pool (Node1-Sem)
10240 2 => False, -- Procedure_To_Call (Node2-Sem)
10241 3 => True, -- Expression (Node3)
10242 4 => False, -- unused
10243 5 => False), -- Return_Statement_Entity (Node5-Sem)
10244
10245 N_Extended_Return_Statement =>
10246 (1 => False, -- Storage_Pool (Node1-Sem)
10247 2 => False, -- Procedure_To_Call (Node2-Sem)
10248 3 => True, -- Return_Object_Declarations (List3)
10249 4 => True, -- Handled_Statement_Sequence (Node4)
10250 5 => False), -- Return_Statement_Entity (Node5-Sem)
10251
10252 N_Package_Declaration =>
10253 (1 => True, -- Specification (Node1)
10254 2 => False, -- unused
10255 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10256 4 => False, -- Parent_Spec (Node4-Sem)
10257 5 => False), -- Corresponding_Body (Node5-Sem)
10258
10259 N_Package_Specification =>
10260 (1 => True, -- Defining_Unit_Name (Node1)
10261 2 => True, -- Visible_Declarations (List2)
10262 3 => True, -- Private_Declarations (List3)
10263 4 => True, -- End_Label (Node4)
10264 5 => False), -- Generic_Parent (Node5-Sem)
10265
10266 N_Package_Body =>
10267 (1 => True, -- Defining_Unit_Name (Node1)
10268 2 => True, -- Declarations (List2)
10269 3 => False, -- unused
10270 4 => True, -- Handled_Statement_Sequence (Node4)
10271 5 => False), -- Corresponding_Spec (Node5-Sem)
10272
10273 N_Private_Type_Declaration =>
10274 (1 => True, -- Defining_Identifier (Node1)
10275 2 => False, -- unused
10276 3 => False, -- unused
10277 4 => True, -- Discriminant_Specifications (List4)
10278 5 => False), -- unused
10279
10280 N_Private_Extension_Declaration =>
10281 (1 => True, -- Defining_Identifier (Node1)
10282 2 => True, -- Interface_List (List2)
10283 3 => False, -- unused
10284 4 => True, -- Discriminant_Specifications (List4)
10285 5 => True), -- Subtype_Indication (Node5)
10286
10287 N_Use_Package_Clause =>
10288 (1 => False, -- unused
10289 2 => True, -- Names (List2)
10290 3 => False, -- Next_Use_Clause (Node3-Sem)
10291 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10292 5 => False), -- unused
10293
10294 N_Use_Type_Clause =>
10295 (1 => False, -- unused
10296 2 => True, -- Subtype_Marks (List2)
10297 3 => False, -- Next_Use_Clause (Node3-Sem)
10298 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10299 5 => False), -- unused
10300
10301 N_Object_Renaming_Declaration =>
10302 (1 => True, -- Defining_Identifier (Node1)
10303 2 => True, -- Name (Node2)
10304 3 => True, -- Access_Definition (Node3)
10305 4 => True, -- Subtype_Mark (Node4)
10306 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10307
10308 N_Exception_Renaming_Declaration =>
10309 (1 => True, -- Defining_Identifier (Node1)
10310 2 => True, -- Name (Node2)
10311 3 => False, -- unused
10312 4 => False, -- unused
10313 5 => False), -- unused
10314
10315 N_Package_Renaming_Declaration =>
10316 (1 => True, -- Defining_Unit_Name (Node1)
10317 2 => True, -- Name (Node2)
10318 3 => False, -- unused
10319 4 => False, -- Parent_Spec (Node4-Sem)
10320 5 => False), -- unused
10321
10322 N_Subprogram_Renaming_Declaration =>
10323 (1 => True, -- Specification (Node1)
10324 2 => True, -- Name (Node2)
10325 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10326 4 => False, -- Parent_Spec (Node4-Sem)
10327 5 => False), -- Corresponding_Spec (Node5-Sem)
10328
10329 N_Generic_Package_Renaming_Declaration =>
10330 (1 => True, -- Defining_Unit_Name (Node1)
10331 2 => True, -- Name (Node2)
10332 3 => False, -- unused
10333 4 => False, -- Parent_Spec (Node4-Sem)
10334 5 => False), -- unused
10335
10336 N_Generic_Procedure_Renaming_Declaration =>
10337 (1 => True, -- Defining_Unit_Name (Node1)
10338 2 => True, -- Name (Node2)
10339 3 => False, -- unused
10340 4 => False, -- Parent_Spec (Node4-Sem)
10341 5 => False), -- unused
10342
10343 N_Generic_Function_Renaming_Declaration =>
10344 (1 => True, -- Defining_Unit_Name (Node1)
10345 2 => True, -- Name (Node2)
10346 3 => False, -- unused
10347 4 => False, -- Parent_Spec (Node4-Sem)
10348 5 => False), -- unused
10349
10350 N_Task_Type_Declaration =>
10351 (1 => True, -- Defining_Identifier (Node1)
10352 2 => True, -- Interface_List (List2)
10353 3 => True, -- Task_Definition (Node3)
10354 4 => True, -- Discriminant_Specifications (List4)
10355 5 => False), -- Corresponding_Body (Node5-Sem)
10356
10357 N_Single_Task_Declaration =>
10358 (1 => True, -- Defining_Identifier (Node1)
10359 2 => True, -- Interface_List (List2)
10360 3 => True, -- Task_Definition (Node3)
10361 4 => False, -- unused
10362 5 => False), -- unused
10363
10364 N_Task_Definition =>
10365 (1 => False, -- unused
10366 2 => True, -- Visible_Declarations (List2)
10367 3 => True, -- Private_Declarations (List3)
10368 4 => True, -- End_Label (Node4)
10369 5 => False), -- unused
10370
10371 N_Task_Body =>
10372 (1 => True, -- Defining_Identifier (Node1)
10373 2 => True, -- Declarations (List2)
10374 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10375 4 => True, -- Handled_Statement_Sequence (Node4)
10376 5 => False), -- Corresponding_Spec (Node5-Sem)
10377
10378 N_Protected_Type_Declaration =>
10379 (1 => True, -- Defining_Identifier (Node1)
10380 2 => True, -- Interface_List (List2)
10381 3 => True, -- Protected_Definition (Node3)
10382 4 => True, -- Discriminant_Specifications (List4)
10383 5 => False), -- Corresponding_Body (Node5-Sem)
10384
10385 N_Single_Protected_Declaration =>
10386 (1 => True, -- Defining_Identifier (Node1)
10387 2 => True, -- Interface_List (List2)
10388 3 => True, -- Protected_Definition (Node3)
10389 4 => False, -- unused
10390 5 => False), -- unused
10391
10392 N_Protected_Definition =>
10393 (1 => False, -- unused
10394 2 => True, -- Visible_Declarations (List2)
10395 3 => True, -- Private_Declarations (List3)
10396 4 => True, -- End_Label (Node4)
10397 5 => False), -- unused
10398
10399 N_Protected_Body =>
10400 (1 => True, -- Defining_Identifier (Node1)
10401 2 => True, -- Declarations (List2)
10402 3 => False, -- unused
10403 4 => True, -- End_Label (Node4)
10404 5 => False), -- Corresponding_Spec (Node5-Sem)
10405
10406 N_Entry_Declaration =>
10407 (1 => True, -- Defining_Identifier (Node1)
10408 2 => False, -- unused
10409 3 => True, -- Parameter_Specifications (List3)
10410 4 => True, -- Discrete_Subtype_Definition (Node4)
10411 5 => False), -- Corresponding_Body (Node5-Sem)
10412
10413 N_Accept_Statement =>
10414 (1 => True, -- Entry_Direct_Name (Node1)
10415 2 => True, -- Declarations (List2)
10416 3 => True, -- Parameter_Specifications (List3)
10417 4 => True, -- Handled_Statement_Sequence (Node4)
10418 5 => True), -- Entry_Index (Node5)
10419
10420 N_Entry_Body =>
10421 (1 => True, -- Defining_Identifier (Node1)
10422 2 => True, -- Declarations (List2)
10423 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10424 4 => True, -- Handled_Statement_Sequence (Node4)
10425 5 => True), -- Entry_Body_Formal_Part (Node5)
10426
10427 N_Entry_Body_Formal_Part =>
10428 (1 => True, -- Condition (Node1)
10429 2 => False, -- unused
10430 3 => True, -- Parameter_Specifications (List3)
10431 4 => True, -- Entry_Index_Specification (Node4)
10432 5 => False), -- unused
10433
10434 N_Entry_Index_Specification =>
10435 (1 => True, -- Defining_Identifier (Node1)
10436 2 => False, -- unused
10437 3 => False, -- unused
10438 4 => True, -- Discrete_Subtype_Definition (Node4)
10439 5 => False), -- unused
10440
10441 N_Entry_Call_Statement =>
10442 (1 => False, -- unused
10443 2 => True, -- Name (Node2)
10444 3 => True, -- Parameter_Associations (List3)
10445 4 => False, -- First_Named_Actual (Node4-Sem)
10446 5 => False), -- unused
10447
10448 N_Requeue_Statement =>
10449 (1 => False, -- unused
10450 2 => True, -- Name (Node2)
10451 3 => False, -- unused
10452 4 => False, -- unused
10453 5 => False), -- unused
10454
10455 N_Delay_Until_Statement =>
10456 (1 => False, -- unused
10457 2 => False, -- unused
10458 3 => True, -- Expression (Node3)
10459 4 => False, -- unused
10460 5 => False), -- unused
10461
10462 N_Delay_Relative_Statement =>
10463 (1 => False, -- unused
10464 2 => False, -- unused
10465 3 => True, -- Expression (Node3)
10466 4 => False, -- unused
10467 5 => False), -- unused
10468
10469 N_Selective_Accept =>
10470 (1 => True, -- Select_Alternatives (List1)
10471 2 => False, -- unused
10472 3 => False, -- unused
10473 4 => True, -- Else_Statements (List4)
10474 5 => False), -- unused
10475
10476 N_Accept_Alternative =>
10477 (1 => True, -- Condition (Node1)
10478 2 => True, -- Accept_Statement (Node2)
10479 3 => True, -- Statements (List3)
10480 4 => True, -- Pragmas_Before (List4)
10481 5 => False), -- Accept_Handler_Records (List5-Sem)
10482
10483 N_Delay_Alternative =>
10484 (1 => True, -- Condition (Node1)
10485 2 => True, -- Delay_Statement (Node2)
10486 3 => True, -- Statements (List3)
10487 4 => True, -- Pragmas_Before (List4)
10488 5 => False), -- unused
10489
10490 N_Terminate_Alternative =>
10491 (1 => True, -- Condition (Node1)
10492 2 => False, -- unused
10493 3 => False, -- unused
10494 4 => True, -- Pragmas_Before (List4)
10495 5 => True), -- Pragmas_After (List5)
10496
10497 N_Timed_Entry_Call =>
10498 (1 => True, -- Entry_Call_Alternative (Node1)
10499 2 => False, -- unused
10500 3 => False, -- unused
10501 4 => True, -- Delay_Alternative (Node4)
10502 5 => False), -- unused
10503
10504 N_Entry_Call_Alternative =>
10505 (1 => True, -- Entry_Call_Statement (Node1)
10506 2 => False, -- unused
10507 3 => True, -- Statements (List3)
10508 4 => True, -- Pragmas_Before (List4)
10509 5 => False), -- unused
10510
10511 N_Conditional_Entry_Call =>
10512 (1 => True, -- Entry_Call_Alternative (Node1)
10513 2 => False, -- unused
10514 3 => False, -- unused
10515 4 => True, -- Else_Statements (List4)
10516 5 => False), -- unused
10517
10518 N_Asynchronous_Select =>
10519 (1 => True, -- Triggering_Alternative (Node1)
10520 2 => True, -- Abortable_Part (Node2)
10521 3 => False, -- unused
10522 4 => False, -- unused
10523 5 => False), -- unused
10524
10525 N_Triggering_Alternative =>
10526 (1 => True, -- Triggering_Statement (Node1)
10527 2 => False, -- unused
10528 3 => True, -- Statements (List3)
10529 4 => True, -- Pragmas_Before (List4)
10530 5 => False), -- unused
10531
10532 N_Abortable_Part =>
10533 (1 => False, -- unused
10534 2 => False, -- unused
10535 3 => True, -- Statements (List3)
10536 4 => False, -- unused
10537 5 => False), -- unused
10538
10539 N_Abort_Statement =>
10540 (1 => False, -- unused
10541 2 => True, -- Names (List2)
10542 3 => False, -- unused
10543 4 => False, -- unused
10544 5 => False), -- unused
10545
10546 N_Compilation_Unit =>
10547 (1 => True, -- Context_Items (List1)
10548 2 => True, -- Unit (Node2)
10549 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10550 4 => False, -- Library_Unit (Node4-Sem)
10551 5 => True), -- Aux_Decls_Node (Node5)
10552
10553 N_Compilation_Unit_Aux =>
10554 (1 => True, -- Actions (List1)
10555 2 => True, -- Declarations (List2)
10556 3 => False, -- unused
10557 4 => True, -- Config_Pragmas (List4)
10558 5 => True), -- Pragmas_After (List5)
10559
10560 N_With_Clause =>
10561 (1 => False, -- unused
10562 2 => True, -- Name (Node2)
10563 3 => False, -- unused
10564 4 => False, -- Library_Unit (Node4-Sem)
10565 5 => False), -- Corresponding_Spec (Node5-Sem)
10566
10567 N_Subprogram_Body_Stub =>
10568 (1 => True, -- Specification (Node1)
10569 2 => False, -- unused
10570 3 => False, -- unused
10571 4 => False, -- Library_Unit (Node4-Sem)
10572 5 => False), -- Corresponding_Body (Node5-Sem)
10573
10574 N_Package_Body_Stub =>
10575 (1 => True, -- Defining_Identifier (Node1)
10576 2 => False, -- unused
10577 3 => False, -- unused
10578 4 => False, -- Library_Unit (Node4-Sem)
10579 5 => False), -- Corresponding_Body (Node5-Sem)
10580
10581 N_Task_Body_Stub =>
10582 (1 => True, -- Defining_Identifier (Node1)
10583 2 => False, -- unused
10584 3 => False, -- unused
10585 4 => False, -- Library_Unit (Node4-Sem)
10586 5 => False), -- Corresponding_Body (Node5-Sem)
10587
10588 N_Protected_Body_Stub =>
10589 (1 => True, -- Defining_Identifier (Node1)
10590 2 => False, -- unused
10591 3 => False, -- unused
10592 4 => False, -- Library_Unit (Node4-Sem)
10593 5 => False), -- Corresponding_Body (Node5-Sem)
10594
10595 N_Subunit =>
10596 (1 => True, -- Proper_Body (Node1)
10597 2 => True, -- Name (Node2)
10598 3 => False, -- Corresponding_Stub (Node3-Sem)
10599 4 => False, -- unused
10600 5 => False), -- unused
10601
10602 N_Exception_Declaration =>
10603 (1 => True, -- Defining_Identifier (Node1)
10604 2 => False, -- unused
10605 3 => False, -- Expression (Node3-Sem)
10606 4 => False, -- unused
10607 5 => False), -- unused
10608
10609 N_Handled_Sequence_Of_Statements =>
10610 (1 => True, -- At_End_Proc (Node1)
10611 2 => False, -- First_Real_Statement (Node2-Sem)
10612 3 => True, -- Statements (List3)
10613 4 => True, -- End_Label (Node4)
10614 5 => True), -- Exception_Handlers (List5)
10615
10616 N_Exception_Handler =>
10617 (1 => False, -- Local_Raise_Statements (Elist1)
10618 2 => True, -- Choice_Parameter (Node2)
10619 3 => True, -- Statements (List3)
10620 4 => True, -- Exception_Choices (List4)
10621 5 => False), -- Exception_Label (Node5)
10622
10623 N_Raise_Statement =>
10624 (1 => False, -- unused
10625 2 => True, -- Name (Node2)
10626 3 => True, -- Expression (Node3)
10627 4 => False, -- unused
10628 5 => False), -- unused
10629
10630 N_Generic_Subprogram_Declaration =>
10631 (1 => True, -- Specification (Node1)
10632 2 => True, -- Generic_Formal_Declarations (List2)
10633 3 => False, -- unused
10634 4 => False, -- Parent_Spec (Node4-Sem)
10635 5 => False), -- Corresponding_Body (Node5-Sem)
10636
10637 N_Generic_Package_Declaration =>
10638 (1 => True, -- Specification (Node1)
10639 2 => True, -- Generic_Formal_Declarations (List2)
10640 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10641 4 => False, -- Parent_Spec (Node4-Sem)
10642 5 => False), -- Corresponding_Body (Node5-Sem)
10643
10644 N_Package_Instantiation =>
10645 (1 => True, -- Defining_Unit_Name (Node1)
10646 2 => True, -- Name (Node2)
10647 3 => True, -- Generic_Associations (List3)
10648 4 => False, -- Parent_Spec (Node4-Sem)
10649 5 => False), -- Instance_Spec (Node5-Sem)
10650
10651 N_Procedure_Instantiation =>
10652 (1 => True, -- Defining_Unit_Name (Node1)
10653 2 => True, -- Name (Node2)
10654 3 => True, -- Generic_Associations (List3)
10655 4 => False, -- Parent_Spec (Node4-Sem)
10656 5 => False), -- Instance_Spec (Node5-Sem)
10657
10658 N_Function_Instantiation =>
10659 (1 => True, -- Defining_Unit_Name (Node1)
10660 2 => True, -- Name (Node2)
10661 3 => True, -- Generic_Associations (List3)
10662 4 => False, -- Parent_Spec (Node4-Sem)
10663 5 => False), -- Instance_Spec (Node5-Sem)
10664
10665 N_Generic_Association =>
10666 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
10667 2 => True, -- Selector_Name (Node2)
10668 3 => False, -- unused
10669 4 => False, -- unused
10670 5 => False), -- unused
10671
10672 N_Formal_Object_Declaration =>
10673 (1 => True, -- Defining_Identifier (Node1)
10674 2 => False, -- unused
10675 3 => True, -- Access_Definition (Node3)
10676 4 => True, -- Subtype_Mark (Node4)
10677 5 => True), -- Default_Expression (Node5)
10678
10679 N_Formal_Type_Declaration =>
10680 (1 => True, -- Defining_Identifier (Node1)
10681 2 => False, -- unused
10682 3 => True, -- Formal_Type_Definition (Node3)
10683 4 => True, -- Discriminant_Specifications (List4)
10684 5 => False), -- unused
10685
10686 N_Formal_Private_Type_Definition =>
10687 (1 => False, -- unused
10688 2 => False, -- unused
10689 3 => False, -- unused
10690 4 => False, -- unused
10691 5 => False), -- unused
10692
10693 N_Formal_Derived_Type_Definition =>
10694 (1 => False, -- unused
10695 2 => True, -- Interface_List (List2)
10696 3 => False, -- unused
10697 4 => True, -- Subtype_Mark (Node4)
10698 5 => False), -- unused
10699
10700 N_Formal_Discrete_Type_Definition =>
10701 (1 => False, -- unused
10702 2 => False, -- unused
10703 3 => False, -- unused
10704 4 => False, -- unused
10705 5 => False), -- unused
10706
10707 N_Formal_Signed_Integer_Type_Definition =>
10708 (1 => False, -- unused
10709 2 => False, -- unused
10710 3 => False, -- unused
10711 4 => False, -- unused
10712 5 => False), -- unused
10713
10714 N_Formal_Modular_Type_Definition =>
10715 (1 => False, -- unused
10716 2 => False, -- unused
10717 3 => False, -- unused
10718 4 => False, -- unused
10719 5 => False), -- unused
10720
10721 N_Formal_Floating_Point_Definition =>
10722 (1 => False, -- unused
10723 2 => False, -- unused
10724 3 => False, -- unused
10725 4 => False, -- unused
10726 5 => False), -- unused
10727
10728 N_Formal_Ordinary_Fixed_Point_Definition =>
10729 (1 => False, -- unused
10730 2 => False, -- unused
10731 3 => False, -- unused
10732 4 => False, -- unused
10733 5 => False), -- unused
10734
10735 N_Formal_Decimal_Fixed_Point_Definition =>
10736 (1 => False, -- unused
10737 2 => False, -- unused
10738 3 => False, -- unused
10739 4 => False, -- unused
10740 5 => False), -- unused
10741
10742 N_Formal_Concrete_Subprogram_Declaration =>
10743 (1 => True, -- Specification (Node1)
10744 2 => True, -- Default_Name (Node2)
10745 3 => False, -- unused
10746 4 => False, -- unused
10747 5 => False), -- unused
10748
10749 N_Formal_Abstract_Subprogram_Declaration =>
10750 (1 => True, -- Specification (Node1)
10751 2 => True, -- Default_Name (Node2)
10752 3 => False, -- unused
10753 4 => False, -- unused
10754 5 => False), -- unused
10755
10756 N_Formal_Package_Declaration =>
10757 (1 => True, -- Defining_Identifier (Node1)
10758 2 => True, -- Name (Node2)
10759 3 => True, -- Generic_Associations (List3)
10760 4 => False, -- unused
10761 5 => False), -- Instance_Spec (Node5-Sem)
10762
10763 N_Attribute_Definition_Clause =>
10764 (1 => True, -- Chars (Name1)
10765 2 => True, -- Name (Node2)
10766 3 => True, -- Expression (Node3)
10767 4 => False, -- unused
10768 5 => False), -- Next_Rep_Item (Node5-Sem)
10769
10770 N_Enumeration_Representation_Clause =>
10771 (1 => True, -- Identifier (Node1)
10772 2 => False, -- unused
10773 3 => True, -- Array_Aggregate (Node3)
10774 4 => False, -- unused
10775 5 => False), -- Next_Rep_Item (Node5-Sem)
10776
10777 N_Record_Representation_Clause =>
10778 (1 => True, -- Identifier (Node1)
10779 2 => True, -- Mod_Clause (Node2)
10780 3 => True, -- Component_Clauses (List3)
10781 4 => False, -- unused
10782 5 => False), -- Next_Rep_Item (Node5-Sem)
10783
10784 N_Component_Clause =>
10785 (1 => True, -- Component_Name (Node1)
10786 2 => True, -- Position (Node2)
10787 3 => True, -- First_Bit (Node3)
10788 4 => True, -- Last_Bit (Node4)
10789 5 => False), -- unused
10790
10791 N_Code_Statement =>
10792 (1 => False, -- unused
10793 2 => False, -- unused
10794 3 => True, -- Expression (Node3)
10795 4 => False, -- unused
10796 5 => False), -- unused
10797
10798 N_Op_Rotate_Left =>
10799 (1 => True, -- Chars (Name1)
10800 2 => True, -- Left_Opnd (Node2)
10801 3 => True, -- Right_Opnd (Node3)
10802 4 => False, -- Entity (Node4-Sem)
10803 5 => False), -- Etype (Node5-Sem)
10804
10805 N_Op_Rotate_Right =>
10806 (1 => True, -- Chars (Name1)
10807 2 => True, -- Left_Opnd (Node2)
10808 3 => True, -- Right_Opnd (Node3)
10809 4 => False, -- Entity (Node4-Sem)
10810 5 => False), -- Etype (Node5-Sem)
10811
10812 N_Op_Shift_Left =>
10813 (1 => True, -- Chars (Name1)
10814 2 => True, -- Left_Opnd (Node2)
10815 3 => True, -- Right_Opnd (Node3)
10816 4 => False, -- Entity (Node4-Sem)
10817 5 => False), -- Etype (Node5-Sem)
10818
10819 N_Op_Shift_Right_Arithmetic =>
10820 (1 => True, -- Chars (Name1)
10821 2 => True, -- Left_Opnd (Node2)
10822 3 => True, -- Right_Opnd (Node3)
10823 4 => False, -- Entity (Node4-Sem)
10824 5 => False), -- Etype (Node5-Sem)
10825
10826 N_Op_Shift_Right =>
10827 (1 => True, -- Chars (Name1)
10828 2 => True, -- Left_Opnd (Node2)
10829 3 => True, -- Right_Opnd (Node3)
10830 4 => False, -- Entity (Node4-Sem)
10831 5 => False), -- Etype (Node5-Sem)
10832
10833 N_Delta_Constraint =>
10834 (1 => False, -- unused
10835 2 => False, -- unused
10836 3 => True, -- Delta_Expression (Node3)
10837 4 => True, -- Range_Constraint (Node4)
10838 5 => False), -- unused
10839
10840 N_At_Clause =>
10841 (1 => True, -- Identifier (Node1)
10842 2 => False, -- unused
10843 3 => True, -- Expression (Node3)
10844 4 => False, -- unused
10845 5 => False), -- unused
10846
10847 N_Mod_Clause =>
10848 (1 => False, -- unused
10849 2 => False, -- unused
10850 3 => True, -- Expression (Node3)
10851 4 => True, -- Pragmas_Before (List4)
10852 5 => False), -- unused
10853
10854 N_Conditional_Expression =>
10855 (1 => True, -- Expressions (List1)
10856 2 => False, -- Then_Actions (List2-Sem)
10857 3 => False, -- Else_Actions (List3-Sem)
10858 4 => False, -- unused
10859 5 => False), -- Etype (Node5-Sem)
10860
10861 N_Expanded_Name =>
10862 (1 => True, -- Chars (Name1)
10863 2 => True, -- Selector_Name (Node2)
10864 3 => True, -- Prefix (Node3)
10865 4 => False, -- Entity (Node4-Sem)
10866 5 => False), -- Etype (Node5-Sem)
10867
10868 N_Free_Statement =>
10869 (1 => False, -- Storage_Pool (Node1-Sem)
10870 2 => False, -- Procedure_To_Call (Node2-Sem)
10871 3 => True, -- Expression (Node3)
10872 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10873 5 => False), -- unused
10874
10875 N_Freeze_Entity =>
10876 (1 => True, -- Actions (List1)
10877 2 => False, -- Access_Types_To_Process (Elist2-Sem)
10878 3 => False, -- TSS_Elist (Elist3-Sem)
10879 4 => False, -- Entity (Node4-Sem)
10880 5 => False), -- First_Subtype_Link (Node5-Sem)
10881
10882 N_Implicit_Label_Declaration =>
10883 (1 => True, -- Defining_Identifier (Node1)
10884 2 => False, -- Label_Construct (Node2-Sem)
10885 3 => False, -- unused
10886 4 => False, -- unused
10887 5 => False), -- unused
10888
10889 N_Itype_Reference =>
10890 (1 => False, -- Itype (Node1-Sem)
10891 2 => False, -- unused
10892 3 => False, -- unused
10893 4 => False, -- unused
10894 5 => False), -- unused
10895
10896 N_Raise_Constraint_Error =>
10897 (1 => True, -- Condition (Node1)
10898 2 => False, -- unused
10899 3 => True, -- Reason (Uint3)
10900 4 => False, -- unused
10901 5 => False), -- Etype (Node5-Sem)
10902
10903 N_Raise_Program_Error =>
10904 (1 => True, -- Condition (Node1)
10905 2 => False, -- unused
10906 3 => True, -- Reason (Uint3)
10907 4 => False, -- unused
10908 5 => False), -- Etype (Node5-Sem)
10909
10910 N_Raise_Storage_Error =>
10911 (1 => True, -- Condition (Node1)
10912 2 => False, -- unused
10913 3 => True, -- Reason (Uint3)
10914 4 => False, -- unused
10915 5 => False), -- Etype (Node5-Sem)
10916
10917 N_Push_Constraint_Error_Label =>
10918 (1 => False, -- unused
10919 2 => False, -- unused
10920 3 => False, -- unused
10921 4 => False, -- unused
10922 5 => False), -- unused
10923
10924 N_Push_Program_Error_Label =>
10925 (1 => False, -- Exception_Label
10926 2 => False, -- unused
10927 3 => False, -- unused
10928 4 => False, -- unused
10929 5 => False), -- Exception_Label
10930
10931 N_Push_Storage_Error_Label =>
10932 (1 => False, -- Exception_Label
10933 2 => False, -- unused
10934 3 => False, -- unused
10935 4 => False, -- unused
10936 5 => False), -- Exception_Label
10937
10938 N_Pop_Constraint_Error_Label =>
10939 (1 => False, -- unused
10940 2 => False, -- unused
10941 3 => False, -- unused
10942 4 => False, -- unused
10943 5 => False), -- unused
10944
10945 N_Pop_Program_Error_Label =>
10946 (1 => False, -- unused
10947 2 => False, -- unused
10948 3 => False, -- unused
10949 4 => False, -- unused
10950 5 => False), -- unused
10951
10952 N_Pop_Storage_Error_Label =>
10953 (1 => False, -- unused
10954 2 => False, -- unused
10955 3 => False, -- unused
10956 4 => False, -- unused
10957 5 => False), -- unused
10958
10959 N_Reference =>
10960 (1 => False, -- unused
10961 2 => False, -- unused
10962 3 => True, -- Prefix (Node3)
10963 4 => False, -- unused
10964 5 => False), -- Etype (Node5-Sem)
10965
10966 N_Subprogram_Info =>
10967 (1 => True, -- Identifier (Node1)
10968 2 => False, -- unused
10969 3 => False, -- unused
10970 4 => False, -- unused
10971 5 => False), -- Etype (Node5-Sem)
10972
10973 N_Unchecked_Expression =>
10974 (1 => False, -- unused
10975 2 => False, -- unused
10976 3 => True, -- Expression (Node3)
10977 4 => False, -- unused
10978 5 => False), -- Etype (Node5-Sem)
10979
10980 N_Unchecked_Type_Conversion =>
10981 (1 => False, -- unused
10982 2 => False, -- unused
10983 3 => True, -- Expression (Node3)
10984 4 => True, -- Subtype_Mark (Node4)
10985 5 => False), -- Etype (Node5-Sem)
10986
10987 N_Validate_Unchecked_Conversion =>
10988 (1 => False, -- Source_Type (Node1-Sem)
10989 2 => False, -- Target_Type (Node2-Sem)
10990 3 => False, -- unused
10991 4 => False, -- unused
10992 5 => False), -- unused
10993
10994 -- End of inserted output from makeisf program
10995
10996 -- Entries for Empty, Error and Unused. Even thought these have a Chars
10997 -- field for debugging purposes, they are not really syntactic fields, so
10998 -- we mark all fields as unused.
10999
11000 N_Empty =>
11001 (1 => False, -- unused
11002 2 => False, -- unused
11003 3 => False, -- unused
11004 4 => False, -- unused
11005 5 => False), -- unused
11006
11007 N_Error =>
11008 (1 => False, -- unused
11009 2 => False, -- unused
11010 3 => False, -- unused
11011 4 => False, -- unused
11012 5 => False), -- unused
11013
11014 N_Unused_At_Start =>
11015 (1 => False, -- unused
11016 2 => False, -- unused
11017 3 => False, -- unused
11018 4 => False, -- unused
11019 5 => False), -- unused
11020
11021 N_Unused_At_End =>
11022 (1 => False, -- unused
11023 2 => False, -- unused
11024 3 => False, -- unused
11025 4 => False, -- unused
11026 5 => False)); -- unused
11027
11028 --------------------
11029 -- Inline Pragmas --
11030 --------------------
11031
11032 pragma Inline (ABE_Is_Certain);
11033 pragma Inline (Abort_Present);
11034 pragma Inline (Abortable_Part);
11035 pragma Inline (Abstract_Present);
11036 pragma Inline (Accept_Handler_Records);
11037 pragma Inline (Accept_Statement);
11038 pragma Inline (Access_Definition);
11039 pragma Inline (Access_To_Subprogram_Definition);
11040 pragma Inline (Access_Types_To_Process);
11041 pragma Inline (Actions);
11042 pragma Inline (Activation_Chain_Entity);
11043 pragma Inline (Acts_As_Spec);
11044 pragma Inline (Actual_Designated_Subtype);
11045 pragma Inline (Address_Warning_Posted);
11046 pragma Inline (Aggregate_Bounds);
11047 pragma Inline (Aliased_Present);
11048 pragma Inline (All_Others);
11049 pragma Inline (All_Present);
11050 pragma Inline (Alternatives);
11051 pragma Inline (Ancestor_Part);
11052 pragma Inline (Array_Aggregate);
11053 pragma Inline (Assignment_OK);
11054 pragma Inline (Associated_Node);
11055 pragma Inline (At_End_Proc);
11056 pragma Inline (Attribute_Name);
11057 pragma Inline (Aux_Decls_Node);
11058 pragma Inline (Backwards_OK);
11059 pragma Inline (Bad_Is_Detected);
11060 pragma Inline (Body_To_Inline);
11061 pragma Inline (Body_Required);
11062 pragma Inline (By_Ref);
11063 pragma Inline (Box_Present);
11064 pragma Inline (Char_Literal_Value);
11065 pragma Inline (Chars);
11066 pragma Inline (Check_Address_Alignment);
11067 pragma Inline (Choice_Parameter);
11068 pragma Inline (Choices);
11069 pragma Inline (Coextensions);
11070 pragma Inline (Comes_From_Extended_Return_Statement);
11071 pragma Inline (Compile_Time_Known_Aggregate);
11072 pragma Inline (Component_Associations);
11073 pragma Inline (Component_Clauses);
11074 pragma Inline (Component_Definition);
11075 pragma Inline (Component_Items);
11076 pragma Inline (Component_List);
11077 pragma Inline (Component_Name);
11078 pragma Inline (Componentwise_Assignment);
11079 pragma Inline (Condition);
11080 pragma Inline (Condition_Actions);
11081 pragma Inline (Config_Pragmas);
11082 pragma Inline (Constant_Present);
11083 pragma Inline (Constraint);
11084 pragma Inline (Constraints);
11085 pragma Inline (Context_Installed);
11086 pragma Inline (Context_Items);
11087 pragma Inline (Context_Pending);
11088 pragma Inline (Controlling_Argument);
11089 pragma Inline (Conversion_OK);
11090 pragma Inline (Corresponding_Body);
11091 pragma Inline (Corresponding_Formal_Spec);
11092 pragma Inline (Corresponding_Generic_Association);
11093 pragma Inline (Corresponding_Integer_Value);
11094 pragma Inline (Corresponding_Spec);
11095 pragma Inline (Corresponding_Stub);
11096 pragma Inline (Dcheck_Function);
11097 pragma Inline (Debug_Statement);
11098 pragma Inline (Declarations);
11099 pragma Inline (Default_Expression);
11100 pragma Inline (Default_Name);
11101 pragma Inline (Defining_Identifier);
11102 pragma Inline (Defining_Unit_Name);
11103 pragma Inline (Delay_Alternative);
11104 pragma Inline (Delay_Statement);
11105 pragma Inline (Delta_Expression);
11106 pragma Inline (Digits_Expression);
11107 pragma Inline (Discr_Check_Funcs_Built);
11108 pragma Inline (Discrete_Choices);
11109 pragma Inline (Discrete_Range);
11110 pragma Inline (Discrete_Subtype_Definition);
11111 pragma Inline (Discrete_Subtype_Definitions);
11112 pragma Inline (Discriminant_Specifications);
11113 pragma Inline (Discriminant_Type);
11114 pragma Inline (Do_Accessibility_Check);
11115 pragma Inline (Do_Discriminant_Check);
11116 pragma Inline (Do_Length_Check);
11117 pragma Inline (Do_Division_Check);
11118 pragma Inline (Do_Overflow_Check);
11119 pragma Inline (Do_Range_Check);
11120 pragma Inline (Do_Storage_Check);
11121 pragma Inline (Do_Tag_Check);
11122 pragma Inline (Elaborate_Present);
11123 pragma Inline (Elaborate_All_Desirable);
11124 pragma Inline (Elaborate_All_Present);
11125 pragma Inline (Elaborate_Desirable);
11126 pragma Inline (Elaboration_Boolean);
11127 pragma Inline (Else_Actions);
11128 pragma Inline (Else_Statements);
11129 pragma Inline (Elsif_Parts);
11130 pragma Inline (Enclosing_Variant);
11131 pragma Inline (End_Label);
11132 pragma Inline (End_Span);
11133 pragma Inline (Entity);
11134 pragma Inline (Entity_Or_Associated_Node);
11135 pragma Inline (Entry_Body_Formal_Part);
11136 pragma Inline (Entry_Call_Alternative);
11137 pragma Inline (Entry_Call_Statement);
11138 pragma Inline (Entry_Direct_Name);
11139 pragma Inline (Entry_Index);
11140 pragma Inline (Entry_Index_Specification);
11141 pragma Inline (Etype);
11142 pragma Inline (Exception_Choices);
11143 pragma Inline (Exception_Handlers);
11144 pragma Inline (Exception_Junk);
11145 pragma Inline (Exception_Label);
11146 pragma Inline (Expansion_Delayed);
11147 pragma Inline (Explicit_Actual_Parameter);
11148 pragma Inline (Explicit_Generic_Actual_Parameter);
11149 pragma Inline (Expression);
11150 pragma Inline (Expressions);
11151 pragma Inline (First_Bit);
11152 pragma Inline (First_Inlined_Subprogram);
11153 pragma Inline (First_Name);
11154 pragma Inline (First_Named_Actual);
11155 pragma Inline (First_Real_Statement);
11156 pragma Inline (First_Subtype_Link);
11157 pragma Inline (Float_Truncate);
11158 pragma Inline (Formal_Type_Definition);
11159 pragma Inline (Forwards_OK);
11160 pragma Inline (From_At_End);
11161 pragma Inline (From_At_Mod);
11162 pragma Inline (From_Default);
11163 pragma Inline (Generic_Associations);
11164 pragma Inline (Generic_Formal_Declarations);
11165 pragma Inline (Generic_Parent);
11166 pragma Inline (Generic_Parent_Type);
11167 pragma Inline (Handled_Statement_Sequence);
11168 pragma Inline (Handler_List_Entry);
11169 pragma Inline (Has_Created_Identifier);
11170 pragma Inline (Has_Dynamic_Length_Check);
11171 pragma Inline (Has_Dynamic_Range_Check);
11172 pragma Inline (Has_Init_Expression);
11173 pragma Inline (Has_Local_Raise);
11174 pragma Inline (Has_Self_Reference);
11175 pragma Inline (Has_No_Elaboration_Code);
11176 pragma Inline (Has_Priority_Pragma);
11177 pragma Inline (Has_Private_View);
11178 pragma Inline (Has_Relative_Deadline_Pragma);
11179 pragma Inline (Has_Storage_Size_Pragma);
11180 pragma Inline (Has_Task_Info_Pragma);
11181 pragma Inline (Has_Task_Name_Pragma);
11182 pragma Inline (Has_Wide_Character);
11183 pragma Inline (Hidden_By_Use_Clause);
11184 pragma Inline (High_Bound);
11185 pragma Inline (Identifier);
11186 pragma Inline (Implicit_With);
11187 pragma Inline (Interface_List);
11188 pragma Inline (Interface_Present);
11189 pragma Inline (Includes_Infinities);
11190 pragma Inline (In_Present);
11191 pragma Inline (Instance_Spec);
11192 pragma Inline (Intval);
11193 pragma Inline (Is_Asynchronous_Call_Block);
11194 pragma Inline (Is_Component_Left_Opnd);
11195 pragma Inline (Is_Component_Right_Opnd);
11196 pragma Inline (Is_Controlling_Actual);
11197 pragma Inline (Is_Dynamic_Coextension);
11198 pragma Inline (Is_Elsif);
11199 pragma Inline (Is_Entry_Barrier_Function);
11200 pragma Inline (Is_Expanded_Build_In_Place_Call);
11201 pragma Inline (Is_Folded_In_Parser);
11202 pragma Inline (Is_In_Discriminant_Check);
11203 pragma Inline (Is_Machine_Number);
11204 pragma Inline (Is_Null_Loop);
11205 pragma Inline (Is_Overloaded);
11206 pragma Inline (Is_Power_Of_2_For_Shift);
11207 pragma Inline (Is_Protected_Subprogram_Body);
11208 pragma Inline (Is_Scil_Node);
11209 pragma Inline (Is_Static_Coextension);
11210 pragma Inline (Is_Static_Expression);
11211 pragma Inline (Is_Subprogram_Descriptor);
11212 pragma Inline (Is_Task_Allocation_Block);
11213 pragma Inline (Is_Task_Master);
11214 pragma Inline (Iteration_Scheme);
11215 pragma Inline (Itype);
11216 pragma Inline (Kill_Range_Check);
11217 pragma Inline (Last_Bit);
11218 pragma Inline (Last_Name);
11219 pragma Inline (Library_Unit);
11220 pragma Inline (Label_Construct);
11221 pragma Inline (Left_Opnd);
11222 pragma Inline (Limited_View_Installed);
11223 pragma Inline (Limited_Present);
11224 pragma Inline (Literals);
11225 pragma Inline (Local_Raise_Not_OK);
11226 pragma Inline (Local_Raise_Statements);
11227 pragma Inline (Loop_Actions);
11228 pragma Inline (Loop_Parameter_Specification);
11229 pragma Inline (Low_Bound);
11230 pragma Inline (Mod_Clause);
11231 pragma Inline (More_Ids);
11232 pragma Inline (Must_Be_Byte_Aligned);
11233 pragma Inline (Must_Not_Freeze);
11234 pragma Inline (Must_Not_Override);
11235 pragma Inline (Must_Override);
11236 pragma Inline (Name);
11237 pragma Inline (Names);
11238 pragma Inline (Next_Entity);
11239 pragma Inline (Next_Implicit_With);
11240 pragma Inline (Next_Named_Actual);
11241 pragma Inline (Next_Pragma);
11242 pragma Inline (Next_Rep_Item);
11243 pragma Inline (Next_Use_Clause);
11244 pragma Inline (No_Ctrl_Actions);
11245 pragma Inline (No_Elaboration_Check);
11246 pragma Inline (No_Entities_Ref_In_Spec);
11247 pragma Inline (No_Initialization);
11248 pragma Inline (No_Truncation);
11249 pragma Inline (Null_Present);
11250 pragma Inline (Null_Exclusion_Present);
11251 pragma Inline (Null_Exclusion_In_Return_Present);
11252 pragma Inline (Null_Record_Present);
11253 pragma Inline (Object_Definition);
11254 pragma Inline (Original_Discriminant);
11255 pragma Inline (Original_Entity);
11256 pragma Inline (Others_Discrete_Choices);
11257 pragma Inline (Out_Present);
11258 pragma Inline (Parameter_Associations);
11259 pragma Inline (Parameter_Specifications);
11260 pragma Inline (Parameter_List_Truncated);
11261 pragma Inline (Parameter_Type);
11262 pragma Inline (Parent_Spec);
11263 pragma Inline (PPC_Enabled);
11264 pragma Inline (Position);
11265 pragma Inline (Pragma_Argument_Associations);
11266 pragma Inline (Pragma_Identifier);
11267 pragma Inline (Pragmas_After);
11268 pragma Inline (Pragmas_Before);
11269 pragma Inline (Prefix);
11270 pragma Inline (Present_Expr);
11271 pragma Inline (Prev_Ids);
11272 pragma Inline (Print_In_Hex);
11273 pragma Inline (Private_Declarations);
11274 pragma Inline (Private_Present);
11275 pragma Inline (Procedure_To_Call);
11276 pragma Inline (Proper_Body);
11277 pragma Inline (Protected_Definition);
11278 pragma Inline (Protected_Present);
11279 pragma Inline (Raises_Constraint_Error);
11280 pragma Inline (Range_Constraint);
11281 pragma Inline (Range_Expression);
11282 pragma Inline (Real_Range_Specification);
11283 pragma Inline (Realval);
11284 pragma Inline (Reason);
11285 pragma Inline (Record_Extension_Part);
11286 pragma Inline (Redundant_Use);
11287 pragma Inline (Renaming_Exception);
11288 pragma Inline (Result_Definition);
11289 pragma Inline (Return_Object_Declarations);
11290 pragma Inline (Return_Statement_Entity);
11291 pragma Inline (Reverse_Present);
11292 pragma Inline (Right_Opnd);
11293 pragma Inline (Rounded_Result);
11294 pragma Inline (Scil_Nkind);
11295 pragma Inline (Scil_Related_Node);
11296 pragma Inline (Scil_Target_Prim);
11297 pragma Inline (Scope);
11298 pragma Inline (Select_Alternatives);
11299 pragma Inline (Selector_Name);
11300 pragma Inline (Selector_Names);
11301 pragma Inline (Shift_Count_OK);
11302 pragma Inline (Source_Type);
11303 pragma Inline (Specification);
11304 pragma Inline (Statements);
11305 pragma Inline (Static_Processing_OK);
11306 pragma Inline (Storage_Pool);
11307 pragma Inline (Strval);
11308 pragma Inline (Subtype_Indication);
11309 pragma Inline (Subtype_Mark);
11310 pragma Inline (Subtype_Marks);
11311 pragma Inline (Suppress_Loop_Warnings);
11312 pragma Inline (Synchronized_Present);
11313 pragma Inline (Tagged_Present);
11314 pragma Inline (Target_Type);
11315 pragma Inline (Task_Definition);
11316 pragma Inline (Task_Present);
11317 pragma Inline (Then_Actions);
11318 pragma Inline (Then_Statements);
11319 pragma Inline (Triggering_Alternative);
11320 pragma Inline (Triggering_Statement);
11321 pragma Inline (Treat_Fixed_As_Integer);
11322 pragma Inline (TSS_Elist);
11323 pragma Inline (Type_Definition);
11324 pragma Inline (Unit);
11325 pragma Inline (Unknown_Discriminants_Present);
11326 pragma Inline (Unreferenced_In_Spec);
11327 pragma Inline (Variant_Part);
11328 pragma Inline (Variants);
11329 pragma Inline (Visible_Declarations);
11330 pragma Inline (Was_Originally_Stub);
11331 pragma Inline (Zero_Cost_Handling);
11332
11333 pragma Inline (Set_ABE_Is_Certain);
11334 pragma Inline (Set_Abort_Present);
11335 pragma Inline (Set_Abortable_Part);
11336 pragma Inline (Set_Abstract_Present);
11337 pragma Inline (Set_Accept_Handler_Records);
11338 pragma Inline (Set_Accept_Statement);
11339 pragma Inline (Set_Access_Definition);
11340 pragma Inline (Set_Access_To_Subprogram_Definition);
11341 pragma Inline (Set_Access_Types_To_Process);
11342 pragma Inline (Set_Actions);
11343 pragma Inline (Set_Activation_Chain_Entity);
11344 pragma Inline (Set_Acts_As_Spec);
11345 pragma Inline (Set_Actual_Designated_Subtype);
11346 pragma Inline (Set_Address_Warning_Posted);
11347 pragma Inline (Set_Aggregate_Bounds);
11348 pragma Inline (Set_Aliased_Present);
11349 pragma Inline (Set_All_Others);
11350 pragma Inline (Set_All_Present);
11351 pragma Inline (Set_Alternatives);
11352 pragma Inline (Set_Ancestor_Part);
11353 pragma Inline (Set_Array_Aggregate);
11354 pragma Inline (Set_Assignment_OK);
11355 pragma Inline (Set_Associated_Node);
11356 pragma Inline (Set_At_End_Proc);
11357 pragma Inline (Set_Attribute_Name);
11358 pragma Inline (Set_Aux_Decls_Node);
11359 pragma Inline (Set_Backwards_OK);
11360 pragma Inline (Set_Bad_Is_Detected);
11361 pragma Inline (Set_Body_To_Inline);
11362 pragma Inline (Set_Body_Required);
11363 pragma Inline (Set_By_Ref);
11364 pragma Inline (Set_Box_Present);
11365 pragma Inline (Set_Char_Literal_Value);
11366 pragma Inline (Set_Chars);
11367 pragma Inline (Set_Check_Address_Alignment);
11368 pragma Inline (Set_Choice_Parameter);
11369 pragma Inline (Set_Choices);
11370 pragma Inline (Set_Coextensions);
11371 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11372 pragma Inline (Set_Compile_Time_Known_Aggregate);
11373 pragma Inline (Set_Component_Associations);
11374 pragma Inline (Set_Component_Clauses);
11375 pragma Inline (Set_Component_Definition);
11376 pragma Inline (Set_Component_Items);
11377 pragma Inline (Set_Component_List);
11378 pragma Inline (Set_Component_Name);
11379 pragma Inline (Set_Componentwise_Assignment);
11380 pragma Inline (Set_Condition);
11381 pragma Inline (Set_Condition_Actions);
11382 pragma Inline (Set_Config_Pragmas);
11383 pragma Inline (Set_Constant_Present);
11384 pragma Inline (Set_Constraint);
11385 pragma Inline (Set_Constraints);
11386 pragma Inline (Set_Context_Installed);
11387 pragma Inline (Set_Context_Items);
11388 pragma Inline (Set_Context_Pending);
11389 pragma Inline (Set_Controlling_Argument);
11390 pragma Inline (Set_Conversion_OK);
11391 pragma Inline (Set_Corresponding_Body);
11392 pragma Inline (Set_Corresponding_Formal_Spec);
11393 pragma Inline (Set_Corresponding_Generic_Association);
11394 pragma Inline (Set_Corresponding_Integer_Value);
11395 pragma Inline (Set_Corresponding_Spec);
11396 pragma Inline (Set_Corresponding_Stub);
11397 pragma Inline (Set_Dcheck_Function);
11398 pragma Inline (Set_Debug_Statement);
11399 pragma Inline (Set_Declarations);
11400 pragma Inline (Set_Default_Expression);
11401 pragma Inline (Set_Default_Name);
11402 pragma Inline (Set_Defining_Identifier);
11403 pragma Inline (Set_Defining_Unit_Name);
11404 pragma Inline (Set_Delay_Alternative);
11405 pragma Inline (Set_Delay_Statement);
11406 pragma Inline (Set_Delta_Expression);
11407 pragma Inline (Set_Digits_Expression);
11408 pragma Inline (Set_Discr_Check_Funcs_Built);
11409 pragma Inline (Set_Discrete_Choices);
11410 pragma Inline (Set_Discrete_Range);
11411 pragma Inline (Set_Discrete_Subtype_Definition);
11412 pragma Inline (Set_Discrete_Subtype_Definitions);
11413 pragma Inline (Set_Discriminant_Specifications);
11414 pragma Inline (Set_Discriminant_Type);
11415 pragma Inline (Set_Do_Accessibility_Check);
11416 pragma Inline (Set_Do_Discriminant_Check);
11417 pragma Inline (Set_Do_Length_Check);
11418 pragma Inline (Set_Do_Division_Check);
11419 pragma Inline (Set_Do_Overflow_Check);
11420 pragma Inline (Set_Do_Range_Check);
11421 pragma Inline (Set_Do_Storage_Check);
11422 pragma Inline (Set_Do_Tag_Check);
11423 pragma Inline (Set_Elaborate_Present);
11424 pragma Inline (Set_Elaborate_All_Desirable);
11425 pragma Inline (Set_Elaborate_All_Present);
11426 pragma Inline (Set_Elaborate_Desirable);
11427 pragma Inline (Set_Elaboration_Boolean);
11428 pragma Inline (Set_Else_Actions);
11429 pragma Inline (Set_Else_Statements);
11430 pragma Inline (Set_Elsif_Parts);
11431 pragma Inline (Set_Enclosing_Variant);
11432 pragma Inline (Set_End_Label);
11433 pragma Inline (Set_End_Span);
11434 pragma Inline (Set_Entity);
11435 pragma Inline (Set_Entry_Body_Formal_Part);
11436 pragma Inline (Set_Entry_Call_Alternative);
11437 pragma Inline (Set_Entry_Call_Statement);
11438 pragma Inline (Set_Entry_Direct_Name);
11439 pragma Inline (Set_Entry_Index);
11440 pragma Inline (Set_Entry_Index_Specification);
11441 pragma Inline (Set_Etype);
11442 pragma Inline (Set_Exception_Choices);
11443 pragma Inline (Set_Exception_Handlers);
11444 pragma Inline (Set_Exception_Junk);
11445 pragma Inline (Set_Exception_Label);
11446 pragma Inline (Set_Expansion_Delayed);
11447 pragma Inline (Set_Explicit_Actual_Parameter);
11448 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11449 pragma Inline (Set_Expression);
11450 pragma Inline (Set_Expressions);
11451 pragma Inline (Set_First_Bit);
11452 pragma Inline (Set_First_Inlined_Subprogram);
11453 pragma Inline (Set_First_Name);
11454 pragma Inline (Set_First_Named_Actual);
11455 pragma Inline (Set_First_Real_Statement);
11456 pragma Inline (Set_First_Subtype_Link);
11457 pragma Inline (Set_Float_Truncate);
11458 pragma Inline (Set_Formal_Type_Definition);
11459 pragma Inline (Set_Forwards_OK);
11460 pragma Inline (Set_From_At_End);
11461 pragma Inline (Set_From_At_Mod);
11462 pragma Inline (Set_From_Default);
11463 pragma Inline (Set_Generic_Associations);
11464 pragma Inline (Set_Generic_Formal_Declarations);
11465 pragma Inline (Set_Generic_Parent);
11466 pragma Inline (Set_Generic_Parent_Type);
11467 pragma Inline (Set_Handled_Statement_Sequence);
11468 pragma Inline (Set_Handler_List_Entry);
11469 pragma Inline (Set_Has_Created_Identifier);
11470 pragma Inline (Set_Has_Dynamic_Length_Check);
11471 pragma Inline (Set_Has_Init_Expression);
11472 pragma Inline (Set_Has_Local_Raise);
11473 pragma Inline (Set_Has_Dynamic_Range_Check);
11474 pragma Inline (Set_Has_No_Elaboration_Code);
11475 pragma Inline (Set_Has_Priority_Pragma);
11476 pragma Inline (Set_Has_Private_View);
11477 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11478 pragma Inline (Set_Has_Storage_Size_Pragma);
11479 pragma Inline (Set_Has_Task_Info_Pragma);
11480 pragma Inline (Set_Has_Task_Name_Pragma);
11481 pragma Inline (Set_Has_Wide_Character);
11482 pragma Inline (Set_Hidden_By_Use_Clause);
11483 pragma Inline (Set_High_Bound);
11484 pragma Inline (Set_Identifier);
11485 pragma Inline (Set_Implicit_With);
11486 pragma Inline (Set_Includes_Infinities);
11487 pragma Inline (Set_Interface_List);
11488 pragma Inline (Set_Interface_Present);
11489 pragma Inline (Set_In_Present);
11490 pragma Inline (Set_Instance_Spec);
11491 pragma Inline (Set_Intval);
11492 pragma Inline (Set_Is_Asynchronous_Call_Block);
11493 pragma Inline (Set_Is_Component_Left_Opnd);
11494 pragma Inline (Set_Is_Component_Right_Opnd);
11495 pragma Inline (Set_Is_Controlling_Actual);
11496 pragma Inline (Set_Is_Dynamic_Coextension);
11497 pragma Inline (Set_Is_Elsif);
11498 pragma Inline (Set_Is_Entry_Barrier_Function);
11499 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11500 pragma Inline (Set_Is_Folded_In_Parser);
11501 pragma Inline (Set_Is_In_Discriminant_Check);
11502 pragma Inline (Set_Is_Machine_Number);
11503 pragma Inline (Set_Is_Null_Loop);
11504 pragma Inline (Set_Is_Overloaded);
11505 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11506 pragma Inline (Set_Is_Protected_Subprogram_Body);
11507 pragma Inline (Set_Is_Scil_Node);
11508 pragma Inline (Set_Has_Self_Reference);
11509 pragma Inline (Set_Is_Static_Coextension);
11510 pragma Inline (Set_Is_Static_Expression);
11511 pragma Inline (Set_Is_Subprogram_Descriptor);
11512 pragma Inline (Set_Is_Task_Allocation_Block);
11513 pragma Inline (Set_Is_Task_Master);
11514 pragma Inline (Set_Iteration_Scheme);
11515 pragma Inline (Set_Itype);
11516 pragma Inline (Set_Kill_Range_Check);
11517 pragma Inline (Set_Last_Bit);
11518 pragma Inline (Set_Last_Name);
11519 pragma Inline (Set_Library_Unit);
11520 pragma Inline (Set_Label_Construct);
11521 pragma Inline (Set_Left_Opnd);
11522 pragma Inline (Set_Limited_View_Installed);
11523 pragma Inline (Set_Limited_Present);
11524 pragma Inline (Set_Literals);
11525 pragma Inline (Set_Local_Raise_Not_OK);
11526 pragma Inline (Set_Local_Raise_Statements);
11527 pragma Inline (Set_Loop_Actions);
11528 pragma Inline (Set_Loop_Parameter_Specification);
11529 pragma Inline (Set_Low_Bound);
11530 pragma Inline (Set_Mod_Clause);
11531 pragma Inline (Set_More_Ids);
11532 pragma Inline (Set_Must_Be_Byte_Aligned);
11533 pragma Inline (Set_Must_Not_Freeze);
11534 pragma Inline (Set_Must_Not_Override);
11535 pragma Inline (Set_Must_Override);
11536 pragma Inline (Set_Name);
11537 pragma Inline (Set_Names);
11538 pragma Inline (Set_Next_Entity);
11539 pragma Inline (Set_Next_Implicit_With);
11540 pragma Inline (Set_Next_Named_Actual);
11541 pragma Inline (Set_Next_Pragma);
11542 pragma Inline (Set_Next_Rep_Item);
11543 pragma Inline (Set_Next_Use_Clause);
11544 pragma Inline (Set_No_Ctrl_Actions);
11545 pragma Inline (Set_No_Elaboration_Check);
11546 pragma Inline (Set_No_Entities_Ref_In_Spec);
11547 pragma Inline (Set_No_Initialization);
11548 pragma Inline (Set_No_Truncation);
11549 pragma Inline (Set_Null_Present);
11550 pragma Inline (Set_Null_Exclusion_Present);
11551 pragma Inline (Set_Null_Exclusion_In_Return_Present);
11552 pragma Inline (Set_Null_Record_Present);
11553 pragma Inline (Set_Object_Definition);
11554 pragma Inline (Set_Original_Discriminant);
11555 pragma Inline (Set_Original_Entity);
11556 pragma Inline (Set_Others_Discrete_Choices);
11557 pragma Inline (Set_Out_Present);
11558 pragma Inline (Set_Parameter_Associations);
11559 pragma Inline (Set_Parameter_Specifications);
11560 pragma Inline (Set_Parameter_List_Truncated);
11561 pragma Inline (Set_Parameter_Type);
11562 pragma Inline (Set_Parent_Spec);
11563 pragma Inline (Set_PPC_Enabled);
11564 pragma Inline (Set_Position);
11565 pragma Inline (Set_Pragma_Argument_Associations);
11566 pragma Inline (Set_Pragma_Identifier);
11567 pragma Inline (Set_Pragmas_After);
11568 pragma Inline (Set_Pragmas_Before);
11569 pragma Inline (Set_Prefix);
11570 pragma Inline (Set_Present_Expr);
11571 pragma Inline (Set_Prev_Ids);
11572 pragma Inline (Set_Print_In_Hex);
11573 pragma Inline (Set_Private_Declarations);
11574 pragma Inline (Set_Private_Present);
11575 pragma Inline (Set_Procedure_To_Call);
11576 pragma Inline (Set_Proper_Body);
11577 pragma Inline (Set_Protected_Definition);
11578 pragma Inline (Set_Protected_Present);
11579 pragma Inline (Set_Raises_Constraint_Error);
11580 pragma Inline (Set_Range_Constraint);
11581 pragma Inline (Set_Range_Expression);
11582 pragma Inline (Set_Real_Range_Specification);
11583 pragma Inline (Set_Realval);
11584 pragma Inline (Set_Reason);
11585 pragma Inline (Set_Record_Extension_Part);
11586 pragma Inline (Set_Redundant_Use);
11587 pragma Inline (Set_Renaming_Exception);
11588 pragma Inline (Set_Result_Definition);
11589 pragma Inline (Set_Return_Object_Declarations);
11590 pragma Inline (Set_Reverse_Present);
11591 pragma Inline (Set_Right_Opnd);
11592 pragma Inline (Set_Rounded_Result);
11593 pragma Inline (Set_Scil_Nkind);
11594 pragma Inline (Set_Scil_Related_Node);
11595 pragma Inline (Set_Scil_Target_Prim);
11596 pragma Inline (Set_Scope);
11597 pragma Inline (Set_Select_Alternatives);
11598 pragma Inline (Set_Selector_Name);
11599 pragma Inline (Set_Selector_Names);
11600 pragma Inline (Set_Shift_Count_OK);
11601 pragma Inline (Set_Source_Type);
11602 pragma Inline (Set_Specification);
11603 pragma Inline (Set_Statements);
11604 pragma Inline (Set_Static_Processing_OK);
11605 pragma Inline (Set_Storage_Pool);
11606 pragma Inline (Set_Strval);
11607 pragma Inline (Set_Subtype_Indication);
11608 pragma Inline (Set_Subtype_Mark);
11609 pragma Inline (Set_Subtype_Marks);
11610 pragma Inline (Set_Suppress_Loop_Warnings);
11611 pragma Inline (Set_Synchronized_Present);
11612 pragma Inline (Set_Tagged_Present);
11613 pragma Inline (Set_Target_Type);
11614 pragma Inline (Set_Task_Definition);
11615 pragma Inline (Set_Task_Present);
11616 pragma Inline (Set_Then_Actions);
11617 pragma Inline (Set_Then_Statements);
11618 pragma Inline (Set_Triggering_Alternative);
11619 pragma Inline (Set_Triggering_Statement);
11620 pragma Inline (Set_Treat_Fixed_As_Integer);
11621 pragma Inline (Set_TSS_Elist);
11622 pragma Inline (Set_Type_Definition);
11623 pragma Inline (Set_Unit);
11624 pragma Inline (Set_Unknown_Discriminants_Present);
11625 pragma Inline (Set_Unreferenced_In_Spec);
11626 pragma Inline (Set_Variant_Part);
11627 pragma Inline (Set_Variants);
11628 pragma Inline (Set_Visible_Declarations);
11629 pragma Inline (Set_Was_Originally_Stub);
11630 pragma Inline (Set_Zero_Cost_Handling);
11631
11632 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
11633 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
11634 -- should refer to N_Simple_Return_Statement.
11635
11636 end Sinfo;