[multiple changes]
[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-2010, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in these places:
63
64 -- In sinfo.ads:
65 -- The documentation associated with the field (if semantic)
66 -- The documentation associated with the node
67 -- The spec of the access function
68 -- The spec of the set procedure
69 -- The entries in Is_Syntactic_Field
70 -- The pragma Inline for the access function
71 -- The pragma Inline for the set procedure
72 -- In sinfo.adb:
73 -- The body of the access function
74 -- The body of the set procedure
75
76 -- The field chosen must be consistent in all places, and, for a node that
77 -- is a subexpression, must not overlap any of the standard expression
78 -- fields.
79
80 -- In addition, if any of the standard expression fields is changed, then
81 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
82 -- must be updated appropriately, since it special cases expression fields.
83
84 -- If a new tree node is added, then the following changes are made
85
86 -- Add it to the documentation in the appropriate place
87 -- Add its fields to this documentation section
88 -- Define it in the appropriate classification in Node_Kind
89 -- In the body (sinfo), add entries to the access functions for all
90 -- its fields (except standard expression fields) to include the new
91 -- node in the checks.
92 -- Add an appropriate section to the case statement in sprint.adb
93 -- Add an appropriate section to the case statement in sem.adb
94 -- Add an appropriate section to the case statement in exp_util.adb
95 -- (Insert_Actions procedure)
96 -- For a subexpression, add an appropriate section to the case
97 -- statement in sem_eval.adb
98 -- For a subexpression, add an appropriate section to the case
99 -- statement in sem_res.adb
100
101 -- Finally, four utility programs must be run:
102
103 -- (Optional.) Run CSinfo to check that you have made the changes
104 -- consistently. It checks most of the rules given above. This utility
105 -- reads sinfo.ads and sinfo.adb and generates a report to standard
106 -- output. This step is optional because XSinfo runs CSinfo.
107
108 -- Run XSinfo to create sinfo.h, the corresponding C header. This
109 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
110 -- not need to read sinfo.adb, since the contents of the body are
111 -- algorithmically determinable from the spec.
112
113 -- Run XTreeprs to create treeprs.ads, an updated version of the module
114 -- that is used to drive the tree print routine. This utility reads (but
115 -- does not modify) treeprs.adt, the template that provides the basic
116 -- structure of the file, and then fills in the data from the comments
117 -- in sinfo.ads.
118
119 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
120 -- spec of the Nmake package which contains functions for constructing
121 -- nodes.
122
123 -- The above steps are done automatically by the build scripts when you do
124 -- a full bootstrap.
125
126 -- Note: sometime we could write a utility that actually generated the body
127 -- of sinfo from the spec instead of simply checking it, since, as noted
128 -- above, the contents of the body can be determined from the spec.
129
130 --------------------------------
131 -- Implicit Nodes in the Tree --
132 --------------------------------
133
134 -- Generally the structure of the tree very closely follows the grammar as
135 -- defined in the RM. However, certain nodes are omitted to save space and
136 -- simplify semantic processing. Two general classes of such omitted nodes
137 -- are as follows:
138
139 -- If the only possibilities for a non-terminal are one or more other
140 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
141 -- corresponding node is omitted from the tree, and the target construct
142 -- appears directly. For example, a real type definition is either
143 -- floating point definition or a fixed point definition. No explicit node
144 -- appears for real type definition. Instead either the floating point
145 -- definition or fixed point definition appears directly.
146
147 -- If a non-terminal corresponds to a list of some other non-terminal
148 -- (possibly with separating punctuation), then usually it is omitted from
149 -- the tree, and a list of components appears instead. For example,
150 -- sequence of statements does not appear explicitly in the tree. Instead
151 -- a list of statements appears directly.
152
153 -- Some additional cases of omitted nodes occur and are documented
154 -- individually. In particular, many nodes are omitted in the tree
155 -- generated for an expression.
156
157 -------------------------------------------
158 -- Handling of Defining Identifier Lists --
159 -------------------------------------------
160
161 -- In several declarative forms in the syntax, lists of defining
162 -- identifiers appear (object declarations, component declarations, number
163 -- declarations etc.)
164
165 -- The semantics of such statements are equivalent to a series of identical
166 -- declarations of single defining identifiers (except that conformance
167 -- checks require the same grouping of identifiers in the parameter case).
168
169 -- To simplify semantic processing, the parser breaks down such multiple
170 -- declaration cases into sequences of single declarations, duplicating
171 -- type and initialization information as required. The flags More_Ids and
172 -- Prev_Ids are used to record the original form of the source in the case
173 -- where the original source used a list of names, More_Ids being set on
174 -- all but the last name and Prev_Ids being set on all but the first name.
175 -- These flags are used to reconstruct the original source (e.g. in the
176 -- Sprint package), and also are included in the conformance checks, but
177 -- otherwise have no semantic significance.
178
179 -- Note: the reason that we use More_Ids and Prev_Ids rather than
180 -- First_Name and Last_Name flags is so that the flags are off in the
181 -- normal one identifier case, which minimizes tree print output.
182
183 -----------------------
184 -- Use of Node Lists --
185 -----------------------
186
187 -- With a few exceptions, if a construction of the form {non-terminal}
188 -- appears in the tree, lists are used in the corresponding tree node (see
189 -- package Nlists for handling of node lists). In this case a field of the
190 -- parent node points to a list of nodes for the non-terminal. The field
191 -- name for such fields has a plural name which always ends in "s". For
192 -- example, a case statement has a field Alternatives pointing to list of
193 -- case statement alternative nodes.
194
195 -- Only fields pointing to lists have names ending in "s", so generally the
196 -- structure is strongly typed, fields not ending in s point to single
197 -- nodes, and fields ending in s point to lists.
198
199 -- The following example shows how a traversal of a list is written. We
200 -- suppose here that Stmt points to a N_Case_Statement node which has a
201 -- list field called Alternatives:
202
203 -- Alt := First (Alternatives (Stmt));
204 -- while Present (Alt) loop
205 -- ..
206 -- -- processing for case statement alternative Alt
207 -- ..
208 -- Alt := Next (Alt);
209 -- end loop;
210
211 -- The Present function tests for Empty, which in this case signals the end
212 -- of the list. First returns Empty immediately if the list is empty.
213 -- Present is defined in Atree, First and Next are defined in Nlists.
214
215 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
216 -- contexts, which is handled as described in the previous section, and
217 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
218 -- using the First_Name and Last_Name flags, as further detailed in the
219 -- description of the N_With_Clause node.
220
221 -------------
222 -- Pragmas --
223 -------------
224
225 -- Pragmas can appear in many different context, but are not included in
226 -- the grammar. Still they must appear in the tree, so they can be properly
227 -- processed.
228
229 -- Two approaches are used. In some cases, an extra field is defined in an
230 -- appropriate node that contains a list of pragmas appearing in the
231 -- expected context. For example pragmas can appear before an
232 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
233 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
234
235 -- The other approach is to simply allow pragmas to appear in syntactic
236 -- lists where the grammar (of course) does not include the possibility.
237 -- For example, the Variants field of an N_Variant_Part node points to a
238 -- list that can contain both N_Pragma and N_Variant nodes.
239
240 -- To make processing easier in the latter case, the Nlists package
241 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
242 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
243 -- ignoring all pragmas.
244
245 -- In the case of the variants list, we can either write:
246
247 -- Variant := First (Variants (N));
248 -- while Present (Variant) loop
249 -- ...
250 -- Variant := Next (Variant);
251 -- end loop;
252
253 -- or
254
255 -- Variant := First_Non_Pragma (Variants (N));
256 -- while Present (Variant) loop
257 -- ...
258 -- Variant := Next_Non_Pragma (Variant);
259 -- end loop;
260
261 -- In the first form of the loop, Variant can either be an N_Pragma or an
262 -- N_Variant node. In the second form, Variant can only be N_Variant since
263 -- all pragmas are skipped.
264
265 ---------------------
266 -- Optional Fields --
267 ---------------------
268
269 -- Fields which correspond to a section of the syntax enclosed in square
270 -- brackets are generally omitted (and the corresponding field set to Empty
271 -- for a node, or No_List for a list). The documentation of such fields
272 -- notes these cases. One exception to this rule occurs in the case of
273 -- possibly empty statement sequences (such as the sequence of statements
274 -- in an entry call alternative). Such cases appear in the syntax rules as
275 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
276 -- statement sequences always contain an empty list (not No_List) if no
277 -- statements are present.
278
279 -- Note: the utility program that constructs the body and spec of the Nmake
280 -- package relies on the format of the comments to determine if a field
281 -- should have a default value in the corresponding make routine. The rule
282 -- is that if the first line of the description of the field contains the
283 -- string "(set to xxx if", then a default value of xxx is provided for
284 -- this field in the corresponding Make_yyy routine.
285
286 -----------------------------------
287 -- Note on Body/Spec Terminology --
288 -----------------------------------
289
290 -- In informal discussions about Ada, it is customary to refer to package
291 -- and subprogram specs and bodies. However, this is not technically
292 -- correct, what is normally referred to as a spec or specification is in
293 -- fact a package declaration or subprogram declaration. We are careful in
294 -- GNAT to use the correct terminology and in particular, the full word
295 -- specification is never used as an incorrect substitute for declaration.
296 -- The structure and terminology used in the tree also reflects the grammar
297 -- and thus uses declaration and specification in the technically correct
298 -- manner.
299
300 -- However, there are contexts in which the informal terminology is useful.
301 -- We have the word "body" to refer to the Interp_Etype declared by the
302 -- declaration of a unit body, and in some contexts we need similar term to
303 -- refer to the entity declared by the package or subprogram declaration,
304 -- and simply using declaration can be confusing since the body also has a
305 -- declaration.
306
307 -- An example of such a context is the link between the package body and
308 -- its declaration. With_Declaration is confusing, since the package body
309 -- itself is a declaration.
310
311 -- To deal with this problem, we reserve the informal term Spec, i.e. the
312 -- popular abbreviation used in this context, to refer to the entity
313 -- declared by the package or subprogram declaration. So in the above
314 -- example case, the field in the body is called With_Spec.
315
316 -- Another important context for the use of the word Spec is in error
317 -- messages, where a hyper-correct use of declaration would be confusing to
318 -- a typical Ada programmer, and even for an expert programmer can cause
319 -- confusion since the body has a declaration as well.
320
321 -- So, to summarize:
322
323 -- Declaration always refers to the syntactic entity that is called
324 -- a declaration. In particular, subprogram declaration
325 -- and package declaration are used to describe the
326 -- syntactic entity that includes the semicolon.
327
328 -- Specification always refers to the syntactic entity that is called
329 -- a specification. In particular, the terms procedure
330 -- specification, function specification, package
331 -- specification, subprogram specification always refer
332 -- to the syntactic entity that has no semicolon.
333
334 -- Spec is an informal term, used to refer to the entity
335 -- that is declared by a task declaration, protected
336 -- declaration, generic declaration, subprogram
337 -- declaration or package declaration.
338
339 -- This convention is followed throughout the GNAT documentation
340 -- both internal and external, and in all error message text.
341
342 ------------------------
343 -- Internal Use Nodes --
344 ------------------------
345
346 -- These are Node_Kind settings used in the internal implementation which
347 -- are not logically part of the specification.
348
349 -- N_Unused_At_Start
350 -- Completely unused entry at the start of the enumeration type. This
351 -- is inserted so that no legitimate value is zero, which helps to get
352 -- better debugging behavior, since zero is a likely uninitialized value).
353
354 -- N_Unused_At_End
355 -- Completely unused entry at the end of the enumeration type. This is
356 -- handy so that arrays with Node_Kind as the index type have an extra
357 -- entry at the end (see for example the use of the Pchar_Pos_Array in
358 -- Treepr, where the extra entry provides the limit value when dealing with
359 -- the last used entry in the array).
360
361 -----------------------------------------
362 -- Note on the settings of Sloc fields --
363 -----------------------------------------
364
365 -- The Sloc field of nodes that come from the source is set by the parser.
366 -- For internal nodes, and nodes generated during expansion the Sloc is
367 -- usually set in the call to the constructor for the node. In general the
368 -- Sloc value chosen for an internal node is the Sloc of the source node
369 -- whose processing is responsible for the expansion. For example, the Sloc
370 -- of an inherited primitive operation is the Sloc of the corresponding
371 -- derived type declaration.
372
373 -- For the nodes of a generic instantiation, the Sloc value is encoded to
374 -- represent both the original Sloc in the generic unit, and the Sloc of
375 -- the instantiation itself. See Sinput.ads for details.
376
377 -- Subprogram instances create two callable entities: one is the visible
378 -- subprogram instance, and the other is an anonymous subprogram nested
379 -- within a wrapper package that contains the renamings for the actuals.
380 -- Both of these entities have the Sloc of the defining entity in the
381 -- instantiation node. This simplifies some ASIS queries.
382
383 -----------------------
384 -- Field Definitions --
385 -----------------------
386
387 -- In the following node definitions, all fields, both syntactic and
388 -- semantic, are documented. The one exception is in the case of entities
389 -- (defining identifiers, character literals and operator symbols), where
390 -- the usage of the fields depends on the entity kind. Entity fields are
391 -- fully documented in the separate package Einfo.
392
393 -- In the node definitions, three common sets of fields are abbreviated to
394 -- save both space in the documentation, and also space in the string
395 -- (defined in Tree_Print_Strings) used to print trees. The following
396 -- abbreviations are used:
397
398 -- Note: the utility program that creates the Treeprs spec (in the file
399 -- xtreeprs.adb) knows about the special fields here, so it must be
400 -- modified if any change is made to these fields.
401
402 -- "plus fields for binary operator"
403 -- Chars (Name1) Name_Id for the operator
404 -- Left_Opnd (Node2) left operand expression
405 -- Right_Opnd (Node3) right operand expression
406 -- Entity (Node4-Sem) defining entity for operator
407 -- Associated_Node (Node4-Sem) for generic processing
408 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
409 -- Has_Private_View (Flag11-Sem) set in generic units.
410
411 -- "plus fields for unary operator"
412 -- Chars (Name1) Name_Id for the operator
413 -- Right_Opnd (Node3) right operand expression
414 -- Entity (Node4-Sem) defining entity for operator
415 -- Associated_Node (Node4-Sem) for generic processing
416 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
417 -- Has_Private_View (Flag11-Sem) set in generic units.
418
419 -- "plus fields for expression"
420 -- Paren_Count number of parentheses levels
421 -- Etype (Node5-Sem) type of the expression
422 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
423 -- Is_Static_Expression (Flag6-Sem) set for static expression
424 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
425 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
426 -- Do_Range_Check (Flag9-Sem) set if a range check needed
427 -- Assignment_OK (Flag15-Sem) set if modification is OK
428 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
429
430 -- Note: see under (EXPRESSION) for further details on the use of
431 -- the Paren_Count field to record the number of parentheses levels.
432
433 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
434 -- The actual definition of this type is given later (the reason for this
435 -- is that we want the descriptions ordered by logical chapter in the RM,
436 -- but the type definition is reordered to facilitate the definition of
437 -- some subtype ranges. The individual descriptions of the nodes show how
438 -- the various fields are used in each node kind, as well as providing
439 -- logical names for the fields. Functions and procedures are provided for
440 -- accessing and setting these fields using these logical names.
441
442 -----------------------
443 -- Gigi Restrictions --
444 -----------------------
445
446 -- The tree passed to Gigi is more restricted than the general tree form.
447 -- For example, as a result of expansion, most of the tasking nodes can
448 -- never appear. For each node to which either a complete or partial
449 -- restriction applies, a note entitled "Gigi restriction" appears which
450 -- documents the restriction.
451
452 -- Note that most of these restrictions apply only to trees generated when
453 -- code is being generated, since they involved expander actions that
454 -- destroy the tree.
455
456 ------------------------
457 -- Common Flag Fields --
458 ------------------------
459
460 -- The following flag fields appear in all nodes
461
462 -- Analyzed
463 -- This flag is used to indicate that a node (and all its children have
464 -- been analyzed. It is used to avoid reanalysis of a node that has
465 -- already been analyzed, both for efficiency and functional correctness
466 -- reasons.
467
468 -- Comes_From_Source
469 -- This flag is set if the node comes directly from an explicit construct
470 -- in the source. It is normally on for any nodes built by the scanner or
471 -- parser from the source program, with the exception that in a few cases
472 -- the parser adds nodes to normalize the representation (in particular
473 -- a null statement is added to a package body if there is no begin/end
474 -- initialization section.
475 --
476 -- Most nodes inserted by the analyzer or expander are not considered
477 -- as coming from source, so the flag is off for such nodes. In a few
478 -- cases, the expander constructs nodes closely equivalent to nodes
479 -- from the source program (e.g. the allocator built for build-in-place
480 -- case), and the Comes_From_Source flag is deliberately set.
481
482 -- Error_Posted
483 -- This flag is used to avoid multiple error messages being posted on or
484 -- referring to the same node. This flag is set if an error message
485 -- refers to a node or is posted on its source location, and has the
486 -- effect of inhibiting further messages involving this same node.
487
488 -- Has_Dynamic_Length_Check (Flag10-Sem)
489 -- This flag is present on all nodes. It is set to indicate that one of
490 -- the routines in unit Checks has generated a length check action which
491 -- has been inserted at the flagged node. This is used to avoid the
492 -- generation of duplicate checks.
493
494 -- Has_Dynamic_Range_Check (Flag12-Sem)
495 -- This flag is present on all nodes. It is set to indicate that one of
496 -- the routines in unit Checks has generated a range check action which
497 -- has been inserted at the flagged node. This is used to avoid the
498 -- generation of duplicate checks.
499
500 -- Has_Local_Raise (Flag8-Sem)
501 -- Present in exception handler nodes. Set if the handler can be entered
502 -- via a local raise that gets transformed to a goto statement. This will
503 -- always be set if Local_Raise_Statements is non-empty, but can also be
504 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
505 -- nodes requiring generation of back end checks.
506
507 ------------------------------------
508 -- Description of Semantic Fields --
509 ------------------------------------
510
511 -- The meaning of the syntactic fields is generally clear from their names
512 -- without any further description, since the names are chosen to
513 -- correspond very closely to the syntax in the reference manual. This
514 -- section describes the usage of the semantic fields, which are used to
515 -- contain additional information determined during semantic analysis.
516
517 -- ABE_Is_Certain (Flag18-Sem)
518 -- This flag is set in an instantiation node or a call node is determined
519 -- to be sure to raise an ABE. This is used to trigger special handling
520 -- of such cases, particularly in the instantiation case where we avoid
521 -- instantiating the body if this flag is set. This flag is also present
522 -- in an N_Formal_Package_Declaration_Node since formal package
523 -- declarations are treated like instantiations, but it is always set to
524 -- False in this context.
525
526 -- Accept_Handler_Records (List5-Sem)
527 -- This field is present only in an N_Accept_Alternative node. It is used
528 -- to temporarily hold the exception handler records from an accept
529 -- statement in a selective accept. These exception handlers will
530 -- eventually be placed in the Handler_Records list of the procedure
531 -- built for this accept (see Expand_N_Selective_Accept procedure in
532 -- Exp_Ch9 for further details).
533
534 -- Access_Types_To_Process (Elist2-Sem)
535 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
536 -- Contains the list of access types which may require specific treatment
537 -- when the nature of the type completion is completely known. An example
538 -- of such treatment is the generation of the associated_final_chain.
539
540 -- Actions (List1-Sem)
541 -- This field contains a sequence of actions that are associated with the
542 -- node holding the field. See the individual node types for details of
543 -- how this field is used, as well as the description of the specific use
544 -- for a particular node type.
545
546 -- Activation_Chain_Entity (Node3-Sem)
547 -- This is used in tree nodes representing task activators (blocks,
548 -- subprogram bodies, package declarations, and task bodies). It is
549 -- initially Empty, and then gets set to point to the entity for the
550 -- declared Activation_Chain variable when the first task is declared.
551 -- When tasks are declared in the corresponding declarative region this
552 -- entity is located by name (its name is always _Chain) and the declared
553 -- tasks are added to the chain. Note that N_Extended_Return_Statement
554 -- does not have this attribute, although it does have an activation
555 -- chain. This chain is used to store the tasks temporarily, and is not
556 -- used for activating them. On successful completion of the return
557 -- statement, the tasks are moved to the caller's chain, and the caller
558 -- activates them.
559
560 -- Acts_As_Spec (Flag4-Sem)
561 -- A flag set in the N_Subprogram_Body node for a subprogram body which
562 -- is acting as its own spec, except in the case of a library level
563 -- subprogram, in which case the flag is set on the parent compilation
564 -- unit node instead (see further description in spec of Lib package).
565 -- ??? Above note about Lib is dubious since lib.ads does not mention
566 -- Acts_As_Spec at all.
567
568 -- Actual_Designated_Subtype (Node4-Sem)
569 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
570 -- needs to known the dynamic constrained subtype of the designated
571 -- object, this attribute is set to that type. This is done for
572 -- N_Free_Statements for access-to-classwide types and access to
573 -- unconstrained packed array types, and for N_Explicit_Dereference when
574 -- the designated type is an unconstrained packed array and the
575 -- dereference is the prefix of a 'Size attribute reference.
576
577 -- Address_Warning_Posted (Flag18-Sem)
578 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
579 -- posted a warning for the address clause regarding size or alignment
580 -- issues. Used to inhibit multiple redundant messages.
581
582 -- Aggregate_Bounds (Node3-Sem)
583 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
584 -- known at compile time, this field points to an N_Range node with those
585 -- bounds. Otherwise Empty.
586
587 -- All_Others (Flag11-Sem)
588 -- Present in an N_Others_Choice node. This flag is set for an others
589 -- exception where all exceptions are to be caught, even those that are
590 -- not normally handled (in particular the tasking abort signal). This
591 -- is used for translation of the at end handler into a normal exception
592 -- handler.
593
594 -- Aspect_Cancel (Flag11-Sem)
595 -- Processing of aspect specifications typically generates pragmas and
596 -- attribute definition clauses that are inserted into the tree after
597 -- the declaration node to get the desired aspect effect. In the case
598 -- of Boolean aspects that use "=> False" to cancel the effect of an
599 -- aspect (i.e. turn if off), the generated pragma has the Aspect_Cancel
600 -- flag set to indicate that the pragma operates in the opposite sense.
601
602 -- Aspect_Rep_Item (Node2-Sem)
603 -- Present in N_Aspect_Specification nodes. Points to the corresponding
604 -- pragma/attribute definition node used to process the aspect.
605
606 -- Assignment_OK (Flag15-Sem)
607 -- This flag is set in a subexpression node for an object, indicating
608 -- that the associated object can be modified, even if this would not
609 -- normally be permissible (either by direct assignment, or by being
610 -- passed as an out or in-out parameter). This is used by the expander
611 -- for a number of purposes, including initialization of constants and
612 -- limited type objects (such as tasks), setting discriminant fields,
613 -- setting tag values, etc. N_Object_Declaration nodes also have this
614 -- flag defined. Here it is used to indicate that an initialization
615 -- expression is valid, even where it would normally not be allowed
616 -- (e.g. where the type involved is limited).
617
618 -- Associated_Node (Node4-Sem)
619 -- Present in nodes that can denote an entity: identifiers, character
620 -- literals, operator symbols, expanded names, operator nodes, and
621 -- attribute reference nodes (all these nodes have an Entity field).
622 -- This field is also present in N_Aggregate, N_Selected_Component, and
623 -- N_Extension_Aggregate nodes. This field is used in generic processing
624 -- to create links between the generic template and the generic copy.
625 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
626 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
627 -- the normal function of Entity is not required at the point where the
628 -- Associated_Node is set. Note also, that in generic templates, this
629 -- means that the Entity field does not necessarily point to an Entity.
630 -- Since the back end is expected to ignore generic templates, this is
631 -- harmless.
632
633 -- At_End_Proc (Node1)
634 -- This field is present in an N_Handled_Sequence_Of_Statements node.
635 -- It contains an identifier reference for the cleanup procedure to be
636 -- called. See description of this node for further details.
637
638 -- Backwards_OK (Flag6-Sem)
639 -- A flag present in the N_Assignment_Statement node. It is used only
640 -- if the type being assigned is an array type, and is set if analysis
641 -- determines that it is definitely safe to do the copy backwards, i.e.
642 -- starting at the highest addressed element. This is the case if either
643 -- the operands do not overlap, or they may overlap, but if they do,
644 -- then the left operand is at a higher address than the right operand.
645 --
646 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
647 -- means that the front end could not determine that either direction is
648 -- definitely safe, and a runtime check may be required if the backend
649 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
650 -- set, it means that the front end can assure no overlap of operands.
651
652 -- Body_To_Inline (Node3-Sem)
653 -- present in subprogram declarations. Denotes analyzed but unexpanded
654 -- body of subprogram, to be used when inlining calls. Present when the
655 -- subprogram has an Inline pragma and inlining is enabled. If the
656 -- declaration is completed by a renaming_as_body, and the renamed en-
657 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
658 -- which is used directly in later calls to the original subprogram.
659
660 -- Body_Required (Flag13-Sem)
661 -- A flag that appears in the N_Compilation_Unit node indicating that
662 -- the corresponding unit requires a body. For the package case, this
663 -- indicates that a completion is required. In Ada 95, if the flag is not
664 -- set for the package case, then a body may not be present. In Ada 83,
665 -- if the flag is not set for the package case, then body is optional.
666 -- For a subprogram declaration, the flag is set except in the case where
667 -- a pragma Import or Interface applies, in which case no body is
668 -- permitted (in Ada 83 or Ada 95).
669
670 -- By_Ref (Flag5-Sem)
671 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
672 -- this flag is set when the returned expression is already allocated on
673 -- the secondary stack and thus the result is passed by reference rather
674 -- than copied another time.
675
676 -- Check_Address_Alignment (Flag11-Sem)
677 -- A flag present in N_Attribute_Definition clause for a 'Address
678 -- attribute definition. This flag is set if a dynamic check should be
679 -- generated at the freeze point for the entity to which this address
680 -- clause applies. The reason that we need this flag is that we want to
681 -- check for range checks being suppressed at the point where the
682 -- attribute definition clause is given, rather than testing this at the
683 -- freeze point.
684
685 -- Coextensions (Elist4-Sem)
686 -- Present in allocators nodes. Points to list of allocators for the
687 -- access discriminants of the allocated object.
688
689 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
690 -- Present in N_Simple_Return_Statement nodes. True if this node was
691 -- constructed as part of the N_Extended_Return_Statement expansion.
692
693 -- Compile_Time_Known_Aggregate (Flag18-Sem)
694 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
695 -- evaluated at compile time without raising constraint error. Such
696 -- aggregates can be passed as is to Gigi without any expansion. See
697 -- Sem_Aggr for the specific conditions under which an aggregate has this
698 -- flag set. See also the flag Static_Processing_OK.
699
700 -- Componentwise_Assignment (Flag14-Sem)
701 -- Present in N_Assignment_Statement nodes. Set for a record assignment
702 -- where all that needs doing is to expand it into component-by-component
703 -- assignments. This is used internally for the case of tagged types with
704 -- rep clauses, where we need to avoid recursion (we don't want to try to
705 -- generate a call to the primitive operation, because this is the case
706 -- where we are compiling the primitive operation). Note that when we are
707 -- expanding component assignments in this case, we never assign the _tag
708 -- field, but we recursively assign components of the parent type.
709
710 -- Condition_Actions (List3-Sem)
711 -- This field appears in else-if nodes and in the iteration scheme node
712 -- for while loops. This field is only used during semantic processing to
713 -- temporarily hold actions inserted into the tree. In the tree passed
714 -- to gigi, the condition actions field is always set to No_List. For
715 -- details on how this field is used, see the routine Insert_Actions in
716 -- package Exp_Util, and also the expansion routines for the relevant
717 -- nodes.
718
719 -- Context_Pending (Flag16-Sem)
720 -- This field appears in Compilation_Unit nodes, to indicate that the
721 -- context of the unit is being compiled. Used to detect circularities
722 -- that are not otherwise detected by the loading mechanism. Such
723 -- circularities can occur in the presence of limited and non-limited
724 -- with_clauses that mention the same units.
725
726 -- Controlling_Argument (Node1-Sem)
727 -- This field is set in procedure and function call nodes if the call
728 -- is a dispatching call (it is Empty for a non-dispatching call). It
729 -- indicates the source of the call's controlling tag. For procedure
730 -- calls, the Controlling_Argument is one of the actuals. For function
731 -- that has a dispatching result, it is an entity in the context of the
732 -- call that can provide a tag, or else it is the tag of the root type
733 -- of the class. It can also specify a tag directly rather than being a
734 -- tagged object. The latter is needed by the implementations of AI-239
735 -- and AI-260.
736
737 -- Conversion_OK (Flag14-Sem)
738 -- A flag set on type conversion nodes to indicate that the conversion
739 -- is to be considered as being valid, even though it is the case that
740 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
741 -- Fixed_Value and Integer_Value, for internal conversions done for
742 -- fixed-point operations, and for certain conversions for calls to
743 -- initialization procedures. If Conversion_OK is set, then Etype must be
744 -- set (the analyzer assumes that Etype has been set). For the case of
745 -- fixed-point operands, it also indicates that the conversion is to be
746 -- direct conversion of the underlying integer result, with no regard to
747 -- the small operand.
748
749 -- Corresponding_Body (Node5-Sem)
750 -- This field is set in subprogram declarations, package declarations,
751 -- entry declarations of protected types, and in generic units. It
752 -- points to the defining entity for the corresponding body (NOT the
753 -- node for the body itself).
754
755 -- Corresponding_Formal_Spec (Node3-Sem)
756 -- This field is set in subprogram renaming declarations, where it points
757 -- to the defining entity for a formal subprogram in the case where the
758 -- renaming corresponds to a generic formal subprogram association in an
759 -- instantiation. The field is Empty if the renaming does not correspond
760 -- to such a formal association.
761
762 -- Corresponding_Generic_Association (Node5-Sem)
763 -- This field is defined for object declarations and object renaming
764 -- declarations. It is set for the declarations within an instance that
765 -- map generic formals to their actuals. If set, the field points to
766 -- a generic_association which is the original parent of the expression
767 -- or name appearing in the declaration. This simplifies ASIS queries.
768
769 -- Corresponding_Integer_Value (Uint4-Sem)
770 -- This field is set in real literals of fixed-point types (it is not
771 -- used for floating-point types). It contains the integer value used
772 -- to represent the fixed-point value. It is also set on the universal
773 -- real literals used to represent bounds of fixed-point base types
774 -- and their first named subtypes.
775
776 -- Corresponding_Spec (Node5-Sem)
777 -- This field is set in subprogram, package, task, and protected body
778 -- nodes, where it points to the defining entity in the corresponding
779 -- spec. The attribute is also set in N_With_Clause nodes where it points
780 -- to the defining entity for the with'ed spec, and in a subprogram
781 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
782 -- if there is no corresponding spec, as in the case of a subprogram body
783 -- that serves as its own spec.
784
785 -- Corresponding_Stub (Node3-Sem)
786 -- This field is present in an N_Subunit node. It holds the node in
787 -- the parent unit that is the stub declaration for the subunit. It is
788 -- set when analysis of the stub forces loading of the proper body. If
789 -- expansion of the proper body creates new declarative nodes, they are
790 -- inserted at the point of the corresponding_stub.
791
792 -- Dcheck_Function (Node5-Sem)
793 -- This field is present in an N_Variant node, It references the entity
794 -- for the discriminant checking function for the variant.
795
796 -- Debug_Statement (Node3)
797 -- This field is present in an N_Pragma node. It is used only for a Debug
798 -- pragma. The parameter is of the form of an expression, as required by
799 -- the pragma syntax, but is actually a procedure call. To simplify
800 -- semantic processing, the parser creates a copy of the argument
801 -- rearranged into a procedure call statement and places it in the
802 -- Debug_Statement field. Note that this field is considered syntactic
803 -- field, since it is created by the parser.
804
805 -- Default_Expression (Node5-Sem)
806 -- This field is Empty if there is no default expression. If there is a
807 -- simple default expression (one with no side effects), then this field
808 -- simply contains a copy of the Expression field (both point to the tree
809 -- for the default expression). Default_Expression is used for
810 -- conformance checking.
811
812 -- Default_Storage_Pool (Node3-Sem)
813 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
814 -- copy of Opt.Default_Pool at the end of the compilation unit. See
815 -- package Opt for details. This is used for inheriting the
816 -- Default_Storage_Pool in child units.
817
818 -- Discr_Check_Funcs_Built (Flag11-Sem)
819 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
820 -- discriminant checking functions are constructed. The purpose is to
821 -- avoid attempting to set these functions more than once.
822
823 -- Do_Accessibility_Check (Flag13-Sem)
824 -- This flag is set on N_Parameter_Specification nodes to indicate
825 -- that an accessibility check is required for the parameter. It is
826 -- not yet decided who takes care of this check (TBD ???).
827
828 -- Do_Discriminant_Check (Flag13-Sem)
829 -- This flag is set on N_Selected_Component nodes to indicate that a
830 -- discriminant check is required using the discriminant check routine
831 -- associated with the selector. The actual check is generated by the
832 -- expander when processing selected components.
833
834 -- Do_Division_Check (Flag13-Sem)
835 -- This flag is set on a division operator (/ mod rem) to indicate
836 -- that a zero divide check is required. The actual check is dealt
837 -- with by the backend (all the front end does is to set the flag).
838
839 -- Do_Length_Check (Flag4-Sem)
840 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
841 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
842 -- is required. It is not determined who deals with this flag (???).
843
844 -- Do_Overflow_Check (Flag17-Sem)
845 -- This flag is set on an operator where an overflow check is required on
846 -- the operation. The actual check is dealt with by the backend (all the
847 -- front end does is to set the flag). The other cases where this flag is
848 -- used is on a Type_Conversion node and for attribute reference nodes.
849 -- For a type conversion, it means that the conversion is from one base
850 -- type to another, and the value may not fit in the target base type.
851 -- See also the description of Do_Range_Check for this case. The only
852 -- attribute references which use this flag are Pred and Succ, where it
853 -- means that the result should be checked for going outside the base
854 -- range. Note that this flag is not set for modular types.
855
856 -- Do_Range_Check (Flag9-Sem)
857 -- This flag is set on an expression which appears in a context where a
858 -- range check is required. The target type is clear from the context.
859 -- The contexts in which this flag can appear are the following:
860
861 -- Right side of an assignment. In this case the target type is
862 -- taken from the left side of the assignment, which is referenced
863 -- by the Name of the N_Assignment_Statement node.
864
865 -- Subscript expressions in an indexed component. In this case the
866 -- target type is determined from the type of the array, which is
867 -- referenced by the Prefix of the N_Indexed_Component node.
868
869 -- Argument expression for a parameter, appearing either directly in
870 -- the Parameter_Associations list of a call or as the Expression of an
871 -- N_Parameter_Association node that appears in this list. In either
872 -- case, the check is against the type of the formal. Note that the
873 -- flag is relevant only in IN and IN OUT parameters, and will be
874 -- ignored for OUT parameters, where no check is required in the call,
875 -- and if a check is required on the return, it is generated explicitly
876 -- with a type conversion.
877
878 -- Initialization expression for the initial value in an object
879 -- declaration. In this case the Do_Range_Check flag is set on
880 -- the initialization expression, and the check is against the
881 -- range of the type of the object being declared.
882
883 -- The expression of a type conversion. In this case the range check is
884 -- against the target type of the conversion. See also the use of
885 -- Do_Overflow_Check on a type conversion. The distinction is that the
886 -- overflow check protects against a value that is outside the range of
887 -- the target base type, whereas a range check checks that the
888 -- resulting value (which is a value of the base type of the target
889 -- type), satisfies the range constraint of the target type.
890
891 -- Note: when a range check is required in contexts other than those
892 -- listed above (e.g. in a return statement), an additional type
893 -- conversion node is introduced to represent the required check.
894
895 -- Do_Storage_Check (Flag17-Sem)
896 -- This flag is set in an N_Allocator node to indicate that a storage
897 -- check is required for the allocation, or in an N_Subprogram_Body node
898 -- to indicate that a stack check is required in the subprogram prolog.
899 -- The N_Allocator case is handled by the routine that expands the call
900 -- to the runtime routine. The N_Subprogram_Body case is handled by the
901 -- backend, and all the semantics does is set the flag.
902
903 -- Do_Tag_Check (Flag13-Sem)
904 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
905 -- N_Procedure_Call_Statement, N_Type_Conversion,
906 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
907 -- node to indicate that the tag check can be suppressed. It is not
908 -- yet decided how this flag is used (TBD ???).
909
910 -- Elaborate_Present (Flag4-Sem)
911 -- This flag is set in the N_With_Clause node to indicate that pragma
912 -- Elaborate pragma appears for the with'ed units.
913
914 -- Elaborate_All_Desirable (Flag9-Sem)
915 -- This flag is set in the N_With_Clause mode to indicate that the static
916 -- elaboration processing has determined that an Elaborate_All pragma is
917 -- desirable for correct elaboration for this unit.
918
919 -- Elaborate_All_Present (Flag14-Sem)
920 -- This flag is set in the N_With_Clause node to indicate that a
921 -- pragma Elaborate_All pragma appears for the with'ed units.
922
923 -- Elaborate_Desirable (Flag11-Sem)
924 -- This flag is set in the N_With_Clause mode to indicate that the static
925 -- elaboration processing has determined that an Elaborate pragma is
926 -- desirable for correct elaboration for this unit.
927
928 -- Elaboration_Boolean (Node2-Sem)
929 -- This field is present in function and procedure specification nodes.
930 -- If set, it points to the entity for a Boolean flag that must be tested
931 -- for certain calls to check for access before elaboration. See body of
932 -- Sem_Elab for further details. This field is Empty if no elaboration
933 -- boolean is required.
934
935 -- Else_Actions (List3-Sem)
936 -- This field is present in conditional expression nodes. During code
937 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
938 -- actions at an appropriate place in the tree to get elaborated at the
939 -- right time. For conditional expressions, we have to be sure that the
940 -- actions for the Else branch are only elaborated if the condition is
941 -- False. The Else_Actions field is used as a temporary parking place for
942 -- these actions. The final tree is always rewritten to eliminate the
943 -- need for this field, so in the tree passed to Gigi, this field is
944 -- always set to No_List.
945
946 -- Enclosing_Variant (Node2-Sem)
947 -- This field is present in the N_Variant node and identifies the Node_Id
948 -- corresponding to the immediately enclosing variant when the variant is
949 -- nested, and N_Empty otherwise. Set during semantic processing of the
950 -- variant part of a record type.
951
952 -- Entity (Node4-Sem)
953 -- Appears in all direct names (identifiers, character literals, and
954 -- operator symbols), as well as expanded names, and attributes that
955 -- denote entities, such as 'Class. Points to entity for corresponding
956 -- defining occurrence. Set after name resolution. For identifiers in a
957 -- WITH list, the corresponding defining occurrence is in a separately
958 -- compiled file, and Entity must be set by the library Load procedure.
959 --
960 -- Note: During name resolution, the value in Entity may be temporarily
961 -- incorrect (e.g. during overload resolution, Entity is initially set to
962 -- the first possible correct interpretation, and then later modified if
963 -- necessary to contain the correct value after resolution).
964 --
965 -- Note: This field overlaps Associated_Node, which is used during
966 -- generic processing (see Sem_Ch12 for details). Note also that in
967 -- generic templates, this means that the Entity field does not always
968 -- point to an Entity. Since the back end is expected to ignore generic
969 -- templates, this is harmless.
970 --
971 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
972 -- It is used only for stream attributes definition clauses. In this
973 -- case, it denotes a (possibly dummy) subprogram entity that is declared
974 -- conceptually at the point of the clause. Thus the visibility of the
975 -- attribute definition clause (in the sense of 8.3(23) as amended by
976 -- AI-195) can be checked by testing the visibility of that subprogram.
977 --
978 -- Note: Normally the Entity field of an identifier points to the entity
979 -- for the corresponding defining identifier, and hence the Chars field
980 -- of an identifier will match the Chars field of the entity. However,
981 -- there is no requirement that these match, and there are obscure cases
982 -- of generated code where they do not match.
983
984 -- Entity_Or_Associated_Node (Node4-Sem)
985 -- A synonym for both Entity and Associated_Node. Used by convention in
986 -- the code when referencing this field in cases where it is not known
987 -- whether the field contains an Entity or an Associated_Node.
988
989 -- Etype (Node5-Sem)
990 -- Appears in all expression nodes, all direct names, and all entities.
991 -- Points to the entity for the related type. Set after type resolution.
992 -- Normally this is the actual subtype of the expression. However, in
993 -- certain contexts such as the right side of an assignment, subscripts,
994 -- arguments to calls, returned value in a function, initial value etc.
995 -- it is the desired target type. In the event that this is different
996 -- from the actual type, the Do_Range_Check flag will be set if a range
997 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
998 -- points to an essentially arbitrary choice from the possible set of
999 -- types.
1000
1001 -- Exception_Junk (Flag8-Sem)
1002 -- This flag is set in a various nodes appearing in a statement sequence
1003 -- to indicate that the corresponding node is an artifact of the
1004 -- generated code for exception handling, and should be ignored when
1005 -- analyzing the control flow of the relevant sequence of statements
1006 -- (e.g. to check that it does not end with a bad return statement).
1007
1008 -- Exception_Label (Node5-Sem)
1009 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1010 -- to be used for transforming the corresponding exception into a goto,
1011 -- or contains Empty, if this exception is not to be transformed. Also
1012 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1013 -- that there may be a local raise for the handler, so that expansion
1014 -- to allow a goto is required (and this field contains the label for
1015 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1016
1017 -- Expansion_Delayed (Flag11-Sem)
1018 -- Set on aggregates and extension aggregates that need a top-down rather
1019 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1020 -- up. For nested aggregates the expansion is delayed until the enclosing
1021 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1022 -- delay it we set this flag. This is done to avoid creating a temporary
1023 -- for each level of a nested aggregates, and also to prevent the
1024 -- premature generation of constraint checks. This is also a requirement
1025 -- if we want to generate the proper attachment to the internal
1026 -- finalization lists (for record with controlled components). Top down
1027 -- expansion of aggregates is also used for in-place array aggregate
1028 -- assignment or initialization. When the full context is known, the
1029 -- target of the assignment or initialization is used to generate the
1030 -- left-hand side of individual assignment to each sub-component.
1031
1032 -- First_Inlined_Subprogram (Node3-Sem)
1033 -- Present in the N_Compilation_Unit node for the main program. Points
1034 -- to a chain of entities for subprograms that are to be inlined. The
1035 -- Next_Inlined_Subprogram field of these entities is used as a link
1036 -- pointer with Empty marking the end of the list. This field is Empty
1037 -- if there are no inlined subprograms or inlining is not active.
1038
1039 -- First_Named_Actual (Node4-Sem)
1040 -- Present in procedure call statement and function call nodes, and also
1041 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1042 -- named parameter where parameters are ordered by declaration order (as
1043 -- opposed to the actual order in the call which may be different due to
1044 -- named associations). Note: this field points to the explicit actual
1045 -- parameter itself, not the N_Parameter_Association node (its parent).
1046
1047 -- First_Real_Statement (Node2-Sem)
1048 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1049 -- Empty. Used only when declarations are moved into the statement part
1050 -- of a construct as a result of wrapping an AT END handler that is
1051 -- required to cover the declarations. In this case, this field is used
1052 -- to remember the location in the statements list of the first real
1053 -- statement, i.e. the statement that used to be first in the statement
1054 -- list before the declarations were prepended.
1055
1056 -- First_Subtype_Link (Node5-Sem)
1057 -- Present in N_Freeze_Entity node for an anonymous base type that is
1058 -- implicitly created by the declaration of a first subtype. It points
1059 -- to the entity for the first subtype.
1060
1061 -- Float_Truncate (Flag11-Sem)
1062 -- A flag present in type conversion nodes. This is used for float to
1063 -- integer conversions where truncation is required rather than rounding.
1064 -- Note that Gigi does not handle type conversions from real to integer
1065 -- with rounding (see Expand_N_Type_Conversion).
1066
1067 -- Forwards_OK (Flag5-Sem)
1068 -- A flag present in the N_Assignment_Statement node. It is used only
1069 -- if the type being assigned is an array type, and is set if analysis
1070 -- determines that it is definitely safe to do the copy forwards, i.e.
1071 -- starting at the lowest addressed element. This is the case if either
1072 -- the operands do not overlap, or they may overlap, but if they do,
1073 -- then the left operand is at a lower address than the right operand.
1074 --
1075 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1076 -- means that the front end could not determine that either direction is
1077 -- definitely safe, and a runtime check may be required if the backend
1078 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1079 -- set, it means that the front end can assure no overlap of operands.
1080
1081 -- From_Aspect_Specification (Flag13-Sem)
1082 -- Processing of aspect specifications typically results in insertion in
1083 -- the tree of corresponding pragma or attribute definition clause nodes.
1084 -- These generated nodes have the From_Aspect_Specification flag set to
1085 -- indicate that they came from aspect specifications originally.
1086
1087 -- From_At_End (Flag4-Sem)
1088 -- This flag is set on an N_Raise_Statement node if it corresponds to
1089 -- the reraise statement generated as the last statement of an AT END
1090 -- handler when SJLJ exception handling is active. It is used to stop
1091 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1092 -- because if the restriction is set, the reraise is not generated.
1093
1094 -- From_At_Mod (Flag4-Sem)
1095 -- This flag is set on the attribute definition clause node that is
1096 -- generated by a transformation of an at mod phrase in a record
1097 -- representation clause. This is used to give slightly different (Ada 83
1098 -- compatible) semantics to such a clause, namely it is used to specify a
1099 -- minimum acceptable alignment for the base type and all subtypes. In
1100 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1101 -- must be a multiple of the given value, and the representation clause
1102 -- is considered to be type specific instead of subtype specific.
1103
1104 -- From_Default (Flag6-Sem)
1105 -- This flag is set on the subprogram renaming declaration created in an
1106 -- instance for a formal subprogram, when the formal is declared with a
1107 -- box, and there is no explicit actual. If the flag is present, the
1108 -- declaration is treated as an implicit reference to the formal in the
1109 -- ali file.
1110
1111 -- Generic_Parent (Node5-Sem)
1112 -- Generic_Parent is defined on declaration nodes that are instances. The
1113 -- value of Generic_Parent is the generic entity from which the instance
1114 -- is obtained. Generic_Parent is also defined for the renaming
1115 -- declarations and object declarations created for the actuals in an
1116 -- instantiation. The generic parent of such a declaration is the
1117 -- corresponding generic association in the Instantiation node.
1118
1119 -- Generic_Parent_Type (Node4-Sem)
1120 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1121 -- actuals of formal private and derived types. Within the instance, the
1122 -- operations on the actual are those inherited from the parent. For a
1123 -- formal private type, the parent type is the generic type itself. The
1124 -- Generic_Parent_Type is also used in an instance to determine whether a
1125 -- private operation overrides an inherited one.
1126
1127 -- Handler_List_Entry (Node2-Sem)
1128 -- This field is present in N_Object_Declaration nodes. It is set only
1129 -- for the Handler_Record entry generated for an exception in zero cost
1130 -- exception handling mode. It references the corresponding item in the
1131 -- handler list, and is used to delete this entry if the corresponding
1132 -- handler is deleted during optimization. For further details on why
1133 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1134
1135 -- Has_No_Elaboration_Code (Flag17-Sem)
1136 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1137 -- or not elaboration code is present for this unit. It is initially set
1138 -- true for subprogram specs and bodies and for all generic units and
1139 -- false for non-generic package specs and bodies. Gigi may set the flag
1140 -- in the non-generic package case if it determines that no elaboration
1141 -- code is generated. Note that this flag is not related to the
1142 -- Is_Preelaborated status, there can be preelaborated packages that
1143 -- generate elaboration code, and non-preelaborated packages which do
1144 -- not generate elaboration code.
1145
1146 -- Has_Pragma_CPU (Flag14-Sem)
1147 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1148 -- flag the presence of a CPU pragma in the declaration sequence (public
1149 -- or private in the task case).
1150
1151 -- Has_Pragma_Suppress_All (Flag14-Sem)
1152 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1153 -- pragma appears anywhere in the unit. This accommodates the rather
1154 -- strange placement rules of other compilers (DEC permits it at the
1155 -- end of a unit, and Rational allows it as a program unit pragma). We
1156 -- allow it anywhere at all, and consider it equivalent to a pragma
1157 -- Suppress (All_Checks) appearing at the start of the configuration
1158 -- pragmas for the unit.
1159
1160 -- Has_Pragma_Priority (Flag6-Sem)
1161 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1162 -- N_Protected_Definition nodes to flag the presence of either a Priority
1163 -- or Interrupt_Priority pragma in the declaration sequence (public or
1164 -- private in the task and protected cases)
1165
1166 -- Has_Private_View (Flag11-Sem)
1167 -- A flag present in generic nodes that have an entity, to indicate that
1168 -- the node has a private type. Used to exchange private and full
1169 -- declarations if the visibility at instantiation is different from the
1170 -- visibility at generic definition.
1171
1172 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1173 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1174 -- flag the presence of a pragma Relative_Deadline.
1175
1176 -- Has_Self_Reference (Flag13-Sem)
1177 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1178 -- of the expressions contains an access attribute reference to the
1179 -- enclosing type. Such a self-reference can only appear in default-
1180 -- initialized aggregate for a record type.
1181
1182 -- Has_Storage_Size_Pragma (Flag5-Sem)
1183 -- A flag present in an N_Task_Definition node to flag the presence of a
1184 -- Storage_Size pragma.
1185
1186 -- Has_Task_Info_Pragma (Flag7-Sem)
1187 -- A flag present in an N_Task_Definition node to flag the presence of a
1188 -- Task_Info pragma. Used to detect duplicate pragmas.
1189
1190 -- Has_Task_Name_Pragma (Flag8-Sem)
1191 -- A flag present in N_Task_Definition nodes to flag the presence of a
1192 -- Task_Name pragma in the declaration sequence for the task.
1193
1194 -- Has_Wide_Character (Flag11-Sem)
1195 -- Present in string literals, set if any wide character (i.e. character
1196 -- code outside the Character range but within Wide_Character range)
1197 -- appears in the string. Used to implement pragma preference rules.
1198
1199 -- Has_Wide_Wide_Character (Flag13-Sem)
1200 -- Present in string literals, set if any wide character (i.e. character
1201 -- code outside the Wide_Character range) appears in the string. Used to
1202 -- implement pragma preference rules.
1203
1204 -- Hidden_By_Use_Clause (Elist4-Sem)
1205 -- An entity list present in use clauses that appear within
1206 -- instantiations. For the resolution of local entities, entities
1207 -- introduced by these use clauses have priority over global ones, and
1208 -- outer entities must be explicitly hidden/restored on exit.
1209
1210 -- Implicit_With (Flag16-Sem)
1211 -- This flag is set in the N_With_Clause node that is implicitly
1212 -- generated for runtime units that are loaded by the expander, and also
1213 -- for package System, if it is loaded implicitly by a use of the
1214 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1215 -- as well.
1216
1217 -- Import_Interface_Present (Flag16-Sem)
1218 -- This flag is set in an Interface or Import pragma if a matching
1219 -- pragma of the other kind is also present. This is used to avoid
1220 -- generating some unwanted error messages.
1221
1222 -- Includes_Infinities (Flag11-Sem)
1223 -- This flag is present in N_Range nodes. It is set for the range of
1224 -- unconstrained float types defined in Standard, which include not only
1225 -- the given range of values, but also legitimately can include infinite
1226 -- values. This flag is false for any float type for which an explicit
1227 -- range is given by the programmer, even if that range is identical to
1228 -- the range for Float.
1229
1230 -- Inherited_Discriminant (Flag13-Sem)
1231 -- This flag is present in N_Component_Association nodes. It indicates
1232 -- that a given component association in an extension aggregate is the
1233 -- value obtained from a constraint on an ancestor. Used to prevent
1234 -- double expansion when the aggregate has expansion delayed.
1235
1236 -- Instance_Spec (Node5-Sem)
1237 -- This field is present in generic instantiation nodes, and also in
1238 -- formal package declaration nodes (formal package declarations are
1239 -- treated in a manner very similar to package instantiations). It points
1240 -- to the node for the spec of the instance, inserted as part of the
1241 -- semantic processing for instantiations in Sem_Ch12.
1242
1243 -- Is_Accessibility_Actual (Flag12-Sem)
1244 -- Present in N_Parameter_Association nodes. True if the parameter is
1245 -- an extra actual that carries the accessibility level of the actual
1246 -- for an access parameter, in a function that dispatches on result and
1247 -- is called in a dispatching context. Used to prevent a formal/actual
1248 -- mismatch when the call is rewritten as a dispatching call.
1249
1250 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1251 -- A flag set in a Block_Statement node to indicate that it is the
1252 -- expansion of an asynchronous entry call. Such a block needs cleanup
1253 -- handler to assure that the call is cancelled.
1254
1255 -- Is_Boolean_Aspect (Flag16-Sem)
1256 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1257 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1258
1259 -- Is_Component_Left_Opnd (Flag13-Sem)
1260 -- Is_Component_Right_Opnd (Flag14-Sem)
1261 -- Present in concatenation nodes, to indicate that the corresponding
1262 -- operand is of the component type of the result. Used in resolving
1263 -- concatenation nodes in instances.
1264
1265 -- Is_Delayed_Aspect (Flag14-Sem)
1266 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1267 -- come from aspect specifications, where the evaluation of the aspect
1268 -- must be delayed to the freeze point.
1269
1270 -- Is_Controlling_Actual (Flag16-Sem)
1271 -- This flag is set on in an expression that is a controlling argument in
1272 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1273 -- details of its use.
1274
1275 -- Is_Dynamic_Coextension (Flag18-Sem)
1276 -- Present in allocator nodes, to indicate that this is an allocator
1277 -- for an access discriminant of a dynamically allocated object. The
1278 -- coextension must be deallocated and finalized at the same time as
1279 -- the enclosing object.
1280
1281 -- Is_Entry_Barrier_Function (Flag8-Sem)
1282 -- This flag is set in an N_Subprogram_Body node which is the expansion
1283 -- of an entry barrier from a protected entry body. It is used for the
1284 -- circuitry checking for incorrect use of Current_Task.
1285
1286 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1287 -- This flag is set in an N_Function_Call node to indicate that the extra
1288 -- actuals to support a build-in-place style of call have been added to
1289 -- the call.
1290
1291 -- Is_In_Discriminant_Check (Flag11-Sem)
1292 -- This flag is present in a selected component, and is used to indicate
1293 -- that the reference occurs within a discriminant check. The
1294 -- significance is that optimizations based on assuming that the
1295 -- discriminant check has a correct value cannot be performed in this
1296 -- case (or the discriminant check may be optimized away!)
1297
1298 -- Is_Machine_Number (Flag11-Sem)
1299 -- This flag is set in an N_Real_Literal node to indicate that the value
1300 -- is a machine number. This avoids some unnecessary cases of converting
1301 -- real literals to machine numbers.
1302
1303 -- Is_Null_Loop (Flag16-Sem)
1304 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1305 -- can be determined to be null at compile time. This is used to remove
1306 -- the loop entirely at expansion time.
1307
1308 -- Is_Overloaded (Flag5-Sem)
1309 -- A flag present in all expression nodes. Used temporarily during
1310 -- overloading determination. The setting of this flag is not relevant
1311 -- once overloading analysis is complete.
1312
1313 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1314 -- A flag present only in N_Op_Expon nodes. It is set when the
1315 -- exponentiation is of the form 2 ** N, where the type of N is an
1316 -- unsigned integral subtype whose size does not exceed the size of
1317 -- Standard_Integer (i.e. a type that can be safely converted to
1318 -- Natural), and the exponentiation appears as the right operand of an
1319 -- integer multiplication or an integer division where the dividend is
1320 -- unsigned. It is also required that overflow checking is off for both
1321 -- the exponentiation and the multiply/divide node. If this set of
1322 -- conditions holds, and the flag is set, then the division or
1323 -- multiplication can be (and is) converted to a shift.
1324
1325 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1326 -- A flag set in a Subprogram_Body block to indicate that it is the
1327 -- implementation of a protected subprogram. Such a body needs cleanup
1328 -- handler to make sure that the associated protected object is unlocked
1329 -- when the subprogram completes.
1330
1331 -- Is_Static_Coextension (Flag14-Sem)
1332 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1333 -- of an object allocated on the stack rather than the heap.
1334
1335 -- Is_Static_Expression (Flag6-Sem)
1336 -- Indicates that an expression is a static expression (RM 4.9). See spec
1337 -- of package Sem_Eval for full details on the use of this flag.
1338
1339 -- Is_Subprogram_Descriptor (Flag16-Sem)
1340 -- Present in N_Object_Declaration, and set only for the object
1341 -- declaration generated for a subprogram descriptor in fast exception
1342 -- mode. See Exp_Ch11 for details of use.
1343
1344 -- Is_Task_Allocation_Block (Flag6-Sem)
1345 -- A flag set in a Block_Statement node to indicate that it is the
1346 -- expansion of a task allocator, or the allocator of an object
1347 -- containing tasks. Such a block requires a cleanup handler to call
1348 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1349 -- allocated but not activated when the allocator completes abnormally.
1350
1351 -- Is_Task_Master (Flag5-Sem)
1352 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1353 -- indicate that the construct is a task master (i.e. has declared tasks
1354 -- or declares an access to a task type).
1355
1356 -- Itype (Node1-Sem)
1357 -- Used in N_Itype_Reference node to reference an itype for which it is
1358 -- important to ensure that it is defined. See description of this node
1359 -- for further details.
1360
1361 -- Kill_Range_Check (Flag11-Sem)
1362 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1363 -- result should not be subjected to range checks. This is used for the
1364 -- implementation of Normalize_Scalars.
1365
1366 -- Label_Construct (Node2-Sem)
1367 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1368 -- N_Block_Statement or N_Loop_Statement node to which the label
1369 -- declaration applies. This is not currently used in the compiler
1370 -- itself, but it is useful in the implementation of ASIS queries.
1371 -- This field is left empty for the special labels generated as part
1372 -- of expanding raise statements with a local exception handler.
1373
1374 -- Library_Unit (Node4-Sem)
1375 -- In a stub node, Library_Unit points to the compilation unit node of
1376 -- the corresponding subunit.
1377 --
1378 -- In a with clause node, Library_Unit points to the spec of the with'ed
1379 -- unit.
1380 --
1381 -- In a compilation unit node, the usage depends on the unit type:
1382 --
1383 -- For a library unit body, Library_Unit points to the compilation unit
1384 -- node of the corresponding spec, unless it's a subprogram body with
1385 -- Acts_As_Spec set, in which case it points to itself.
1386 --
1387 -- For a spec, Library_Unit points to the compilation unit node of the
1388 -- corresponding body, if present. The body will be present if the spec
1389 -- is or contains generics that we needed to instantiate. Similarly, the
1390 -- body will be present if we needed it for inlining purposes. Thus, if
1391 -- we have a spec/body pair, both of which are present, they point to
1392 -- each other via Library_Unit.
1393 --
1394 -- For a subunit, Library_Unit points to the compilation unit node of
1395 -- the parent body.
1396 --
1397 -- Note that this field is not used to hold the parent pointer for child
1398 -- unit (which might in any case need to use it for some other purpose as
1399 -- described above). Instead for a child unit, implicit with's are
1400 -- generated for all parents.
1401
1402 -- Local_Raise_Statements (Elist1)
1403 -- This field is present in exception handler nodes. It is set to
1404 -- No_Elist in the normal case. If there is at least one raise statement
1405 -- which can potentially be handled as a local raise, then this field
1406 -- points to a list of raise nodes, which are calls to a routine to raise
1407 -- an exception. These are raise nodes which can be optimized into gotos
1408 -- if the handler turns out to meet the conditions which permit this
1409 -- transformation. Note that this does NOT include instances of the
1410 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1411 -- handled by the back end (using the N_Push/N_Pop mechanism).
1412
1413 -- Loop_Actions (List2-Sem)
1414 -- A list present in Component_Association nodes in array aggregates.
1415 -- Used to collect actions that must be executed within the loop because
1416 -- they may need to be evaluated anew each time through.
1417
1418 -- Limited_View_Installed (Flag18-Sem)
1419 -- Present in With_Clauses and in package specifications. If set on
1420 -- with_clause, it indicates that this clause has created the current
1421 -- limited view of the designated package. On a package specification, it
1422 -- indicates that the limited view has already been created because the
1423 -- package is mentioned in a limited_with_clause in the closure of the
1424 -- unit being compiled.
1425
1426 -- Local_Raise_Not_OK (Flag7-Sem)
1427 -- Present in N_Exception_Handler nodes. Set if the handler contains
1428 -- a construct (reraise statement, or call to subprogram in package
1429 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1430 -- for a local raise (one that could otherwise be converted to a goto).
1431
1432 -- Must_Be_Byte_Aligned (Flag14-Sem)
1433 -- This flag is present in N_Attribute_Reference nodes. It can be set
1434 -- only for the Address and Unrestricted_Access attributes. If set it
1435 -- means that the object for which the address/access is given must be on
1436 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1437 -- of the object is to be made before taking the address (this copy is in
1438 -- the current scope on the stack frame). This is used for certain cases
1439 -- of code generated by the expander that passes parameters by address.
1440 --
1441 -- The reason the copy is not made by the front end is that the back end
1442 -- has more information about type layout and may be able to (but is not
1443 -- guaranteed to) prevent making unnecessary copies.
1444
1445 -- Must_Not_Freeze (Flag8-Sem)
1446 -- A flag present in all expression nodes. Normally expressions cause
1447 -- freezing as described in the RM. If this flag is set, then this is
1448 -- inhibited. This is used by the analyzer and expander to label nodes
1449 -- that are created by semantic analysis or expansion and which must not
1450 -- cause freezing even though they normally would. This flag is also
1451 -- present in an N_Subtype_Indication node, since we also use these in
1452 -- calls to Freeze_Expression.
1453
1454 -- Next_Entity (Node2-Sem)
1455 -- Present in defining identifiers, defining character literals and
1456 -- defining operator symbols (i.e. in all entities). The entities of a
1457 -- scope are chained, and this field is used as the forward pointer for
1458 -- this list. See Einfo for further details.
1459
1460 -- Next_Exit_Statement (Node3-Sem)
1461 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1462 -- chained (in reverse order of appearance) from the First_Exit_Statement
1463 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1464 -- the next entry on this chain (Empty = end of list).
1465
1466 -- Next_Implicit_With (Node3-Sem)
1467 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1468 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1469 -- to prevent multiple with_clauses for the same unit in a given context.
1470 -- A postorder traversal of the tree whose nodes are units and whose
1471 -- links are with_clauses defines the order in which Inspector must
1472 -- examine a compiled unit and its full context. This ordering ensures
1473 -- that any subprogram call is examined after the subprogram declaration
1474 -- has been seen.
1475
1476 -- Next_Named_Actual (Node4-Sem)
1477 -- Present in parameter association node. Set during semantic analysis to
1478 -- point to the next named parameter, where parameters are ordered by
1479 -- declaration order (as opposed to the actual order in the call, which
1480 -- may be different due to named associations). Not that this field
1481 -- points to the explicit actual parameter itself, not to the
1482 -- N_Parameter_Association node (its parent).
1483
1484 -- Next_Pragma (Node1-Sem)
1485 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1486 -- nodes. Currently used for two purposes:
1487 --
1488 -- Create a list of linked Check_Policy pragmas. The head of this list
1489 -- is stored in Opt.Check_Policy_List (which has further details).
1490 --
1491 -- Used by processing for Pre/Postcondition pragmas to store a list of
1492 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1493 -- details).
1494
1495 -- Next_Rep_Item (Node5-Sem)
1496 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1497 -- clauses, record rep clauses, aspect specification nodes. Used to link
1498 -- representation items that apply to an entity. See full description of
1499 -- First_Rep_Item field in Einfo for further details.
1500
1501 -- Next_Use_Clause (Node3-Sem)
1502 -- While use clauses are active during semantic processing, they are
1503 -- chained from the scope stack entry, using Next_Use_Clause as a link
1504 -- pointer, with Empty marking the end of the list. The head pointer is
1505 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1506 -- processing (i.e. when Gigi sees the tree, the contents of this field
1507 -- is undefined and should not be read).
1508
1509 -- No_Ctrl_Actions (Flag7-Sem)
1510 -- Present in N_Assignment_Statement to indicate that no finalize nor
1511 -- adjust should take place on this assignment even though the rhs is
1512 -- controlled. This is used in init procs and aggregate expansions where
1513 -- the generated assignments are more initialisations than real
1514 -- assignments.
1515
1516 -- No_Elaboration_Check (Flag14-Sem)
1517 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1518 -- that no elaboration check is needed on the call, because it appears in
1519 -- the context of a local Suppress pragma. This is used on calls within
1520 -- task bodies, where the actual elaboration checks are applied after
1521 -- analysis, when the local scope stack is not present.
1522
1523 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1524 -- Present in N_With_Clause nodes. Set if the with clause is on the
1525 -- package or subprogram spec where the main unit is the corresponding
1526 -- body, and no entities of the with'ed unit are referenced by the spec
1527 -- (an entity may still be referenced in the body, so this flag is used
1528 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1529 -- full details)
1530
1531 -- No_Initialization (Flag13-Sem)
1532 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1533 -- object must not be initialized (by Initialize or call to an init
1534 -- proc). This is needed for controlled aggregates. When the Object
1535 -- declaration has an expression, this flag means that this expression
1536 -- should not be taken into account (needed for in place initialization
1537 -- with aggregates).
1538
1539 -- No_Truncation (Flag17-Sem)
1540 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1541 -- only if the RM_Size of the source is greater than the RM_Size of the
1542 -- target for scalar operands. Normally in such a case we truncate some
1543 -- higher order bits of the source, and then sign/zero extend the result
1544 -- to form the output value. But if this flag is set, then we do not do
1545 -- any truncation, so for example, if an 8 bit input is converted to 5
1546 -- bit result which is in fact stored in 8 bits, then the high order
1547 -- three bits of the target result will be copied from the source. This
1548 -- is used for properly setting out of range values for use by pragmas
1549 -- Initialize_Scalars and Normalize_Scalars.
1550
1551 -- Original_Discriminant (Node2-Sem)
1552 -- Present in identifiers. Used in references to discriminants that
1553 -- appear in generic units. Because the names of the discriminants may be
1554 -- different in an instance, we use this field to recover the position of
1555 -- the discriminant in the original type, and replace it with the
1556 -- discriminant at the same position in the instantiated type.
1557
1558 -- Original_Entity (Node2-Sem)
1559 -- Present in numeric literals. Used to denote the named number that has
1560 -- been constant-folded into the given literal. If literal is from
1561 -- source, or the result of some other constant-folding operation, then
1562 -- Original_Entity is empty. This field is needed to handle properly
1563 -- named numbers in generic units, where the Associated_Node field
1564 -- interferes with the Entity field, making it impossible to preserve the
1565 -- original entity at the point of instantiation (ASIS problem).
1566
1567 -- Others_Discrete_Choices (List1-Sem)
1568 -- When a case statement or variant is analyzed, the semantic checks
1569 -- determine the actual list of choices that correspond to an others
1570 -- choice. This list is materialized for later use by the expander and
1571 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1572 -- this materialized list of choices, which is in standard format for a
1573 -- list of discrete choices, except that of course it cannot contain an
1574 -- N_Others_Choice entry.
1575
1576 -- Parameter_List_Truncated (Flag17-Sem)
1577 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1578 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1579 -- a result of a First_Optional_Parameter specification in an
1580 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1581 -- The truncation is done by the expander by removing trailing parameters
1582 -- from the argument list, in accordance with the set of rules allowing
1583 -- such parameter removal. In particular, parameters can be removed
1584 -- working from the end of the parameter list backwards up to and
1585 -- including the entry designated by First_Optional_Parameter in the
1586 -- Import pragma. Parameters can be removed if they are implicit and the
1587 -- default value is a known-at-compile-time value, including the use of
1588 -- the Null_Parameter attribute, or if explicit parameter values are
1589 -- present that match the corresponding defaults.
1590
1591 -- Parent_Spec (Node4-Sem)
1592 -- For a library unit that is a child unit spec (package or subprogram
1593 -- declaration, generic declaration or instantiation, or library level
1594 -- rename, this field points to the compilation unit node for the parent
1595 -- package specification. This field is Empty for library bodies (the
1596 -- parent spec in this case can be found from the corresponding spec).
1597
1598 -- Pragma_Enabled (Flag5-Sem)
1599 -- Present in N_Pragma nodes. This flag is relevant only for pragmas
1600 -- Assert, Check, Precondition, and Postcondition. It is true if the
1601 -- check corresponding to the pragma type is enabled at the point where
1602 -- the pragma appears.
1603
1604 -- Present_Expr (Uint3-Sem)
1605 -- Present in an N_Variant node. This has a meaningful value only after
1606 -- Gigi has back annotated the tree with representation information. At
1607 -- this point, it contains a reference to a gcc expression that depends
1608 -- on the values of one or more discriminants. Give a set of discriminant
1609 -- values, this expression evaluates to False (zero) if variant is not
1610 -- present, and True (non-zero) if it is present. See unit Repinfo for
1611 -- further details on gigi back annotation. This field is used during
1612 -- ASIS processing (data decomposition annex) to determine if a field is
1613 -- present or not.
1614
1615 -- Print_In_Hex (Flag13-Sem)
1616 -- Set on an N_Integer_Literal node to indicate that the value should be
1617 -- printed in hexadecimal in the sprint listing. Has no effect on
1618 -- legality or semantics of program, only on the displayed output. This
1619 -- is used to clarify output from the packed array cases.
1620
1621 -- Procedure_To_Call (Node2-Sem)
1622 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1623 -- and N_Extended_Return_Statement nodes. References the entity for the
1624 -- declaration of the procedure to be called to accomplish the required
1625 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1626 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1627 -- allocating the return value), and for the Deallocate procedure in the
1628 -- case of N_Free_Statement.
1629
1630 -- Raises_Constraint_Error (Flag7-Sem)
1631 -- Set on an expression whose evaluation will definitely fail constraint
1632 -- error check. In the case of static expressions, this flag must be set
1633 -- accurately (and if it is set, the expression is typically illegal
1634 -- unless it appears as a non-elaborated branch of a short-circuit form).
1635 -- For a non-static expression, this flag may be set whenever an
1636 -- expression (e.g. an aggregate) is known to raise constraint error. If
1637 -- set, the expression definitely will raise CE if elaborated at runtime.
1638 -- If not set, the expression may or may not raise CE. In other words, on
1639 -- static expressions, the flag is set accurately, on non-static
1640 -- expressions it is set conservatively.
1641
1642 -- Redundant_Use (Flag13-Sem)
1643 -- Present in nodes that can appear as an operand in a use clause or use
1644 -- type clause (identifiers, expanded names, attribute references). Set
1645 -- to indicate that a use is redundant (and therefore need not be undone
1646 -- on scope exit).
1647
1648 -- Renaming_Exception (Node2-Sem)
1649 -- Present in N_Exception_Declaration node. Used to point back to the
1650 -- exception renaming for an exception declared within a subprogram.
1651 -- What happens is that an exception declared in a subprogram is moved
1652 -- to the library level with a unique name, and the original exception
1653 -- becomes a renaming. This link from the library level exception to the
1654 -- renaming declaration allows registering of the proper exception name.
1655
1656 -- Return_Statement_Entity (Node5-Sem)
1657 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1658 -- Points to an E_Return_Statement representing the return statement.
1659
1660 -- Return_Object_Declarations (List3)
1661 -- Present in N_Extended_Return_Statement.
1662 -- Points to a list initially containing a single
1663 -- N_Object_Declaration representing the return object.
1664 -- We use a list (instead of just a pointer to the object decl)
1665 -- because Analyze wants to insert extra actions on this list.
1666
1667 -- Rounded_Result (Flag18-Sem)
1668 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1669 -- Used in the fixed-point cases to indicate that the result must be
1670 -- rounded as a result of the use of the 'Round attribute. Also used for
1671 -- integer N_Op_Divide nodes to indicate that the result should be
1672 -- rounded to the nearest integer (breaking ties away from zero), rather
1673 -- than truncated towards zero as usual. These rounded integer operations
1674 -- are the result of expansion of rounded fixed-point divide, conversion
1675 -- and multiplication operations.
1676
1677 -- SCIL_Entity (Node4-Sem)
1678 -- Present in SCIL nodes. Used to reference the tagged type associated
1679 -- with the SCIL node.
1680
1681 -- SCIL_Controlling_Tag (Node5-Sem)
1682 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1683 -- controlling tag of a dispatching call.
1684
1685 -- SCIL_Tag_Value (Node5-Sem)
1686 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1687 -- value that is being tested.
1688
1689 -- SCIL_Target_Prim (Node2-Sem)
1690 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1691 -- type primitive associated with the SCIL node.
1692
1693 -- Scope (Node3-Sem)
1694 -- Present in defining identifiers, defining character literals and
1695 -- defining operator symbols (i.e. in all entities). The entities of a
1696 -- scope all use this field to reference the corresponding scope entity.
1697 -- See Einfo for further details.
1698
1699 -- Shift_Count_OK (Flag4-Sem)
1700 -- A flag present in shift nodes to indicate that the shift count is
1701 -- known to be in range, i.e. is in the range from zero to word length
1702 -- minus one. If this flag is not set, then the shift count may be
1703 -- outside this range, i.e. larger than the word length, and the code
1704 -- must ensure that such shift counts give the appropriate result.
1705
1706 -- Source_Type (Node1-Sem)
1707 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1708 -- source type entity for the unchecked conversion instantiation
1709 -- which gigi must do size validation for.
1710
1711 -- Split_PPC (Flag17)
1712 -- When a Pre or Postaspect specification is processed, it is broken
1713 -- into AND THEN sections. The left most section has Split_PPC set to
1714 -- False, indicating that it is the original specification (e.g. for
1715 -- posting errors). For other sections, Split_PPC is set to True.
1716 -- This flag is set in both the N_Aspect_Specification node itself,
1717 -- and in the pragma which is generated from this node.
1718
1719 -- Static_Processing_OK (Flag4-Sem)
1720 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1721 -- flag is set, the full value of the aggregate can be determined at
1722 -- compile time and the aggregate can be passed as is to the back-end.
1723 -- In this event it is irrelevant whether this flag is set or not.
1724 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1725 -- Static_Processing_OK is set, the aggregate can (but need not) be
1726 -- converted into a compile time known aggregate by the expander. See
1727 -- Sem_Aggr for the specific conditions under which an aggregate has its
1728 -- Static_Processing_OK flag set.
1729
1730 -- Storage_Pool (Node1-Sem)
1731 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1732 -- and N_Extended_Return_Statement nodes. References the entity for the
1733 -- storage pool to be used for the allocate or free call or for the
1734 -- allocation of the returned value from function. Empty indicates that
1735 -- the global default pool is to be used. Note that in the case
1736 -- of a return statement, this field is set only if the function returns
1737 -- value of a type whose size is not known at compile time on the
1738 -- secondary stack.
1739
1740 -- Suppress_Assignment_Checks (Flag18-Sem)
1741 -- Used in generated N_Assignment_Statement nodes to suppress predicate
1742 -- and range checks in cases where the generated code knows that the
1743 -- value being assigned is in range and satisfies any predicate. Also
1744 -- can be set in N_Object_Declaration nodes, to similarly suppress any
1745 -- checks on the initializing value.
1746
1747 -- Suppress_Loop_Warnings (Flag17-Sem)
1748 -- Used in N_Loop_Statement node to indicate that warnings within the
1749 -- body of the loop should be suppressed. This is set when the range
1750 -- of a FOR loop is known to be null, or is probably null (loop would
1751 -- only execute if invalid values are present).
1752
1753 -- Target_Type (Node2-Sem)
1754 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1755 -- type entity for the unchecked conversion instantiation which gigi must
1756 -- do size validation for.
1757
1758 -- Then_Actions (List3-Sem)
1759 -- This field is present in conditional expression nodes. During code
1760 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1761 -- actions at an appropriate place in the tree to get elaborated at the
1762 -- right time. For conditional expressions, we have to be sure that the
1763 -- actions for the Then branch are only elaborated if the condition is
1764 -- True. The Then_Actions field is used as a temporary parking place for
1765 -- these actions. The final tree is always rewritten to eliminate the
1766 -- need for this field, so in the tree passed to Gigi, this field is
1767 -- always set to No_List.
1768
1769 -- Treat_Fixed_As_Integer (Flag14-Sem)
1770 -- This flag appears in operator nodes for divide, multiply, mod and rem
1771 -- on fixed-point operands. It indicates that the operands are to be
1772 -- treated as integer values, ignoring small values. This flag is only
1773 -- set as a result of expansion of fixed-point operations. Typically a
1774 -- fixed-point multiplication in the source generates subsidiary
1775 -- multiplication and division operations that work with the underlying
1776 -- integer values and have this flag set. Note that this flag is not
1777 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1778 -- in these cases it is always the case that fixed is treated as integer.
1779 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1780 -- leave such nodes alone, and whoever makes them must set the correct
1781 -- Etype value.
1782
1783 -- TSS_Elist (Elist3-Sem)
1784 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1785 -- entries for each TSS (type support subprogram) associated with the
1786 -- frozen type. The elements of the list are the entities for the
1787 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1788 -- if there are no type support subprograms for the type or if the freeze
1789 -- node is not for a type.
1790
1791 -- Unreferenced_In_Spec (Flag7-Sem)
1792 -- Present in N_With_Clause nodes. Set if the with clause is on the
1793 -- package or subprogram spec where the main unit is the corresponding
1794 -- body, and is not referenced by the spec (it may still be referenced by
1795 -- the body, so this flag is used to generate the proper message (see
1796 -- Sem_Util.Check_Unused_Withs for details)
1797
1798 -- Was_Originally_Stub (Flag13-Sem)
1799 -- This flag is set in the node for a proper body that replaces stub.
1800 -- During the analysis procedure, stubs in some situations get rewritten
1801 -- by the corresponding bodies, and we set this flag to remember that
1802 -- this happened. Note that it is not good enough to rely on the use of
1803 -- Original_Node here because of the case of nested instantiations where
1804 -- the substituted node can be copied.
1805
1806 -- Withed_Body (Node1-Sem)
1807 -- Present in N_With_Clause nodes. Set if the unit in whose context
1808 -- the with_clause appears instantiates a generic contained in the
1809 -- library unit of the with_clause and as a result loads its body.
1810 -- Used for a more precise unit traversal for CodePeer.
1811
1812 -- Zero_Cost_Handling (Flag5-Sem)
1813 -- This flag is set in all handled sequence of statement and exception
1814 -- handler nodes if exceptions are to be handled using the zero-cost
1815 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1816 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1817 -- to do for such a handler is simply to put the code in the handler
1818 -- somewhere. The front end has generated all necessary labels.
1819
1820 --------------------------------------------------
1821 -- Note on Use of End_Label and End_Span Fields --
1822 --------------------------------------------------
1823
1824 -- Several constructs have end lines:
1825
1826 -- Loop Statement end loop [loop_IDENTIFIER];
1827 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1828 -- Task Definition end [task_IDENTIFIER]
1829 -- Protected Definition end [protected_IDENTIFIER]
1830 -- Protected Body end [protected_IDENTIFIER]
1831
1832 -- Block Statement end [block_IDENTIFIER];
1833 -- Subprogram Body end [DESIGNATOR];
1834 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1835 -- Task Body end [task_IDENTIFIER];
1836 -- Accept Statement end [entry_IDENTIFIER]];
1837 -- Entry Body end [entry_IDENTIFIER];
1838
1839 -- If Statement end if;
1840 -- Case Statement end case;
1841
1842 -- Record Definition end record;
1843 -- Enumeration Definition );
1844
1845 -- The End_Label and End_Span fields are used to mark the locations of
1846 -- these lines, and also keep track of the label in the case where a label
1847 -- is present.
1848
1849 -- For the first group above, the End_Label field of the corresponding node
1850 -- is used to point to the label identifier. In the case where there is no
1851 -- label in the source, the parser supplies a dummy identifier (with
1852 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1853 -- marks the location of the token following the END token.
1854
1855 -- For the second group, the use of End_Label is similar, but the End_Label
1856 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1857 -- simply because in some cases there is no room in the parent node.
1858
1859 -- For the third group, there is never any label, and instead of using
1860 -- End_Label, we use the End_Span field which gives the location of the
1861 -- token following END, relative to the starting Sloc of the construct,
1862 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1863 -- following the End_Label.
1864
1865 -- The record definition case is handled specially, we treat it as though
1866 -- it required an optional label which is never present, and so the parser
1867 -- always builds a dummy identifier with Comes From Source set False. The
1868 -- reason we do this, rather than using End_Span in this case, is that we
1869 -- want to generate a cross-ref entry for the end of a record, since it
1870 -- represents a scope for name declaration purposes.
1871
1872 -- The enumeration definition case is handled in an exactly similar manner,
1873 -- building a dummy identifier to get a cross-reference.
1874
1875 -- Note: the reason we store the difference as a Uint, instead of storing
1876 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1877 -- distinguished from other types of values, and we count on all general
1878 -- use fields being self describing. To make things easier for clients,
1879 -- note that we provide function End_Location, and procedure
1880 -- Set_End_Location to allow access to the logical value (which is the
1881 -- Source_Ptr value for the end token).
1882
1883 ---------------------
1884 -- Syntactic Nodes --
1885 ---------------------
1886
1887 ---------------------
1888 -- 2.3 Identifier --
1889 ---------------------
1890
1891 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1892 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1893
1894 -- An IDENTIFIER shall not be a reserved word
1895
1896 -- In the Ada grammar identifiers are the bottom level tokens which have
1897 -- very few semantics. Actual program identifiers are direct names. If
1898 -- we were being 100% honest with the grammar, then we would have a node
1899 -- called N_Direct_Name which would point to an identifier. However,
1900 -- that's too many extra nodes, so we just use the N_Identifier node
1901 -- directly as a direct name, and it contains the expression fields and
1902 -- Entity field that correspond to its use as a direct name. In those
1903 -- few cases where identifiers appear in contexts where they are not
1904 -- direct names (pragmas, pragma argument associations, attribute
1905 -- references and attribute definition clauses), the Chars field of the
1906 -- node contains the Name_Id for the identifier name.
1907
1908 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1909 -- cases. First, an incorrect use of a reserved word as an identifier is
1910 -- diagnosed and then treated as a normal identifier. Second, an
1911 -- attribute designator of the form of a reserved word (access, delta,
1912 -- digits, range) is treated as an identifier.
1913
1914 -- Note: The set of letters that is permitted in an identifier depends
1915 -- on the character set in use. See package Csets for full details.
1916
1917 -- N_Identifier
1918 -- Sloc points to identifier
1919 -- Chars (Name1) contains the Name_Id for the identifier
1920 -- Entity (Node4-Sem)
1921 -- Associated_Node (Node4-Sem)
1922 -- Original_Discriminant (Node2-Sem)
1923 -- Redundant_Use (Flag13-Sem)
1924 -- Has_Private_View (Flag11-Sem) (set in generic units)
1925 -- plus fields for expression
1926
1927 --------------------------
1928 -- 2.4 Numeric Literal --
1929 --------------------------
1930
1931 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1932
1933 ----------------------------
1934 -- 2.4.1 Decimal Literal --
1935 ----------------------------
1936
1937 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1938
1939 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1940
1941 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1942
1943 -- Decimal literals appear in the tree as either integer literal nodes
1944 -- or real literal nodes, depending on whether a period is present.
1945
1946 -- Note: literal nodes appear as a result of direct use of literals
1947 -- in the source program, and also as the result of evaluating
1948 -- expressions at compile time. In the latter case, it is possible
1949 -- to construct real literals that have no syntactic representation
1950 -- using the standard literal format. Such literals are listed by
1951 -- Sprint using the notation [numerator / denominator].
1952
1953 -- Note: the value of an integer literal node created by the front end
1954 -- is never outside the range of values of the base type. However, it
1955 -- can be the case that the created value is outside the range of the
1956 -- particular subtype. This happens in the case of integer overflows
1957 -- with checks suppressed.
1958
1959 -- N_Integer_Literal
1960 -- Sloc points to literal
1961 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1962 -- has been constant-folded into its literal value.
1963 -- Intval (Uint3) contains integer value of literal
1964 -- plus fields for expression
1965 -- Print_In_Hex (Flag13-Sem)
1966
1967 -- N_Real_Literal
1968 -- Sloc points to literal
1969 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1970 -- has been constant-folded into its literal value.
1971 -- Realval (Ureal3) contains real value of literal
1972 -- Corresponding_Integer_Value (Uint4-Sem)
1973 -- Is_Machine_Number (Flag11-Sem)
1974 -- plus fields for expression
1975
1976 --------------------------
1977 -- 2.4.2 Based Literal --
1978 --------------------------
1979
1980 -- BASED_LITERAL ::=
1981 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1982
1983 -- BASE ::= NUMERAL
1984
1985 -- BASED_NUMERAL ::=
1986 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1987
1988 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1989
1990 -- Based literals appear in the tree as either integer literal nodes
1991 -- or real literal nodes, depending on whether a period is present.
1992
1993 ----------------------------
1994 -- 2.5 Character Literal --
1995 ----------------------------
1996
1997 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1998
1999 -- N_Character_Literal
2000 -- Sloc points to literal
2001 -- Chars (Name1) contains the Name_Id for the identifier
2002 -- Char_Literal_Value (Uint2) contains the literal value
2003 -- Entity (Node4-Sem)
2004 -- Associated_Node (Node4-Sem)
2005 -- Has_Private_View (Flag11-Sem) set in generic units.
2006 -- plus fields for expression
2007
2008 -- Note: the Entity field will be missing (set to Empty) for character
2009 -- literals whose type is Standard.Wide_Character or Standard.Character
2010 -- or a type derived from one of these two. In this case the character
2011 -- literal stands for its own coding. The reason we take this irregular
2012 -- short cut is to avoid the need to build lots of junk defining
2013 -- character literal nodes.
2014
2015 -------------------------
2016 -- 2.6 String Literal --
2017 -------------------------
2018
2019 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2020
2021 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2022 -- single GRAPHIC_CHARACTER other than a quotation mark.
2023 --
2024 -- Is_Folded_In_Parser is True if the parser created this literal by
2025 -- folding a sequence of "&" operators. For example, if the source code
2026 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2027 -- is set. This flag is needed because the parser doesn't know about
2028 -- visibility, so the folded result might be wrong, and semantic
2029 -- analysis needs to check for that.
2030
2031 -- N_String_Literal
2032 -- Sloc points to literal
2033 -- Strval (Str3) contains Id of string value
2034 -- Has_Wide_Character (Flag11-Sem)
2035 -- Has_Wide_Wide_Character (Flag13-Sem)
2036 -- Is_Folded_In_Parser (Flag4)
2037 -- plus fields for expression
2038
2039 ------------------
2040 -- 2.7 Comment --
2041 ------------------
2042
2043 -- A COMMENT starts with two adjacent hyphens and extends up to the
2044 -- end of the line. A COMMENT may appear on any line of a program.
2045
2046 -- Comments are skipped by the scanner and do not appear in the tree.
2047 -- It is possible to reconstruct the position of comments with respect
2048 -- to the elements of the tree by using the source position (Sloc)
2049 -- pointers that appear in every tree node.
2050
2051 -----------------
2052 -- 2.8 Pragma --
2053 -----------------
2054
2055 -- PRAGMA ::= pragma IDENTIFIER
2056 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2057
2058 -- Note that a pragma may appear in the tree anywhere a declaration
2059 -- or a statement may appear, as well as in some other situations
2060 -- which are explicitly documented.
2061
2062 -- N_Pragma
2063 -- Sloc points to PRAGMA
2064 -- Next_Pragma (Node1-Sem)
2065 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2066 -- Debug_Statement (Node3) (set to Empty if not Debug)
2067 -- Pragma_Identifier (Node4)
2068 -- Next_Rep_Item (Node5-Sem)
2069 -- Pragma_Enabled (Flag5-Sem)
2070 -- From_Aspect_Specification (Flag13-Sem)
2071 -- Is_Delayed_Aspect (Flag14-Sem)
2072 -- Import_Interface_Present (Flag16-Sem)
2073 -- Aspect_Cancel (Flag11-Sem)
2074 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2075 -- Class_Present (Flag6) set if from Aspect with 'Class
2076
2077 -- Note: we should have a section on what pragmas are passed on to
2078 -- the back end to be processed. This section should note that pragma
2079 -- Psect_Object is always converted to Common_Object, but there are
2080 -- undoubtedly many other similar notes required ???
2081
2082 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2083 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2084
2085 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2086 -- aspect name, as does the Pragma_Identifier. In this case if the
2087 -- pragma has a local name argument (such as pragma Inline), it is
2088 -- resolved to point to the specific entity affected by the pragma.
2089
2090 --------------------------------------
2091 -- 2.8 Pragma Argument Association --
2092 --------------------------------------
2093
2094 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2095 -- [pragma_argument_IDENTIFIER =>] NAME
2096 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2097
2098 -- N_Pragma_Argument_Association
2099 -- Sloc points to first token in association
2100 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2101 -- Expression (Node3)
2102
2103 ------------------------
2104 -- 2.9 Reserved Word --
2105 ------------------------
2106
2107 -- Reserved words are parsed by the scanner, and returned as the
2108 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2109
2110 ----------------------------
2111 -- 3.1 Basic Declaration --
2112 ----------------------------
2113
2114 -- BASIC_DECLARATION ::=
2115 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2116 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2117 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2118 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2119 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2120 -- | GENERIC_INSTANTIATION
2121
2122 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2123 -- see further description in section on semantic nodes.
2124
2125 -- Also, in the tree that is constructed, a pragma may appear
2126 -- anywhere that a declaration may appear.
2127
2128 ------------------------------
2129 -- 3.1 Defining Identifier --
2130 ------------------------------
2131
2132 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2133
2134 -- A defining identifier is an entity, which has additional fields
2135 -- depending on the setting of the Ekind field. These additional
2136 -- fields are defined (and access subprograms declared) in package
2137 -- Einfo.
2138
2139 -- Note: N_Defining_Identifier is an extended node whose fields are
2140 -- deliberate layed out to match the layout of fields in an ordinary
2141 -- N_Identifier node allowing for easy alteration of an identifier
2142 -- node into a defining identifier node. For details, see procedure
2143 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2144
2145 -- N_Defining_Identifier
2146 -- Sloc points to identifier
2147 -- Chars (Name1) contains the Name_Id for the identifier
2148 -- Next_Entity (Node2-Sem)
2149 -- Scope (Node3-Sem)
2150 -- Etype (Node5-Sem)
2151
2152 -----------------------------
2153 -- 3.2.1 Type Declaration --
2154 -----------------------------
2155
2156 -- TYPE_DECLARATION ::=
2157 -- FULL_TYPE_DECLARATION
2158 -- | INCOMPLETE_TYPE_DECLARATION
2159 -- | PRIVATE_TYPE_DECLARATION
2160 -- | PRIVATE_EXTENSION_DECLARATION
2161
2162 ----------------------------------
2163 -- 3.2.1 Full Type Declaration --
2164 ----------------------------------
2165
2166 -- FULL_TYPE_DECLARATION ::=
2167 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2168 -- is TYPE_DEFINITION
2169 -- [ASPECT_SPECIFICATIONS];
2170
2171 -- | TASK_TYPE_DECLARATION
2172 -- | PROTECTED_TYPE_DECLARATION
2173
2174 -- The full type declaration node is used only for the first case. The
2175 -- second case (concurrent type declaration), is represented directly
2176 -- by a task type declaration or a protected type declaration.
2177
2178 -- N_Full_Type_Declaration
2179 -- Sloc points to TYPE
2180 -- Defining_Identifier (Node1)
2181 -- Discriminant_Specifications (List4) (set to No_List if none)
2182 -- Type_Definition (Node3)
2183 -- Discr_Check_Funcs_Built (Flag11-Sem)
2184
2185 ----------------------------
2186 -- 3.2.1 Type Definition --
2187 ----------------------------
2188
2189 -- TYPE_DEFINITION ::=
2190 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2191 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2192 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2193 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2194
2195 --------------------------------
2196 -- 3.2.2 Subtype Declaration --
2197 --------------------------------
2198
2199 -- SUBTYPE_DECLARATION ::=
2200 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2201
2202 -- The subtype indication field is set to Empty for subtypes
2203 -- declared in package Standard (Positive, Natural).
2204
2205 -- N_Subtype_Declaration
2206 -- Sloc points to SUBTYPE
2207 -- Defining_Identifier (Node1)
2208 -- Null_Exclusion_Present (Flag11)
2209 -- Subtype_Indication (Node5)
2210 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2211 -- Exception_Junk (Flag8-Sem)
2212
2213 -------------------------------
2214 -- 3.2.2 Subtype Indication --
2215 -------------------------------
2216
2217 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2218
2219 -- Note: if no constraint is present, the subtype indication appears
2220 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2221 -- node is used only if a constraint is present.
2222
2223 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2224 -- with the null-exclusion part (see AI-231), we had to introduce a new
2225 -- attribute in all the parents of subtype_indication nodes to indicate
2226 -- if the null-exclusion is present.
2227
2228 -- Note: the reason that this node has expression fields is that a
2229 -- subtype indication can appear as an operand of a membership test.
2230
2231 -- N_Subtype_Indication
2232 -- Sloc points to first token of subtype mark
2233 -- Subtype_Mark (Node4)
2234 -- Constraint (Node3)
2235 -- Etype (Node5-Sem)
2236 -- Must_Not_Freeze (Flag8-Sem)
2237
2238 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2239 -- reason for this redundancy is so that in a list of array index types,
2240 -- the Etype can be uniformly accessed to determine the subscript type.
2241 -- This means that no Itype is constructed for the actual subtype that
2242 -- is created by the subtype indication. If such an Itype is required,
2243 -- it is constructed in the context in which the indication appears.
2244
2245 -------------------------
2246 -- 3.2.2 Subtype Mark --
2247 -------------------------
2248
2249 -- SUBTYPE_MARK ::= subtype_NAME
2250
2251 -----------------------
2252 -- 3.2.2 Constraint --
2253 -----------------------
2254
2255 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2256
2257 ------------------------------
2258 -- 3.2.2 Scalar Constraint --
2259 ------------------------------
2260
2261 -- SCALAR_CONSTRAINT ::=
2262 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2263
2264 ---------------------------------
2265 -- 3.2.2 Composite Constraint --
2266 ---------------------------------
2267
2268 -- COMPOSITE_CONSTRAINT ::=
2269 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2270
2271 -------------------------------
2272 -- 3.3.1 Object Declaration --
2273 -------------------------------
2274
2275 -- OBJECT_DECLARATION ::=
2276 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2277 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2278 -- [ASPECT_SPECIFICATIONS];
2279 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2280 -- ACCESS_DEFINITION [:= EXPRESSION]
2281 -- [ASPECT_SPECIFICATIONS];
2282 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2283 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2284 -- [ASPECT_SPECIFICATIONS];
2285 -- | SINGLE_TASK_DECLARATION
2286 -- | SINGLE_PROTECTED_DECLARATION
2287
2288 -- Note: aliased is not permitted in Ada 83 mode
2289
2290 -- The N_Object_Declaration node is only for the first two cases.
2291 -- Single task declaration is handled by P_Task (9.1)
2292 -- Single protected declaration is handled by P_protected (9.5)
2293
2294 -- Although the syntax allows multiple identifiers in the list, the
2295 -- semantics is as though successive declarations were given with
2296 -- identical type definition and expression components. To simplify
2297 -- semantic processing, the parser represents a multiple declaration
2298 -- case as a sequence of single declarations, using the More_Ids and
2299 -- Prev_Ids flags to preserve the original source form as described
2300 -- in the section on "Handling of Defining Identifier Lists".
2301
2302 -- The flag Has_Init_Expression is set if an initializing expression
2303 -- is present. Normally it is set if and only if Expression contains
2304 -- a non-empty value, but there is an exception to this. When the
2305 -- initializing expression is an aggregate which requires explicit
2306 -- assignments, the Expression field gets set to Empty, but this flag
2307 -- is still set, so we don't forget we had an initializing expression.
2308
2309 -- Note: if a range check is required for the initialization
2310 -- expression then the Do_Range_Check flag is set in the Expression,
2311 -- with the check being done against the type given by the object
2312 -- definition, which is also the Etype of the defining identifier.
2313
2314 -- Note: the contents of the Expression field must be ignored (i.e.
2315 -- treated as though it were Empty) if No_Initialization is set True.
2316
2317 -- Note: the back end places some restrictions on the form of the
2318 -- Expression field. If the object being declared is Atomic, then
2319 -- the Expression may not have the form of an aggregate (since this
2320 -- might cause the back end to generate separate assignments). In this
2321 -- case the front end must generate an extra temporary and initialize
2322 -- this temporary as required (the temporary itself is not atomic).
2323
2324 -- Note: there is not node kind for object definition. Instead, the
2325 -- corresponding field holds a subtype indication, an array type
2326 -- definition, or (Ada 2005, AI-406) an access definition.
2327
2328 -- N_Object_Declaration
2329 -- Sloc points to first identifier
2330 -- Defining_Identifier (Node1)
2331 -- Aliased_Present (Flag4) set if ALIASED appears
2332 -- Constant_Present (Flag17) set if CONSTANT appears
2333 -- Null_Exclusion_Present (Flag11)
2334 -- Object_Definition (Node4) subtype indic./array type def./access def.
2335 -- Expression (Node3) (set to Empty if not present)
2336 -- Handler_List_Entry (Node2-Sem)
2337 -- Corresponding_Generic_Association (Node5-Sem)
2338 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2339 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2340 -- No_Initialization (Flag13-Sem)
2341 -- Assignment_OK (Flag15-Sem)
2342 -- Exception_Junk (Flag8-Sem)
2343 -- Is_Subprogram_Descriptor (Flag16-Sem)
2344 -- Has_Init_Expression (Flag14)
2345 -- Suppress_Assignment_Checks (Flag18-Sem)
2346
2347 -------------------------------------
2348 -- 3.3.1 Defining Identifier List --
2349 -------------------------------------
2350
2351 -- DEFINING_IDENTIFIER_LIST ::=
2352 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2353
2354 -------------------------------
2355 -- 3.3.2 Number Declaration --
2356 -------------------------------
2357
2358 -- NUMBER_DECLARATION ::=
2359 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2360
2361 -- Although the syntax allows multiple identifiers in the list, the
2362 -- semantics is as though successive declarations were given with
2363 -- identical expressions. To simplify semantic processing, the parser
2364 -- represents a multiple declaration case as a sequence of single
2365 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2366 -- the original source form as described in the section on "Handling
2367 -- of Defining Identifier Lists".
2368
2369 -- N_Number_Declaration
2370 -- Sloc points to first identifier
2371 -- Defining_Identifier (Node1)
2372 -- Expression (Node3)
2373 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2374 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2375
2376 ----------------------------------
2377 -- 3.4 Derived Type Definition --
2378 ----------------------------------
2379
2380 -- DERIVED_TYPE_DEFINITION ::=
2381 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2382 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2383
2384 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2385 -- in Ada 83 mode
2386
2387 -- Note: a record extension part is required if ABSTRACT is present
2388
2389 -- N_Derived_Type_Definition
2390 -- Sloc points to NEW
2391 -- Abstract_Present (Flag4)
2392 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2393 -- Subtype_Indication (Node5)
2394 -- Record_Extension_Part (Node3) (set to Empty if not present)
2395 -- Limited_Present (Flag17)
2396 -- Task_Present (Flag5) set in task interfaces
2397 -- Protected_Present (Flag6) set in protected interfaces
2398 -- Synchronized_Present (Flag7) set in interfaces
2399 -- Interface_List (List2) (set to No_List if none)
2400 -- Interface_Present (Flag16) set in abstract interfaces
2401
2402 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2403 -- Interface_List, and Interface_Present are used for abstract
2404 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2405
2406 ---------------------------
2407 -- 3.5 Range Constraint --
2408 ---------------------------
2409
2410 -- RANGE_CONSTRAINT ::= range RANGE
2411
2412 -- N_Range_Constraint
2413 -- Sloc points to RANGE
2414 -- Range_Expression (Node4)
2415
2416 ----------------
2417 -- 3.5 Range --
2418 ----------------
2419
2420 -- RANGE ::=
2421 -- RANGE_ATTRIBUTE_REFERENCE
2422 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2423
2424 -- Note: the case of a range given as a range attribute reference
2425 -- appears directly in the tree as an attribute reference.
2426
2427 -- Note: the field name for a reference to a range is Range_Expression
2428 -- rather than Range, because range is a reserved keyword in Ada!
2429
2430 -- Note: the reason that this node has expression fields is that a
2431 -- range can appear as an operand of a membership test. The Etype
2432 -- field is the type of the range (we do NOT construct an implicit
2433 -- subtype to represent the range exactly).
2434
2435 -- N_Range
2436 -- Sloc points to ..
2437 -- Low_Bound (Node1)
2438 -- High_Bound (Node2)
2439 -- Includes_Infinities (Flag11)
2440 -- plus fields for expression
2441
2442 -- Note: if the range appears in a context, such as a subtype
2443 -- declaration, where range checks are required on one or both of
2444 -- the expression fields, then type conversion nodes are inserted
2445 -- to represent the required checks.
2446
2447 ----------------------------------------
2448 -- 3.5.1 Enumeration Type Definition --
2449 ----------------------------------------
2450
2451 -- ENUMERATION_TYPE_DEFINITION ::=
2452 -- (ENUMERATION_LITERAL_SPECIFICATION
2453 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2454
2455 -- Note: the Literals field in the node described below is null for
2456 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2457 -- which special processing handles these types as special cases.
2458
2459 -- N_Enumeration_Type_Definition
2460 -- Sloc points to left parenthesis
2461 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2462 -- End_Label (Node4) (set to Empty if internally generated record)
2463
2464 ----------------------------------------------
2465 -- 3.5.1 Enumeration Literal Specification --
2466 ----------------------------------------------
2467
2468 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2469 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2470
2471 ---------------------------------------
2472 -- 3.5.1 Defining Character Literal --
2473 ---------------------------------------
2474
2475 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2476
2477 -- A defining character literal is an entity, which has additional
2478 -- fields depending on the setting of the Ekind field. These
2479 -- additional fields are defined (and access subprograms declared)
2480 -- in package Einfo.
2481
2482 -- Note: N_Defining_Character_Literal is an extended node whose fields
2483 -- are deliberate layed out to match the layout of fields in an ordinary
2484 -- N_Character_Literal node allowing for easy alteration of a character
2485 -- literal node into a defining character literal node. For details, see
2486 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2487
2488 -- N_Defining_Character_Literal
2489 -- Sloc points to literal
2490 -- Chars (Name1) contains the Name_Id for the identifier
2491 -- Next_Entity (Node2-Sem)
2492 -- Scope (Node3-Sem)
2493 -- Etype (Node5-Sem)
2494
2495 ------------------------------------
2496 -- 3.5.4 Integer Type Definition --
2497 ------------------------------------
2498
2499 -- Note: there is an error in this rule in the latest version of the
2500 -- grammar, so we have retained the old rule pending clarification.
2501
2502 -- INTEGER_TYPE_DEFINITION ::=
2503 -- SIGNED_INTEGER_TYPE_DEFINITION
2504 -- | MODULAR_TYPE_DEFINITION
2505
2506 -------------------------------------------
2507 -- 3.5.4 Signed Integer Type Definition --
2508 -------------------------------------------
2509
2510 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2511 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2512
2513 -- Note: the Low_Bound and High_Bound fields are set to Empty
2514 -- for integer types defined in package Standard.
2515
2516 -- N_Signed_Integer_Type_Definition
2517 -- Sloc points to RANGE
2518 -- Low_Bound (Node1)
2519 -- High_Bound (Node2)
2520
2521 ------------------------------------
2522 -- 3.5.4 Modular Type Definition --
2523 ------------------------------------
2524
2525 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2526
2527 -- N_Modular_Type_Definition
2528 -- Sloc points to MOD
2529 -- Expression (Node3)
2530
2531 ---------------------------------
2532 -- 3.5.6 Real Type Definition --
2533 ---------------------------------
2534
2535 -- REAL_TYPE_DEFINITION ::=
2536 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2537
2538 --------------------------------------
2539 -- 3.5.7 Floating Point Definition --
2540 --------------------------------------
2541
2542 -- FLOATING_POINT_DEFINITION ::=
2543 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2544
2545 -- Note: The Digits_Expression and Real_Range_Specifications fields
2546 -- are set to Empty for floating-point types declared in Standard.
2547
2548 -- N_Floating_Point_Definition
2549 -- Sloc points to DIGITS
2550 -- Digits_Expression (Node2)
2551 -- Real_Range_Specification (Node4) (set to Empty if not present)
2552
2553 -------------------------------------
2554 -- 3.5.7 Real Range Specification --
2555 -------------------------------------
2556
2557 -- REAL_RANGE_SPECIFICATION ::=
2558 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2559
2560 -- N_Real_Range_Specification
2561 -- Sloc points to RANGE
2562 -- Low_Bound (Node1)
2563 -- High_Bound (Node2)
2564
2565 -----------------------------------
2566 -- 3.5.9 Fixed Point Definition --
2567 -----------------------------------
2568
2569 -- FIXED_POINT_DEFINITION ::=
2570 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2571
2572 --------------------------------------------
2573 -- 3.5.9 Ordinary Fixed Point Definition --
2574 --------------------------------------------
2575
2576 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2577 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2578
2579 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2580
2581 -- N_Ordinary_Fixed_Point_Definition
2582 -- Sloc points to DELTA
2583 -- Delta_Expression (Node3)
2584 -- Real_Range_Specification (Node4)
2585
2586 -------------------------------------------
2587 -- 3.5.9 Decimal Fixed Point Definition --
2588 -------------------------------------------
2589
2590 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2591 -- delta static_EXPRESSION
2592 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2593
2594 -- Note: decimal types are not permitted in Ada 83 mode
2595
2596 -- N_Decimal_Fixed_Point_Definition
2597 -- Sloc points to DELTA
2598 -- Delta_Expression (Node3)
2599 -- Digits_Expression (Node2)
2600 -- Real_Range_Specification (Node4) (set to Empty if not present)
2601
2602 ------------------------------
2603 -- 3.5.9 Digits Constraint --
2604 ------------------------------
2605
2606 -- DIGITS_CONSTRAINT ::=
2607 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2608
2609 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2610 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2611
2612 -- N_Digits_Constraint
2613 -- Sloc points to DIGITS
2614 -- Digits_Expression (Node2)
2615 -- Range_Constraint (Node4) (set to Empty if not present)
2616
2617 --------------------------------
2618 -- 3.6 Array Type Definition --
2619 --------------------------------
2620
2621 -- ARRAY_TYPE_DEFINITION ::=
2622 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2623
2624 -----------------------------------------
2625 -- 3.6 Unconstrained Array Definition --
2626 -----------------------------------------
2627
2628 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2629 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2630 -- COMPONENT_DEFINITION
2631
2632 -- Note: dimensionality of array is indicated by number of entries in
2633 -- the Subtype_Marks list, which has one entry for each dimension.
2634
2635 -- N_Unconstrained_Array_Definition
2636 -- Sloc points to ARRAY
2637 -- Subtype_Marks (List2)
2638 -- Component_Definition (Node4)
2639
2640 -----------------------------------
2641 -- 3.6 Index Subtype Definition --
2642 -----------------------------------
2643
2644 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2645
2646 -- There is no explicit node in the tree for an index subtype
2647 -- definition since the N_Unconstrained_Array_Definition node
2648 -- incorporates the type marks which appear in this context.
2649
2650 ---------------------------------------
2651 -- 3.6 Constrained Array Definition --
2652 ---------------------------------------
2653
2654 -- CONSTRAINED_ARRAY_DEFINITION ::=
2655 -- array (DISCRETE_SUBTYPE_DEFINITION
2656 -- {, DISCRETE_SUBTYPE_DEFINITION})
2657 -- of COMPONENT_DEFINITION
2658
2659 -- Note: dimensionality of array is indicated by number of entries
2660 -- in the Discrete_Subtype_Definitions list, which has one entry
2661 -- for each dimension.
2662
2663 -- N_Constrained_Array_Definition
2664 -- Sloc points to ARRAY
2665 -- Discrete_Subtype_Definitions (List2)
2666 -- Component_Definition (Node4)
2667
2668 --------------------------------------
2669 -- 3.6 Discrete Subtype Definition --
2670 --------------------------------------
2671
2672 -- DISCRETE_SUBTYPE_DEFINITION ::=
2673 -- discrete_SUBTYPE_INDICATION | RANGE
2674
2675 -------------------------------
2676 -- 3.6 Component Definition --
2677 -------------------------------
2678
2679 -- COMPONENT_DEFINITION ::=
2680 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2681
2682 -- Note: although the syntax does not permit a component definition to
2683 -- be an anonymous array (and the parser will diagnose such an attempt
2684 -- with an appropriate message), it is possible for anonymous arrays
2685 -- to appear as component definitions. The semantics and back end handle
2686 -- this case properly, and the expander in fact generates such cases.
2687 -- Access_Definition is an optional field that gives support to
2688 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2689 -- Subtype_Indication field or else the Access_Definition field.
2690
2691 -- N_Component_Definition
2692 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2693 -- Aliased_Present (Flag4)
2694 -- Null_Exclusion_Present (Flag11)
2695 -- Subtype_Indication (Node5) (set to Empty if not present)
2696 -- Access_Definition (Node3) (set to Empty if not present)
2697
2698 -----------------------------
2699 -- 3.6.1 Index Constraint --
2700 -----------------------------
2701
2702 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2703
2704 -- It is not in general possible to distinguish between discriminant
2705 -- constraints and index constraints at parse time, since a simple
2706 -- name could be either the subtype mark of a discrete range, or an
2707 -- expression in a discriminant association with no name. Either
2708 -- entry appears simply as the name, and the semantic parse must
2709 -- distinguish between the two cases. Thus we use a common tree
2710 -- node format for both of these constraint types.
2711
2712 -- See Discriminant_Constraint for format of node
2713
2714 ---------------------------
2715 -- 3.6.1 Discrete Range --
2716 ---------------------------
2717
2718 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2719
2720 ----------------------------
2721 -- 3.7 Discriminant Part --
2722 ----------------------------
2723
2724 -- DISCRIMINANT_PART ::=
2725 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2726
2727 ------------------------------------
2728 -- 3.7 Unknown Discriminant Part --
2729 ------------------------------------
2730
2731 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2732
2733 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2734
2735 -- There is no explicit node in the tree for an unknown discriminant
2736 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2737 -- parent node.
2738
2739 ----------------------------------
2740 -- 3.7 Known Discriminant Part --
2741 ----------------------------------
2742
2743 -- KNOWN_DISCRIMINANT_PART ::=
2744 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2745
2746 -------------------------------------
2747 -- 3.7 Discriminant Specification --
2748 -------------------------------------
2749
2750 -- DISCRIMINANT_SPECIFICATION ::=
2751 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2752 -- [:= DEFAULT_EXPRESSION]
2753 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2754 -- [:= DEFAULT_EXPRESSION]
2755
2756 -- Although the syntax allows multiple identifiers in the list, the
2757 -- semantics is as though successive specifications were given with
2758 -- identical type definition and expression components. To simplify
2759 -- semantic processing, the parser represents a multiple declaration
2760 -- case as a sequence of single specifications, using the More_Ids and
2761 -- Prev_Ids flags to preserve the original source form as described
2762 -- in the section on "Handling of Defining Identifier Lists".
2763
2764 -- N_Discriminant_Specification
2765 -- Sloc points to first identifier
2766 -- Defining_Identifier (Node1)
2767 -- Null_Exclusion_Present (Flag11)
2768 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2769 -- Expression (Node3) (set to Empty if no default expression)
2770 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2771 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2772
2773 -----------------------------
2774 -- 3.7 Default Expression --
2775 -----------------------------
2776
2777 -- DEFAULT_EXPRESSION ::= EXPRESSION
2778
2779 ------------------------------------
2780 -- 3.7.1 Discriminant Constraint --
2781 ------------------------------------
2782
2783 -- DISCRIMINANT_CONSTRAINT ::=
2784 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2785
2786 -- It is not in general possible to distinguish between discriminant
2787 -- constraints and index constraints at parse time, since a simple
2788 -- name could be either the subtype mark of a discrete range, or an
2789 -- expression in a discriminant association with no name. Either
2790 -- entry appears simply as the name, and the semantic parse must
2791 -- distinguish between the two cases. Thus we use a common tree
2792 -- node format for both of these constraint types.
2793
2794 -- N_Index_Or_Discriminant_Constraint
2795 -- Sloc points to left paren
2796 -- Constraints (List1) points to list of discrete ranges or
2797 -- discriminant associations
2798
2799 -------------------------------------
2800 -- 3.7.1 Discriminant Association --
2801 -------------------------------------
2802
2803 -- DISCRIMINANT_ASSOCIATION ::=
2804 -- [discriminant_SELECTOR_NAME
2805 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2806
2807 -- Note: a discriminant association that has no selector name list
2808 -- appears directly as an expression in the tree.
2809
2810 -- N_Discriminant_Association
2811 -- Sloc points to first token of discriminant association
2812 -- Selector_Names (List1) (always non-empty, since if no selector
2813 -- names are present, this node is not used, see comment above)
2814 -- Expression (Node3)
2815
2816 ---------------------------------
2817 -- 3.8 Record Type Definition --
2818 ---------------------------------
2819
2820 -- RECORD_TYPE_DEFINITION ::=
2821 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2822
2823 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2824
2825 -- There is no explicit node in the tree for a record type definition.
2826 -- Instead the flags for Tagged_Present and Limited_Present appear in
2827 -- the N_Record_Definition node for a record definition appearing in
2828 -- the context of a record type definition.
2829
2830 ----------------------------
2831 -- 3.8 Record Definition --
2832 ----------------------------
2833
2834 -- RECORD_DEFINITION ::=
2835 -- record
2836 -- COMPONENT_LIST
2837 -- end record
2838 -- | null record
2839
2840 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2841 -- flags appear only for a record definition appearing in a record
2842 -- type definition.
2843
2844 -- Note: the NULL RECORD case is not permitted in Ada 83
2845
2846 -- N_Record_Definition
2847 -- Sloc points to RECORD or NULL
2848 -- End_Label (Node4) (set to Empty if internally generated record)
2849 -- Abstract_Present (Flag4)
2850 -- Tagged_Present (Flag15)
2851 -- Limited_Present (Flag17)
2852 -- Component_List (Node1) empty in null record case
2853 -- Null_Present (Flag13) set in null record case
2854 -- Task_Present (Flag5) set in task interfaces
2855 -- Protected_Present (Flag6) set in protected interfaces
2856 -- Synchronized_Present (Flag7) set in interfaces
2857 -- Interface_Present (Flag16) set in abstract interfaces
2858 -- Interface_List (List2) (set to No_List if none)
2859
2860 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2861 -- Interface_List and Interface_Present are used for abstract
2862 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2863
2864 -------------------------
2865 -- 3.8 Component List --
2866 -------------------------
2867
2868 -- COMPONENT_LIST ::=
2869 -- COMPONENT_ITEM {COMPONENT_ITEM}
2870 -- | {COMPONENT_ITEM} VARIANT_PART
2871 -- | null;
2872
2873 -- N_Component_List
2874 -- Sloc points to first token of component list
2875 -- Component_Items (List3)
2876 -- Variant_Part (Node4) (set to Empty if no variant part)
2877 -- Null_Present (Flag13)
2878
2879 -------------------------
2880 -- 3.8 Component Item --
2881 -------------------------
2882
2883 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2884
2885 -- Note: A component item can also be a pragma, and in the tree
2886 -- that is obtained after semantic processing, a component item
2887 -- can be an N_Null node resulting from a non-recognized pragma.
2888
2889 --------------------------------
2890 -- 3.8 Component Declaration --
2891 --------------------------------
2892
2893 -- COMPONENT_DECLARATION ::=
2894 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2895 -- [:= DEFAULT_EXPRESSION]
2896 -- [ASPECT_SPECIFICATIONS];
2897
2898 -- Note: although the syntax does not permit a component definition to
2899 -- be an anonymous array (and the parser will diagnose such an attempt
2900 -- with an appropriate message), it is possible for anonymous arrays
2901 -- to appear as component definitions. The semantics and back end handle
2902 -- this case properly, and the expander in fact generates such cases.
2903
2904 -- Although the syntax allows multiple identifiers in the list, the
2905 -- semantics is as though successive declarations were given with the
2906 -- same component definition and expression components. To simplify
2907 -- semantic processing, the parser represents a multiple declaration
2908 -- case as a sequence of single declarations, using the More_Ids and
2909 -- Prev_Ids flags to preserve the original source form as described
2910 -- in the section on "Handling of Defining Identifier Lists".
2911
2912 -- N_Component_Declaration
2913 -- Sloc points to first identifier
2914 -- Defining_Identifier (Node1)
2915 -- Component_Definition (Node4)
2916 -- Expression (Node3) (set to Empty if no default expression)
2917 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2918 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2919
2920 -------------------------
2921 -- 3.8.1 Variant Part --
2922 -------------------------
2923
2924 -- VARIANT_PART ::=
2925 -- case discriminant_DIRECT_NAME is
2926 -- VARIANT
2927 -- {VARIANT}
2928 -- end case;
2929
2930 -- Note: the variants list can contain pragmas as well as variants.
2931 -- In a properly formed program there is at least one variant.
2932
2933 -- N_Variant_Part
2934 -- Sloc points to CASE
2935 -- Name (Node2)
2936 -- Variants (List1)
2937
2938 --------------------
2939 -- 3.8.1 Variant --
2940 --------------------
2941
2942 -- VARIANT ::=
2943 -- when DISCRETE_CHOICE_LIST =>
2944 -- COMPONENT_LIST
2945
2946 -- N_Variant
2947 -- Sloc points to WHEN
2948 -- Discrete_Choices (List4)
2949 -- Component_List (Node1)
2950 -- Enclosing_Variant (Node2-Sem)
2951 -- Present_Expr (Uint3-Sem)
2952 -- Dcheck_Function (Node5-Sem)
2953
2954 ---------------------------------
2955 -- 3.8.1 Discrete Choice List --
2956 ---------------------------------
2957
2958 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2959
2960 ----------------------------
2961 -- 3.8.1 Discrete Choice --
2962 ----------------------------
2963
2964 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2965
2966 -- Note: in Ada 83 mode, the expression must be a simple expression
2967
2968 -- The only choice that appears explicitly is the OTHERS choice, as
2969 -- defined here. Other cases of discrete choice (expression and
2970 -- discrete range) appear directly. This production is also used
2971 -- for the OTHERS possibility of an exception choice.
2972
2973 -- Note: in accordance with the syntax, the parser does not check that
2974 -- OTHERS appears at the end on its own in a choice list context. This
2975 -- is a semantic check.
2976
2977 -- N_Others_Choice
2978 -- Sloc points to OTHERS
2979 -- Others_Discrete_Choices (List1-Sem)
2980 -- All_Others (Flag11-Sem)
2981
2982 ----------------------------------
2983 -- 3.9.1 Record Extension Part --
2984 ----------------------------------
2985
2986 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2987
2988 -- Note: record extension parts are not permitted in Ada 83 mode
2989
2990 --------------------------------------
2991 -- 3.9.4 Interface Type Definition --
2992 --------------------------------------
2993
2994 -- INTERFACE_TYPE_DEFINITION ::=
2995 -- [limited | task | protected | synchronized]
2996 -- interface [interface_list]
2997
2998 -- Note: Interfaces are implemented with N_Record_Definition and
2999 -- N_Derived_Type_Definition nodes because most of the support
3000 -- for the analysis of abstract types has been reused to
3001 -- analyze abstract interfaces.
3002
3003 ----------------------------------
3004 -- 3.10 Access Type Definition --
3005 ----------------------------------
3006
3007 -- ACCESS_TYPE_DEFINITION ::=
3008 -- ACCESS_TO_OBJECT_DEFINITION
3009 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3010
3011 --------------------------
3012 -- 3.10 Null Exclusion --
3013 --------------------------
3014
3015 -- NULL_EXCLUSION ::= not null
3016
3017 ---------------------------------------
3018 -- 3.10 Access To Object Definition --
3019 ---------------------------------------
3020
3021 -- ACCESS_TO_OBJECT_DEFINITION ::=
3022 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3023 -- SUBTYPE_INDICATION
3024
3025 -- N_Access_To_Object_Definition
3026 -- Sloc points to ACCESS
3027 -- All_Present (Flag15)
3028 -- Null_Exclusion_Present (Flag11)
3029 -- Subtype_Indication (Node5)
3030 -- Constant_Present (Flag17)
3031
3032 -----------------------------------
3033 -- 3.10 General Access Modifier --
3034 -----------------------------------
3035
3036 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3037
3038 -- Note: general access modifiers are not permitted in Ada 83 mode
3039
3040 -- There is no explicit node in the tree for general access modifier.
3041 -- Instead the All_Present or Constant_Present flags are set in the
3042 -- parent node.
3043
3044 -------------------------------------------
3045 -- 3.10 Access To Subprogram Definition --
3046 -------------------------------------------
3047
3048 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3049 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3050 -- | [NULL_EXCLUSION] access [protected] function
3051 -- PARAMETER_AND_RESULT_PROFILE
3052
3053 -- Note: access to subprograms are not permitted in Ada 83 mode
3054
3055 -- N_Access_Function_Definition
3056 -- Sloc points to ACCESS
3057 -- Null_Exclusion_Present (Flag11)
3058 -- Null_Exclusion_In_Return_Present (Flag14)
3059 -- Protected_Present (Flag6)
3060 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3061 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3062
3063 -- N_Access_Procedure_Definition
3064 -- Sloc points to ACCESS
3065 -- Null_Exclusion_Present (Flag11)
3066 -- Protected_Present (Flag6)
3067 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3068
3069 -----------------------------
3070 -- 3.10 Access Definition --
3071 -----------------------------
3072
3073 -- ACCESS_DEFINITION ::=
3074 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3075 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3076
3077 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3078
3079 -- N_Access_Definition
3080 -- Sloc points to ACCESS
3081 -- Null_Exclusion_Present (Flag11)
3082 -- All_Present (Flag15)
3083 -- Constant_Present (Flag17)
3084 -- Subtype_Mark (Node4)
3085 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3086
3087 -----------------------------------------
3088 -- 3.10.1 Incomplete Type Declaration --
3089 -----------------------------------------
3090
3091 -- INCOMPLETE_TYPE_DECLARATION ::=
3092 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3093
3094 -- N_Incomplete_Type_Declaration
3095 -- Sloc points to TYPE
3096 -- Defining_Identifier (Node1)
3097 -- Discriminant_Specifications (List4) (set to No_List if no
3098 -- discriminant part, or if the discriminant part is an
3099 -- unknown discriminant part)
3100 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3101 -- Tagged_Present (Flag15)
3102
3103 ----------------------------
3104 -- 3.11 Declarative Part --
3105 ----------------------------
3106
3107 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3108
3109 -- Note: although the parser enforces the syntactic requirement that
3110 -- a declarative part can contain only declarations, the semantic
3111 -- processing may add statements to the list of actions in a
3112 -- declarative part, so the code generator should be prepared
3113 -- to accept a statement in this position.
3114
3115 ----------------------------
3116 -- 3.11 Declarative Item --
3117 ----------------------------
3118
3119 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3120
3121 ----------------------------------
3122 -- 3.11 Basic Declarative Item --
3123 ----------------------------------
3124
3125 -- BASIC_DECLARATIVE_ITEM ::=
3126 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3127
3128 ----------------
3129 -- 3.11 Body --
3130 ----------------
3131
3132 -- BODY ::= PROPER_BODY | BODY_STUB
3133
3134 -----------------------
3135 -- 3.11 Proper Body --
3136 -----------------------
3137
3138 -- PROPER_BODY ::=
3139 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3140
3141 ---------------
3142 -- 4.1 Name --
3143 ---------------
3144
3145 -- NAME ::=
3146 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3147 -- | INDEXED_COMPONENT | SLICE
3148 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3149 -- | TYPE_CONVERSION | FUNCTION_CALL
3150 -- | CHARACTER_LITERAL
3151
3152 ----------------------
3153 -- 4.1 Direct Name --
3154 ----------------------
3155
3156 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3157
3158 -----------------
3159 -- 4.1 Prefix --
3160 -----------------
3161
3162 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3163
3164 -------------------------------
3165 -- 4.1 Explicit Dereference --
3166 -------------------------------
3167
3168 -- EXPLICIT_DEREFERENCE ::= NAME . all
3169
3170 -- N_Explicit_Dereference
3171 -- Sloc points to ALL
3172 -- Prefix (Node3)
3173 -- Actual_Designated_Subtype (Node4-Sem)
3174 -- plus fields for expression
3175
3176 -------------------------------
3177 -- 4.1 Implicit Dereference --
3178 -------------------------------
3179
3180 -- IMPLICIT_DEREFERENCE ::= NAME
3181
3182 ------------------------------
3183 -- 4.1.1 Indexed Component --
3184 ------------------------------
3185
3186 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3187
3188 -- Note: the parser may generate this node in some situations where it
3189 -- should be a function call. The semantic pass must correct this
3190 -- misidentification (which is inevitable at the parser level).
3191
3192 -- N_Indexed_Component
3193 -- Sloc contains a copy of the Sloc value of the Prefix
3194 -- Prefix (Node3)
3195 -- Expressions (List1)
3196 -- plus fields for expression
3197
3198 -- Note: if any of the subscripts requires a range check, then the
3199 -- Do_Range_Check flag is set on the corresponding expression, with
3200 -- the index type being determined from the type of the Prefix, which
3201 -- references the array being indexed.
3202
3203 -- Note: in a fully analyzed and expanded indexed component node, and
3204 -- hence in any such node that gigi sees, if the prefix is an access
3205 -- type, then an explicit dereference operation has been inserted.
3206
3207 ------------------
3208 -- 4.1.2 Slice --
3209 ------------------
3210
3211 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3212
3213 -- Note: an implicit subtype is created to describe the resulting
3214 -- type, so that the bounds of this type are the bounds of the slice.
3215
3216 -- N_Slice
3217 -- Sloc points to first token of prefix
3218 -- Prefix (Node3)
3219 -- Discrete_Range (Node4)
3220 -- plus fields for expression
3221
3222 -------------------------------
3223 -- 4.1.3 Selected Component --
3224 -------------------------------
3225
3226 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3227
3228 -- Note: selected components that are semantically expanded names get
3229 -- changed during semantic processing into the separate N_Expanded_Name
3230 -- node. See description of this node in the section on semantic nodes.
3231
3232 -- N_Selected_Component
3233 -- Sloc points to period
3234 -- Prefix (Node3)
3235 -- Selector_Name (Node2)
3236 -- Associated_Node (Node4-Sem)
3237 -- Do_Discriminant_Check (Flag13-Sem)
3238 -- Is_In_Discriminant_Check (Flag11-Sem)
3239 -- plus fields for expression
3240
3241 --------------------------
3242 -- 4.1.3 Selector Name --
3243 --------------------------
3244
3245 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3246
3247 --------------------------------
3248 -- 4.1.4 Attribute Reference --
3249 --------------------------------
3250
3251 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3252
3253 -- Note: the syntax is quite ambiguous at this point. Consider:
3254
3255 -- A'Length (X) X is part of the attribute designator
3256 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3257 -- A'Class (X) X is the expression of a type conversion
3258
3259 -- It would be possible for the parser to distinguish these cases
3260 -- by looking at the attribute identifier. However, that would mean
3261 -- more work in introducing new implementation defined attributes,
3262 -- and also it would mean that special processing for attributes
3263 -- would be scattered around, instead of being centralized in the
3264 -- semantic routine that handles an N_Attribute_Reference node.
3265 -- Consequently, the parser in all the above cases stores the
3266 -- expression (X in these examples) as a single element list in
3267 -- in the Expressions field of the N_Attribute_Reference node.
3268
3269 -- Similarly, for attributes like Max which take two arguments,
3270 -- we store the two arguments as a two element list in the
3271 -- Expressions field. Of course it is clear at parse time that
3272 -- this case is really a function call with an attribute as the
3273 -- prefix, but it turns out to be convenient to handle the two
3274 -- argument case in a similar manner to the one argument case,
3275 -- and indeed in general the parser will accept any number of
3276 -- expressions in this position and store them as a list in the
3277 -- attribute reference node. This allows for future addition of
3278 -- attributes that take more than two arguments.
3279
3280 -- Note: named associates are not permitted in function calls where
3281 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3282 -- to skip the normal subprogram argument processing.
3283
3284 -- Note: for the attributes whose designators are technically keywords,
3285 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3286 -- the corresponding name, even though no identifier is involved.
3287
3288 -- Note: the generated code may contain stream attributes applied to
3289 -- limited types for which no stream routines exist officially. In such
3290 -- case, the result is to use the stream attribute for the underlying
3291 -- full type, or in the case of a protected type, the components
3292 -- (including any discriminants) are merely streamed in order.
3293
3294 -- See Exp_Attr for a complete description of which attributes are
3295 -- passed onto Gigi, and which are handled entirely by the front end.
3296
3297 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3298 -- a non-standard enumeration type or a nonzero/zero semantics
3299 -- boolean type, so the value is simply the stored representation.
3300
3301 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3302 -- references a subprogram that is a renaming, then the front end must
3303 -- rewrite the attribute to refer directly to the renamed entity.
3304
3305 -- Note: In generated code, the Address and Unrestricted_Access
3306 -- attributes can be applied to any expression, and the meaning is
3307 -- to create an object containing the value (the object is in the
3308 -- current stack frame), and pass the address of this value. If the
3309 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3310 -- is taken must be on a byte (storage unit) boundary, and if it is
3311 -- not (or may not be), then the generated code must create a copy
3312 -- that is byte aligned, and pass the address of this copy.
3313
3314 -- N_Attribute_Reference
3315 -- Sloc points to apostrophe
3316 -- Prefix (Node3)
3317 -- Attribute_Name (Name2) identifier name from attribute designator
3318 -- Expressions (List1) (set to No_List if no associated expressions)
3319 -- Entity (Node4-Sem) used if the attribute yields a type
3320 -- Associated_Node (Node4-Sem)
3321 -- Do_Overflow_Check (Flag17-Sem)
3322 -- Redundant_Use (Flag13-Sem)
3323 -- Must_Be_Byte_Aligned (Flag14)
3324 -- plus fields for expression
3325
3326 ---------------------------------
3327 -- 4.1.4 Attribute Designator --
3328 ---------------------------------
3329
3330 -- ATTRIBUTE_DESIGNATOR ::=
3331 -- IDENTIFIER [(static_EXPRESSION)]
3332 -- | access | delta | digits
3333
3334 -- There is no explicit node in the tree for an attribute designator.
3335 -- Instead the Attribute_Name and Expressions fields of the parent
3336 -- node (N_Attribute_Reference node) hold the information.
3337
3338 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3339 -- designator, then they are treated as identifiers internally
3340 -- rather than the keywords of the same name.
3341
3342 --------------------------------------
3343 -- 4.1.4 Range Attribute Reference --
3344 --------------------------------------
3345
3346 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3347
3348 -- A range attribute reference is represented in the tree using the
3349 -- normal N_Attribute_Reference node.
3350
3351 ---------------------------------------
3352 -- 4.1.4 Range Attribute Designator --
3353 ---------------------------------------
3354
3355 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3356
3357 -- A range attribute designator is represented in the tree using the
3358 -- normal N_Attribute_Reference node.
3359
3360 --------------------
3361 -- 4.3 Aggregate --
3362 --------------------
3363
3364 -- AGGREGATE ::=
3365 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3366
3367 -----------------------------
3368 -- 4.3.1 Record Aggregate --
3369 -----------------------------
3370
3371 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3372
3373 -- N_Aggregate
3374 -- Sloc points to left parenthesis
3375 -- Expressions (List1) (set to No_List if none or null record case)
3376 -- Component_Associations (List2) (set to No_List if none)
3377 -- Null_Record_Present (Flag17)
3378 -- Aggregate_Bounds (Node3-Sem)
3379 -- Associated_Node (Node4-Sem)
3380 -- Static_Processing_OK (Flag4-Sem)
3381 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3382 -- Expansion_Delayed (Flag11-Sem)
3383 -- Has_Self_Reference (Flag13-Sem)
3384 -- plus fields for expression
3385
3386 -- Note: this structure is used for both record and array aggregates
3387 -- since the two cases are not separable by the parser. The parser
3388 -- makes no attempt to enforce consistency here, so it is up to the
3389 -- semantic phase to make sure that the aggregate is consistent (i.e.
3390 -- that it is not a "half-and-half" case that mixes record and array
3391 -- syntax. In particular, for a record aggregate, the expressions
3392 -- field will be set if there are positional associations.
3393
3394 -- Note: N_Aggregate is not used for all aggregates; in particular,
3395 -- there is a separate node kind for extension aggregates.
3396
3397 -- Note: gigi/gcc can handle array aggregates correctly providing that
3398 -- they are entirely positional, and the array subtype involved has a
3399 -- known at compile time length and is not bit packed, or a convention
3400 -- Fortran array with more than one dimension. If these conditions
3401 -- are not met, then the front end must translate the aggregate into
3402 -- an appropriate set of assignments into a temporary.
3403
3404 -- Note: for the record aggregate case, gigi/gcc can handle all cases of
3405 -- record aggregates, including those for packed, and rep-claused
3406 -- records, and also variant records, providing that there are no
3407 -- variable length fields whose size is not known at compile time, and
3408 -- providing that the aggregate is presented in fully named form.
3409
3410 ----------------------------------------------
3411 -- 4.3.1 Record Component Association List --
3412 ----------------------------------------------
3413
3414 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3415 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3416 -- | null record
3417
3418 -- There is no explicit node in the tree for a record component
3419 -- association list. Instead the Null_Record_Present flag is set in
3420 -- the parent node for the NULL RECORD case.
3421
3422 ------------------------------------------------------
3423 -- 4.3.1 Record Component Association (also 4.3.3) --
3424 ------------------------------------------------------
3425
3426 -- RECORD_COMPONENT_ASSOCIATION ::=
3427 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3428
3429 -- N_Component_Association
3430 -- Sloc points to first selector name
3431 -- Choices (List1)
3432 -- Loop_Actions (List2-Sem)
3433 -- Expression (Node3)
3434 -- Box_Present (Flag15)
3435 -- Inherited_Discriminant (Flag13)
3436
3437 -- Note: this structure is used for both record component associations
3438 -- and array component associations, since the two cases aren't always
3439 -- separable by the parser. The choices list may represent either a
3440 -- list of selector names in the record aggregate case, or a list of
3441 -- discrete choices in the array aggregate case or an N_Others_Choice
3442 -- node (which appears as a singleton list). Box_Present gives support
3443 -- to Ada 2005 (AI-287).
3444
3445 ----------------------------------
3446 -- 4.3.1 Component Choice List --
3447 ----------------------------------
3448
3449 -- COMPONENT_CHOICE_LIST ::=
3450 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3451 -- | others
3452
3453 -- The entries of a component choice list appear in the Choices list of
3454 -- the associated N_Component_Association, as either selector names, or
3455 -- as an N_Others_Choice node.
3456
3457 --------------------------------
3458 -- 4.3.2 Extension Aggregate --
3459 --------------------------------
3460
3461 -- EXTENSION_AGGREGATE ::=
3462 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3463
3464 -- Note: extension aggregates are not permitted in Ada 83 mode
3465
3466 -- N_Extension_Aggregate
3467 -- Sloc points to left parenthesis
3468 -- Ancestor_Part (Node3)
3469 -- Associated_Node (Node4-Sem)
3470 -- Expressions (List1) (set to No_List if none or null record case)
3471 -- Component_Associations (List2) (set to No_List if none)
3472 -- Null_Record_Present (Flag17)
3473 -- Expansion_Delayed (Flag11-Sem)
3474 -- Has_Self_Reference (Flag13-Sem)
3475 -- plus fields for expression
3476
3477 --------------------------
3478 -- 4.3.2 Ancestor Part --
3479 --------------------------
3480
3481 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3482
3483 ----------------------------
3484 -- 4.3.3 Array Aggregate --
3485 ----------------------------
3486
3487 -- ARRAY_AGGREGATE ::=
3488 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3489
3490 ---------------------------------------
3491 -- 4.3.3 Positional Array Aggregate --
3492 ---------------------------------------
3493
3494 -- POSITIONAL_ARRAY_AGGREGATE ::=
3495 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3496 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3497
3498 -- See Record_Aggregate (4.3.1) for node structure
3499
3500 ----------------------------------
3501 -- 4.3.3 Named Array Aggregate --
3502 ----------------------------------
3503
3504 -- NAMED_ARRAY_AGGREGATE ::=
3505 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3506
3507 -- See Record_Aggregate (4.3.1) for node structure
3508
3509 ----------------------------------------
3510 -- 4.3.3 Array Component Association --
3511 ----------------------------------------
3512
3513 -- ARRAY_COMPONENT_ASSOCIATION ::=
3514 -- DISCRETE_CHOICE_LIST => EXPRESSION
3515
3516 -- See Record_Component_Association (4.3.1) for node structure
3517
3518 --------------------------------------------------
3519 -- 4.4 Expression/Relation/Term/Factor/Primary --
3520 --------------------------------------------------
3521
3522 -- EXPRESSION ::=
3523 -- RELATION {LOGICAL_OPERATOR RELATION}
3524
3525 -- CHOICE_EXPRESSION ::=
3526 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3527
3528 -- CHOICE_RELATION ::=
3529 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3530
3531 -- RELATION ::=
3532 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3533
3534 -- MEMBERSHIP_CHOICE_LIST ::=
3535 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3536
3537 -- MEMBERSHIP_CHOICE ::=
3538 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3539
3540 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3541
3542 -- SIMPLE_EXPRESSION ::=
3543 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3544
3545 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3546
3547 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3548
3549 -- No nodes are generated for any of these constructs. Instead, the
3550 -- node for the operator appears directly. When we refer to an
3551 -- expression in this description, we mean any of the possible
3552 -- constituent components of an expression (e.g. identifier is
3553 -- an example of an expression).
3554
3555 -- Note: the above syntax is that Ada 2012 syntax which restricts
3556 -- choice relations to simple expressions to avoid ambiguities in
3557 -- some contexts with set membership notation. It has been decided
3558 -- that in retrospect, the Ada 95 change allowing general expressions
3559 -- in this context was a mistake, so we have reverted to the above
3560 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3561 -- expressions was there in Ada 83 from the start).
3562
3563 ------------------
3564 -- 4.4 Primary --
3565 ------------------
3566
3567 -- PRIMARY ::=
3568 -- NUMERIC_LITERAL | null
3569 -- | STRING_LITERAL | AGGREGATE
3570 -- | NAME | QUALIFIED_EXPRESSION
3571 -- | ALLOCATOR | (EXPRESSION)
3572
3573 -- Usually there is no explicit node in the tree for primary. Instead
3574 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3575 -- exceptions. First, there is an explicit node for a null primary.
3576
3577 -- N_Null
3578 -- Sloc points to NULL
3579 -- plus fields for expression
3580
3581 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3582 -- that the parser keep track of which subexpressions are enclosed
3583 -- in parentheses, and how many levels of parentheses are used. This
3584 -- information is required for optimization purposes, and also for
3585 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3586 -- conform with ((((1)))) in the body).
3587
3588 -- The parentheses are recorded by keeping a Paren_Count field in every
3589 -- subexpression node (it is actually present in all nodes, but only
3590 -- used in subexpression nodes). This count records the number of
3591 -- levels of parentheses. If the number of levels in the source exceeds
3592 -- the maximum accommodated by this count, then the count is simply left
3593 -- at the maximum value. This means that there are some pathological
3594 -- cases of failure to detect conformance failures (e.g. an expression
3595 -- with 500 levels of parens will conform with one with 501 levels),
3596 -- but we do not need to lose sleep over this.
3597
3598 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3599 -- type N_Parenthesized_Expression used to accurately record unlimited
3600 -- numbers of levels of parentheses. However, it turned out to be a
3601 -- real nuisance to have to take into account the possible presence of
3602 -- this node during semantic analysis, since basically parentheses have
3603 -- zero relevance to semantic analysis.
3604
3605 -- Note: the level of parentheses always present in things like
3606 -- aggregates does not count, only the parentheses in the primary
3607 -- (EXPRESSION) affect the setting of the Paren_Count field.
3608
3609 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3610 -- treated as though it were Empty) if No_Initialization is set True.
3611
3612 --------------------------------------
3613 -- 4.5 Short Circuit Control Forms --
3614 --------------------------------------
3615
3616 -- EXPRESSION ::=
3617 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3618
3619 -- Gigi restriction: For both these control forms, the operand and
3620 -- result types are always Standard.Boolean. The expander inserts the
3621 -- required conversion operations where needed to ensure this is the
3622 -- case.
3623
3624 -- N_And_Then
3625 -- Sloc points to AND of AND THEN
3626 -- Left_Opnd (Node2)
3627 -- Right_Opnd (Node3)
3628 -- Actions (List1-Sem)
3629 -- plus fields for expression
3630
3631 -- N_Or_Else
3632 -- Sloc points to OR of OR ELSE
3633 -- Left_Opnd (Node2)
3634 -- Right_Opnd (Node3)
3635 -- Actions (List1-Sem)
3636 -- plus fields for expression
3637
3638 -- Note: The Actions field is used to hold actions associated with
3639 -- the right hand operand. These have to be treated specially since
3640 -- they are not unconditionally executed. See Insert_Actions for a
3641 -- more detailed description of how these actions are handled.
3642
3643 ---------------------------
3644 -- 4.5 Membership Tests --
3645 ---------------------------
3646
3647 -- RELATION ::=
3648 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3649
3650 -- MEMBERSHIP_CHOICE_LIST ::=
3651 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3652
3653 -- MEMBERSHIP_CHOICE ::=
3654 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3655
3656 -- Note: although the grammar above allows only a range or a subtype
3657 -- mark, the parser in fact will accept any simple expression in place
3658 -- of a subtype mark. This means that the semantic analyzer must be able
3659 -- to deal with, and diagnose a simple expression other than a name for
3660 -- the right operand. This simplifies error recovery in the parser.
3661
3662 -- The Alternatives field below is present only if there is more
3663 -- than one Membership_Choice present (which is legitimate only in
3664 -- Ada 2012 mode) in which case Right_Opnd is Empty, and Alternatives
3665 -- contains the list of choices. In the tree passed to the back end,
3666 -- Alternatives is always No_List, and Right_Opnd is set (i.e. the
3667 -- expansion circuitry expands out the complex set membership case
3668 -- using simple membership operations).
3669
3670 -- Should we rename Alternatives here to Membership_Choices ???
3671
3672 -- N_In
3673 -- Sloc points to IN
3674 -- Left_Opnd (Node2)
3675 -- Right_Opnd (Node3)
3676 -- Alternatives (List4) (set to No_List if only one set alternative)
3677 -- plus fields for expression
3678
3679 -- N_Not_In
3680 -- Sloc points to NOT of NOT IN
3681 -- Left_Opnd (Node2)
3682 -- Right_Opnd (Node3)
3683 -- Alternatives (List4) (set to No_List if only one set alternative)
3684 -- plus fields for expression
3685
3686 --------------------
3687 -- 4.5 Operators --
3688 --------------------
3689
3690 -- LOGICAL_OPERATOR ::= and | or | xor
3691
3692 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3693
3694 -- BINARY_ADDING_OPERATOR ::= + | - | &
3695
3696 -- UNARY_ADDING_OPERATOR ::= + | -
3697
3698 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3699
3700 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3701
3702 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3703
3704 -- x #* y
3705 -- x #/ y
3706 -- x #mod y
3707 -- x #rem y
3708
3709 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3710 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3711 -- All handling of smalls for multiplication and division is handled
3712 -- by the front end (mod and rem result only from expansion). Gigi
3713 -- thus never needs to worry about small values (for other operators
3714 -- operating on fixed-point, e.g. addition, the small value does not
3715 -- have any semantic effect anyway, these are always integer operations.
3716
3717 -- Gigi restriction: For all operators taking Boolean operands, the
3718 -- type is always Standard.Boolean. The expander inserts the required
3719 -- conversion operations where needed to ensure this is the case.
3720
3721 -- N_Op_And
3722 -- Sloc points to AND
3723 -- Do_Length_Check (Flag4-Sem)
3724 -- plus fields for binary operator
3725 -- plus fields for expression
3726
3727 -- N_Op_Or
3728 -- Sloc points to OR
3729 -- Do_Length_Check (Flag4-Sem)
3730 -- plus fields for binary operator
3731 -- plus fields for expression
3732
3733 -- N_Op_Xor
3734 -- Sloc points to XOR
3735 -- Do_Length_Check (Flag4-Sem)
3736 -- plus fields for binary operator
3737 -- plus fields for expression
3738
3739 -- N_Op_Eq
3740 -- Sloc points to =
3741 -- plus fields for binary operator
3742 -- plus fields for expression
3743
3744 -- N_Op_Ne
3745 -- Sloc points to /=
3746 -- plus fields for binary operator
3747 -- plus fields for expression
3748
3749 -- N_Op_Lt
3750 -- Sloc points to <
3751 -- plus fields for binary operator
3752 -- plus fields for expression
3753
3754 -- N_Op_Le
3755 -- Sloc points to <=
3756 -- plus fields for binary operator
3757 -- plus fields for expression
3758
3759 -- N_Op_Gt
3760 -- Sloc points to >
3761 -- plus fields for binary operator
3762 -- plus fields for expression
3763
3764 -- N_Op_Ge
3765 -- Sloc points to >=
3766 -- plus fields for binary operator
3767 -- plus fields for expression
3768
3769 -- N_Op_Add
3770 -- Sloc points to + (binary)
3771 -- plus fields for binary operator
3772 -- plus fields for expression
3773
3774 -- N_Op_Subtract
3775 -- Sloc points to - (binary)
3776 -- plus fields for binary operator
3777 -- plus fields for expression
3778
3779 -- N_Op_Concat
3780 -- Sloc points to &
3781 -- Is_Component_Left_Opnd (Flag13-Sem)
3782 -- Is_Component_Right_Opnd (Flag14-Sem)
3783 -- plus fields for binary operator
3784 -- plus fields for expression
3785
3786 -- N_Op_Multiply
3787 -- Sloc points to *
3788 -- Treat_Fixed_As_Integer (Flag14-Sem)
3789 -- Rounded_Result (Flag18-Sem)
3790 -- plus fields for binary operator
3791 -- plus fields for expression
3792
3793 -- N_Op_Divide
3794 -- Sloc points to /
3795 -- Treat_Fixed_As_Integer (Flag14-Sem)
3796 -- Do_Division_Check (Flag13-Sem)
3797 -- Rounded_Result (Flag18-Sem)
3798 -- plus fields for binary operator
3799 -- plus fields for expression
3800
3801 -- N_Op_Mod
3802 -- Sloc points to MOD
3803 -- Treat_Fixed_As_Integer (Flag14-Sem)
3804 -- Do_Division_Check (Flag13-Sem)
3805 -- plus fields for binary operator
3806 -- plus fields for expression
3807
3808 -- N_Op_Rem
3809 -- Sloc points to REM
3810 -- Treat_Fixed_As_Integer (Flag14-Sem)
3811 -- Do_Division_Check (Flag13-Sem)
3812 -- plus fields for binary operator
3813 -- plus fields for expression
3814
3815 -- N_Op_Expon
3816 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3817 -- Sloc points to **
3818 -- plus fields for binary operator
3819 -- plus fields for expression
3820
3821 -- N_Op_Plus
3822 -- Sloc points to + (unary)
3823 -- plus fields for unary operator
3824 -- plus fields for expression
3825
3826 -- N_Op_Minus
3827 -- Sloc points to - (unary)
3828 -- plus fields for unary operator
3829 -- plus fields for expression
3830
3831 -- N_Op_Abs
3832 -- Sloc points to ABS
3833 -- plus fields for unary operator
3834 -- plus fields for expression
3835
3836 -- N_Op_Not
3837 -- Sloc points to NOT
3838 -- plus fields for unary operator
3839 -- plus fields for expression
3840
3841 -- See also shift operators in section B.2
3842
3843 -- Note on fixed-point operations passed to Gigi: For adding operators,
3844 -- the semantics is to treat these simply as integer operations, with
3845 -- the small values being ignored (the bounds are already stored in
3846 -- units of small, so that constraint checking works as usual). For the
3847 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3848 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3849 -- thus treat these nodes in identical manner, ignoring small values.
3850
3851 ---------------------------------
3852 -- 4.5.9 Quantified Expression --
3853 ---------------------------------
3854
3855 -- QUANTIFIED_EXPRESSION ::=
3856 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
3857 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
3858 --
3859 -- QUANTIFIER ::= all | some
3860
3861 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
3862 -- is present at a time, in which case the other one is empty.
3863
3864 -- N_Quantified_Expression
3865 -- Sloc points to FOR
3866 -- Iterator_Specification (Node2)
3867 -- Loop_Parameter_Specification (Node4)
3868 -- Condition (Node1)
3869 -- All_Present (Flag15)
3870
3871 --------------------------
3872 -- 4.6 Type Conversion --
3873 --------------------------
3874
3875 -- TYPE_CONVERSION ::=
3876 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3877
3878 -- In the (NAME) case, the name is stored as the expression
3879
3880 -- Note: the parser never generates a type conversion node, since it
3881 -- looks like an indexed component which is generated by preference.
3882 -- The semantic pass must correct this misidentification.
3883
3884 -- Gigi handles conversions that involve no change in the root type,
3885 -- and also all conversions from integer to floating-point types.
3886 -- Conversions from floating-point to integer are only handled in
3887 -- the case where Float_Truncate flag set. Other conversions from
3888 -- floating-point to integer (involving rounding) and all conversions
3889 -- involving fixed-point types are handled by the expander.
3890
3891 -- Sprint syntax if Float_Truncate set: X^(Y)
3892 -- Sprint syntax if Conversion_OK set X?(Y)
3893 -- Sprint syntax if both flags set X?^(Y)
3894
3895 -- Note: If either the operand or result type is fixed-point, Gigi will
3896 -- only see a type conversion node with Conversion_OK set. The front end
3897 -- takes care of all handling of small's for fixed-point conversions.
3898
3899 -- N_Type_Conversion
3900 -- Sloc points to first token of subtype mark
3901 -- Subtype_Mark (Node4)
3902 -- Expression (Node3)
3903 -- Do_Tag_Check (Flag13-Sem)
3904 -- Do_Length_Check (Flag4-Sem)
3905 -- Do_Overflow_Check (Flag17-Sem)
3906 -- Float_Truncate (Flag11-Sem)
3907 -- Rounded_Result (Flag18-Sem)
3908 -- Conversion_OK (Flag14-Sem)
3909 -- plus fields for expression
3910
3911 -- Note: if a range check is required, then the Do_Range_Check flag
3912 -- is set in the Expression with the check being done against the
3913 -- target type range (after the base type conversion, if any).
3914
3915 -------------------------------
3916 -- 4.7 Qualified Expression --
3917 -------------------------------
3918
3919 -- QUALIFIED_EXPRESSION ::=
3920 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3921
3922 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3923 -- the expression, so the Expression field of this node always points
3924 -- to a parenthesized expression in this case (i.e. Paren_Count will
3925 -- always be non-zero for the referenced expression if it is not an
3926 -- aggregate).
3927
3928 -- N_Qualified_Expression
3929 -- Sloc points to apostrophe
3930 -- Subtype_Mark (Node4)
3931 -- Expression (Node3) expression or aggregate
3932 -- plus fields for expression
3933
3934 --------------------
3935 -- 4.8 Allocator --
3936 --------------------
3937
3938 -- ALLOCATOR ::=
3939 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3940
3941 -- Sprint syntax (when storage pool present)
3942 -- new xxx (storage_pool = pool)
3943
3944 -- N_Allocator
3945 -- Sloc points to NEW
3946 -- Expression (Node3) subtype indication or qualified expression
3947 -- Storage_Pool (Node1-Sem)
3948 -- Procedure_To_Call (Node2-Sem)
3949 -- Coextensions (Elist4-Sem)
3950 -- Null_Exclusion_Present (Flag11)
3951 -- No_Initialization (Flag13-Sem)
3952 -- Is_Static_Coextension (Flag14-Sem)
3953 -- Do_Storage_Check (Flag17-Sem)
3954 -- Is_Dynamic_Coextension (Flag18-Sem)
3955 -- plus fields for expression
3956
3957 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3958 -- This flag has a special function in conjunction with the restriction
3959 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3960 -- is not set. This means that if a source allocator is replaced with
3961 -- a constructed allocator, the Comes_From_Source flag should be copied
3962 -- to the newly created allocator.
3963
3964 ---------------------------------
3965 -- 5.1 Sequence Of Statements --
3966 ---------------------------------
3967
3968 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3969
3970 -- Note: Although the parser will not accept a declaration as a
3971 -- statement, the semantic analyzer may insert declarations (e.g.
3972 -- declarations of implicit types needed for execution of other
3973 -- statements) into a sequence of statements, so the code generator
3974 -- should be prepared to accept a declaration where a statement is
3975 -- expected. Note also that pragmas can appear as statements.
3976
3977 --------------------
3978 -- 5.1 Statement --
3979 --------------------
3980
3981 -- STATEMENT ::=
3982 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3983
3984 -- There is no explicit node in the tree for a statement. Instead, the
3985 -- individual statement appears directly. Labels are treated as a
3986 -- kind of statement, i.e. they are linked into a statement list at
3987 -- the point they appear, so the labeled statement appears following
3988 -- the label or labels in the statement list.
3989
3990 ---------------------------
3991 -- 5.1 Simple Statement --
3992 ---------------------------
3993
3994 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3995 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3996 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3997 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3998 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3999 -- | ABORT_STATEMENT | RAISE_STATEMENT
4000 -- | CODE_STATEMENT
4001
4002 -----------------------------
4003 -- 5.1 Compound Statement --
4004 -----------------------------
4005
4006 -- COMPOUND_STATEMENT ::=
4007 -- IF_STATEMENT | CASE_STATEMENT
4008 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4009 -- | EXTENDED_RETURN_STATEMENT
4010 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4011
4012 -------------------------
4013 -- 5.1 Null Statement --
4014 -------------------------
4015
4016 -- NULL_STATEMENT ::= null;
4017
4018 -- N_Null_Statement
4019 -- Sloc points to NULL
4020
4021 ----------------
4022 -- 5.1 Label --
4023 ----------------
4024
4025 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4026
4027 -- Note that the occurrence of a label is not a defining identifier,
4028 -- but rather a referencing occurrence. The defining occurrence is
4029 -- in the implicit label declaration which occurs in the innermost
4030 -- enclosing block.
4031
4032 -- N_Label
4033 -- Sloc points to <<
4034 -- Identifier (Node1) direct name of statement identifier
4035 -- Exception_Junk (Flag8-Sem)
4036
4037 -- Note: Before Ada 2012, a label is always followed by a statement,
4038 -- and this is true in the tree even in Ada 2012 mode (the parser
4039 -- inserts a null statement marked with Comes_From_Source False).
4040
4041 -------------------------------
4042 -- 5.1 Statement Identifier --
4043 -------------------------------
4044
4045 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4046
4047 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4048 -- (not an OPERATOR_SYMBOL)
4049
4050 -------------------------------
4051 -- 5.2 Assignment Statement --
4052 -------------------------------
4053
4054 -- ASSIGNMENT_STATEMENT ::=
4055 -- variable_NAME := EXPRESSION;
4056
4057 -- N_Assignment_Statement
4058 -- Sloc points to :=
4059 -- Name (Node2)
4060 -- Expression (Node3)
4061 -- Do_Tag_Check (Flag13-Sem)
4062 -- Do_Length_Check (Flag4-Sem)
4063 -- Forwards_OK (Flag5-Sem)
4064 -- Backwards_OK (Flag6-Sem)
4065 -- No_Ctrl_Actions (Flag7-Sem)
4066 -- Componentwise_Assignment (Flag14-Sem)
4067 -- Suppress_Assignment_Checks (Flag18-Sem)
4068
4069 -- Note: if a range check is required, then the Do_Range_Check flag
4070 -- is set in the Expression (right hand side), with the check being
4071 -- done against the type of the Name (left hand side).
4072
4073 -- Note: the back end places some restrictions on the form of the
4074 -- Expression field. If the object being assigned to is Atomic, then
4075 -- the Expression may not have the form of an aggregate (since this
4076 -- might cause the back end to generate separate assignments). In this
4077 -- case the front end must generate an extra temporary and initialize
4078 -- this temporary as required (the temporary itself is not atomic).
4079
4080 -----------------------
4081 -- 5.3 If Statement --
4082 -----------------------
4083
4084 -- IF_STATEMENT ::=
4085 -- if CONDITION then
4086 -- SEQUENCE_OF_STATEMENTS
4087 -- {elsif CONDITION then
4088 -- SEQUENCE_OF_STATEMENTS}
4089 -- [else
4090 -- SEQUENCE_OF_STATEMENTS]
4091 -- end if;
4092
4093 -- Gigi restriction: This expander ensures that the type of the
4094 -- Condition fields is always Standard.Boolean, even if the type
4095 -- in the source is some non-standard boolean type.
4096
4097 -- N_If_Statement
4098 -- Sloc points to IF
4099 -- Condition (Node1)
4100 -- Then_Statements (List2)
4101 -- Elsif_Parts (List3) (set to No_List if none present)
4102 -- Else_Statements (List4) (set to No_List if no else part present)
4103 -- End_Span (Uint5) (set to No_Uint if expander generated)
4104
4105 -- N_Elsif_Part
4106 -- Sloc points to ELSIF
4107 -- Condition (Node1)
4108 -- Then_Statements (List2)
4109 -- Condition_Actions (List3-Sem)
4110
4111 --------------------
4112 -- 5.3 Condition --
4113 --------------------
4114
4115 -- CONDITION ::= boolean_EXPRESSION
4116
4117 -------------------------
4118 -- 5.4 Case Statement --
4119 -------------------------
4120
4121 -- CASE_STATEMENT ::=
4122 -- case EXPRESSION is
4123 -- CASE_STATEMENT_ALTERNATIVE
4124 -- {CASE_STATEMENT_ALTERNATIVE}
4125 -- end case;
4126
4127 -- Note: the Alternatives can contain pragmas. These only occur at
4128 -- the start of the list, since any pragmas occurring after the first
4129 -- alternative are absorbed into the corresponding statement sequence.
4130
4131 -- N_Case_Statement
4132 -- Sloc points to CASE
4133 -- Expression (Node3)
4134 -- Alternatives (List4)
4135 -- End_Span (Uint5) (set to No_Uint if expander generated)
4136
4137 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4138 -- followed by a statement, and this is true in the tree even in Ada
4139 -- 2012 mode (the parser inserts a null statement marked with the flag
4140 -- Comes_From_Source False).
4141
4142 -------------------------------------
4143 -- 5.4 Case Statement Alternative --
4144 -------------------------------------
4145
4146 -- CASE_STATEMENT_ALTERNATIVE ::=
4147 -- when DISCRETE_CHOICE_LIST =>
4148 -- SEQUENCE_OF_STATEMENTS
4149
4150 -- N_Case_Statement_Alternative
4151 -- Sloc points to WHEN
4152 -- Discrete_Choices (List4)
4153 -- Statements (List3)
4154
4155 -------------------------
4156 -- 5.5 Loop Statement --
4157 -------------------------
4158
4159 -- LOOP_STATEMENT ::=
4160 -- [loop_STATEMENT_IDENTIFIER :]
4161 -- [ITERATION_SCHEME] loop
4162 -- SEQUENCE_OF_STATEMENTS
4163 -- end loop [loop_IDENTIFIER];
4164
4165 -- Note: The occurrence of a loop label is not a defining identifier
4166 -- but rather a referencing occurrence. The defining occurrence is in
4167 -- the implicit label declaration which occurs in the innermost
4168 -- enclosing block.
4169
4170 -- Note: there is always a loop statement identifier present in
4171 -- the tree, even if none was given in the source. In the case where
4172 -- no loop identifier is given in the source, the parser creates
4173 -- a name of the form _Loop_n, where n is a decimal integer (the
4174 -- two underlines ensure that the loop names created in this manner
4175 -- do not conflict with any user defined identifiers), and the flag
4176 -- Has_Created_Identifier is set to True. The only exception to the
4177 -- rule that all loop statement nodes have identifiers occurs for
4178 -- loops constructed by the expander, and the semantic analyzer will
4179 -- create and supply dummy loop identifiers in these cases.
4180
4181 -- N_Loop_Statement
4182 -- Sloc points to LOOP
4183 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4184 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4185 -- Statements (List3)
4186 -- End_Label (Node4)
4187 -- Has_Created_Identifier (Flag15)
4188 -- Is_Null_Loop (Flag16)
4189 -- Suppress_Loop_Warnings (Flag17)
4190
4191 -- Note: the parser fills in the Identifier field if there is an
4192 -- explicit loop identifier. Otherwise the parser leaves this field
4193 -- set to Empty, and then the semantic processing for a loop statement
4194 -- creates an identifier, setting the Has_Created_Identifier flag to
4195 -- True. So after semantic analysis, the Identifier is always set,
4196 -- referencing an identifier whose entity has an Ekind of E_Loop.
4197
4198 --------------------------
4199 -- 5.5 Iteration Scheme --
4200 --------------------------
4201
4202 -- ITERATION_SCHEME ::=
4203 -- while CONDITION
4204 -- | for LOOP_PARAMETER_SPECIFICATION
4205 -- | for ITERATOR_SPECIFICATION
4206
4207 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4208 -- is present at a time, in which case the other one is empty. Both are
4209 -- empty in the case of a WHILE loop.
4210
4211 -- Gigi restriction: This expander ensures that the type of the
4212 -- Condition field is always Standard.Boolean, even if the type
4213 -- in the source is some non-standard boolean type.
4214
4215 -- N_Iteration_Scheme
4216 -- Sloc points to WHILE or FOR
4217 -- Condition (Node1) (set to Empty if FOR case)
4218 -- Condition_Actions (List3-Sem)
4219 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4220 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4221
4222 ---------------------------------------
4223 -- 5.5 Loop parameter specification --
4224 ---------------------------------------
4225
4226 -- LOOP_PARAMETER_SPECIFICATION ::=
4227 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4228
4229 -- N_Loop_Parameter_Specification
4230 -- Sloc points to first identifier
4231 -- Defining_Identifier (Node1)
4232 -- Reverse_Present (Flag15)
4233 -- Discrete_Subtype_Definition (Node4)
4234
4235 ----------------------------------
4236 -- 5.5.1 Iterator specification --
4237 ----------------------------------
4238
4239 -- ITERATOR_SPECIFICATION ::=
4240 -- DEFINING_IDENTIFIER in [reverse] NAME
4241 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4242
4243 -- N_Iterator_Specification
4244 -- Sloc points to defining identifier
4245 -- Defining_Identifier (Node1)
4246 -- Name (Node2)
4247 -- Reverse_Present (Flag15)
4248 -- Of_Present (Flag16)
4249 -- Subtype_Indication (Node5)
4250
4251 -- Note: The Of_Present flag distinguishes the two forms
4252
4253 --------------------------
4254 -- 5.6 Block Statement --
4255 --------------------------
4256
4257 -- BLOCK_STATEMENT ::=
4258 -- [block_STATEMENT_IDENTIFIER:]
4259 -- [declare
4260 -- DECLARATIVE_PART]
4261 -- begin
4262 -- HANDLED_SEQUENCE_OF_STATEMENTS
4263 -- end [block_IDENTIFIER];
4264
4265 -- Note that the occurrence of a block identifier is not a defining
4266 -- identifier, but rather a referencing occurrence. The defining
4267 -- occurrence is an E_Block entity declared by the implicit label
4268 -- declaration which occurs in the innermost enclosing block statement
4269 -- or body; the block identifier denotes that E_Block.
4270
4271 -- For block statements that come from source code, there is always a
4272 -- block statement identifier present in the tree, denoting an
4273 -- E_Block. In the case where no block identifier is given in the
4274 -- source, the parser creates a name of the form B_n, where n is a
4275 -- decimal integer, and the flag Has_Created_Identifier is set to
4276 -- True. Blocks constructed by the expander usually have no identifier,
4277 -- and no corresponding entity.
4278
4279 -- Note: the block statement created for an extended return statement
4280 -- has an entity, and this entity is an E_Return_Statement, rather than
4281 -- the usual E_Block.
4282
4283 -- Note: Exception_Junk is set for the wrapping blocks created during
4284 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4285
4286 -- N_Block_Statement
4287 -- Sloc points to DECLARE or BEGIN
4288 -- Identifier (Node1) block direct name (set to Empty if not present)
4289 -- Declarations (List2) (set to No_List if no DECLARE part)
4290 -- Handled_Statement_Sequence (Node4)
4291 -- Is_Task_Master (Flag5-Sem)
4292 -- Activation_Chain_Entity (Node3-Sem)
4293 -- Has_Created_Identifier (Flag15)
4294 -- Is_Task_Allocation_Block (Flag6)
4295 -- Is_Asynchronous_Call_Block (Flag7)
4296 -- Exception_Junk (Flag8-Sem)
4297
4298 -------------------------
4299 -- 5.7 Exit Statement --
4300 -------------------------
4301
4302 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4303
4304 -- Gigi restriction: This expander ensures that the type of the
4305 -- Condition field is always Standard.Boolean, even if the type
4306 -- in the source is some non-standard boolean type.
4307
4308 -- N_Exit_Statement
4309 -- Sloc points to EXIT
4310 -- Name (Node2) (set to Empty if no loop name present)
4311 -- Condition (Node1) (set to Empty if no WHEN part present)
4312 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4313
4314 -------------------------
4315 -- 5.9 Goto Statement --
4316 -------------------------
4317
4318 -- GOTO_STATEMENT ::= goto label_NAME;
4319
4320 -- N_Goto_Statement
4321 -- Sloc points to GOTO
4322 -- Name (Node2)
4323 -- Exception_Junk (Flag8-Sem)
4324
4325 ---------------------------------
4326 -- 6.1 Subprogram Declaration --
4327 ---------------------------------
4328
4329 -- SUBPROGRAM_DECLARATION ::=
4330 -- SUBPROGRAM_SPECIFICATION
4331 -- [ASPECT_SPECIFICATIONS];
4332
4333 -- N_Subprogram_Declaration
4334 -- Sloc points to FUNCTION or PROCEDURE
4335 -- Specification (Node1)
4336 -- Body_To_Inline (Node3-Sem)
4337 -- Corresponding_Body (Node5-Sem)
4338 -- Parent_Spec (Node4-Sem)
4339
4340 ------------------------------------------
4341 -- 6.1 Abstract Subprogram Declaration --
4342 ------------------------------------------
4343
4344 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4345 -- SUBPROGRAM_SPECIFICATION is abstract
4346 -- [ASPECT_SPECIFICATIONS];
4347
4348 -- N_Abstract_Subprogram_Declaration
4349 -- Sloc points to ABSTRACT
4350 -- Specification (Node1)
4351
4352 -----------------------------------
4353 -- 6.1 Subprogram Specification --
4354 -----------------------------------
4355
4356 -- SUBPROGRAM_SPECIFICATION ::=
4357 -- [[not] overriding]
4358 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4359 -- | [[not] overriding]
4360 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4361
4362 -- Note: there are no separate nodes for the profiles, instead the
4363 -- information appears directly in the following nodes.
4364
4365 -- N_Function_Specification
4366 -- Sloc points to FUNCTION
4367 -- Defining_Unit_Name (Node1) (the designator)
4368 -- Elaboration_Boolean (Node2-Sem)
4369 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4370 -- Null_Exclusion_Present (Flag11)
4371 -- Result_Definition (Node4) for result subtype
4372 -- Generic_Parent (Node5-Sem)
4373 -- Must_Override (Flag14) set if overriding indicator present
4374 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4375
4376 -- N_Procedure_Specification
4377 -- Sloc points to PROCEDURE
4378 -- Defining_Unit_Name (Node1)
4379 -- Elaboration_Boolean (Node2-Sem)
4380 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4381 -- Generic_Parent (Node5-Sem)
4382 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4383 -- Must_Override (Flag14) set if overriding indicator present
4384 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4385
4386 -- Note: overriding indicator is an Ada 2005 feature
4387
4388 ---------------------
4389 -- 6.1 Designator --
4390 ---------------------
4391
4392 -- DESIGNATOR ::=
4393 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4394
4395 -- Designators that are simply identifiers or operator symbols appear
4396 -- directly in the tree in this form. The following node is used only
4397 -- in the case where the designator has a parent unit name component.
4398
4399 -- N_Designator
4400 -- Sloc points to period
4401 -- Name (Node2) holds the parent unit name. Note that this is always
4402 -- non-Empty, since this node is only used for the case where a
4403 -- parent library unit package name is present.
4404 -- Identifier (Node1)
4405
4406 -- Note that the identifier can also be an operator symbol here
4407
4408 ------------------------------
4409 -- 6.1 Defining Designator --
4410 ------------------------------
4411
4412 -- DEFINING_DESIGNATOR ::=
4413 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4414
4415 -------------------------------------
4416 -- 6.1 Defining Program Unit Name --
4417 -------------------------------------
4418
4419 -- DEFINING_PROGRAM_UNIT_NAME ::=
4420 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4421
4422 -- The parent unit name is present only in the case of a child unit
4423 -- name (permissible only for Ada 95 for a library level unit, i.e.
4424 -- a unit at scope level one). If no such name is present, the defining
4425 -- program unit name is represented simply as the defining identifier.
4426 -- In the child unit case, the following node is used to represent the
4427 -- child unit name.
4428
4429 -- N_Defining_Program_Unit_Name
4430 -- Sloc points to period
4431 -- Name (Node2) holds the parent unit name. Note that this is always
4432 -- non-Empty, since this node is only used for the case where a
4433 -- parent unit name is present.
4434 -- Defining_Identifier (Node1)
4435
4436 --------------------------
4437 -- 6.1 Operator Symbol --
4438 --------------------------
4439
4440 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4441
4442 -- Note: the fields of the N_Operator_Symbol node are laid out to
4443 -- match the corresponding fields of an N_Character_Literal node. This
4444 -- allows easy conversion of the operator symbol node into a character
4445 -- literal node in the case where a string constant of the form of an
4446 -- operator symbol is scanned out as such, but turns out semantically
4447 -- to be a string literal that is not an operator. For details see
4448 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4449
4450 -- N_Operator_Symbol
4451 -- Sloc points to literal
4452 -- Chars (Name1) contains the Name_Id for the operator symbol
4453 -- Strval (Str3) Id of string value. This is used if the operator
4454 -- symbol turns out to be a normal string after all.
4455 -- Entity (Node4-Sem)
4456 -- Associated_Node (Node4-Sem)
4457 -- Has_Private_View (Flag11-Sem) set in generic units.
4458 -- Etype (Node5-Sem)
4459
4460 -- Note: the Strval field may be set to No_String for generated
4461 -- operator symbols that are known not to be string literals
4462 -- semantically.
4463
4464 -----------------------------------
4465 -- 6.1 Defining Operator Symbol --
4466 -----------------------------------
4467
4468 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4469
4470 -- A defining operator symbol is an entity, which has additional
4471 -- fields depending on the setting of the Ekind field. These
4472 -- additional fields are defined (and access subprograms declared)
4473 -- in package Einfo.
4474
4475 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4476 -- are deliberately layed out to match the layout of fields in an
4477 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4478 -- an operator symbol node into a defining operator symbol node.
4479 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4480 -- for further details.
4481
4482 -- N_Defining_Operator_Symbol
4483 -- Sloc points to literal
4484 -- Chars (Name1) contains the Name_Id for the operator symbol
4485 -- Next_Entity (Node2-Sem)
4486 -- Scope (Node3-Sem)
4487 -- Etype (Node5-Sem)
4488
4489 ----------------------------
4490 -- 6.1 Parameter Profile --
4491 ----------------------------
4492
4493 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4494
4495 ---------------------------------------
4496 -- 6.1 Parameter and Result Profile --
4497 ---------------------------------------
4498
4499 -- PARAMETER_AND_RESULT_PROFILE ::=
4500 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4501 -- | [FORMAL_PART] return ACCESS_DEFINITION
4502
4503 -- There is no explicit node in the tree for a parameter and result
4504 -- profile. Instead the information appears directly in the parent.
4505
4506 ----------------------
4507 -- 6.1 Formal part --
4508 ----------------------
4509
4510 -- FORMAL_PART ::=
4511 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4512
4513 ----------------------------------
4514 -- 6.1 Parameter specification --
4515 ----------------------------------
4516
4517 -- PARAMETER_SPECIFICATION ::=
4518 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4519 -- [:= DEFAULT_EXPRESSION]
4520 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4521 -- [:= DEFAULT_EXPRESSION]
4522
4523 -- Although the syntax allows multiple identifiers in the list, the
4524 -- semantics is as though successive specifications were given with
4525 -- identical type definition and expression components. To simplify
4526 -- semantic processing, the parser represents a multiple declaration
4527 -- case as a sequence of single Specifications, using the More_Ids and
4528 -- Prev_Ids flags to preserve the original source form as described
4529 -- in the section on "Handling of Defining Identifier Lists".
4530
4531 -- N_Parameter_Specification
4532 -- Sloc points to first identifier
4533 -- Defining_Identifier (Node1)
4534 -- In_Present (Flag15)
4535 -- Out_Present (Flag17)
4536 -- Null_Exclusion_Present (Flag11)
4537 -- Parameter_Type (Node2) subtype mark or access definition
4538 -- Expression (Node3) (set to Empty if no default expression present)
4539 -- Do_Accessibility_Check (Flag13-Sem)
4540 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4541 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4542 -- Default_Expression (Node5-Sem)
4543
4544 ---------------
4545 -- 6.1 Mode --
4546 ---------------
4547
4548 -- MODE ::= [in] | in out | out
4549
4550 -- There is no explicit node in the tree for the Mode. Instead the
4551 -- In_Present and Out_Present flags are set in the parent node to
4552 -- record the presence of keywords specifying the mode.
4553
4554 --------------------------
4555 -- 6.3 Subprogram Body --
4556 --------------------------
4557
4558 -- SUBPROGRAM_BODY ::=
4559 -- SUBPROGRAM_SPECIFICATION is
4560 -- DECLARATIVE_PART
4561 -- begin
4562 -- HANDLED_SEQUENCE_OF_STATEMENTS
4563 -- end [DESIGNATOR];
4564
4565 -- N_Subprogram_Body
4566 -- Sloc points to FUNCTION or PROCEDURE
4567 -- Specification (Node1)
4568 -- Declarations (List2)
4569 -- Handled_Statement_Sequence (Node4)
4570 -- Activation_Chain_Entity (Node3-Sem)
4571 -- Corresponding_Spec (Node5-Sem)
4572 -- Acts_As_Spec (Flag4-Sem)
4573 -- Bad_Is_Detected (Flag15) used only by parser
4574 -- Do_Storage_Check (Flag17-Sem)
4575 -- Has_Pragma_Priority (Flag6-Sem)
4576 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4577 -- Is_Entry_Barrier_Function (Flag8-Sem)
4578 -- Is_Task_Master (Flag5-Sem)
4579 -- Was_Originally_Stub (Flag13-Sem)
4580 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4581 -- Has_Pragma_CPU (Flag14-Sem)
4582
4583 ------------------------------
4584 -- Parameterized Expression --
4585 ------------------------------
4586
4587 -- This is an Ada 2012 extension, we put it here for now, to be labeled
4588 -- and put in its proper section when we know exactly where that is!
4589
4590 -- PARAMETERIZED_EXPRESSION ::=
4591 -- FUNCTION SPECIFICATION IS (EXPRESSION);
4592
4593 -- N_Parameterized_Expression
4594 -- Sloc points to FUNCTION
4595 -- Specification (Node1)
4596 -- Expression (Node3)
4597
4598 -----------------------------------
4599 -- 6.4 Procedure Call Statement --
4600 -----------------------------------
4601
4602 -- PROCEDURE_CALL_STATEMENT ::=
4603 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4604
4605 -- Note: the reason that a procedure call has expression fields is
4606 -- that it semantically resembles an expression, e.g. overloading is
4607 -- allowed and a type is concocted for semantic processing purposes.
4608 -- Certain of these fields, such as Parens are not relevant, but it
4609 -- is easier to just supply all of them together!
4610
4611 -- N_Procedure_Call_Statement
4612 -- Sloc points to first token of name or prefix
4613 -- Name (Node2) stores name or prefix
4614 -- Parameter_Associations (List3) (set to No_List if no
4615 -- actual parameter part)
4616 -- First_Named_Actual (Node4-Sem)
4617 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4618 -- Do_Tag_Check (Flag13-Sem)
4619 -- No_Elaboration_Check (Flag14-Sem)
4620 -- Parameter_List_Truncated (Flag17-Sem)
4621 -- ABE_Is_Certain (Flag18-Sem)
4622 -- plus fields for expression
4623
4624 -- If any IN parameter requires a range check, then the corresponding
4625 -- argument expression has the Do_Range_Check flag set, and the range
4626 -- check is done against the formal type. Note that this argument
4627 -- expression may appear directly in the Parameter_Associations list,
4628 -- or may be a descendent of an N_Parameter_Association node that
4629 -- appears in this list.
4630
4631 ------------------------
4632 -- 6.4 Function Call --
4633 ------------------------
4634
4635 -- FUNCTION_CALL ::=
4636 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4637
4638 -- Note: the parser may generate an indexed component node or simply
4639 -- a name node instead of a function call node. The semantic pass must
4640 -- correct this misidentification.
4641
4642 -- N_Function_Call
4643 -- Sloc points to first token of name or prefix
4644 -- Name (Node2) stores name or prefix
4645 -- Parameter_Associations (List3) (set to No_List if no
4646 -- actual parameter part)
4647 -- First_Named_Actual (Node4-Sem)
4648 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4649 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4650 -- Do_Tag_Check (Flag13-Sem)
4651 -- No_Elaboration_Check (Flag14-Sem)
4652 -- Parameter_List_Truncated (Flag17-Sem)
4653 -- ABE_Is_Certain (Flag18-Sem)
4654 -- plus fields for expression
4655
4656 --------------------------------
4657 -- 6.4 Actual Parameter Part --
4658 --------------------------------
4659
4660 -- ACTUAL_PARAMETER_PART ::=
4661 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4662
4663 --------------------------------
4664 -- 6.4 Parameter Association --
4665 --------------------------------
4666
4667 -- PARAMETER_ASSOCIATION ::=
4668 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4669
4670 -- Note: the N_Parameter_Association node is built only if a formal
4671 -- parameter selector name is present, otherwise the parameter
4672 -- association appears in the tree simply as the node for the
4673 -- explicit actual parameter.
4674
4675 -- N_Parameter_Association
4676 -- Sloc points to formal parameter
4677 -- Selector_Name (Node2) (always non-Empty)
4678 -- Explicit_Actual_Parameter (Node3)
4679 -- Next_Named_Actual (Node4-Sem)
4680 -- Is_Accessibility_Actual (Flag13-Sem)
4681
4682 ---------------------------
4683 -- 6.4 Actual Parameter --
4684 ---------------------------
4685
4686 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4687
4688 ---------------------------
4689 -- 6.5 Return Statement --
4690 ---------------------------
4691
4692 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4693
4694 -- In Ada 2005, we have:
4695
4696 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4697
4698 -- EXTENDED_RETURN_STATEMENT ::=
4699 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4700 -- [:= EXPRESSION] [do
4701 -- HANDLED_SEQUENCE_OF_STATEMENTS
4702 -- end return];
4703
4704 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4705
4706 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4707 -- "return statement" is defined in 6.5 to mean a
4708 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4709
4710 -- N_Return_Statement
4711 -- Sloc points to RETURN
4712 -- Return_Statement_Entity (Node5-Sem)
4713 -- Expression (Node3) (set to Empty if no expression present)
4714 -- Storage_Pool (Node1-Sem)
4715 -- Procedure_To_Call (Node2-Sem)
4716 -- Do_Tag_Check (Flag13-Sem)
4717 -- By_Ref (Flag5-Sem)
4718 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4719
4720 -- N_Return_Statement represents a simple_return_statement, and is
4721 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4722 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4723 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4724 -- as Make_Simple_Return_Statement in Sem_Util.
4725
4726 -- Note: Return_Statement_Entity points to an E_Return_Statement
4727
4728 -- If a range check is required, then Do_Range_Check is set on the
4729 -- Expression. The check is against the return subtype of the function.
4730
4731 -- N_Extended_Return_Statement
4732 -- Sloc points to RETURN
4733 -- Return_Statement_Entity (Node5-Sem)
4734 -- Return_Object_Declarations (List3)
4735 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4736 -- Storage_Pool (Node1-Sem)
4737 -- Procedure_To_Call (Node2-Sem)
4738 -- Do_Tag_Check (Flag13-Sem)
4739 -- By_Ref (Flag5-Sem)
4740
4741 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4742
4743 -- Note that Return_Object_Declarations is a list containing the
4744 -- N_Object_Declaration -- see comment on this field above.
4745
4746 -- The declared object will have Is_Return_Object = True.
4747
4748 -- There is no such syntactic category as return_object_declaration
4749 -- in the RM. Return_Object_Declarations represents this portion of
4750 -- the syntax for EXTENDED_RETURN_STATEMENT:
4751 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4752 -- [:= EXPRESSION]
4753
4754 -- There are two entities associated with an extended_return_statement:
4755 -- the Return_Statement_Entity represents the statement itself, and the
4756 -- Defining_Identifier of the Object_Declaration in
4757 -- Return_Object_Declarations represents the object being
4758 -- returned. N_Simple_Return_Statement has only the former.
4759
4760 ------------------------------
4761 -- 7.1 Package Declaration --
4762 ------------------------------
4763
4764 -- PACKAGE_DECLARATION ::=
4765 -- PACKAGE_SPECIFICATION
4766 -- [ASPECT_SPECIFICATIONS];
4767
4768 -- Note: the activation chain entity for a package spec is used for
4769 -- all tasks declared in the package spec, or in the package body.
4770
4771 -- N_Package_Declaration
4772 -- Sloc points to PACKAGE
4773 -- Specification (Node1)
4774 -- Corresponding_Body (Node5-Sem)
4775 -- Parent_Spec (Node4-Sem)
4776 -- Activation_Chain_Entity (Node3-Sem)
4777
4778 --------------------------------
4779 -- 7.1 Package Specification --
4780 --------------------------------
4781
4782 -- PACKAGE_SPECIFICATION ::=
4783 -- package DEFINING_PROGRAM_UNIT_NAME is
4784 -- {BASIC_DECLARATIVE_ITEM}
4785 -- [private
4786 -- {BASIC_DECLARATIVE_ITEM}]
4787 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4788
4789 -- N_Package_Specification
4790 -- Sloc points to PACKAGE
4791 -- Defining_Unit_Name (Node1)
4792 -- Visible_Declarations (List2)
4793 -- Private_Declarations (List3) (set to No_List if no private
4794 -- part present)
4795 -- End_Label (Node4)
4796 -- Generic_Parent (Node5-Sem)
4797 -- Limited_View_Installed (Flag18-Sem)
4798
4799 -----------------------
4800 -- 7.1 Package Body --
4801 -----------------------
4802
4803 -- PACKAGE_BODY ::=
4804 -- package body DEFINING_PROGRAM_UNIT_NAME is
4805 -- DECLARATIVE_PART
4806 -- [begin
4807 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4808 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4809
4810 -- N_Package_Body
4811 -- Sloc points to PACKAGE
4812 -- Defining_Unit_Name (Node1)
4813 -- Declarations (List2)
4814 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4815 -- Corresponding_Spec (Node5-Sem)
4816 -- Was_Originally_Stub (Flag13-Sem)
4817
4818 -- Note: if a source level package does not contain a handled sequence
4819 -- of statements, then the parser supplies a dummy one with a null
4820 -- sequence of statements. Comes_From_Source will be False in this
4821 -- constructed sequence. The reason we need this is for the End_Label
4822 -- field in the HSS.
4823
4824 -----------------------------------
4825 -- 7.4 Private Type Declaration --
4826 -----------------------------------
4827
4828 -- PRIVATE_TYPE_DECLARATION ::=
4829 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4830 -- is [[abstract] tagged] [limited] private;
4831
4832 -- Note: TAGGED is not permitted in Ada 83 mode
4833
4834 -- N_Private_Type_Declaration
4835 -- Sloc points to TYPE
4836 -- Defining_Identifier (Node1)
4837 -- Discriminant_Specifications (List4) (set to No_List if no
4838 -- discriminant part)
4839 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4840 -- Abstract_Present (Flag4)
4841 -- Tagged_Present (Flag15)
4842 -- Limited_Present (Flag17)
4843
4844 ----------------------------------------
4845 -- 7.4 Private Extension Declaration --
4846 ----------------------------------------
4847
4848 -- PRIVATE_EXTENSION_DECLARATION ::=
4849 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4850 -- [abstract] [limited | synchronized]
4851 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4852 -- with private;
4853
4854 -- Note: LIMITED, and private extension declarations are not allowed
4855 -- in Ada 83 mode.
4856
4857 -- N_Private_Extension_Declaration
4858 -- Sloc points to TYPE
4859 -- Defining_Identifier (Node1)
4860 -- Discriminant_Specifications (List4) (set to No_List if no
4861 -- discriminant part)
4862 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4863 -- Abstract_Present (Flag4)
4864 -- Limited_Present (Flag17)
4865 -- Synchronized_Present (Flag7)
4866 -- Subtype_Indication (Node5)
4867 -- Interface_List (List2) (set to No_List if none)
4868
4869 ---------------------
4870 -- 8.4 Use Clause --
4871 ---------------------
4872
4873 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4874
4875 -----------------------------
4876 -- 8.4 Use Package Clause --
4877 -----------------------------
4878
4879 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4880
4881 -- N_Use_Package_Clause
4882 -- Sloc points to USE
4883 -- Names (List2)
4884 -- Next_Use_Clause (Node3-Sem)
4885 -- Hidden_By_Use_Clause (Elist4-Sem)
4886
4887 --------------------------
4888 -- 8.4 Use Type Clause --
4889 --------------------------
4890
4891 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
4892
4893 -- Note: use type clause is not permitted in Ada 83 mode
4894
4895 -- Note: the ALL keyword can appear only in Ada 2012 mode
4896
4897 -- N_Use_Type_Clause
4898 -- Sloc points to USE
4899 -- Subtype_Marks (List2)
4900 -- Next_Use_Clause (Node3-Sem)
4901 -- Hidden_By_Use_Clause (Elist4-Sem)
4902 -- All_Present (Flag15)
4903
4904 -------------------------------
4905 -- 8.5 Renaming Declaration --
4906 -------------------------------
4907
4908 -- RENAMING_DECLARATION ::=
4909 -- OBJECT_RENAMING_DECLARATION
4910 -- | EXCEPTION_RENAMING_DECLARATION
4911 -- | PACKAGE_RENAMING_DECLARATION
4912 -- | SUBPROGRAM_RENAMING_DECLARATION
4913 -- | GENERIC_RENAMING_DECLARATION
4914
4915 --------------------------------------
4916 -- 8.5 Object Renaming Declaration --
4917 --------------------------------------
4918
4919 -- OBJECT_RENAMING_DECLARATION ::=
4920 -- DEFINING_IDENTIFIER :
4921 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4922 -- | DEFINING_IDENTIFIER :
4923 -- ACCESS_DEFINITION renames object_NAME;
4924
4925 -- Note: Access_Definition is an optional field that gives support to
4926 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4927 -- Subtype_Indication field or else the Access_Definition field.
4928
4929 -- N_Object_Renaming_Declaration
4930 -- Sloc points to first identifier
4931 -- Defining_Identifier (Node1)
4932 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4933 -- Subtype_Mark (Node4) (set to Empty if not present)
4934 -- Access_Definition (Node3) (set to Empty if not present)
4935 -- Name (Node2)
4936 -- Corresponding_Generic_Association (Node5-Sem)
4937
4938 -----------------------------------------
4939 -- 8.5 Exception Renaming Declaration --
4940 -----------------------------------------
4941
4942 -- EXCEPTION_RENAMING_DECLARATION ::=
4943 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4944
4945 -- N_Exception_Renaming_Declaration
4946 -- Sloc points to first identifier
4947 -- Defining_Identifier (Node1)
4948 -- Name (Node2)
4949
4950 ---------------------------------------
4951 -- 8.5 Package Renaming Declaration --
4952 ---------------------------------------
4953
4954 -- PACKAGE_RENAMING_DECLARATION ::=
4955 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4956
4957 -- N_Package_Renaming_Declaration
4958 -- Sloc points to PACKAGE
4959 -- Defining_Unit_Name (Node1)
4960 -- Name (Node2)
4961 -- Parent_Spec (Node4-Sem)
4962
4963 ------------------------------------------
4964 -- 8.5 Subprogram Renaming Declaration --
4965 ------------------------------------------
4966
4967 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4968 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4969
4970 -- N_Subprogram_Renaming_Declaration
4971 -- Sloc points to RENAMES
4972 -- Specification (Node1)
4973 -- Name (Node2)
4974 -- Parent_Spec (Node4-Sem)
4975 -- Corresponding_Spec (Node5-Sem)
4976 -- Corresponding_Formal_Spec (Node3-Sem)
4977 -- From_Default (Flag6-Sem)
4978
4979 -----------------------------------------
4980 -- 8.5.5 Generic Renaming Declaration --
4981 -----------------------------------------
4982
4983 -- GENERIC_RENAMING_DECLARATION ::=
4984 -- generic package DEFINING_PROGRAM_UNIT_NAME
4985 -- renames generic_package_NAME
4986 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4987 -- renames generic_procedure_NAME
4988 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4989 -- renames generic_function_NAME
4990
4991 -- N_Generic_Package_Renaming_Declaration
4992 -- Sloc points to GENERIC
4993 -- Defining_Unit_Name (Node1)
4994 -- Name (Node2)
4995 -- Parent_Spec (Node4-Sem)
4996
4997 -- N_Generic_Procedure_Renaming_Declaration
4998 -- Sloc points to GENERIC
4999 -- Defining_Unit_Name (Node1)
5000 -- Name (Node2)
5001 -- Parent_Spec (Node4-Sem)
5002
5003 -- N_Generic_Function_Renaming_Declaration
5004 -- Sloc points to GENERIC
5005 -- Defining_Unit_Name (Node1)
5006 -- Name (Node2)
5007 -- Parent_Spec (Node4-Sem)
5008
5009 --------------------------------
5010 -- 9.1 Task Type Declaration --
5011 --------------------------------
5012
5013 -- TASK_TYPE_DECLARATION ::=
5014 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5015 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
5016 -- [ASPECT_SPECIFICATIONS];
5017
5018 -- N_Task_Type_Declaration
5019 -- Sloc points to TASK
5020 -- Defining_Identifier (Node1)
5021 -- Discriminant_Specifications (List4) (set to No_List if no
5022 -- discriminant part)
5023 -- Interface_List (List2) (set to No_List if none)
5024 -- Task_Definition (Node3) (set to Empty if not present)
5025 -- Corresponding_Body (Node5-Sem)
5026
5027 ----------------------------------
5028 -- 9.1 Single Task Declaration --
5029 ----------------------------------
5030
5031 -- SINGLE_TASK_DECLARATION ::=
5032 -- task DEFINING_IDENTIFIER
5033 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
5034 -- [ASPECT_SPECIFICATIONS];
5035
5036 -- N_Single_Task_Declaration
5037 -- Sloc points to TASK
5038 -- Defining_Identifier (Node1)
5039 -- Interface_List (List2) (set to No_List if none)
5040 -- Task_Definition (Node3) (set to Empty if not present)
5041
5042 --------------------------
5043 -- 9.1 Task Definition --
5044 --------------------------
5045
5046 -- TASK_DEFINITION ::=
5047 -- {TASK_ITEM}
5048 -- [private
5049 -- {TASK_ITEM}]
5050 -- end [task_IDENTIFIER]
5051
5052 -- Note: as a result of semantic analysis, the list of task items can
5053 -- include implicit type declarations resulting from entry families.
5054
5055 -- N_Task_Definition
5056 -- Sloc points to first token of task definition
5057 -- Visible_Declarations (List2)
5058 -- Private_Declarations (List3) (set to No_List if no private part)
5059 -- End_Label (Node4)
5060 -- Has_Pragma_Priority (Flag6-Sem)
5061 -- Has_Storage_Size_Pragma (Flag5-Sem)
5062 -- Has_Task_Info_Pragma (Flag7-Sem)
5063 -- Has_Task_Name_Pragma (Flag8-Sem)
5064 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5065 -- Has_Pragma_CPU (Flag14-Sem)
5066
5067 --------------------
5068 -- 9.1 Task Item --
5069 --------------------
5070
5071 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5072
5073 --------------------
5074 -- 9.1 Task Body --
5075 --------------------
5076
5077 -- TASK_BODY ::=
5078 -- task body task_DEFINING_IDENTIFIER is
5079 -- DECLARATIVE_PART
5080 -- begin
5081 -- HANDLED_SEQUENCE_OF_STATEMENTS
5082 -- end [task_IDENTIFIER];
5083
5084 -- Gigi restriction: This node never appears
5085
5086 -- N_Task_Body
5087 -- Sloc points to TASK
5088 -- Defining_Identifier (Node1)
5089 -- Declarations (List2)
5090 -- Handled_Statement_Sequence (Node4)
5091 -- Is_Task_Master (Flag5-Sem)
5092 -- Activation_Chain_Entity (Node3-Sem)
5093 -- Corresponding_Spec (Node5-Sem)
5094 -- Was_Originally_Stub (Flag13-Sem)
5095
5096 -------------------------------------
5097 -- 9.4 Protected Type Declaration --
5098 -------------------------------------
5099
5100 -- PROTECTED_TYPE_DECLARATION ::=
5101 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5102 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5103 -- {ASPECT_SPECIFICATIONS];
5104
5105 -- Note: protected type declarations are not permitted in Ada 83 mode
5106
5107 -- N_Protected_Type_Declaration
5108 -- Sloc points to PROTECTED
5109 -- Defining_Identifier (Node1)
5110 -- Discriminant_Specifications (List4) (set to No_List if no
5111 -- discriminant part)
5112 -- Interface_List (List2) (set to No_List if none)
5113 -- Protected_Definition (Node3)
5114 -- Corresponding_Body (Node5-Sem)
5115
5116 ---------------------------------------
5117 -- 9.4 Single Protected Declaration --
5118 ---------------------------------------
5119
5120 -- SINGLE_PROTECTED_DECLARATION ::=
5121 -- protected DEFINING_IDENTIFIER
5122 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5123 -- [ASPECT_SPECIFICATIONS];
5124
5125 -- Note: single protected declarations are not allowed in Ada 83 mode
5126
5127 -- N_Single_Protected_Declaration
5128 -- Sloc points to PROTECTED
5129 -- Defining_Identifier (Node1)
5130 -- Interface_List (List2) (set to No_List if none)
5131 -- Protected_Definition (Node3)
5132
5133 -------------------------------
5134 -- 9.4 Protected Definition --
5135 -------------------------------
5136
5137 -- PROTECTED_DEFINITION ::=
5138 -- {PROTECTED_OPERATION_DECLARATION}
5139 -- [private
5140 -- {PROTECTED_ELEMENT_DECLARATION}]
5141 -- end [protected_IDENTIFIER]
5142
5143 -- N_Protected_Definition
5144 -- Sloc points to first token of protected definition
5145 -- Visible_Declarations (List2)
5146 -- Private_Declarations (List3) (set to No_List if no private part)
5147 -- End_Label (Node4)
5148 -- Has_Pragma_Priority (Flag6-Sem)
5149
5150 ------------------------------------------
5151 -- 9.4 Protected Operation Declaration --
5152 ------------------------------------------
5153
5154 -- PROTECTED_OPERATION_DECLARATION ::=
5155 -- SUBPROGRAM_DECLARATION
5156 -- | ENTRY_DECLARATION
5157 -- | REPRESENTATION_CLAUSE
5158
5159 ----------------------------------------
5160 -- 9.4 Protected Element Declaration --
5161 ----------------------------------------
5162
5163 -- PROTECTED_ELEMENT_DECLARATION ::=
5164 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5165
5166 -------------------------
5167 -- 9.4 Protected Body --
5168 -------------------------
5169
5170 -- PROTECTED_BODY ::=
5171 -- protected body DEFINING_IDENTIFIER is
5172 -- {PROTECTED_OPERATION_ITEM}
5173 -- end [protected_IDENTIFIER];
5174
5175 -- Note: protected bodies are not allowed in Ada 83 mode
5176
5177 -- Gigi restriction: This node never appears
5178
5179 -- N_Protected_Body
5180 -- Sloc points to PROTECTED
5181 -- Defining_Identifier (Node1)
5182 -- Declarations (List2) protected operation items (and pragmas)
5183 -- End_Label (Node4)
5184 -- Corresponding_Spec (Node5-Sem)
5185 -- Was_Originally_Stub (Flag13-Sem)
5186
5187 -----------------------------------
5188 -- 9.4 Protected Operation Item --
5189 -----------------------------------
5190
5191 -- PROTECTED_OPERATION_ITEM ::=
5192 -- SUBPROGRAM_DECLARATION
5193 -- | SUBPROGRAM_BODY
5194 -- | ENTRY_BODY
5195 -- | REPRESENTATION_CLAUSE
5196
5197 ------------------------------
5198 -- 9.5.2 Entry Declaration --
5199 ------------------------------
5200
5201 -- ENTRY_DECLARATION ::=
5202 -- [[not] overriding]
5203 -- entry DEFINING_IDENTIFIER
5204 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
5205
5206 -- N_Entry_Declaration
5207 -- Sloc points to ENTRY
5208 -- Defining_Identifier (Node1)
5209 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5210 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5211 -- Corresponding_Body (Node5-Sem)
5212 -- Must_Override (Flag14) set if overriding indicator present
5213 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5214
5215 -- Note: overriding indicator is an Ada 2005 feature
5216
5217 -----------------------------
5218 -- 9.5.2 Accept statement --
5219 -----------------------------
5220
5221 -- ACCEPT_STATEMENT ::=
5222 -- accept entry_DIRECT_NAME
5223 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5224 -- HANDLED_SEQUENCE_OF_STATEMENTS
5225 -- end [entry_IDENTIFIER]];
5226
5227 -- Gigi restriction: This node never appears
5228
5229 -- Note: there are no explicit declarations allowed in an accept
5230 -- statement. However, the implicit declarations for any statement
5231 -- identifiers (labels and block/loop identifiers) are declarations
5232 -- that belong logically to the accept statement, and that is why
5233 -- there is a Declarations field in this node.
5234
5235 -- N_Accept_Statement
5236 -- Sloc points to ACCEPT
5237 -- Entry_Direct_Name (Node1)
5238 -- Entry_Index (Node5) (set to Empty if not present)
5239 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5240 -- Handled_Statement_Sequence (Node4)
5241 -- Declarations (List2) (set to No_List if no declarations)
5242
5243 ------------------------
5244 -- 9.5.2 Entry Index --
5245 ------------------------
5246
5247 -- ENTRY_INDEX ::= EXPRESSION
5248
5249 -----------------------
5250 -- 9.5.2 Entry Body --
5251 -----------------------
5252
5253 -- ENTRY_BODY ::=
5254 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5255 -- DECLARATIVE_PART
5256 -- begin
5257 -- HANDLED_SEQUENCE_OF_STATEMENTS
5258 -- end [entry_IDENTIFIER];
5259
5260 -- ENTRY_BARRIER ::= when CONDITION
5261
5262 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5263 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5264 -- too full (it would otherwise have too many fields)
5265
5266 -- Gigi restriction: This node never appears
5267
5268 -- N_Entry_Body
5269 -- Sloc points to ENTRY
5270 -- Defining_Identifier (Node1)
5271 -- Entry_Body_Formal_Part (Node5)
5272 -- Declarations (List2)
5273 -- Handled_Statement_Sequence (Node4)
5274 -- Activation_Chain_Entity (Node3-Sem)
5275
5276 -----------------------------------
5277 -- 9.5.2 Entry Body Formal Part --
5278 -----------------------------------
5279
5280 -- ENTRY_BODY_FORMAL_PART ::=
5281 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5282
5283 -- Note that an entry body formal part node is present even if it is
5284 -- empty. This reflects the grammar, in which it is the components of
5285 -- the entry body formal part that are optional, not the entry body
5286 -- formal part itself. Also this means that the barrier condition
5287 -- always has somewhere to be stored.
5288
5289 -- Gigi restriction: This node never appears
5290
5291 -- N_Entry_Body_Formal_Part
5292 -- Sloc points to first token
5293 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5294 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5295 -- Condition (Node1) from entry barrier of entry body
5296
5297 --------------------------
5298 -- 9.5.2 Entry Barrier --
5299 --------------------------
5300
5301 -- ENTRY_BARRIER ::= when CONDITION
5302
5303 --------------------------------------
5304 -- 9.5.2 Entry Index Specification --
5305 --------------------------------------
5306
5307 -- ENTRY_INDEX_SPECIFICATION ::=
5308 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5309
5310 -- Gigi restriction: This node never appears
5311
5312 -- N_Entry_Index_Specification
5313 -- Sloc points to FOR
5314 -- Defining_Identifier (Node1)
5315 -- Discrete_Subtype_Definition (Node4)
5316
5317 ---------------------------------
5318 -- 9.5.3 Entry Call Statement --
5319 ---------------------------------
5320
5321 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5322
5323 -- The parser may generate a procedure call for this construct. The
5324 -- semantic pass must correct this misidentification where needed.
5325
5326 -- Gigi restriction: This node never appears
5327
5328 -- N_Entry_Call_Statement
5329 -- Sloc points to first token of name
5330 -- Name (Node2)
5331 -- Parameter_Associations (List3) (set to No_List if no
5332 -- actual parameter part)
5333 -- First_Named_Actual (Node4-Sem)
5334
5335 ------------------------------
5336 -- 9.5.4 Requeue Statement --
5337 ------------------------------
5338
5339 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5340
5341 -- Note: requeue statements are not permitted in Ada 83 mode
5342
5343 -- Gigi restriction: This node never appears
5344
5345 -- N_Requeue_Statement
5346 -- Sloc points to REQUEUE
5347 -- Name (Node2)
5348 -- Abort_Present (Flag15)
5349
5350 --------------------------
5351 -- 9.6 Delay Statement --
5352 --------------------------
5353
5354 -- DELAY_STATEMENT ::=
5355 -- DELAY_UNTIL_STATEMENT
5356 -- | DELAY_RELATIVE_STATEMENT
5357
5358 --------------------------------
5359 -- 9.6 Delay Until Statement --
5360 --------------------------------
5361
5362 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5363
5364 -- Note: delay until statements are not permitted in Ada 83 mode
5365
5366 -- Gigi restriction: This node never appears
5367
5368 -- N_Delay_Until_Statement
5369 -- Sloc points to DELAY
5370 -- Expression (Node3)
5371
5372 -----------------------------------
5373 -- 9.6 Delay Relative Statement --
5374 -----------------------------------
5375
5376 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5377
5378 -- Gigi restriction: This node never appears
5379
5380 -- N_Delay_Relative_Statement
5381 -- Sloc points to DELAY
5382 -- Expression (Node3)
5383
5384 ---------------------------
5385 -- 9.7 Select Statement --
5386 ---------------------------
5387
5388 -- SELECT_STATEMENT ::=
5389 -- SELECTIVE_ACCEPT
5390 -- | TIMED_ENTRY_CALL
5391 -- | CONDITIONAL_ENTRY_CALL
5392 -- | ASYNCHRONOUS_SELECT
5393
5394 -----------------------------
5395 -- 9.7.1 Selective Accept --
5396 -----------------------------
5397
5398 -- SELECTIVE_ACCEPT ::=
5399 -- select
5400 -- [GUARD]
5401 -- SELECT_ALTERNATIVE
5402 -- {or
5403 -- [GUARD]
5404 -- SELECT_ALTERNATIVE}
5405 -- [else
5406 -- SEQUENCE_OF_STATEMENTS]
5407 -- end select;
5408
5409 -- Gigi restriction: This node never appears
5410
5411 -- Note: the guard expression, if present, appears in the node for
5412 -- the select alternative.
5413
5414 -- N_Selective_Accept
5415 -- Sloc points to SELECT
5416 -- Select_Alternatives (List1)
5417 -- Else_Statements (List4) (set to No_List if no else part)
5418
5419 ------------------
5420 -- 9.7.1 Guard --
5421 ------------------
5422
5423 -- GUARD ::= when CONDITION =>
5424
5425 -- As noted above, the CONDITION that is part of a GUARD is included
5426 -- in the node for the select alternative for convenience.
5427
5428 -------------------------------
5429 -- 9.7.1 Select Alternative --
5430 -------------------------------
5431
5432 -- SELECT_ALTERNATIVE ::=
5433 -- ACCEPT_ALTERNATIVE
5434 -- | DELAY_ALTERNATIVE
5435 -- | TERMINATE_ALTERNATIVE
5436
5437 -------------------------------
5438 -- 9.7.1 Accept Alternative --
5439 -------------------------------
5440
5441 -- ACCEPT_ALTERNATIVE ::=
5442 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5443
5444 -- Gigi restriction: This node never appears
5445
5446 -- N_Accept_Alternative
5447 -- Sloc points to ACCEPT
5448 -- Accept_Statement (Node2)
5449 -- Condition (Node1) from the guard (set to Empty if no guard present)
5450 -- Statements (List3) (set to Empty_List if no statements)
5451 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5452 -- Accept_Handler_Records (List5-Sem)
5453
5454 ------------------------------
5455 -- 9.7.1 Delay Alternative --
5456 ------------------------------
5457
5458 -- DELAY_ALTERNATIVE ::=
5459 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5460
5461 -- Gigi restriction: This node never appears
5462
5463 -- N_Delay_Alternative
5464 -- Sloc points to DELAY
5465 -- Delay_Statement (Node2)
5466 -- Condition (Node1) from the guard (set to Empty if no guard present)
5467 -- Statements (List3) (set to Empty_List if no statements)
5468 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5469
5470 ----------------------------------
5471 -- 9.7.1 Terminate Alternative --
5472 ----------------------------------
5473
5474 -- TERMINATE_ALTERNATIVE ::= terminate;
5475
5476 -- Gigi restriction: This node never appears
5477
5478 -- N_Terminate_Alternative
5479 -- Sloc points to TERMINATE
5480 -- Condition (Node1) from the guard (set to Empty if no guard present)
5481 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5482 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5483
5484 -----------------------------
5485 -- 9.7.2 Timed Entry Call --
5486 -----------------------------
5487
5488 -- TIMED_ENTRY_CALL ::=
5489 -- select
5490 -- ENTRY_CALL_ALTERNATIVE
5491 -- or
5492 -- DELAY_ALTERNATIVE
5493 -- end select;
5494
5495 -- Gigi restriction: This node never appears
5496
5497 -- N_Timed_Entry_Call
5498 -- Sloc points to SELECT
5499 -- Entry_Call_Alternative (Node1)
5500 -- Delay_Alternative (Node4)
5501
5502 -----------------------------------
5503 -- 9.7.2 Entry Call Alternative --
5504 -----------------------------------
5505
5506 -- ENTRY_CALL_ALTERNATIVE ::=
5507 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5508
5509 -- PROCEDURE_OR_ENTRY_CALL ::=
5510 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5511
5512 -- Gigi restriction: This node never appears
5513
5514 -- N_Entry_Call_Alternative
5515 -- Sloc points to first token of entry call statement
5516 -- Entry_Call_Statement (Node1)
5517 -- Statements (List3) (set to Empty_List if no statements)
5518 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5519
5520 -----------------------------------
5521 -- 9.7.3 Conditional Entry Call --
5522 -----------------------------------
5523
5524 -- CONDITIONAL_ENTRY_CALL ::=
5525 -- select
5526 -- ENTRY_CALL_ALTERNATIVE
5527 -- else
5528 -- SEQUENCE_OF_STATEMENTS
5529 -- end select;
5530
5531 -- Gigi restriction: This node never appears
5532
5533 -- N_Conditional_Entry_Call
5534 -- Sloc points to SELECT
5535 -- Entry_Call_Alternative (Node1)
5536 -- Else_Statements (List4)
5537
5538 --------------------------------
5539 -- 9.7.4 Asynchronous Select --
5540 --------------------------------
5541
5542 -- ASYNCHRONOUS_SELECT ::=
5543 -- select
5544 -- TRIGGERING_ALTERNATIVE
5545 -- then abort
5546 -- ABORTABLE_PART
5547 -- end select;
5548
5549 -- Note: asynchronous select is not permitted in Ada 83 mode
5550
5551 -- Gigi restriction: This node never appears
5552
5553 -- N_Asynchronous_Select
5554 -- Sloc points to SELECT
5555 -- Triggering_Alternative (Node1)
5556 -- Abortable_Part (Node2)
5557
5558 -----------------------------------
5559 -- 9.7.4 Triggering Alternative --
5560 -----------------------------------
5561
5562 -- TRIGGERING_ALTERNATIVE ::=
5563 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5564
5565 -- Gigi restriction: This node never appears
5566
5567 -- N_Triggering_Alternative
5568 -- Sloc points to first token of triggering statement
5569 -- Triggering_Statement (Node1)
5570 -- Statements (List3) (set to Empty_List if no statements)
5571 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5572
5573 ---------------------------------
5574 -- 9.7.4 Triggering Statement --
5575 ---------------------------------
5576
5577 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5578
5579 ---------------------------
5580 -- 9.7.4 Abortable Part --
5581 ---------------------------
5582
5583 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5584
5585 -- Gigi restriction: This node never appears
5586
5587 -- N_Abortable_Part
5588 -- Sloc points to ABORT
5589 -- Statements (List3)
5590
5591 --------------------------
5592 -- 9.8 Abort Statement --
5593 --------------------------
5594
5595 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5596
5597 -- Gigi restriction: This node never appears
5598
5599 -- N_Abort_Statement
5600 -- Sloc points to ABORT
5601 -- Names (List2)
5602
5603 -------------------------
5604 -- 10.1.1 Compilation --
5605 -------------------------
5606
5607 -- COMPILATION ::= {COMPILATION_UNIT}
5608
5609 -- There is no explicit node in the tree for a compilation, since in
5610 -- general the compiler is processing only a single compilation unit
5611 -- at a time. It is possible to parse multiple units in syntax check
5612 -- only mode, but the trees are discarded in that case.
5613
5614 ------------------------------
5615 -- 10.1.1 Compilation Unit --
5616 ------------------------------
5617
5618 -- COMPILATION_UNIT ::=
5619 -- CONTEXT_CLAUSE LIBRARY_ITEM
5620 -- | CONTEXT_CLAUSE SUBUNIT
5621
5622 -- The N_Compilation_Unit node itself represents the above syntax.
5623 -- However, there are two additional items not reflected in the above
5624 -- syntax. First we have the global declarations that are added by the
5625 -- code generator. These are outer level declarations (so they cannot
5626 -- be represented as being inside the units). An example is the wrapper
5627 -- subprograms that are created to do ABE checking. As always a list of
5628 -- declarations can contain actions as well (i.e. statements), and such
5629 -- statements are executed as part of the elaboration of the unit. Note
5630 -- that all such declarations are elaborated before the library unit.
5631
5632 -- Similarly, certain actions need to be elaborated at the completion
5633 -- of elaboration of the library unit (notably the statement that sets
5634 -- the Boolean flag indicating that elaboration is complete).
5635
5636 -- The third item not reflected in the syntax is pragmas that appear
5637 -- after the compilation unit. As always pragmas are a problem since
5638 -- they are not part of the formal syntax, but can be stuck into the
5639 -- source following a set of ad hoc rules, and we have to find an ad
5640 -- hoc way of sticking them into the tree. For pragmas that appear
5641 -- before the library unit, we just consider them to be part of the
5642 -- context clause, and pragmas can appear in the Context_Items list
5643 -- of the compilation unit. However, pragmas can also appear after
5644 -- the library item.
5645
5646 -- To deal with all these problems, we create an auxiliary node for
5647 -- a compilation unit, referenced from the N_Compilation_Unit node,
5648 -- that contains these items.
5649
5650 -- N_Compilation_Unit
5651 -- Sloc points to first token of defining unit name
5652 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5653 -- Context_Items (List1) context items and pragmas preceding unit
5654 -- Private_Present (Flag15) set if library unit has private keyword
5655 -- Unit (Node2) library item or subunit
5656 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5657 -- Has_No_Elaboration_Code (Flag17-Sem)
5658 -- Body_Required (Flag13-Sem) set for spec if body is required
5659 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5660 -- Context_Pending (Flag16-Sem)
5661 -- First_Inlined_Subprogram (Node3-Sem)
5662 -- Has_Pragma_Suppress_All (Flag14-Sem)
5663
5664 -- N_Compilation_Unit_Aux
5665 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5666 -- Declarations (List2) (set to No_List if no global declarations)
5667 -- Actions (List1) (set to No_List if no actions)
5668 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5669 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5670 -- Default_Storage_Pool (Node3-Sem)
5671
5672 --------------------------
5673 -- 10.1.1 Library Item --
5674 --------------------------
5675
5676 -- LIBRARY_ITEM ::=
5677 -- [private] LIBRARY_UNIT_DECLARATION
5678 -- | LIBRARY_UNIT_BODY
5679 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5680
5681 -- Note: PRIVATE is not allowed in Ada 83 mode
5682
5683 -- There is no explicit node in the tree for library item, instead
5684 -- the declaration or body, and the flag for private if present,
5685 -- appear in the N_Compilation_Unit node.
5686
5687 --------------------------------------
5688 -- 10.1.1 Library Unit Declaration --
5689 --------------------------------------
5690
5691 -- LIBRARY_UNIT_DECLARATION ::=
5692 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5693 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5694
5695 -----------------------------------------------
5696 -- 10.1.1 Library Unit Renaming Declaration --
5697 -----------------------------------------------
5698
5699 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5700 -- PACKAGE_RENAMING_DECLARATION
5701 -- | GENERIC_RENAMING_DECLARATION
5702 -- | SUBPROGRAM_RENAMING_DECLARATION
5703
5704 -------------------------------
5705 -- 10.1.1 Library unit body --
5706 -------------------------------
5707
5708 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5709
5710 ------------------------------
5711 -- 10.1.1 Parent Unit Name --
5712 ------------------------------
5713
5714 -- PARENT_UNIT_NAME ::= NAME
5715
5716 ----------------------------
5717 -- 10.1.2 Context clause --
5718 ----------------------------
5719
5720 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5721
5722 -- The context clause can include pragmas, and any pragmas that appear
5723 -- before the context clause proper (i.e. all configuration pragmas,
5724 -- also appear at the front of this list).
5725
5726 --------------------------
5727 -- 10.1.2 Context_Item --
5728 --------------------------
5729
5730 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5731
5732 -------------------------
5733 -- 10.1.2 With clause --
5734 -------------------------
5735
5736 -- WITH_CLAUSE ::=
5737 -- with library_unit_NAME {,library_unit_NAME};
5738
5739 -- A separate With clause is built for each name, so that we have
5740 -- a Corresponding_Spec field for each with'ed spec. The flags
5741 -- First_Name and Last_Name are used to reconstruct the exact
5742 -- source form. When a list of names appears in one with clause,
5743 -- the first name in the list has First_Name set, and the last
5744 -- has Last_Name set. If the with clause has only one name, then
5745 -- both of the flags First_Name and Last_Name are set in this name.
5746
5747 -- Note: in the case of implicit with's that are installed by the
5748 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5749 -- set to Standard_Location, but it is incorrect to test the Sloc
5750 -- to find out if a with clause is implicit, test the flag instead.
5751
5752 -- N_With_Clause
5753 -- Sloc points to first token of library unit name
5754 -- Withed_Body (Node1-Sem)
5755 -- Name (Node2)
5756 -- Next_Implicit_With (Node3-Sem)
5757 -- Library_Unit (Node4-Sem)
5758 -- Corresponding_Spec (Node5-Sem)
5759 -- First_Name (Flag5) (set to True if first name or only one name)
5760 -- Last_Name (Flag6) (set to True if last name or only one name)
5761 -- Context_Installed (Flag13-Sem)
5762 -- Elaborate_Present (Flag4-Sem)
5763 -- Elaborate_All_Present (Flag14-Sem)
5764 -- Elaborate_All_Desirable (Flag9-Sem)
5765 -- Elaborate_Desirable (Flag11-Sem)
5766 -- Private_Present (Flag15) set if with_clause has private keyword
5767 -- Implicit_With (Flag16-Sem)
5768 -- Limited_Present (Flag17) set if LIMITED is present
5769 -- Limited_View_Installed (Flag18-Sem)
5770 -- Unreferenced_In_Spec (Flag7-Sem)
5771 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5772
5773 -- Note: Limited_Present and Limited_View_Installed give support to
5774 -- Ada 2005 (AI-50217).
5775 -- Similarly, Private_Present gives support to AI-50262.
5776
5777 ----------------------
5778 -- With_Type clause --
5779 ----------------------
5780
5781 -- This is a GNAT extension, used to implement mutually recursive
5782 -- types declared in different packages.
5783 -- Note: this is now obsolete. The functionality of this construct
5784 -- is now implemented by the Ada 2005 Limited_with_Clause.
5785
5786 ---------------------
5787 -- 10.2 Body stub --
5788 ---------------------
5789
5790 -- BODY_STUB ::=
5791 -- SUBPROGRAM_BODY_STUB
5792 -- | PACKAGE_BODY_STUB
5793 -- | TASK_BODY_STUB
5794 -- | PROTECTED_BODY_STUB
5795
5796 ----------------------------------
5797 -- 10.1.3 Subprogram Body Stub --
5798 ----------------------------------
5799
5800 -- SUBPROGRAM_BODY_STUB ::=
5801 -- SUBPROGRAM_SPECIFICATION is separate;
5802
5803 -- N_Subprogram_Body_Stub
5804 -- Sloc points to FUNCTION or PROCEDURE
5805 -- Specification (Node1)
5806 -- Library_Unit (Node4-Sem) points to the subunit
5807 -- Corresponding_Body (Node5-Sem)
5808
5809 -------------------------------
5810 -- 10.1.3 Package Body Stub --
5811 -------------------------------
5812
5813 -- PACKAGE_BODY_STUB ::=
5814 -- package body DEFINING_IDENTIFIER is separate;
5815
5816 -- N_Package_Body_Stub
5817 -- Sloc points to PACKAGE
5818 -- Defining_Identifier (Node1)
5819 -- Library_Unit (Node4-Sem) points to the subunit
5820 -- Corresponding_Body (Node5-Sem)
5821
5822 ----------------------------
5823 -- 10.1.3 Task Body Stub --
5824 ----------------------------
5825
5826 -- TASK_BODY_STUB ::=
5827 -- task body DEFINING_IDENTIFIER is separate;
5828
5829 -- N_Task_Body_Stub
5830 -- Sloc points to TASK
5831 -- Defining_Identifier (Node1)
5832 -- Library_Unit (Node4-Sem) points to the subunit
5833 -- Corresponding_Body (Node5-Sem)
5834
5835 ---------------------------------
5836 -- 10.1.3 Protected Body Stub --
5837 ---------------------------------
5838
5839 -- PROTECTED_BODY_STUB ::=
5840 -- protected body DEFINING_IDENTIFIER is separate;
5841
5842 -- Note: protected body stubs are not allowed in Ada 83 mode
5843
5844 -- N_Protected_Body_Stub
5845 -- Sloc points to PROTECTED
5846 -- Defining_Identifier (Node1)
5847 -- Library_Unit (Node4-Sem) points to the subunit
5848 -- Corresponding_Body (Node5-Sem)
5849
5850 ---------------------
5851 -- 10.1.3 Subunit --
5852 ---------------------
5853
5854 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5855
5856 -- N_Subunit
5857 -- Sloc points to SEPARATE
5858 -- Name (Node2) is the name of the parent unit
5859 -- Proper_Body (Node1) is the subunit body
5860 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5861
5862 ---------------------------------
5863 -- 11.1 Exception Declaration --
5864 ---------------------------------
5865
5866 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
5867 -- [ASPECT_SPECIFICATIONS];
5868
5869 -- For consistency with object declarations etc., the parser converts
5870 -- the case of multiple identifiers being declared to a series of
5871 -- declarations in which the expression is copied, using the More_Ids
5872 -- and Prev_Ids flags to remember the source form as described in the
5873 -- section on "Handling of Defining Identifier Lists".
5874
5875 -- N_Exception_Declaration
5876 -- Sloc points to EXCEPTION
5877 -- Defining_Identifier (Node1)
5878 -- Expression (Node3-Sem)
5879 -- Renaming_Exception (Node2-Sem)
5880 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5881 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5882
5883 ------------------------------------------
5884 -- 11.2 Handled Sequence Of Statements --
5885 ------------------------------------------
5886
5887 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5888 -- SEQUENCE_OF_STATEMENTS
5889 -- [exception
5890 -- EXCEPTION_HANDLER
5891 -- {EXCEPTION_HANDLER}]
5892 -- [at end
5893 -- cleanup_procedure_call (param, param, param, ...);]
5894
5895 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5896 -- used only internally currently, but is considered to be syntactic.
5897 -- At the moment, the only cleanup action allowed is a single call to
5898 -- a parameterless procedure, and the Identifier field of the node is
5899 -- the procedure to be called. Also there is a current restriction
5900 -- that exception handles and a cleanup cannot be present in the same
5901 -- frame, so at least one of Exception_Handlers or the Identifier must
5902 -- be missing.
5903
5904 -- Actually, more accurately, this restriction applies to the original
5905 -- source program. In the expanded tree, if the At_End_Proc field is
5906 -- present, then there will also be an exception handler of the form:
5907
5908 -- when all others =>
5909 -- cleanup;
5910 -- raise;
5911
5912 -- where cleanup is the procedure to be generated. The reason we do
5913 -- this is so that the front end can handle the necessary entries in
5914 -- the exception tables, and other exception handler actions required
5915 -- as part of the normal handling for exception handlers.
5916
5917 -- The AT END cleanup handler protects only the sequence of statements
5918 -- (not the associated declarations of the parent), just like exception
5919 -- handlers. The big difference is that the cleanup procedure is called
5920 -- on either a normal or an abnormal exit from the statement sequence.
5921
5922 -- Note: the list of Exception_Handlers can contain pragmas as well
5923 -- as actual handlers. In practice these pragmas can only occur at
5924 -- the start of the list, since any pragmas occurring later on will
5925 -- be included in the statement list of the corresponding handler.
5926
5927 -- Note: although in the Ada syntax, the sequence of statements in
5928 -- a handled sequence of statements can only contain statements, we
5929 -- allow free mixing of declarations and statements in the resulting
5930 -- expanded tree. This is for example used to deal with the case of
5931 -- a cleanup procedure that must handle declarations as well as the
5932 -- statements of a block.
5933
5934 -- N_Handled_Sequence_Of_Statements
5935 -- Sloc points to first token of first statement
5936 -- Statements (List3)
5937 -- End_Label (Node4) (set to Empty if expander generated)
5938 -- Exception_Handlers (List5) (set to No_List if none present)
5939 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5940 -- First_Real_Statement (Node2-Sem)
5941 -- Zero_Cost_Handling (Flag5-Sem)
5942
5943 -- Note: the parent always contains a Declarations field which contains
5944 -- declarations associated with the handled sequence of statements. This
5945 -- is true even in the case of an accept statement (see description of
5946 -- the N_Accept_Statement node).
5947
5948 -- End_Label refers to the containing construct
5949
5950 -----------------------------
5951 -- 11.2 Exception Handler --
5952 -----------------------------
5953
5954 -- EXCEPTION_HANDLER ::=
5955 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5956 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5957 -- SEQUENCE_OF_STATEMENTS
5958
5959 -- Note: choice parameter specification is not allowed in Ada 83 mode
5960
5961 -- N_Exception_Handler
5962 -- Sloc points to WHEN
5963 -- Choice_Parameter (Node2) (set to Empty if not present)
5964 -- Exception_Choices (List4)
5965 -- Statements (List3)
5966 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5967 -- Zero_Cost_Handling (Flag5-Sem)
5968 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5969 -- Local_Raise_Not_OK (Flag7-Sem)
5970 -- Has_Local_Raise (Flag8-Sem)
5971
5972 ------------------------------------------
5973 -- 11.2 Choice parameter specification --
5974 ------------------------------------------
5975
5976 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5977
5978 ----------------------------
5979 -- 11.2 Exception Choice --
5980 ----------------------------
5981
5982 -- EXCEPTION_CHOICE ::= exception_NAME | others
5983
5984 -- Except in the case of OTHERS, no explicit node appears in the tree
5985 -- for exception choice. Instead the exception name appears directly.
5986 -- An OTHERS choice is represented by a N_Others_Choice node (see
5987 -- section 3.8.1.
5988
5989 -- Note: for the exception choice created for an at end handler, the
5990 -- exception choice is an N_Others_Choice node with All_Others set.
5991
5992 ---------------------------
5993 -- 11.3 Raise Statement --
5994 ---------------------------
5995
5996 -- RAISE_STATEMENT ::= raise [exception_NAME];
5997
5998 -- In Ada 2005, we have
5999
6000 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
6001
6002 -- N_Raise_Statement
6003 -- Sloc points to RAISE
6004 -- Name (Node2) (set to Empty if no exception name present)
6005 -- Expression (Node3) (set to Empty if no expression present)
6006 -- From_At_End (Flag4-Sem)
6007
6008 -------------------------------
6009 -- 12.1 Generic Declaration --
6010 -------------------------------
6011
6012 -- GENERIC_DECLARATION ::=
6013 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6014
6015 ------------------------------------------
6016 -- 12.1 Generic Subprogram Declaration --
6017 ------------------------------------------
6018
6019 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6020 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
6021
6022 -- Note: Generic_Formal_Declarations can include pragmas
6023
6024 -- N_Generic_Subprogram_Declaration
6025 -- Sloc points to GENERIC
6026 -- Specification (Node1) subprogram specification
6027 -- Corresponding_Body (Node5-Sem)
6028 -- Generic_Formal_Declarations (List2) from generic formal part
6029 -- Parent_Spec (Node4-Sem)
6030
6031 ---------------------------------------
6032 -- 12.1 Generic Package Declaration --
6033 ---------------------------------------
6034
6035 -- GENERIC_PACKAGE_DECLARATION ::=
6036 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6037 -- [ASPECT_SPECIFICATIONS];
6038
6039 -- Note: when we do generics right, the Activation_Chain_Entity entry
6040 -- for this node can be removed (since the expander won't see generic
6041 -- units any more)???.
6042
6043 -- Note: Generic_Formal_Declarations can include pragmas
6044
6045 -- N_Generic_Package_Declaration
6046 -- Sloc points to GENERIC
6047 -- Specification (Node1) package specification
6048 -- Corresponding_Body (Node5-Sem)
6049 -- Generic_Formal_Declarations (List2) from generic formal part
6050 -- Parent_Spec (Node4-Sem)
6051 -- Activation_Chain_Entity (Node3-Sem)
6052
6053 -------------------------------
6054 -- 12.1 Generic Formal Part --
6055 -------------------------------
6056
6057 -- GENERIC_FORMAL_PART ::=
6058 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6059
6060 ------------------------------------------------
6061 -- 12.1 Generic Formal Parameter Declaration --
6062 ------------------------------------------------
6063
6064 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6065 -- FORMAL_OBJECT_DECLARATION
6066 -- | FORMAL_TYPE_DECLARATION
6067 -- | FORMAL_SUBPROGRAM_DECLARATION
6068 -- | FORMAL_PACKAGE_DECLARATION
6069
6070 ---------------------------------
6071 -- 12.3 Generic Instantiation --
6072 ---------------------------------
6073
6074 -- GENERIC_INSTANTIATION ::=
6075 -- package DEFINING_PROGRAM_UNIT_NAME is
6076 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6077 -- [ASPECT_SPECIFICATIONS];
6078 -- | [[not] overriding]
6079 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6080 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6081 -- [ASPECT_SPECIFICATIONS];
6082 -- | [[not] overriding]
6083 -- function DEFINING_DESIGNATOR is
6084 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6085 -- [ASPECT_SPECIFICATIONS];
6086
6087 -- N_Package_Instantiation
6088 -- Sloc points to PACKAGE
6089 -- Defining_Unit_Name (Node1)
6090 -- Name (Node2)
6091 -- Generic_Associations (List3) (set to No_List if no
6092 -- generic actual part)
6093 -- Parent_Spec (Node4-Sem)
6094 -- Instance_Spec (Node5-Sem)
6095 -- ABE_Is_Certain (Flag18-Sem)
6096
6097 -- N_Procedure_Instantiation
6098 -- Sloc points to PROCEDURE
6099 -- Defining_Unit_Name (Node1)
6100 -- Name (Node2)
6101 -- Parent_Spec (Node4-Sem)
6102 -- Generic_Associations (List3) (set to No_List if no
6103 -- generic actual part)
6104 -- Instance_Spec (Node5-Sem)
6105 -- Must_Override (Flag14) set if overriding indicator present
6106 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6107 -- ABE_Is_Certain (Flag18-Sem)
6108
6109 -- N_Function_Instantiation
6110 -- Sloc points to FUNCTION
6111 -- Defining_Unit_Name (Node1)
6112 -- Name (Node2)
6113 -- Generic_Associations (List3) (set to No_List if no
6114 -- generic actual part)
6115 -- Parent_Spec (Node4-Sem)
6116 -- Instance_Spec (Node5-Sem)
6117 -- Must_Override (Flag14) set if overriding indicator present
6118 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6119 -- ABE_Is_Certain (Flag18-Sem)
6120
6121 -- Note: overriding indicator is an Ada 2005 feature
6122
6123 -------------------------------
6124 -- 12.3 Generic Actual Part --
6125 -------------------------------
6126
6127 -- GENERIC_ACTUAL_PART ::=
6128 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6129
6130 -------------------------------
6131 -- 12.3 Generic Association --
6132 -------------------------------
6133
6134 -- GENERIC_ASSOCIATION ::=
6135 -- [generic_formal_parameter_SELECTOR_NAME =>]
6136
6137 -- Note: unlike the procedure call case, a generic association node
6138 -- is generated for every association, even if no formal parameter
6139 -- selector name is present. In this case the parser will leave the
6140 -- Selector_Name field set to Empty, to be filled in later by the
6141 -- semantic pass.
6142
6143 -- In Ada 2005, a formal may be associated with a box, if the
6144 -- association is part of the list of actuals for a formal package.
6145 -- If the association is given by OTHERS => <>, the association is
6146 -- an N_Others_Choice.
6147
6148 -- N_Generic_Association
6149 -- Sloc points to first token of generic association
6150 -- Selector_Name (Node2) (set to Empty if no formal
6151 -- parameter selector name)
6152 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6153 -- Box_Present (Flag15) (for formal_package associations with a box)
6154
6155 ---------------------------------------------
6156 -- 12.3 Explicit Generic Actual Parameter --
6157 ---------------------------------------------
6158
6159 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6160 -- EXPRESSION | variable_NAME | subprogram_NAME
6161 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6162
6163 -------------------------------------
6164 -- 12.4 Formal Object Declaration --
6165 -------------------------------------
6166
6167 -- FORMAL_OBJECT_DECLARATION ::=
6168 -- DEFINING_IDENTIFIER_LIST :
6169 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6170 -- [ASPECT_SPECIFICATIONS];
6171 -- | DEFINING_IDENTIFIER_LIST :
6172 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6173 -- [ASPECT_SPECIFICATIONS];
6174
6175 -- Although the syntax allows multiple identifiers in the list, the
6176 -- semantics is as though successive declarations were given with
6177 -- identical type definition and expression components. To simplify
6178 -- semantic processing, the parser represents a multiple declaration
6179 -- case as a sequence of single declarations, using the More_Ids and
6180 -- Prev_Ids flags to preserve the original source form as described
6181 -- in the section on "Handling of Defining Identifier Lists".
6182
6183 -- N_Formal_Object_Declaration
6184 -- Sloc points to first identifier
6185 -- Defining_Identifier (Node1)
6186 -- In_Present (Flag15)
6187 -- Out_Present (Flag17)
6188 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6189 -- Subtype_Mark (Node4) (set to Empty if not present)
6190 -- Access_Definition (Node3) (set to Empty if not present)
6191 -- Default_Expression (Node5) (set to Empty if no default expression)
6192 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6193 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6194
6195 -----------------------------------
6196 -- 12.5 Formal Type Declaration --
6197 -----------------------------------
6198
6199 -- FORMAL_TYPE_DECLARATION ::=
6200 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6201 -- is FORMAL_TYPE_DEFINITION
6202 -- [ASPECT_SPECIFICATIONS];
6203
6204 -- N_Formal_Type_Declaration
6205 -- Sloc points to TYPE
6206 -- Defining_Identifier (Node1)
6207 -- Formal_Type_Definition (Node3)
6208 -- Discriminant_Specifications (List4) (set to No_List if no
6209 -- discriminant part)
6210 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6211
6212 ----------------------------------
6213 -- 12.5 Formal type definition --
6214 ----------------------------------
6215
6216 -- FORMAL_TYPE_DEFINITION ::=
6217 -- FORMAL_PRIVATE_TYPE_DEFINITION
6218 -- | FORMAL_DERIVED_TYPE_DEFINITION
6219 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6220 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6221 -- | FORMAL_MODULAR_TYPE_DEFINITION
6222 -- | FORMAL_FLOATING_POINT_DEFINITION
6223 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6224 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6225 -- | FORMAL_ARRAY_TYPE_DEFINITION
6226 -- | FORMAL_ACCESS_TYPE_DEFINITION
6227 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6228
6229 ---------------------------------------------
6230 -- 12.5.1 Formal Private Type Definition --
6231 ---------------------------------------------
6232
6233 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6234 -- [[abstract] tagged] [limited] private
6235
6236 -- Note: TAGGED is not allowed in Ada 83 mode
6237
6238 -- N_Formal_Private_Type_Definition
6239 -- Sloc points to PRIVATE
6240 -- Abstract_Present (Flag4)
6241 -- Tagged_Present (Flag15)
6242 -- Limited_Present (Flag17)
6243
6244 --------------------------------------------
6245 -- 12.5.1 Formal Derived Type Definition --
6246 --------------------------------------------
6247
6248 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6249 -- [abstract] [limited | synchronized]
6250 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6251 -- Note: this construct is not allowed in Ada 83 mode
6252
6253 -- N_Formal_Derived_Type_Definition
6254 -- Sloc points to NEW
6255 -- Subtype_Mark (Node4)
6256 -- Private_Present (Flag15)
6257 -- Abstract_Present (Flag4)
6258 -- Limited_Present (Flag17)
6259 -- Synchronized_Present (Flag7)
6260 -- Interface_List (List2) (set to No_List if none)
6261
6262 ---------------------------------------------
6263 -- 12.5.2 Formal Discrete Type Definition --
6264 ---------------------------------------------
6265
6266 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6267
6268 -- N_Formal_Discrete_Type_Definition
6269 -- Sloc points to (
6270
6271 ---------------------------------------------------
6272 -- 12.5.2 Formal Signed Integer Type Definition --
6273 ---------------------------------------------------
6274
6275 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6276
6277 -- N_Formal_Signed_Integer_Type_Definition
6278 -- Sloc points to RANGE
6279
6280 --------------------------------------------
6281 -- 12.5.2 Formal Modular Type Definition --
6282 --------------------------------------------
6283
6284 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6285
6286 -- N_Formal_Modular_Type_Definition
6287 -- Sloc points to MOD
6288
6289 ----------------------------------------------
6290 -- 12.5.2 Formal Floating Point Definition --
6291 ----------------------------------------------
6292
6293 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6294
6295 -- N_Formal_Floating_Point_Definition
6296 -- Sloc points to DIGITS
6297
6298 ----------------------------------------------------
6299 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6300 ----------------------------------------------------
6301
6302 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6303
6304 -- N_Formal_Ordinary_Fixed_Point_Definition
6305 -- Sloc points to DELTA
6306
6307 ---------------------------------------------------
6308 -- 12.5.2 Formal Decimal Fixed Point Definition --
6309 ---------------------------------------------------
6310
6311 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6312
6313 -- Note: formal decimal fixed point definition not allowed in Ada 83
6314
6315 -- N_Formal_Decimal_Fixed_Point_Definition
6316 -- Sloc points to DELTA
6317
6318 ------------------------------------------
6319 -- 12.5.3 Formal Array Type Definition --
6320 ------------------------------------------
6321
6322 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6323
6324 -------------------------------------------
6325 -- 12.5.4 Formal Access Type Definition --
6326 -------------------------------------------
6327
6328 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6329
6330 ----------------------------------------------
6331 -- 12.5.5 Formal Interface Type Definition --
6332 ----------------------------------------------
6333
6334 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6335
6336 -----------------------------------------
6337 -- 12.6 Formal Subprogram Declaration --
6338 -----------------------------------------
6339
6340 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6341 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6342 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6343
6344 --------------------------------------------------
6345 -- 12.6 Formal Concrete Subprogram Declaration --
6346 --------------------------------------------------
6347
6348 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6349 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6350 -- [ASPECT_SPECIFICATIONS];
6351
6352 -- N_Formal_Concrete_Subprogram_Declaration
6353 -- Sloc points to WITH
6354 -- Specification (Node1)
6355 -- Default_Name (Node2) (set to Empty if no subprogram default)
6356 -- Box_Present (Flag15)
6357
6358 -- Note: if no subprogram default is present, then Name is set
6359 -- to Empty, and Box_Present is False.
6360
6361 --------------------------------------------------
6362 -- 12.6 Formal Abstract Subprogram Declaration --
6363 --------------------------------------------------
6364
6365 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6366 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6367 -- [ASPECT_SPECIFICATIONS];
6368
6369 -- N_Formal_Abstract_Subprogram_Declaration
6370 -- Sloc points to WITH
6371 -- Specification (Node1)
6372 -- Default_Name (Node2) (set to Empty if no subprogram default)
6373 -- Box_Present (Flag15)
6374
6375 -- Note: if no subprogram default is present, then Name is set
6376 -- to Empty, and Box_Present is False.
6377
6378 ------------------------------
6379 -- 12.6 Subprogram Default --
6380 ------------------------------
6381
6382 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6383
6384 -- There is no separate node in the tree for a subprogram default.
6385 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6386 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6387 -- default name or box indication, as needed.
6388
6389 ------------------------
6390 -- 12.6 Default Name --
6391 ------------------------
6392
6393 -- DEFAULT_NAME ::= NAME
6394
6395 --------------------------------------
6396 -- 12.7 Formal Package Declaration --
6397 --------------------------------------
6398
6399 -- FORMAL_PACKAGE_DECLARATION ::=
6400 -- with package DEFINING_IDENTIFIER
6401 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6402 -- [ASPECT_SPECIFICATIONS];
6403
6404 -- Note: formal package declarations not allowed in Ada 83 mode
6405
6406 -- N_Formal_Package_Declaration
6407 -- Sloc points to WITH
6408 -- Defining_Identifier (Node1)
6409 -- Name (Node2)
6410 -- Generic_Associations (List3) (set to No_List if (<>) case or
6411 -- empty generic actual part)
6412 -- Box_Present (Flag15)
6413 -- Instance_Spec (Node5-Sem)
6414 -- ABE_Is_Certain (Flag18-Sem)
6415
6416 --------------------------------------
6417 -- 12.7 Formal Package Actual Part --
6418 --------------------------------------
6419
6420 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6421 -- ([OTHERS] => <>)
6422 -- | [GENERIC_ACTUAL_PART]
6423 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6424
6425 -- FORMAL_PACKAGE_ASSOCIATION ::=
6426 -- GENERIC_ASSOCIATION
6427 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6428
6429 -- There is no explicit node in the tree for a formal package actual
6430 -- part. Instead the information appears in the parent node (i.e. the
6431 -- formal package declaration node itself).
6432
6433 -- There is no explicit node for a formal package association. All of
6434 -- them are represented either by a generic association, possibly with
6435 -- Box_Present, or by an N_Others_Choice.
6436
6437 ---------------------------------
6438 -- 13.1 Representation clause --
6439 ---------------------------------
6440
6441 -- REPRESENTATION_CLAUSE ::=
6442 -- ATTRIBUTE_DEFINITION_CLAUSE
6443 -- | ENUMERATION_REPRESENTATION_CLAUSE
6444 -- | RECORD_REPRESENTATION_CLAUSE
6445 -- | AT_CLAUSE
6446
6447 ----------------------
6448 -- 13.1 Local Name --
6449 ----------------------
6450
6451 -- LOCAL_NAME :=
6452 -- DIRECT_NAME
6453 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6454 -- | library_unit_NAME
6455
6456 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6457 -- as an attribute reference, which has essentially the same form.
6458
6459 ---------------------------------------
6460 -- 13.3 Attribute definition clause --
6461 ---------------------------------------
6462
6463 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6464 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6465 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6466
6467 -- In Ada 83, the expression must be a simple expression and the
6468 -- local name must be a direct name.
6469
6470 -- Note: the only attribute definition clause that is processed by
6471 -- gigi is an address clause. For all other cases, the information
6472 -- is extracted by the front end and either results in setting entity
6473 -- information, e.g. Esize for the Size clause, or in appropriate
6474 -- expansion actions (e.g. in the case of Storage_Size).
6475
6476 -- For an address clause, Gigi constructs the appropriate addressing
6477 -- code. It also ensures that no aliasing optimizations are made
6478 -- for the object for which the address clause appears.
6479
6480 -- Note: for an address clause used to achieve an overlay:
6481
6482 -- A : Integer;
6483 -- B : Integer;
6484 -- for B'Address use A'Address;
6485
6486 -- the above rule means that Gigi will ensure that no optimizations
6487 -- will be made for B that would violate the implementation advice
6488 -- of RM 13.3(19). However, this advice applies only to B and not
6489 -- to A, which seems unfortunate. The GNAT front end will mark the
6490 -- object A as volatile to also prevent unwanted optimization
6491 -- assumptions based on no aliasing being made for B.
6492
6493 -- N_Attribute_Definition_Clause
6494 -- Sloc points to FOR
6495 -- Name (Node2) the local name
6496 -- Chars (Name1) the identifier name from the attribute designator
6497 -- Expression (Node3) the expression or name
6498 -- Entity (Node4-Sem)
6499 -- Next_Rep_Item (Node5-Sem)
6500 -- From_At_Mod (Flag4-Sem)
6501 -- Check_Address_Alignment (Flag11-Sem)
6502 -- From_Aspect_Specification (Flag13-Sem)
6503 -- Is_Delayed_Aspect (Flag14-Sem)
6504 -- Address_Warning_Posted (Flag18-Sem)
6505
6506 -- Note: if From_Aspect_Specification is set, then Sloc points to the
6507 -- aspect name, and Entity is resolved already to reference the entity
6508 -- to which the aspect applies.
6509
6510 -----------------------------------
6511 -- 13.3.1 Aspect Specifications --
6512 -----------------------------------
6513
6514 -- We modify the RM grammar here, the RM grammar is:
6515
6516 -- ASPECT_SPECIFICATION ::=
6517 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {.
6518 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
6519
6520 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6521
6522 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6523
6524 -- That's inconvenient, since there is no non-terminal name for a single
6525 -- entry in the list of aspects. So we use this grammar instead:
6526
6527 -- ASPECT_SPECIFICATIONS ::=
6528 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
6529
6530 -- ASPECT_SPECIFICATION =>
6531 -- ASPECT_MARK [=> ASPECT_DEFINITION]
6532
6533 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6534
6535 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6536
6537 -- See separate package Aspects for details on the incorporation of
6538 -- these nodes into the tree, and how aspect specifications for a given
6539 -- declaration node are associated with that node.
6540
6541 -- N_Aspect_Specification
6542 -- Sloc points to aspect identifier
6543 -- Identifier (Node1) aspect identifier
6544 -- Aspect_Rep_Item (Node2-Sem)
6545 -- Expression (Node3) Aspect_Definition (set to Empty if none)
6546 -- Entity (Node4-Sem) entity to which the aspect applies
6547 -- Class_Present (Flag6) Set if 'Class present
6548 -- Next_Rep_Item (Node5-Sem)
6549 -- Split_PPC (Flag17) Set if split pre/post attribute
6550 -- Is_Boolean_Aspect (Flag16-Sem)
6551
6552 -- Note: Aspect_Specification is an Ada 2012 feature
6553
6554 -- Note: When a Pre or Post aspect specification is processed, it is
6555 -- broken into AND THEN sections. The left most section has Split_PPC
6556 -- set to False, indicating that it is the original specification (e.g.
6557 -- for posting errors). For the other sections, Split_PPC is set True.
6558
6559 ---------------------------------------------
6560 -- 13.4 Enumeration representation clause --
6561 ---------------------------------------------
6562
6563 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6564 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6565
6566 -- In Ada 83, the name must be a direct name
6567
6568 -- N_Enumeration_Representation_Clause
6569 -- Sloc points to FOR
6570 -- Identifier (Node1) direct name
6571 -- Array_Aggregate (Node3)
6572 -- Next_Rep_Item (Node5-Sem)
6573
6574 ---------------------------------
6575 -- 13.4 Enumeration aggregate --
6576 ---------------------------------
6577
6578 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6579
6580 ------------------------------------------
6581 -- 13.5.1 Record representation clause --
6582 ------------------------------------------
6583
6584 -- RECORD_REPRESENTATION_CLAUSE ::=
6585 -- for first_subtype_LOCAL_NAME use
6586 -- record [MOD_CLAUSE]
6587 -- {COMPONENT_CLAUSE}
6588 -- end record;
6589
6590 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6591 -- replaced by a corresponding Alignment attribute definition clause).
6592
6593 -- Note: Component_Clauses can include pragmas
6594
6595 -- N_Record_Representation_Clause
6596 -- Sloc points to FOR
6597 -- Identifier (Node1) direct name
6598 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6599 -- Component_Clauses (List3)
6600 -- Next_Rep_Item (Node5-Sem)
6601
6602 ------------------------------
6603 -- 13.5.1 Component clause --
6604 ------------------------------
6605
6606 -- COMPONENT_CLAUSE ::=
6607 -- component_LOCAL_NAME at POSITION
6608 -- range FIRST_BIT .. LAST_BIT;
6609
6610 -- N_Component_Clause
6611 -- Sloc points to AT
6612 -- Component_Name (Node1) points to Name or Attribute_Reference
6613 -- Position (Node2)
6614 -- First_Bit (Node3)
6615 -- Last_Bit (Node4)
6616
6617 ----------------------
6618 -- 13.5.1 Position --
6619 ----------------------
6620
6621 -- POSITION ::= static_EXPRESSION
6622
6623 -----------------------
6624 -- 13.5.1 First_Bit --
6625 -----------------------
6626
6627 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6628
6629 ----------------------
6630 -- 13.5.1 Last_Bit --
6631 ----------------------
6632
6633 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6634
6635 --------------------------
6636 -- 13.8 Code statement --
6637 --------------------------
6638
6639 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6640
6641 -- Note: in GNAT, the qualified expression has the form
6642
6643 -- Asm_Insn'(Asm (...));
6644
6645 -- See package System.Machine_Code in file s-maccod.ads for details on
6646 -- the allowed parameters to Asm. There are two ways this node can
6647 -- arise, as a code statement, in which case the expression is the
6648 -- qualified expression, or as a result of the expansion of an intrinsic
6649 -- call to the Asm or Asm_Input procedure.
6650
6651 -- N_Code_Statement
6652 -- Sloc points to first token of the expression
6653 -- Expression (Node3)
6654
6655 -- Note: package Exp_Code contains an abstract functional interface
6656 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6657
6658 ------------------------
6659 -- 13.12 Restriction --
6660 ------------------------
6661
6662 -- RESTRICTION ::=
6663 -- restriction_IDENTIFIER
6664 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6665
6666 -- There is no explicit node for restrictions. Instead the restriction
6667 -- appears in normal pragma syntax as a pragma argument association,
6668 -- which has the same syntactic form.
6669
6670 --------------------------
6671 -- B.2 Shift Operators --
6672 --------------------------
6673
6674 -- Calls to the intrinsic shift functions are converted to one of
6675 -- the following shift nodes, which have the form of normal binary
6676 -- operator names. Note that for a given shift operation, one node
6677 -- covers all possible types, as for normal operators.
6678
6679 -- Note: it is perfectly permissible for the expander to generate
6680 -- shift operation nodes directly, in which case they will be analyzed
6681 -- and parsed in the usual manner.
6682
6683 -- Sprint syntax: shift-function-name!(expr, count)
6684
6685 -- Note: the Left_Opnd field holds the first argument (the value to
6686 -- be shifted). The Right_Opnd field holds the second argument (the
6687 -- shift count). The Chars field is the name of the intrinsic function.
6688
6689 -- N_Op_Rotate_Left
6690 -- Sloc points to the function name
6691 -- plus fields for binary operator
6692 -- plus fields for expression
6693 -- Shift_Count_OK (Flag4-Sem)
6694
6695 -- N_Op_Rotate_Right
6696 -- Sloc points to the function name
6697 -- plus fields for binary operator
6698 -- plus fields for expression
6699 -- Shift_Count_OK (Flag4-Sem)
6700
6701 -- N_Op_Shift_Left
6702 -- Sloc points to the function name
6703 -- plus fields for binary operator
6704 -- plus fields for expression
6705 -- Shift_Count_OK (Flag4-Sem)
6706
6707 -- N_Op_Shift_Right_Arithmetic
6708 -- Sloc points to the function name
6709 -- plus fields for binary operator
6710 -- plus fields for expression
6711 -- Shift_Count_OK (Flag4-Sem)
6712
6713 -- N_Op_Shift_Right
6714 -- Sloc points to the function name
6715 -- plus fields for binary operator
6716 -- plus fields for expression
6717 -- Shift_Count_OK (Flag4-Sem)
6718
6719 --------------------------
6720 -- Obsolescent Features --
6721 --------------------------
6722
6723 -- The syntax descriptions and tree nodes for obsolescent features are
6724 -- grouped together, corresponding to their location in appendix I in
6725 -- the RM. However, parsing and semantic analysis for these constructs
6726 -- is located in an appropriate chapter (see individual notes).
6727
6728 ---------------------------
6729 -- J.3 Delta Constraint --
6730 ---------------------------
6731
6732 -- Note: the parse routine for this construct is located in section
6733 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6734 -- where delta constraint logically belongs.
6735
6736 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6737
6738 -- N_Delta_Constraint
6739 -- Sloc points to DELTA
6740 -- Delta_Expression (Node3)
6741 -- Range_Constraint (Node4) (set to Empty if not present)
6742
6743 --------------------
6744 -- J.7 At Clause --
6745 --------------------
6746
6747 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6748
6749 -- Note: the parse routine for this construct is located in Par-Ch13,
6750 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6751 -- belongs if it were not obsolescent.
6752
6753 -- Note: in Ada 83 the expression must be a simple expression
6754
6755 -- Gigi restriction: This node never appears, it is rewritten as an
6756 -- address attribute definition clause.
6757
6758 -- N_At_Clause
6759 -- Sloc points to FOR
6760 -- Identifier (Node1)
6761 -- Expression (Node3)
6762
6763 ---------------------
6764 -- J.8 Mod clause --
6765 ---------------------
6766
6767 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6768
6769 -- Note: the parse routine for this construct is located in Par-Ch13,
6770 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6771 -- belongs if it were not obsolescent.
6772
6773 -- Note: in Ada 83, the expression must be a simple expression
6774
6775 -- Gigi restriction: this node never appears. It is replaced
6776 -- by a corresponding Alignment attribute definition clause.
6777
6778 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6779 -- its name has "clause" in it. This is rather strange, but is quite
6780 -- definitely specified. The pragmas before are collected in the
6781 -- Pragmas_Before field of the mod clause node itself, and pragmas
6782 -- after are simply swallowed up in the list of component clauses.
6783
6784 -- N_Mod_Clause
6785 -- Sloc points to AT
6786 -- Expression (Node3)
6787 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6788
6789 --------------------
6790 -- Semantic Nodes --
6791 --------------------
6792
6793 -- These semantic nodes are used to hold additional semantic information.
6794 -- They are inserted into the tree as a result of semantic processing.
6795 -- Although there are no legitimate source syntax constructions that
6796 -- correspond directly to these nodes, we need a source syntax for the
6797 -- reconstructed tree printed by Sprint, and the node descriptions here
6798 -- show this syntax.
6799
6800 -- Note: Case_Expression and Conditional_Expression is in this section for
6801 -- now, since they are extensions. We will move them to their appropriate
6802 -- places when they are officially approved as extensions (and then we will
6803 -- know what the exact grammar and place in the Reference Manual is!)
6804
6805 ---------------------
6806 -- Case Expression --
6807 ---------------------
6808
6809 -- CASE_EXPRESSION ::=
6810 -- case EXPRESSION is
6811 -- CASE_EXPRESSION_ALTERNATIVE
6812 -- {CASE_EXPRESSION_ALTERNATIVE}
6813
6814 -- Note that the Alternatives cannot include pragmas (this contrasts
6815 -- with the situation of case statements where pragmas are allowed).
6816
6817 -- N_Case_Expression
6818 -- Sloc points to CASE
6819 -- Expression (Node3)
6820 -- Alternatives (List4)
6821
6822 ---------------------------------
6823 -- Case Expression Alternative --
6824 ---------------------------------
6825
6826 -- CASE_STATEMENT_ALTERNATIVE ::=
6827 -- when DISCRETE_CHOICE_LIST =>
6828 -- EXPRESSION
6829
6830 -- N_Case_Expression_Alternative
6831 -- Sloc points to WHEN
6832 -- Actions (List1)
6833 -- Discrete_Choices (List4)
6834 -- Expression (Node3)
6835
6836 -- Note: The Actions field temporarily holds any actions associated with
6837 -- evaluation of the Expression. During expansion of the case expression
6838 -- these actions are wrapped into an N_Expressions_With_Actions node
6839 -- replacing the original expression.
6840
6841 ----------------------------
6842 -- Conditional Expression --
6843 ----------------------------
6844
6845 -- This node is used to represent an expression corresponding to the
6846 -- C construct (condition ? then-expression : else_expression), where
6847 -- Expressions is a three element list, whose first expression is the
6848 -- condition, and whose second and third expressions are the then and
6849 -- else expressions respectively.
6850
6851 -- Note: the Then_Actions and Else_Actions fields are always set to
6852 -- No_List in the tree passed to Gigi. These fields are used only
6853 -- for temporary processing purposes in the expander.
6854
6855 -- The Ada language does not permit conditional expressions, however
6856 -- this is under discussion as a possible extension by the ARG, and we
6857 -- have implemented a form of this capability in GNAT under control of
6858 -- the -gnatX switch. The syntax is:
6859
6860 -- CONDITIONAL_EXPRESSION ::=
6861 -- if EXPRESSION then EXPRESSION
6862 -- {elsif EXPRESSION then EXPRESSION}
6863 -- [else EXPRESSION]
6864
6865 -- And we add the additional constructs
6866
6867 -- PRIMARY ::= ( CONDITIONAL_EXPRESSION )
6868 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6869
6870 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6871 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6872 -- the Is_Elsif flag is set on the inner conditional expression.
6873
6874 -- N_Conditional_Expression
6875 -- Sloc points to IF or ELSIF keyword
6876 -- Expressions (List1)
6877 -- Then_Actions (List2-Sem)
6878 -- Else_Actions (List3-Sem)
6879 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6880 -- plus fields for expression
6881
6882 -------------------
6883 -- Expanded_Name --
6884 -------------------
6885
6886 -- The N_Expanded_Name node is used to represent a selected component
6887 -- name that has been resolved to an expanded name. The semantic phase
6888 -- replaces N_Selected_Component nodes that represent names by the use
6889 -- of this node, leaving the N_Selected_Component node used only when
6890 -- the prefix is a record or protected type.
6891
6892 -- The fields of the N_Expanded_Name node are layed out identically
6893 -- to those of the N_Selected_Component node, allowing conversion of
6894 -- an expanded name node to a selected component node to be done
6895 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6896
6897 -- There is no special sprint syntax for an expanded name
6898
6899 -- N_Expanded_Name
6900 -- Sloc points to the period
6901 -- Chars (Name1) copy of Chars field of selector name
6902 -- Prefix (Node3)
6903 -- Selector_Name (Node2)
6904 -- Entity (Node4-Sem)
6905 -- Associated_Node (Node4-Sem)
6906 -- Redundant_Use (Flag13-Sem)
6907 -- Has_Private_View (Flag11-Sem) set in generic units.
6908 -- plus fields for expression
6909
6910 -----------------------------
6911 -- Expression with Actions --
6912 -----------------------------
6913
6914 -- This node is created by the analyzer/expander to handle some
6915 -- expansion cases, notably short circuit forms where there are
6916 -- actions associated with the right hand operand.
6917
6918 -- The N_Expression_With_Actions node represents an expression with
6919 -- an associated set of actions (which are executable statements and
6920 -- declarations, as might occur in a handled statement sequence).
6921
6922 -- The required semantics is that the set of actions is executed in
6923 -- the order in which it appears just before the expression is
6924 -- evaluated (and these actions must only be executed if the value
6925 -- of the expression is evaluated). The node is considered to be
6926 -- a subexpression, whose value is the value of the Expression after
6927 -- executing all the actions.
6928
6929 -- Note: if the actions contain declarations, then these declarations
6930 -- maybe referenced with in the expression. It is thus appropriate for
6931 -- the back end to create a scope that encompasses the construct (any
6932 -- declarations within the actions will definitely not be referenced
6933 -- once elaboration of the construct is completed).
6934
6935 -- Sprint syntax: do
6936 -- action;
6937 -- action;
6938 -- ...
6939 -- action;
6940 -- in expression end
6941
6942 -- N_Expression_With_Actions
6943 -- Actions (List1)
6944 -- Expression (Node3)
6945 -- plus fields for expression
6946
6947 -- Note: the actions list is always non-null, since we would
6948 -- never have created this node if there weren't some actions.
6949
6950 --------------------
6951 -- Free Statement --
6952 --------------------
6953
6954 -- The N_Free_Statement node is generated as a result of a call to an
6955 -- instantiation of Unchecked_Deallocation. The instantiation of this
6956 -- generic is handled specially and generates this node directly.
6957
6958 -- Sprint syntax: free expression
6959
6960 -- N_Free_Statement
6961 -- Sloc is copied from the unchecked deallocation call
6962 -- Expression (Node3) argument to unchecked deallocation call
6963 -- Storage_Pool (Node1-Sem)
6964 -- Procedure_To_Call (Node2-Sem)
6965 -- Actual_Designated_Subtype (Node4-Sem)
6966
6967 -- Note: in the case where a debug source file is generated, the Sloc
6968 -- for this node points to the FREE keyword in the Sprint file output.
6969
6970 -------------------
6971 -- Freeze Entity --
6972 -------------------
6973
6974 -- This node marks the point in a declarative part at which an entity
6975 -- declared therein becomes frozen. The expander places initialization
6976 -- procedures for types at those points. Gigi uses the freezing point
6977 -- to elaborate entities that may depend on previous private types.
6978
6979 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6980 -- a full description of the use of this node.
6981
6982 -- The Entity field points back to the entity for the type (whose
6983 -- Freeze_Node field points back to this freeze node).
6984
6985 -- The Actions field contains a list of declarations and statements
6986 -- generated by the expander which are associated with the freeze
6987 -- node, and are elaborated as though the freeze node were replaced
6988 -- by this sequence of actions.
6989
6990 -- Note: the Sloc field in the freeze node references a construct
6991 -- associated with the freezing point. This is used for posting
6992 -- messages in some error/warning situations, e.g. the case where
6993 -- a primitive operation of a tagged type is declared too late.
6994
6995 -- Sprint syntax: freeze entity-name [
6996 -- freeze actions
6997 -- ]
6998
6999 -- N_Freeze_Entity
7000 -- Sloc points near freeze point (see above special note)
7001 -- Entity (Node4-Sem)
7002 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7003 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7004 -- Actions (List1) (set to No_List if no freeze actions)
7005 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7006
7007 -- The Actions field holds actions associated with the freeze. These
7008 -- actions are elaborated at the point where the type is frozen.
7009
7010 -- Note: in the case where a debug source file is generated, the Sloc
7011 -- for this node points to the FREEZE keyword in the Sprint file output.
7012
7013 --------------------------------
7014 -- Implicit Label Declaration --
7015 --------------------------------
7016
7017 -- An implicit label declaration is created for every occurrence of a
7018 -- label on a statement or a label on a block or loop. It is chained
7019 -- in the declarations of the innermost enclosing block as specified
7020 -- in RM section 5.1 (3).
7021
7022 -- The Defining_Identifier is the actual identifier for the statement
7023 -- identifier. Note that the occurrence of the label is a reference, NOT
7024 -- the defining occurrence. The defining occurrence occurs at the head
7025 -- of the innermost enclosing block, and is represented by this node.
7026
7027 -- Note: from the grammar, this might better be called an implicit
7028 -- statement identifier declaration, but the term we choose seems
7029 -- friendlier, since at least informally statement identifiers are
7030 -- called labels in both cases (i.e. when used in labels, and when
7031 -- used as the identifiers of blocks and loops).
7032
7033 -- Note: although this is logically a semantic node, since it does not
7034 -- correspond directly to a source syntax construction, these nodes are
7035 -- actually created by the parser in a post pass done just after parsing
7036 -- is complete, before semantic analysis is started (see Par.Labl).
7037
7038 -- Sprint syntax: labelname : label;
7039
7040 -- N_Implicit_Label_Declaration
7041 -- Sloc points to the << of the label
7042 -- Defining_Identifier (Node1)
7043 -- Label_Construct (Node2-Sem)
7044
7045 -- Note: in the case where a debug source file is generated, the Sloc
7046 -- for this node points to the label name in the generated declaration.
7047
7048 ---------------------
7049 -- Itype_Reference --
7050 ---------------------
7051
7052 -- This node is used to create a reference to an Itype. The only purpose
7053 -- is to make sure the Itype is defined if this is the first reference.
7054
7055 -- A typical use of this node is when an Itype is to be referenced in
7056 -- two branches of an IF statement. In this case it is important that
7057 -- the first use of the Itype not be inside the conditional, since then
7058 -- it might not be defined if the other branch of the IF is taken, in
7059 -- the case where the definition generates elaboration code.
7060
7061 -- The Itype field points to the referenced Itype
7062
7063 -- Sprint syntax: reference itype-name
7064
7065 -- N_Itype_Reference
7066 -- Sloc points to the node generating the reference
7067 -- Itype (Node1-Sem)
7068
7069 -- Note: in the case where a debug source file is generated, the Sloc
7070 -- for this node points to the REFERENCE keyword in the file output.
7071
7072 ---------------------
7073 -- Raise_xxx_Error --
7074 ---------------------
7075
7076 -- One of these nodes is created during semantic analysis to replace
7077 -- a node for an expression that is determined to definitely raise
7078 -- the corresponding exception.
7079
7080 -- The N_Raise_xxx_Error node may also stand alone in place
7081 -- of a declaration or statement, in which case it simply causes
7082 -- the exception to be raised (i.e. it is equivalent to a raise
7083 -- statement that raises the corresponding exception). This use
7084 -- is distinguished by the fact that the Etype in this case is
7085 -- Standard_Void_Type, In the subexpression case, the Etype is the
7086 -- same as the type of the subexpression which it replaces.
7087
7088 -- If Condition is empty, then the raise is unconditional. If the
7089 -- Condition field is non-empty, it is a boolean expression which
7090 -- is first evaluated, and the exception is raised only if the
7091 -- value of the expression is True. In the unconditional case, the
7092 -- creation of this node is usually accompanied by a warning message
7093 -- error. The creation of this node will usually be accompanied by a
7094 -- message (unless it appears within the right operand of a short
7095 -- circuit form whose left argument is static and decisively
7096 -- eliminates elaboration of the raise operation. The condition field
7097 -- can ONLY be present when the node is used as a statement form, it
7098 -- may NOT be present in the case where the node appears within an
7099 -- expression.
7100
7101 -- The exception is generated with a message that contains the
7102 -- file name and line number, and then appended text. The Reason
7103 -- code shows the text to be added. The Reason code is an element
7104 -- of the type Types.RT_Exception_Code, and indicates both the
7105 -- message to be added, and the exception to be raised (which must
7106 -- match the node type). The value is stored by storing a Uint which
7107 -- is the Pos value of the enumeration element in this type.
7108
7109 -- Gigi restriction: This expander ensures that the type of the
7110 -- Condition field is always Standard.Boolean, even if the type
7111 -- in the source is some non-standard boolean type.
7112
7113 -- Sprint syntax: [xxx_error "msg"]
7114 -- or: [xxx_error when condition "msg"]
7115
7116 -- N_Raise_Constraint_Error
7117 -- Sloc references related construct
7118 -- Condition (Node1) (set to Empty if no condition)
7119 -- Reason (Uint3)
7120 -- plus fields for expression
7121
7122 -- N_Raise_Program_Error
7123 -- Sloc references related construct
7124 -- Condition (Node1) (set to Empty if no condition)
7125 -- Reason (Uint3)
7126 -- plus fields for expression
7127
7128 -- N_Raise_Storage_Error
7129 -- Sloc references related construct
7130 -- Condition (Node1) (set to Empty if no condition)
7131 -- Reason (Uint3)
7132 -- plus fields for expression
7133
7134 -- Note: Sloc is copied from the expression generating the exception.
7135 -- In the case where a debug source file is generated, the Sloc for
7136 -- this node points to the left bracket in the Sprint file output.
7137
7138 -- Note: the back end may be required to translate these nodes into
7139 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7140
7141 ---------------------------------------------
7142 -- Optimization of Exception Raise to Goto --
7143 ---------------------------------------------
7144
7145 -- In some cases, the front end will determine that any exception raised
7146 -- by the back end for a certain exception should be transformed into a
7147 -- goto statement.
7148
7149 -- There are three kinds of exceptions raised by the back end (note that
7150 -- for this purpose we consider gigi to be part of the back end in the
7151 -- gcc case):
7152
7153 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7154 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7155 -- 3. Other cases not specifically marked by the front end
7156
7157 -- Normally all such exceptions are translated into calls to the proper
7158 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7159 -- and the exception message.
7160
7161 -- The front end may determine that for a particular sequence of code,
7162 -- exceptions in any of these three categories for a particular builtin
7163 -- exception should result in a goto, rather than a call to Rcheck_xx.
7164 -- The exact sequence to be generated is:
7165
7166 -- Local_Raise (exception'Identity);
7167 -- goto Label
7168
7169 -- The front end marks such a sequence of code by bracketing it with
7170 -- push and pop nodes:
7171
7172 -- N_Push_xxx_Label (referencing the label)
7173 -- ...
7174 -- (code where transformation is expected for exception xxx)
7175 -- ...
7176 -- N_Pop_xxx_Label
7177
7178 -- The use of push/pop reflects the fact that such regions can properly
7179 -- nest, and one special case is a subregion in which no transformation
7180 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7181 -- Exception_Label field is Empty.
7182
7183 -- N_Push_Constraint_Error_Label
7184 -- Sloc references first statement in region covered
7185 -- Exception_Label (Node5-Sem)
7186
7187 -- N_Push_Program_Error_Label
7188 -- Sloc references first statement in region covered
7189 -- Exception_Label (Node5-Sem)
7190
7191 -- N_Push_Storage_Error_Label
7192 -- Sloc references first statement in region covered
7193 -- Exception_Label (Node5-Sem)
7194
7195 -- N_Pop_Constraint_Error_Label
7196 -- Sloc references last statement in region covered
7197
7198 -- N_Pop_Program_Error_Label
7199 -- Sloc references last statement in region covered
7200
7201 -- N_Pop_Storage_Error_Label
7202 -- Sloc references last statement in region covered
7203
7204 ---------------
7205 -- Reference --
7206 ---------------
7207
7208 -- For a number of purposes, we need to construct references to objects.
7209 -- These references are subsequently treated as normal access values.
7210 -- An example is the construction of the parameter block passed to a
7211 -- task entry. The N_Reference node is provided for this purpose. It is
7212 -- similar in effect to the use of the Unrestricted_Access attribute,
7213 -- and like Unrestricted_Access can be applied to objects which would
7214 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7215 -- objects which are not aliased, and slices). In addition it can be
7216 -- applied to composite type values as well as objects, including string
7217 -- values and aggregates.
7218
7219 -- Note: we use the Prefix field for this expression so that the
7220 -- resulting node can be treated using common code with the attribute
7221 -- nodes for the 'Access and related attributes. Logically it would make
7222 -- more sense to call it an Expression field, but then we would have to
7223 -- special case the treatment of the N_Reference node.
7224
7225 -- Sprint syntax: prefix'reference
7226
7227 -- N_Reference
7228 -- Sloc is copied from the expression
7229 -- Prefix (Node3)
7230 -- plus fields for expression
7231
7232 -- Note: in the case where a debug source file is generated, the Sloc
7233 -- for this node points to the quote in the Sprint file output.
7234
7235 -----------------
7236 -- SCIL Nodes --
7237 -----------------
7238
7239 -- SCIL nodes are special nodes added to the tree when the CodePeer
7240 -- mode is active. They help the CodePeer backend to locate nodes that
7241 -- require special processing.
7242
7243 -- Major documentation on the general design of the SCIL interface, and
7244 -- in particular detailed description of these nodes is missing and is
7245 -- to be supplied in the future, when the design has finalized ???
7246
7247 -- Meanwhile these nodes should be considered in experimental form, and
7248 -- should be ignored by all code generating back ends. ???
7249
7250 -- N_SCIL_Dispatch_Table_Tag_Init
7251 -- Sloc references a node for a tag initialization
7252 -- SCIL_Entity (Node4-Sem)
7253
7254 -- N_SCIL_Dispatching_Call
7255 -- Sloc references the node of a dispatching call
7256 -- SCIL_Target_Prim (Node2-Sem)
7257 -- SCIL_Entity (Node4-Sem)
7258 -- SCIL_Controlling_Tag (Node5-Sem)
7259
7260 -- N_SCIL_Membership_Test
7261 -- Sloc references the node of a membership test
7262 -- SCIL_Tag_Value (Node5-Sem)
7263 -- SCIL_Entity (Node4-Sem)
7264
7265 ---------------------
7266 -- Subprogram_Info --
7267 ---------------------
7268
7269 -- This node generates the appropriate Subprogram_Info value for a
7270 -- given procedure. See Ada.Exceptions for further details
7271
7272 -- Sprint syntax: subprog'subprogram_info
7273
7274 -- N_Subprogram_Info
7275 -- Sloc points to the entity for the procedure
7276 -- Identifier (Node1) identifier referencing the procedure
7277 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
7278
7279 -- Note: in the case where a debug source file is generated, the Sloc
7280 -- for this node points to the quote in the Sprint file output.
7281
7282 --------------------------
7283 -- Unchecked Expression --
7284 --------------------------
7285
7286 -- An unchecked expression is one that must be analyzed and resolved
7287 -- with all checks off, regardless of the current setting of scope
7288 -- suppress flags.
7289
7290 -- Sprint syntax: `(expression)
7291
7292 -- Note: this node is always removed from the tree (and replaced by
7293 -- its constituent expression) on completion of analysis, so it only
7294 -- appears in intermediate trees, and will never be seen by Gigi.
7295
7296 -- N_Unchecked_Expression
7297 -- Sloc is a copy of the Sloc of the expression
7298 -- Expression (Node3)
7299 -- plus fields for expression
7300
7301 -- Note: in the case where a debug source file is generated, the Sloc
7302 -- for this node points to the back quote in the Sprint file output.
7303
7304 -------------------------------
7305 -- Unchecked Type Conversion --
7306 -------------------------------
7307
7308 -- An unchecked type conversion node represents the semantic action
7309 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7310 -- It is generated as a result of actual use of Unchecked_Conversion
7311 -- and also the expander generates unchecked type conversion nodes
7312 -- directly for expansion of complex semantic actions.
7313
7314 -- Note: an unchecked type conversion is a variable as far as the
7315 -- semantics are concerned, which is convenient for the expander.
7316 -- This does not change what Ada source programs are legal, since
7317 -- clearly a function call to an instantiation of Unchecked_Conversion
7318 -- is not a variable in any case.
7319
7320 -- Sprint syntax: subtype-mark!(expression)
7321
7322 -- N_Unchecked_Type_Conversion
7323 -- Sloc points to related node in source
7324 -- Subtype_Mark (Node4)
7325 -- Expression (Node3)
7326 -- Kill_Range_Check (Flag11-Sem)
7327 -- No_Truncation (Flag17-Sem)
7328 -- plus fields for expression
7329
7330 -- Note: in the case where a debug source file is generated, the Sloc
7331 -- for this node points to the exclamation in the Sprint file output.
7332
7333 -----------------------------------
7334 -- Validate_Unchecked_Conversion --
7335 -----------------------------------
7336
7337 -- The front end does most of the validation of unchecked conversion,
7338 -- including checking sizes (this is done after the back end is called
7339 -- to take advantage of back-annotation of calculated sizes).
7340
7341 -- The front end also deals with specific cases that are not allowed
7342 -- e.g. involving unconstrained array types.
7343
7344 -- For the case of the standard gigi backend, this means that all
7345 -- checks are done in the front-end.
7346
7347 -- However, in the case of specialized back-ends, notably the JVM
7348 -- backend for JGNAT, additional requirements and restrictions apply
7349 -- to unchecked conversion, and these are most conveniently performed
7350 -- in the specialized back-end.
7351
7352 -- To accommodate this requirement, for such back ends, the following
7353 -- special node is generated recording an unchecked conversion that
7354 -- needs to be validated. The back end should post an appropriate
7355 -- error message if the unchecked conversion is invalid or warrants
7356 -- a special warning message.
7357
7358 -- Source_Type and Target_Type point to the entities for the two
7359 -- types involved in the unchecked conversion instantiation that
7360 -- is to be validated.
7361
7362 -- Sprint syntax: validate Unchecked_Conversion (source, target);
7363
7364 -- N_Validate_Unchecked_Conversion
7365 -- Sloc points to instantiation (location for warning message)
7366 -- Source_Type (Node1-Sem)
7367 -- Target_Type (Node2-Sem)
7368
7369 -- Note: in the case where a debug source file is generated, the Sloc
7370 -- for this node points to the VALIDATE keyword in the file output.
7371
7372 -----------
7373 -- Empty --
7374 -----------
7375
7376 -- Used as the contents of the Nkind field of the dummy Empty node
7377 -- and in some other situations to indicate an uninitialized value.
7378
7379 -- N_Empty
7380 -- Chars (Name1) is set to No_Name
7381
7382 -----------
7383 -- Error --
7384 -----------
7385
7386 -- Used as the contents of the Nkind field of the dummy Error node.
7387 -- Has an Etype field, which gets set to Any_Type later on, to help
7388 -- error recovery (Error_Posted is also set in the Error node).
7389
7390 -- N_Error
7391 -- Chars (Name1) is set to Error_Name
7392 -- Etype (Node5-Sem)
7393
7394 --------------------------
7395 -- Node Type Definition --
7396 --------------------------
7397
7398 -- The following is the definition of the Node_Kind type. As previously
7399 -- discussed, this is separated off to allow rearrangement of the order to
7400 -- facilitate definition of subtype ranges. The comments show the subtype
7401 -- classes which apply to each set of node kinds. The first entry in the
7402 -- comment characterizes the following list of nodes.
7403
7404 type Node_Kind is (
7405 N_Unused_At_Start,
7406
7407 -- N_Representation_Clause
7408
7409 N_At_Clause,
7410 N_Component_Clause,
7411 N_Enumeration_Representation_Clause,
7412 N_Mod_Clause,
7413 N_Record_Representation_Clause,
7414
7415 -- N_Representation_Clause, N_Has_Chars
7416
7417 N_Attribute_Definition_Clause,
7418
7419 -- N_Has_Chars
7420
7421 N_Empty,
7422 N_Pragma_Argument_Association,
7423
7424 -- N_Has_Etype
7425
7426 N_Error,
7427
7428 -- N_Entity, N_Has_Etype, N_Has_Chars
7429
7430 N_Defining_Character_Literal,
7431 N_Defining_Identifier,
7432 N_Defining_Operator_Symbol,
7433
7434 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7435
7436 N_Expanded_Name,
7437
7438 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7439 -- N_Has_Chars, N_Has_Entity
7440
7441 N_Identifier,
7442 N_Operator_Symbol,
7443
7444 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7445 -- N_Has_Chars, N_Has_Entity
7446
7447 N_Character_Literal,
7448
7449 -- N_Binary_Op, N_Op, N_Subexpr,
7450 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7451
7452 N_Op_Add,
7453 N_Op_Concat,
7454 N_Op_Expon,
7455 N_Op_Subtract,
7456
7457 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7458 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7459
7460 N_Op_Divide,
7461 N_Op_Mod,
7462 N_Op_Multiply,
7463 N_Op_Rem,
7464
7465 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7466 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7467
7468 N_Op_And,
7469
7470 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7471 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7472
7473 N_Op_Eq,
7474 N_Op_Ge,
7475 N_Op_Gt,
7476 N_Op_Le,
7477 N_Op_Lt,
7478 N_Op_Ne,
7479
7480 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7481 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7482
7483 N_Op_Or,
7484 N_Op_Xor,
7485
7486 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7487 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7488
7489 N_Op_Rotate_Left,
7490 N_Op_Rotate_Right,
7491 N_Op_Shift_Left,
7492 N_Op_Shift_Right,
7493 N_Op_Shift_Right_Arithmetic,
7494
7495 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7496 -- N_Has_Chars, N_Has_Entity
7497
7498 N_Op_Abs,
7499 N_Op_Minus,
7500 N_Op_Not,
7501 N_Op_Plus,
7502
7503 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7504
7505 N_Attribute_Reference,
7506
7507 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7508
7509 N_In,
7510 N_Not_In,
7511
7512 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7513
7514 N_And_Then,
7515 N_Or_Else,
7516
7517 -- N_Subexpr, N_Has_Etype
7518
7519 N_Conditional_Expression,
7520 N_Explicit_Dereference,
7521 N_Expression_With_Actions,
7522 N_Function_Call,
7523 N_Indexed_Component,
7524 N_Integer_Literal,
7525 N_Null,
7526 N_Procedure_Call_Statement,
7527 N_Qualified_Expression,
7528 N_Quantified_Expression,
7529
7530 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7531
7532 N_Raise_Constraint_Error,
7533 N_Raise_Program_Error,
7534 N_Raise_Storage_Error,
7535
7536 -- N_Subexpr, N_Has_Etype
7537
7538 N_Aggregate,
7539 N_Allocator,
7540 N_Case_Expression,
7541 N_Extension_Aggregate,
7542 N_Range,
7543 N_Real_Literal,
7544 N_Reference,
7545 N_Selected_Component,
7546 N_Slice,
7547 N_String_Literal,
7548 N_Subprogram_Info,
7549 N_Type_Conversion,
7550 N_Unchecked_Expression,
7551 N_Unchecked_Type_Conversion,
7552
7553 -- N_Has_Etype
7554
7555 N_Subtype_Indication,
7556
7557 -- N_Declaration
7558
7559 N_Component_Declaration,
7560 N_Entry_Declaration,
7561 N_Formal_Object_Declaration,
7562 N_Formal_Type_Declaration,
7563 N_Full_Type_Declaration,
7564 N_Incomplete_Type_Declaration,
7565 N_Iterator_Specification,
7566 N_Loop_Parameter_Specification,
7567 N_Object_Declaration,
7568 N_Parameterized_Expression,
7569 N_Protected_Type_Declaration,
7570 N_Private_Extension_Declaration,
7571 N_Private_Type_Declaration,
7572 N_Subtype_Declaration,
7573
7574 -- N_Subprogram_Specification, N_Declaration
7575
7576 N_Function_Specification,
7577 N_Procedure_Specification,
7578
7579 -- N_Access_To_Subprogram_Definition
7580
7581 N_Access_Function_Definition,
7582 N_Access_Procedure_Definition,
7583
7584 -- N_Later_Decl_Item
7585
7586 N_Task_Type_Declaration,
7587
7588 -- N_Body_Stub, N_Later_Decl_Item
7589
7590 N_Package_Body_Stub,
7591 N_Protected_Body_Stub,
7592 N_Subprogram_Body_Stub,
7593 N_Task_Body_Stub,
7594
7595 -- N_Generic_Instantiation, N_Later_Decl_Item
7596 -- N_Subprogram_Instantiation
7597
7598 N_Function_Instantiation,
7599 N_Procedure_Instantiation,
7600
7601 -- N_Generic_Instantiation, N_Later_Decl_Item
7602
7603 N_Package_Instantiation,
7604
7605 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7606
7607 N_Package_Body,
7608 N_Subprogram_Body,
7609
7610 -- N_Later_Decl_Item, N_Proper_Body
7611
7612 N_Protected_Body,
7613 N_Task_Body,
7614
7615 -- N_Later_Decl_Item
7616
7617 N_Implicit_Label_Declaration,
7618 N_Package_Declaration,
7619 N_Single_Task_Declaration,
7620 N_Subprogram_Declaration,
7621 N_Use_Package_Clause,
7622
7623 -- N_Generic_Declaration, N_Later_Decl_Item
7624
7625 N_Generic_Package_Declaration,
7626 N_Generic_Subprogram_Declaration,
7627
7628 -- N_Array_Type_Definition
7629
7630 N_Constrained_Array_Definition,
7631 N_Unconstrained_Array_Definition,
7632
7633 -- N_Renaming_Declaration
7634
7635 N_Exception_Renaming_Declaration,
7636 N_Object_Renaming_Declaration,
7637 N_Package_Renaming_Declaration,
7638 N_Subprogram_Renaming_Declaration,
7639
7640 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7641
7642 N_Generic_Function_Renaming_Declaration,
7643 N_Generic_Package_Renaming_Declaration,
7644 N_Generic_Procedure_Renaming_Declaration,
7645
7646 -- N_Statement_Other_Than_Procedure_Call
7647
7648 N_Abort_Statement,
7649 N_Accept_Statement,
7650 N_Assignment_Statement,
7651 N_Asynchronous_Select,
7652 N_Block_Statement,
7653 N_Case_Statement,
7654 N_Code_Statement,
7655 N_Conditional_Entry_Call,
7656
7657 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7658
7659 N_Delay_Relative_Statement,
7660 N_Delay_Until_Statement,
7661
7662 -- N_Statement_Other_Than_Procedure_Call
7663
7664 N_Entry_Call_Statement,
7665 N_Free_Statement,
7666 N_Goto_Statement,
7667 N_Loop_Statement,
7668 N_Null_Statement,
7669 N_Raise_Statement,
7670 N_Requeue_Statement,
7671 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7672 N_Extended_Return_Statement,
7673 N_Selective_Accept,
7674 N_Timed_Entry_Call,
7675
7676 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7677
7678 N_Exit_Statement,
7679 N_If_Statement,
7680
7681 -- N_Has_Condition
7682
7683 N_Accept_Alternative,
7684 N_Delay_Alternative,
7685 N_Elsif_Part,
7686 N_Entry_Body_Formal_Part,
7687 N_Iteration_Scheme,
7688 N_Terminate_Alternative,
7689
7690 -- N_Formal_Subprogram_Declaration
7691
7692 N_Formal_Abstract_Subprogram_Declaration,
7693 N_Formal_Concrete_Subprogram_Declaration,
7694
7695 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7696
7697 N_Push_Constraint_Error_Label,
7698 N_Push_Program_Error_Label,
7699 N_Push_Storage_Error_Label,
7700
7701 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7702
7703 N_Pop_Constraint_Error_Label,
7704 N_Pop_Program_Error_Label,
7705 N_Pop_Storage_Error_Label,
7706
7707 -- SCIL nodes
7708
7709 N_SCIL_Dispatch_Table_Tag_Init,
7710 N_SCIL_Dispatching_Call,
7711 N_SCIL_Membership_Test,
7712
7713 -- Other nodes (not part of any subtype class)
7714
7715 N_Abortable_Part,
7716 N_Abstract_Subprogram_Declaration,
7717 N_Access_Definition,
7718 N_Access_To_Object_Definition,
7719 N_Aspect_Specification,
7720 N_Case_Expression_Alternative,
7721 N_Case_Statement_Alternative,
7722 N_Compilation_Unit,
7723 N_Compilation_Unit_Aux,
7724 N_Component_Association,
7725 N_Component_Definition,
7726 N_Component_List,
7727 N_Derived_Type_Definition,
7728 N_Decimal_Fixed_Point_Definition,
7729 N_Defining_Program_Unit_Name,
7730 N_Delta_Constraint,
7731 N_Designator,
7732 N_Digits_Constraint,
7733 N_Discriminant_Association,
7734 N_Discriminant_Specification,
7735 N_Enumeration_Type_Definition,
7736 N_Entry_Body,
7737 N_Entry_Call_Alternative,
7738 N_Entry_Index_Specification,
7739 N_Exception_Declaration,
7740 N_Exception_Handler,
7741 N_Floating_Point_Definition,
7742 N_Formal_Decimal_Fixed_Point_Definition,
7743 N_Formal_Derived_Type_Definition,
7744 N_Formal_Discrete_Type_Definition,
7745 N_Formal_Floating_Point_Definition,
7746 N_Formal_Modular_Type_Definition,
7747 N_Formal_Ordinary_Fixed_Point_Definition,
7748 N_Formal_Package_Declaration,
7749 N_Formal_Private_Type_Definition,
7750 N_Formal_Signed_Integer_Type_Definition,
7751 N_Freeze_Entity,
7752 N_Generic_Association,
7753 N_Handled_Sequence_Of_Statements,
7754 N_Index_Or_Discriminant_Constraint,
7755 N_Itype_Reference,
7756 N_Label,
7757 N_Modular_Type_Definition,
7758 N_Number_Declaration,
7759 N_Ordinary_Fixed_Point_Definition,
7760 N_Others_Choice,
7761 N_Package_Specification,
7762 N_Parameter_Association,
7763 N_Parameter_Specification,
7764 N_Pragma,
7765 N_Protected_Definition,
7766 N_Range_Constraint,
7767 N_Real_Range_Specification,
7768 N_Record_Definition,
7769 N_Signed_Integer_Type_Definition,
7770 N_Single_Protected_Declaration,
7771 N_Subunit,
7772 N_Task_Definition,
7773 N_Triggering_Alternative,
7774 N_Use_Type_Clause,
7775 N_Validate_Unchecked_Conversion,
7776 N_Variant,
7777 N_Variant_Part,
7778 N_With_Clause,
7779 N_Unused_At_End);
7780
7781 for Node_Kind'Size use 8;
7782 -- The data structures in Atree assume this!
7783
7784 ----------------------------
7785 -- Node Class Definitions --
7786 ----------------------------
7787
7788 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7789 N_Access_Function_Definition ..
7790 N_Access_Procedure_Definition;
7791
7792 subtype N_Array_Type_Definition is Node_Kind range
7793 N_Constrained_Array_Definition ..
7794 N_Unconstrained_Array_Definition;
7795
7796 subtype N_Binary_Op is Node_Kind range
7797 N_Op_Add ..
7798 N_Op_Shift_Right_Arithmetic;
7799
7800 subtype N_Body_Stub is Node_Kind range
7801 N_Package_Body_Stub ..
7802 N_Task_Body_Stub;
7803
7804 subtype N_Declaration is Node_Kind range
7805 N_Component_Declaration ..
7806 N_Procedure_Specification;
7807 -- Note: this includes all constructs normally thought of as declarations
7808 -- except those which are separately grouped as later declarations.
7809
7810 subtype N_Delay_Statement is Node_Kind range
7811 N_Delay_Relative_Statement ..
7812 N_Delay_Until_Statement;
7813
7814 subtype N_Direct_Name is Node_Kind range
7815 N_Identifier ..
7816 N_Character_Literal;
7817
7818 subtype N_Entity is Node_Kind range
7819 N_Defining_Character_Literal ..
7820 N_Defining_Operator_Symbol;
7821
7822 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7823 N_Formal_Abstract_Subprogram_Declaration ..
7824 N_Formal_Concrete_Subprogram_Declaration;
7825
7826 subtype N_Generic_Declaration is Node_Kind range
7827 N_Generic_Package_Declaration ..
7828 N_Generic_Subprogram_Declaration;
7829
7830 subtype N_Generic_Instantiation is Node_Kind range
7831 N_Function_Instantiation ..
7832 N_Package_Instantiation;
7833
7834 subtype N_Generic_Renaming_Declaration is Node_Kind range
7835 N_Generic_Function_Renaming_Declaration ..
7836 N_Generic_Procedure_Renaming_Declaration;
7837
7838 subtype N_Has_Chars is Node_Kind range
7839 N_Attribute_Definition_Clause ..
7840 N_Op_Plus;
7841
7842 subtype N_Has_Entity is Node_Kind range
7843 N_Expanded_Name ..
7844 N_Attribute_Reference;
7845 -- Nodes that have Entity fields
7846 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Aspect_Specification,
7847 -- or N_Attribute_Definition_Clause.
7848
7849 subtype N_Has_Etype is Node_Kind range
7850 N_Error ..
7851 N_Subtype_Indication;
7852
7853 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7854 N_Op_Divide ..
7855 N_Op_Rem;
7856
7857 subtype N_Multiplying_Operator is Node_Kind range
7858 N_Op_Divide ..
7859 N_Op_Rem;
7860
7861 subtype N_Later_Decl_Item is Node_Kind range
7862 N_Task_Type_Declaration ..
7863 N_Generic_Subprogram_Declaration;
7864 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7865 -- only those items which can appear as later declarative items. This also
7866 -- includes N_Implicit_Label_Declaration which is not specifically in the
7867 -- grammar but may appear as a valid later declarative items. It does NOT
7868 -- include N_Pragma which can also appear among later declarative items.
7869 -- It does however include N_Protected_Body, which is a bit peculiar, but
7870 -- harmless since this cannot appear in Ada 83 mode anyway.
7871
7872 subtype N_Membership_Test is Node_Kind range
7873 N_In ..
7874 N_Not_In;
7875
7876 subtype N_Op is Node_Kind range
7877 N_Op_Add ..
7878 N_Op_Plus;
7879
7880 subtype N_Op_Boolean is Node_Kind range
7881 N_Op_And ..
7882 N_Op_Xor;
7883 -- Binary operators which take operands of a boolean type, and yield
7884 -- a result of a boolean type.
7885
7886 subtype N_Op_Compare is Node_Kind range
7887 N_Op_Eq ..
7888 N_Op_Ne;
7889
7890 subtype N_Op_Shift is Node_Kind range
7891 N_Op_Rotate_Left ..
7892 N_Op_Shift_Right_Arithmetic;
7893
7894 subtype N_Proper_Body is Node_Kind range
7895 N_Package_Body ..
7896 N_Task_Body;
7897
7898 subtype N_Push_xxx_Label is Node_Kind range
7899 N_Push_Constraint_Error_Label ..
7900 N_Push_Storage_Error_Label;
7901
7902 subtype N_Pop_xxx_Label is Node_Kind range
7903 N_Pop_Constraint_Error_Label ..
7904 N_Pop_Storage_Error_Label;
7905
7906 subtype N_Push_Pop_xxx_Label is Node_Kind range
7907 N_Push_Constraint_Error_Label ..
7908 N_Pop_Storage_Error_Label;
7909
7910 subtype N_Raise_xxx_Error is Node_Kind range
7911 N_Raise_Constraint_Error ..
7912 N_Raise_Storage_Error;
7913
7914 subtype N_Renaming_Declaration is Node_Kind range
7915 N_Exception_Renaming_Declaration ..
7916 N_Generic_Procedure_Renaming_Declaration;
7917
7918 subtype N_Representation_Clause is Node_Kind range
7919 N_At_Clause ..
7920 N_Attribute_Definition_Clause;
7921
7922 subtype N_Short_Circuit is Node_Kind range
7923 N_And_Then ..
7924 N_Or_Else;
7925
7926 subtype N_SCIL_Node is Node_Kind range
7927 N_SCIL_Dispatch_Table_Tag_Init ..
7928 N_SCIL_Membership_Test;
7929
7930 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7931 N_Abort_Statement ..
7932 N_If_Statement;
7933 -- Note that this includes all statement types except for the cases of the
7934 -- N_Procedure_Call_Statement which is considered to be a subexpression
7935 -- (since overloading is possible, so it needs to go through the normal
7936 -- overloading resolution for expressions).
7937
7938 subtype N_Subprogram_Instantiation is Node_Kind range
7939 N_Function_Instantiation ..
7940 N_Procedure_Instantiation;
7941
7942 subtype N_Has_Condition is Node_Kind range
7943 N_Exit_Statement ..
7944 N_Terminate_Alternative;
7945 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7946
7947 subtype N_Subexpr is Node_Kind range
7948 N_Expanded_Name ..
7949 N_Unchecked_Type_Conversion;
7950 -- Nodes with expression fields
7951
7952 subtype N_Subprogram_Specification is Node_Kind range
7953 N_Function_Specification ..
7954 N_Procedure_Specification;
7955
7956 subtype N_Unary_Op is Node_Kind range
7957 N_Op_Abs ..
7958 N_Op_Plus;
7959
7960 subtype N_Unit_Body is Node_Kind range
7961 N_Package_Body ..
7962 N_Subprogram_Body;
7963
7964 ---------------------------
7965 -- Node Access Functions --
7966 ---------------------------
7967
7968 -- The following functions return the contents of the indicated field of
7969 -- the node referenced by the argument, which is a Node_Id. They provide
7970 -- logical access to fields in the node which could be accessed using the
7971 -- Atree.Unchecked_Access package, but the idea is always to use these
7972 -- higher level routines which preserve strong typing. In debug mode,
7973 -- these routines check that they are being applied to an appropriate
7974 -- node, as well as checking that the node is in range.
7975
7976 function ABE_Is_Certain
7977 (N : Node_Id) return Boolean; -- Flag18
7978
7979 function Abort_Present
7980 (N : Node_Id) return Boolean; -- Flag15
7981
7982 function Abortable_Part
7983 (N : Node_Id) return Node_Id; -- Node2
7984
7985 function Abstract_Present
7986 (N : Node_Id) return Boolean; -- Flag4
7987
7988 function Accept_Handler_Records
7989 (N : Node_Id) return List_Id; -- List5
7990
7991 function Accept_Statement
7992 (N : Node_Id) return Node_Id; -- Node2
7993
7994 function Access_Definition
7995 (N : Node_Id) return Node_Id; -- Node3
7996
7997 function Access_To_Subprogram_Definition
7998 (N : Node_Id) return Node_Id; -- Node3
7999
8000 function Access_Types_To_Process
8001 (N : Node_Id) return Elist_Id; -- Elist2
8002
8003 function Actions
8004 (N : Node_Id) return List_Id; -- List1
8005
8006 function Activation_Chain_Entity
8007 (N : Node_Id) return Node_Id; -- Node3
8008
8009 function Acts_As_Spec
8010 (N : Node_Id) return Boolean; -- Flag4
8011
8012 function Actual_Designated_Subtype
8013 (N : Node_Id) return Node_Id; -- Node4
8014
8015 function Address_Warning_Posted
8016 (N : Node_Id) return Boolean; -- Flag18
8017
8018 function Aggregate_Bounds
8019 (N : Node_Id) return Node_Id; -- Node3
8020
8021 function Aliased_Present
8022 (N : Node_Id) return Boolean; -- Flag4
8023
8024 function All_Others
8025 (N : Node_Id) return Boolean; -- Flag11
8026
8027 function All_Present
8028 (N : Node_Id) return Boolean; -- Flag15
8029
8030 function Alternatives
8031 (N : Node_Id) return List_Id; -- List4
8032
8033 function Ancestor_Part
8034 (N : Node_Id) return Node_Id; -- Node3
8035
8036 function Array_Aggregate
8037 (N : Node_Id) return Node_Id; -- Node3
8038
8039 function Aspect_Cancel
8040 (N : Node_Id) return Boolean; -- Flag11
8041
8042 function Aspect_Rep_Item
8043 (N : Node_Id) return Node_Id; -- Node2
8044
8045 function Assignment_OK
8046 (N : Node_Id) return Boolean; -- Flag15
8047
8048 function Associated_Node
8049 (N : Node_Id) return Node_Id; -- Node4
8050
8051 function At_End_Proc
8052 (N : Node_Id) return Node_Id; -- Node1
8053
8054 function Attribute_Name
8055 (N : Node_Id) return Name_Id; -- Name2
8056
8057 function Aux_Decls_Node
8058 (N : Node_Id) return Node_Id; -- Node5
8059
8060 function Backwards_OK
8061 (N : Node_Id) return Boolean; -- Flag6
8062
8063 function Bad_Is_Detected
8064 (N : Node_Id) return Boolean; -- Flag15
8065
8066 function By_Ref
8067 (N : Node_Id) return Boolean; -- Flag5
8068
8069 function Body_Required
8070 (N : Node_Id) return Boolean; -- Flag13
8071
8072 function Body_To_Inline
8073 (N : Node_Id) return Node_Id; -- Node3
8074
8075 function Box_Present
8076 (N : Node_Id) return Boolean; -- Flag15
8077
8078 function Char_Literal_Value
8079 (N : Node_Id) return Uint; -- Uint2
8080
8081 function Chars
8082 (N : Node_Id) return Name_Id; -- Name1
8083
8084 function Check_Address_Alignment
8085 (N : Node_Id) return Boolean; -- Flag11
8086
8087 function Choice_Parameter
8088 (N : Node_Id) return Node_Id; -- Node2
8089
8090 function Choices
8091 (N : Node_Id) return List_Id; -- List1
8092
8093 function Class_Present
8094 (N : Node_Id) return Boolean; -- Flag6
8095
8096 function Coextensions
8097 (N : Node_Id) return Elist_Id; -- Elist4
8098
8099 function Comes_From_Extended_Return_Statement
8100 (N : Node_Id) return Boolean; -- Flag18
8101
8102 function Compile_Time_Known_Aggregate
8103 (N : Node_Id) return Boolean; -- Flag18
8104
8105 function Component_Associations
8106 (N : Node_Id) return List_Id; -- List2
8107
8108 function Component_Clauses
8109 (N : Node_Id) return List_Id; -- List3
8110
8111 function Component_Definition
8112 (N : Node_Id) return Node_Id; -- Node4
8113
8114 function Component_Items
8115 (N : Node_Id) return List_Id; -- List3
8116
8117 function Component_List
8118 (N : Node_Id) return Node_Id; -- Node1
8119
8120 function Component_Name
8121 (N : Node_Id) return Node_Id; -- Node1
8122
8123 function Componentwise_Assignment
8124 (N : Node_Id) return Boolean; -- Flag14
8125
8126 function Condition
8127 (N : Node_Id) return Node_Id; -- Node1
8128
8129 function Condition_Actions
8130 (N : Node_Id) return List_Id; -- List3
8131
8132 function Config_Pragmas
8133 (N : Node_Id) return List_Id; -- List4
8134
8135 function Constant_Present
8136 (N : Node_Id) return Boolean; -- Flag17
8137
8138 function Constraint
8139 (N : Node_Id) return Node_Id; -- Node3
8140
8141 function Constraints
8142 (N : Node_Id) return List_Id; -- List1
8143
8144 function Context_Installed
8145 (N : Node_Id) return Boolean; -- Flag13
8146
8147 function Context_Pending
8148 (N : Node_Id) return Boolean; -- Flag16
8149
8150 function Context_Items
8151 (N : Node_Id) return List_Id; -- List1
8152
8153 function Controlling_Argument
8154 (N : Node_Id) return Node_Id; -- Node1
8155
8156 function Conversion_OK
8157 (N : Node_Id) return Boolean; -- Flag14
8158
8159 function Corresponding_Body
8160 (N : Node_Id) return Node_Id; -- Node5
8161
8162 function Corresponding_Formal_Spec
8163 (N : Node_Id) return Node_Id; -- Node3
8164
8165 function Corresponding_Generic_Association
8166 (N : Node_Id) return Node_Id; -- Node5
8167
8168 function Corresponding_Integer_Value
8169 (N : Node_Id) return Uint; -- Uint4
8170
8171 function Corresponding_Spec
8172 (N : Node_Id) return Node_Id; -- Node5
8173
8174 function Corresponding_Stub
8175 (N : Node_Id) return Node_Id; -- Node3
8176
8177 function Dcheck_Function
8178 (N : Node_Id) return Entity_Id; -- Node5
8179
8180 function Debug_Statement
8181 (N : Node_Id) return Node_Id; -- Node3
8182
8183 function Declarations
8184 (N : Node_Id) return List_Id; -- List2
8185
8186 function Default_Expression
8187 (N : Node_Id) return Node_Id; -- Node5
8188
8189 function Default_Storage_Pool
8190 (N : Node_Id) return Node_Id; -- Node3
8191
8192 function Default_Name
8193 (N : Node_Id) return Node_Id; -- Node2
8194
8195 function Defining_Identifier
8196 (N : Node_Id) return Entity_Id; -- Node1
8197
8198 function Defining_Unit_Name
8199 (N : Node_Id) return Node_Id; -- Node1
8200
8201 function Delay_Alternative
8202 (N : Node_Id) return Node_Id; -- Node4
8203
8204 function Delay_Statement
8205 (N : Node_Id) return Node_Id; -- Node2
8206
8207 function Delta_Expression
8208 (N : Node_Id) return Node_Id; -- Node3
8209
8210 function Digits_Expression
8211 (N : Node_Id) return Node_Id; -- Node2
8212
8213 function Discr_Check_Funcs_Built
8214 (N : Node_Id) return Boolean; -- Flag11
8215
8216 function Discrete_Choices
8217 (N : Node_Id) return List_Id; -- List4
8218
8219 function Discrete_Range
8220 (N : Node_Id) return Node_Id; -- Node4
8221
8222 function Discrete_Subtype_Definition
8223 (N : Node_Id) return Node_Id; -- Node4
8224
8225 function Discrete_Subtype_Definitions
8226 (N : Node_Id) return List_Id; -- List2
8227
8228 function Discriminant_Specifications
8229 (N : Node_Id) return List_Id; -- List4
8230
8231 function Discriminant_Type
8232 (N : Node_Id) return Node_Id; -- Node5
8233
8234 function Do_Accessibility_Check
8235 (N : Node_Id) return Boolean; -- Flag13
8236
8237 function Do_Discriminant_Check
8238 (N : Node_Id) return Boolean; -- Flag13
8239
8240 function Do_Division_Check
8241 (N : Node_Id) return Boolean; -- Flag13
8242
8243 function Do_Length_Check
8244 (N : Node_Id) return Boolean; -- Flag4
8245
8246 function Do_Overflow_Check
8247 (N : Node_Id) return Boolean; -- Flag17
8248
8249 function Do_Range_Check
8250 (N : Node_Id) return Boolean; -- Flag9
8251
8252 function Do_Storage_Check
8253 (N : Node_Id) return Boolean; -- Flag17
8254
8255 function Do_Tag_Check
8256 (N : Node_Id) return Boolean; -- Flag13
8257
8258 function Elaborate_All_Desirable
8259 (N : Node_Id) return Boolean; -- Flag9
8260
8261 function Elaborate_All_Present
8262 (N : Node_Id) return Boolean; -- Flag14
8263
8264 function Elaborate_Desirable
8265 (N : Node_Id) return Boolean; -- Flag11
8266
8267 function Elaborate_Present
8268 (N : Node_Id) return Boolean; -- Flag4
8269
8270 function Elaboration_Boolean
8271 (N : Node_Id) return Node_Id; -- Node2
8272
8273 function Else_Actions
8274 (N : Node_Id) return List_Id; -- List3
8275
8276 function Else_Statements
8277 (N : Node_Id) return List_Id; -- List4
8278
8279 function Elsif_Parts
8280 (N : Node_Id) return List_Id; -- List3
8281
8282 function Enclosing_Variant
8283 (N : Node_Id) return Node_Id; -- Node2
8284
8285 function End_Label
8286 (N : Node_Id) return Node_Id; -- Node4
8287
8288 function End_Span
8289 (N : Node_Id) return Uint; -- Uint5
8290
8291 function Entity
8292 (N : Node_Id) return Node_Id; -- Node4
8293
8294 function Entity_Or_Associated_Node
8295 (N : Node_Id) return Node_Id; -- Node4
8296
8297 function Entry_Body_Formal_Part
8298 (N : Node_Id) return Node_Id; -- Node5
8299
8300 function Entry_Call_Alternative
8301 (N : Node_Id) return Node_Id; -- Node1
8302
8303 function Entry_Call_Statement
8304 (N : Node_Id) return Node_Id; -- Node1
8305
8306 function Entry_Direct_Name
8307 (N : Node_Id) return Node_Id; -- Node1
8308
8309 function Entry_Index
8310 (N : Node_Id) return Node_Id; -- Node5
8311
8312 function Entry_Index_Specification
8313 (N : Node_Id) return Node_Id; -- Node4
8314
8315 function Etype
8316 (N : Node_Id) return Node_Id; -- Node5
8317
8318 function Exception_Choices
8319 (N : Node_Id) return List_Id; -- List4
8320
8321 function Exception_Handlers
8322 (N : Node_Id) return List_Id; -- List5
8323
8324 function Exception_Junk
8325 (N : Node_Id) return Boolean; -- Flag8
8326
8327 function Exception_Label
8328 (N : Node_Id) return Node_Id; -- Node5
8329
8330 function Explicit_Actual_Parameter
8331 (N : Node_Id) return Node_Id; -- Node3
8332
8333 function Expansion_Delayed
8334 (N : Node_Id) return Boolean; -- Flag11
8335
8336 function Explicit_Generic_Actual_Parameter
8337 (N : Node_Id) return Node_Id; -- Node1
8338
8339 function Expression
8340 (N : Node_Id) return Node_Id; -- Node3
8341
8342 function Expressions
8343 (N : Node_Id) return List_Id; -- List1
8344
8345 function First_Bit
8346 (N : Node_Id) return Node_Id; -- Node3
8347
8348 function First_Inlined_Subprogram
8349 (N : Node_Id) return Entity_Id; -- Node3
8350
8351 function First_Name
8352 (N : Node_Id) return Boolean; -- Flag5
8353
8354 function First_Named_Actual
8355 (N : Node_Id) return Node_Id; -- Node4
8356
8357 function First_Real_Statement
8358 (N : Node_Id) return Node_Id; -- Node2
8359
8360 function First_Subtype_Link
8361 (N : Node_Id) return Entity_Id; -- Node5
8362
8363 function Float_Truncate
8364 (N : Node_Id) return Boolean; -- Flag11
8365
8366 function Formal_Type_Definition
8367 (N : Node_Id) return Node_Id; -- Node3
8368
8369 function Forwards_OK
8370 (N : Node_Id) return Boolean; -- Flag5
8371
8372 function From_Aspect_Specification
8373 (N : Node_Id) return Boolean; -- Flag13
8374
8375 function From_At_End
8376 (N : Node_Id) return Boolean; -- Flag4
8377
8378 function From_At_Mod
8379 (N : Node_Id) return Boolean; -- Flag4
8380
8381 function From_Default
8382 (N : Node_Id) return Boolean; -- Flag6
8383
8384 function Generic_Associations
8385 (N : Node_Id) return List_Id; -- List3
8386
8387 function Generic_Formal_Declarations
8388 (N : Node_Id) return List_Id; -- List2
8389
8390 function Generic_Parent
8391 (N : Node_Id) return Node_Id; -- Node5
8392
8393 function Generic_Parent_Type
8394 (N : Node_Id) return Node_Id; -- Node4
8395
8396 function Handled_Statement_Sequence
8397 (N : Node_Id) return Node_Id; -- Node4
8398
8399 function Handler_List_Entry
8400 (N : Node_Id) return Node_Id; -- Node2
8401
8402 function Has_Created_Identifier
8403 (N : Node_Id) return Boolean; -- Flag15
8404
8405 function Has_Dynamic_Length_Check
8406 (N : Node_Id) return Boolean; -- Flag10
8407
8408 function Has_Dynamic_Range_Check
8409 (N : Node_Id) return Boolean; -- Flag12
8410
8411 function Has_Init_Expression
8412 (N : Node_Id) return Boolean; -- Flag14
8413
8414 function Has_Local_Raise
8415 (N : Node_Id) return Boolean; -- Flag8
8416
8417 function Has_No_Elaboration_Code
8418 (N : Node_Id) return Boolean; -- Flag17
8419
8420 function Has_Pragma_CPU
8421 (N : Node_Id) return Boolean; -- Flag14
8422
8423 function Has_Pragma_Priority
8424 (N : Node_Id) return Boolean; -- Flag6
8425
8426 function Has_Pragma_Suppress_All
8427 (N : Node_Id) return Boolean; -- Flag14
8428
8429 function Has_Private_View
8430 (N : Node_Id) return Boolean; -- Flag11
8431
8432 function Has_Relative_Deadline_Pragma
8433 (N : Node_Id) return Boolean; -- Flag9
8434
8435 function Has_Self_Reference
8436 (N : Node_Id) return Boolean; -- Flag13
8437
8438 function Has_Storage_Size_Pragma
8439 (N : Node_Id) return Boolean; -- Flag5
8440
8441 function Has_Task_Info_Pragma
8442 (N : Node_Id) return Boolean; -- Flag7
8443
8444 function Has_Task_Name_Pragma
8445 (N : Node_Id) return Boolean; -- Flag8
8446
8447 function Has_Wide_Character
8448 (N : Node_Id) return Boolean; -- Flag11
8449
8450 function Has_Wide_Wide_Character
8451 (N : Node_Id) return Boolean; -- Flag13
8452
8453 function Hidden_By_Use_Clause
8454 (N : Node_Id) return Elist_Id; -- Elist4
8455
8456 function High_Bound
8457 (N : Node_Id) return Node_Id; -- Node2
8458
8459 function Identifier
8460 (N : Node_Id) return Node_Id; -- Node1
8461
8462 function Interface_List
8463 (N : Node_Id) return List_Id; -- List2
8464
8465 function Interface_Present
8466 (N : Node_Id) return Boolean; -- Flag16
8467
8468 function Implicit_With
8469 (N : Node_Id) return Boolean; -- Flag16
8470
8471 function Import_Interface_Present
8472 (N : Node_Id) return Boolean; -- Flag16
8473
8474 function In_Present
8475 (N : Node_Id) return Boolean; -- Flag15
8476
8477 function Includes_Infinities
8478 (N : Node_Id) return Boolean; -- Flag11
8479
8480 function Inherited_Discriminant
8481 (N : Node_Id) return Boolean; -- Flag13
8482
8483 function Instance_Spec
8484 (N : Node_Id) return Node_Id; -- Node5
8485
8486 function Intval
8487 (N : Node_Id) return Uint; -- Uint3
8488
8489 function Is_Accessibility_Actual
8490 (N : Node_Id) return Boolean; -- Flag13
8491
8492 function Is_Asynchronous_Call_Block
8493 (N : Node_Id) return Boolean; -- Flag7
8494
8495 function Is_Boolean_Aspect
8496 (N : Node_Id) return Boolean; -- Flag16
8497
8498 function Is_Component_Left_Opnd
8499 (N : Node_Id) return Boolean; -- Flag13
8500
8501 function Is_Component_Right_Opnd
8502 (N : Node_Id) return Boolean; -- Flag14
8503
8504 function Is_Controlling_Actual
8505 (N : Node_Id) return Boolean; -- Flag16
8506
8507 function Is_Delayed_Aspect
8508 (N : Node_Id) return Boolean; -- Flag14
8509
8510 function Is_Dynamic_Coextension
8511 (N : Node_Id) return Boolean; -- Flag18
8512
8513 function Is_Elsif
8514 (N : Node_Id) return Boolean; -- Flag13
8515
8516 function Is_Entry_Barrier_Function
8517 (N : Node_Id) return Boolean; -- Flag8
8518
8519 function Is_Expanded_Build_In_Place_Call
8520 (N : Node_Id) return Boolean; -- Flag11
8521
8522 function Is_Folded_In_Parser
8523 (N : Node_Id) return Boolean; -- Flag4
8524
8525 function Is_In_Discriminant_Check
8526 (N : Node_Id) return Boolean; -- Flag11
8527
8528 function Is_Machine_Number
8529 (N : Node_Id) return Boolean; -- Flag11
8530
8531 function Is_Null_Loop
8532 (N : Node_Id) return Boolean; -- Flag16
8533
8534 function Is_Overloaded
8535 (N : Node_Id) return Boolean; -- Flag5
8536
8537 function Is_Power_Of_2_For_Shift
8538 (N : Node_Id) return Boolean; -- Flag13
8539
8540 function Is_Protected_Subprogram_Body
8541 (N : Node_Id) return Boolean; -- Flag7
8542
8543 function Is_Static_Coextension
8544 (N : Node_Id) return Boolean; -- Flag14
8545
8546 function Is_Static_Expression
8547 (N : Node_Id) return Boolean; -- Flag6
8548
8549 function Is_Subprogram_Descriptor
8550 (N : Node_Id) return Boolean; -- Flag16
8551
8552 function Is_Task_Allocation_Block
8553 (N : Node_Id) return Boolean; -- Flag6
8554
8555 function Is_Task_Master
8556 (N : Node_Id) return Boolean; -- Flag5
8557
8558 function Iteration_Scheme
8559 (N : Node_Id) return Node_Id; -- Node2
8560
8561 function Iterator_Specification
8562 (N : Node_Id) return Node_Id; -- Node2
8563
8564 function Itype
8565 (N : Node_Id) return Entity_Id; -- Node1
8566
8567 function Kill_Range_Check
8568 (N : Node_Id) return Boolean; -- Flag11
8569
8570 function Label_Construct
8571 (N : Node_Id) return Node_Id; -- Node2
8572
8573 function Left_Opnd
8574 (N : Node_Id) return Node_Id; -- Node2
8575
8576 function Last_Bit
8577 (N : Node_Id) return Node_Id; -- Node4
8578
8579 function Last_Name
8580 (N : Node_Id) return Boolean; -- Flag6
8581
8582 function Library_Unit
8583 (N : Node_Id) return Node_Id; -- Node4
8584
8585 function Limited_View_Installed
8586 (N : Node_Id) return Boolean; -- Flag18
8587
8588 function Limited_Present
8589 (N : Node_Id) return Boolean; -- Flag17
8590
8591 function Literals
8592 (N : Node_Id) return List_Id; -- List1
8593
8594 function Local_Raise_Not_OK
8595 (N : Node_Id) return Boolean; -- Flag7
8596
8597 function Local_Raise_Statements
8598 (N : Node_Id) return Elist_Id; -- Elist1
8599
8600 function Loop_Actions
8601 (N : Node_Id) return List_Id; -- List2
8602
8603 function Loop_Parameter_Specification
8604 (N : Node_Id) return Node_Id; -- Node4
8605
8606 function Low_Bound
8607 (N : Node_Id) return Node_Id; -- Node1
8608
8609 function Mod_Clause
8610 (N : Node_Id) return Node_Id; -- Node2
8611
8612 function More_Ids
8613 (N : Node_Id) return Boolean; -- Flag5
8614
8615 function Must_Be_Byte_Aligned
8616 (N : Node_Id) return Boolean; -- Flag14
8617
8618 function Must_Not_Freeze
8619 (N : Node_Id) return Boolean; -- Flag8
8620
8621 function Must_Not_Override
8622 (N : Node_Id) return Boolean; -- Flag15
8623
8624 function Must_Override
8625 (N : Node_Id) return Boolean; -- Flag14
8626
8627 function Name
8628 (N : Node_Id) return Node_Id; -- Node2
8629
8630 function Names
8631 (N : Node_Id) return List_Id; -- List2
8632
8633 function Next_Entity
8634 (N : Node_Id) return Node_Id; -- Node2
8635
8636 function Next_Exit_Statement
8637 (N : Node_Id) return Node_Id; -- Node3
8638
8639 function Next_Implicit_With
8640 (N : Node_Id) return Node_Id; -- Node3
8641
8642 function Next_Named_Actual
8643 (N : Node_Id) return Node_Id; -- Node4
8644
8645 function Next_Pragma
8646 (N : Node_Id) return Node_Id; -- Node1
8647
8648 function Next_Rep_Item
8649 (N : Node_Id) return Node_Id; -- Node5
8650
8651 function Next_Use_Clause
8652 (N : Node_Id) return Node_Id; -- Node3
8653
8654 function No_Ctrl_Actions
8655 (N : Node_Id) return Boolean; -- Flag7
8656
8657 function No_Elaboration_Check
8658 (N : Node_Id) return Boolean; -- Flag14
8659
8660 function No_Entities_Ref_In_Spec
8661 (N : Node_Id) return Boolean; -- Flag8
8662
8663 function No_Initialization
8664 (N : Node_Id) return Boolean; -- Flag13
8665
8666 function No_Truncation
8667 (N : Node_Id) return Boolean; -- Flag17
8668
8669 function Null_Present
8670 (N : Node_Id) return Boolean; -- Flag13
8671
8672 function Null_Exclusion_Present
8673 (N : Node_Id) return Boolean; -- Flag11
8674
8675 function Null_Exclusion_In_Return_Present
8676 (N : Node_Id) return Boolean; -- Flag14
8677
8678 function Null_Record_Present
8679 (N : Node_Id) return Boolean; -- Flag17
8680
8681 function Object_Definition
8682 (N : Node_Id) return Node_Id; -- Node4
8683
8684 function Of_Present
8685 (N : Node_Id) return Boolean; -- Flag16
8686
8687 function Original_Discriminant
8688 (N : Node_Id) return Node_Id; -- Node2
8689
8690 function Original_Entity
8691 (N : Node_Id) return Entity_Id; -- Node2
8692
8693 function Others_Discrete_Choices
8694 (N : Node_Id) return List_Id; -- List1
8695
8696 function Out_Present
8697 (N : Node_Id) return Boolean; -- Flag17
8698
8699 function Parameter_Associations
8700 (N : Node_Id) return List_Id; -- List3
8701
8702 function Parameter_List_Truncated
8703 (N : Node_Id) return Boolean; -- Flag17
8704
8705 function Parameter_Specifications
8706 (N : Node_Id) return List_Id; -- List3
8707
8708 function Parameter_Type
8709 (N : Node_Id) return Node_Id; -- Node2
8710
8711 function Parent_Spec
8712 (N : Node_Id) return Node_Id; -- Node4
8713
8714 function Position
8715 (N : Node_Id) return Node_Id; -- Node2
8716
8717 function Pragma_Argument_Associations
8718 (N : Node_Id) return List_Id; -- List2
8719
8720 function Pragma_Enabled
8721 (N : Node_Id) return Boolean; -- Flag5
8722
8723 function Pragma_Identifier
8724 (N : Node_Id) return Node_Id; -- Node4
8725
8726 function Pragmas_After
8727 (N : Node_Id) return List_Id; -- List5
8728
8729 function Pragmas_Before
8730 (N : Node_Id) return List_Id; -- List4
8731
8732 function Prefix
8733 (N : Node_Id) return Node_Id; -- Node3
8734
8735 function Present_Expr
8736 (N : Node_Id) return Uint; -- Uint3
8737
8738 function Prev_Ids
8739 (N : Node_Id) return Boolean; -- Flag6
8740
8741 function Print_In_Hex
8742 (N : Node_Id) return Boolean; -- Flag13
8743
8744 function Private_Declarations
8745 (N : Node_Id) return List_Id; -- List3
8746
8747 function Private_Present
8748 (N : Node_Id) return Boolean; -- Flag15
8749
8750 function Procedure_To_Call
8751 (N : Node_Id) return Node_Id; -- Node2
8752
8753 function Proper_Body
8754 (N : Node_Id) return Node_Id; -- Node1
8755
8756 function Protected_Definition
8757 (N : Node_Id) return Node_Id; -- Node3
8758
8759 function Protected_Present
8760 (N : Node_Id) return Boolean; -- Flag6
8761
8762 function Raises_Constraint_Error
8763 (N : Node_Id) return Boolean; -- Flag7
8764
8765 function Range_Constraint
8766 (N : Node_Id) return Node_Id; -- Node4
8767
8768 function Range_Expression
8769 (N : Node_Id) return Node_Id; -- Node4
8770
8771 function Real_Range_Specification
8772 (N : Node_Id) return Node_Id; -- Node4
8773
8774 function Realval
8775 (N : Node_Id) return Ureal; -- Ureal3
8776
8777 function Reason
8778 (N : Node_Id) return Uint; -- Uint3
8779
8780 function Record_Extension_Part
8781 (N : Node_Id) return Node_Id; -- Node3
8782
8783 function Redundant_Use
8784 (N : Node_Id) return Boolean; -- Flag13
8785
8786 function Renaming_Exception
8787 (N : Node_Id) return Node_Id; -- Node2
8788
8789 function Result_Definition
8790 (N : Node_Id) return Node_Id; -- Node4
8791
8792 function Return_Object_Declarations
8793 (N : Node_Id) return List_Id; -- List3
8794
8795 function Return_Statement_Entity
8796 (N : Node_Id) return Node_Id; -- Node5
8797
8798 function Reverse_Present
8799 (N : Node_Id) return Boolean; -- Flag15
8800
8801 function Right_Opnd
8802 (N : Node_Id) return Node_Id; -- Node3
8803
8804 function Rounded_Result
8805 (N : Node_Id) return Boolean; -- Flag18
8806
8807 function SCIL_Controlling_Tag
8808 (N : Node_Id) return Node_Id; -- Node5
8809
8810 function SCIL_Entity
8811 (N : Node_Id) return Node_Id; -- Node4
8812
8813 function SCIL_Tag_Value
8814 (N : Node_Id) return Node_Id; -- Node5
8815
8816 function SCIL_Target_Prim
8817 (N : Node_Id) return Node_Id; -- Node2
8818
8819 function Scope
8820 (N : Node_Id) return Node_Id; -- Node3
8821
8822 function Select_Alternatives
8823 (N : Node_Id) return List_Id; -- List1
8824
8825 function Selector_Name
8826 (N : Node_Id) return Node_Id; -- Node2
8827
8828 function Selector_Names
8829 (N : Node_Id) return List_Id; -- List1
8830
8831 function Shift_Count_OK
8832 (N : Node_Id) return Boolean; -- Flag4
8833
8834 function Source_Type
8835 (N : Node_Id) return Entity_Id; -- Node1
8836
8837 function Specification
8838 (N : Node_Id) return Node_Id; -- Node1
8839
8840 function Split_PPC
8841 (N : Node_Id) return Boolean; -- Flag17
8842
8843 function Statements
8844 (N : Node_Id) return List_Id; -- List3
8845
8846 function Static_Processing_OK
8847 (N : Node_Id) return Boolean; -- Flag4
8848
8849 function Storage_Pool
8850 (N : Node_Id) return Node_Id; -- Node1
8851
8852 function Strval
8853 (N : Node_Id) return String_Id; -- Str3
8854
8855 function Subtype_Indication
8856 (N : Node_Id) return Node_Id; -- Node5
8857
8858 function Subtype_Mark
8859 (N : Node_Id) return Node_Id; -- Node4
8860
8861 function Subtype_Marks
8862 (N : Node_Id) return List_Id; -- List2
8863
8864 function Suppress_Assignment_Checks
8865 (N : Node_Id) return Boolean; -- Flag18
8866
8867 function Suppress_Loop_Warnings
8868 (N : Node_Id) return Boolean; -- Flag17
8869
8870 function Synchronized_Present
8871 (N : Node_Id) return Boolean; -- Flag7
8872
8873 function Tagged_Present
8874 (N : Node_Id) return Boolean; -- Flag15
8875
8876 function Target_Type
8877 (N : Node_Id) return Entity_Id; -- Node2
8878
8879 function Task_Definition
8880 (N : Node_Id) return Node_Id; -- Node3
8881
8882 function Task_Present
8883 (N : Node_Id) return Boolean; -- Flag5
8884
8885 function Then_Actions
8886 (N : Node_Id) return List_Id; -- List2
8887
8888 function Then_Statements
8889 (N : Node_Id) return List_Id; -- List2
8890
8891 function Treat_Fixed_As_Integer
8892 (N : Node_Id) return Boolean; -- Flag14
8893
8894 function Triggering_Alternative
8895 (N : Node_Id) return Node_Id; -- Node1
8896
8897 function Triggering_Statement
8898 (N : Node_Id) return Node_Id; -- Node1
8899
8900 function TSS_Elist
8901 (N : Node_Id) return Elist_Id; -- Elist3
8902
8903 function Type_Definition
8904 (N : Node_Id) return Node_Id; -- Node3
8905
8906 function Unit
8907 (N : Node_Id) return Node_Id; -- Node2
8908
8909 function Unknown_Discriminants_Present
8910 (N : Node_Id) return Boolean; -- Flag13
8911
8912 function Unreferenced_In_Spec
8913 (N : Node_Id) return Boolean; -- Flag7
8914
8915 function Variant_Part
8916 (N : Node_Id) return Node_Id; -- Node4
8917
8918 function Variants
8919 (N : Node_Id) return List_Id; -- List1
8920
8921 function Visible_Declarations
8922 (N : Node_Id) return List_Id; -- List2
8923
8924 function Was_Originally_Stub
8925 (N : Node_Id) return Boolean; -- Flag13
8926
8927 function Withed_Body
8928 (N : Node_Id) return Node_Id; -- Node1
8929
8930 function Zero_Cost_Handling
8931 (N : Node_Id) return Boolean; -- Flag5
8932
8933 -- End functions (note used by xsinfo utility program to end processing)
8934
8935 ----------------------------
8936 -- Node Update Procedures --
8937 ----------------------------
8938
8939 -- These are the corresponding node update routines, which again provide
8940 -- a high level logical access with type checking. In addition to setting
8941 -- the indicated field of the node N to the given Val, in the case of
8942 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8943 -- point back to node N. This automates the setting of the parent pointer.
8944
8945 procedure Set_ABE_Is_Certain
8946 (N : Node_Id; Val : Boolean := True); -- Flag18
8947
8948 procedure Set_Abort_Present
8949 (N : Node_Id; Val : Boolean := True); -- Flag15
8950
8951 procedure Set_Abortable_Part
8952 (N : Node_Id; Val : Node_Id); -- Node2
8953
8954 procedure Set_Abstract_Present
8955 (N : Node_Id; Val : Boolean := True); -- Flag4
8956
8957 procedure Set_Accept_Handler_Records
8958 (N : Node_Id; Val : List_Id); -- List5
8959
8960 procedure Set_Accept_Statement
8961 (N : Node_Id; Val : Node_Id); -- Node2
8962
8963 procedure Set_Access_Definition
8964 (N : Node_Id; Val : Node_Id); -- Node3
8965
8966 procedure Set_Access_To_Subprogram_Definition
8967 (N : Node_Id; Val : Node_Id); -- Node3
8968
8969 procedure Set_Access_Types_To_Process
8970 (N : Node_Id; Val : Elist_Id); -- Elist2
8971
8972 procedure Set_Actions
8973 (N : Node_Id; Val : List_Id); -- List1
8974
8975 procedure Set_Activation_Chain_Entity
8976 (N : Node_Id; Val : Node_Id); -- Node3
8977
8978 procedure Set_Acts_As_Spec
8979 (N : Node_Id; Val : Boolean := True); -- Flag4
8980
8981 procedure Set_Actual_Designated_Subtype
8982 (N : Node_Id; Val : Node_Id); -- Node4
8983
8984 procedure Set_Address_Warning_Posted
8985 (N : Node_Id; Val : Boolean := True); -- Flag18
8986
8987 procedure Set_Aggregate_Bounds
8988 (N : Node_Id; Val : Node_Id); -- Node3
8989
8990 procedure Set_Aliased_Present
8991 (N : Node_Id; Val : Boolean := True); -- Flag4
8992
8993 procedure Set_All_Others
8994 (N : Node_Id; Val : Boolean := True); -- Flag11
8995
8996 procedure Set_All_Present
8997 (N : Node_Id; Val : Boolean := True); -- Flag15
8998
8999 procedure Set_Alternatives
9000 (N : Node_Id; Val : List_Id); -- List4
9001
9002 procedure Set_Ancestor_Part
9003 (N : Node_Id; Val : Node_Id); -- Node3
9004
9005 procedure Set_Array_Aggregate
9006 (N : Node_Id; Val : Node_Id); -- Node3
9007
9008 procedure Set_Aspect_Cancel
9009 (N : Node_Id; Val : Boolean := True); -- Flag11
9010
9011 procedure Set_Aspect_Rep_Item
9012 (N : Node_Id; Val : Node_Id); -- Node2
9013
9014 procedure Set_Assignment_OK
9015 (N : Node_Id; Val : Boolean := True); -- Flag15
9016
9017 procedure Set_Associated_Node
9018 (N : Node_Id; Val : Node_Id); -- Node4
9019
9020 procedure Set_Attribute_Name
9021 (N : Node_Id; Val : Name_Id); -- Name2
9022
9023 procedure Set_At_End_Proc
9024 (N : Node_Id; Val : Node_Id); -- Node1
9025
9026 procedure Set_Aux_Decls_Node
9027 (N : Node_Id; Val : Node_Id); -- Node5
9028
9029 procedure Set_Backwards_OK
9030 (N : Node_Id; Val : Boolean := True); -- Flag6
9031
9032 procedure Set_Bad_Is_Detected
9033 (N : Node_Id; Val : Boolean := True); -- Flag15
9034
9035 procedure Set_Body_Required
9036 (N : Node_Id; Val : Boolean := True); -- Flag13
9037
9038 procedure Set_Body_To_Inline
9039 (N : Node_Id; Val : Node_Id); -- Node3
9040
9041 procedure Set_Box_Present
9042 (N : Node_Id; Val : Boolean := True); -- Flag15
9043
9044 procedure Set_By_Ref
9045 (N : Node_Id; Val : Boolean := True); -- Flag5
9046
9047 procedure Set_Char_Literal_Value
9048 (N : Node_Id; Val : Uint); -- Uint2
9049
9050 procedure Set_Chars
9051 (N : Node_Id; Val : Name_Id); -- Name1
9052
9053 procedure Set_Check_Address_Alignment
9054 (N : Node_Id; Val : Boolean := True); -- Flag11
9055
9056 procedure Set_Choice_Parameter
9057 (N : Node_Id; Val : Node_Id); -- Node2
9058
9059 procedure Set_Choices
9060 (N : Node_Id; Val : List_Id); -- List1
9061
9062 procedure Set_Class_Present
9063 (N : Node_Id; Val : Boolean := True); -- Flag6
9064
9065 procedure Set_Coextensions
9066 (N : Node_Id; Val : Elist_Id); -- Elist4
9067
9068 procedure Set_Comes_From_Extended_Return_Statement
9069 (N : Node_Id; Val : Boolean := True); -- Flag18
9070
9071 procedure Set_Compile_Time_Known_Aggregate
9072 (N : Node_Id; Val : Boolean := True); -- Flag18
9073
9074 procedure Set_Component_Associations
9075 (N : Node_Id; Val : List_Id); -- List2
9076
9077 procedure Set_Component_Clauses
9078 (N : Node_Id; Val : List_Id); -- List3
9079
9080 procedure Set_Component_Definition
9081 (N : Node_Id; Val : Node_Id); -- Node4
9082
9083 procedure Set_Component_Items
9084 (N : Node_Id; Val : List_Id); -- List3
9085
9086 procedure Set_Component_List
9087 (N : Node_Id; Val : Node_Id); -- Node1
9088
9089 procedure Set_Component_Name
9090 (N : Node_Id; Val : Node_Id); -- Node1
9091
9092 procedure Set_Componentwise_Assignment
9093 (N : Node_Id; Val : Boolean := True); -- Flag14
9094
9095 procedure Set_Condition
9096 (N : Node_Id; Val : Node_Id); -- Node1
9097
9098 procedure Set_Condition_Actions
9099 (N : Node_Id; Val : List_Id); -- List3
9100
9101 procedure Set_Config_Pragmas
9102 (N : Node_Id; Val : List_Id); -- List4
9103
9104 procedure Set_Constant_Present
9105 (N : Node_Id; Val : Boolean := True); -- Flag17
9106
9107 procedure Set_Constraint
9108 (N : Node_Id; Val : Node_Id); -- Node3
9109
9110 procedure Set_Constraints
9111 (N : Node_Id; Val : List_Id); -- List1
9112
9113 procedure Set_Context_Installed
9114 (N : Node_Id; Val : Boolean := True); -- Flag13
9115
9116 procedure Set_Context_Items
9117 (N : Node_Id; Val : List_Id); -- List1
9118
9119 procedure Set_Context_Pending
9120 (N : Node_Id; Val : Boolean := True); -- Flag16
9121
9122 procedure Set_Controlling_Argument
9123 (N : Node_Id; Val : Node_Id); -- Node1
9124
9125 procedure Set_Conversion_OK
9126 (N : Node_Id; Val : Boolean := True); -- Flag14
9127
9128 procedure Set_Corresponding_Body
9129 (N : Node_Id; Val : Node_Id); -- Node5
9130
9131 procedure Set_Corresponding_Formal_Spec
9132 (N : Node_Id; Val : Node_Id); -- Node3
9133
9134 procedure Set_Corresponding_Generic_Association
9135 (N : Node_Id; Val : Node_Id); -- Node5
9136
9137 procedure Set_Corresponding_Integer_Value
9138 (N : Node_Id; Val : Uint); -- Uint4
9139
9140 procedure Set_Corresponding_Spec
9141 (N : Node_Id; Val : Node_Id); -- Node5
9142
9143 procedure Set_Corresponding_Stub
9144 (N : Node_Id; Val : Node_Id); -- Node3
9145
9146 procedure Set_Dcheck_Function
9147 (N : Node_Id; Val : Entity_Id); -- Node5
9148
9149 procedure Set_Debug_Statement
9150 (N : Node_Id; Val : Node_Id); -- Node3
9151
9152 procedure Set_Declarations
9153 (N : Node_Id; Val : List_Id); -- List2
9154
9155 procedure Set_Default_Expression
9156 (N : Node_Id; Val : Node_Id); -- Node5
9157
9158 procedure Set_Default_Storage_Pool
9159 (N : Node_Id; Val : Node_Id); -- Node3
9160
9161 procedure Set_Default_Name
9162 (N : Node_Id; Val : Node_Id); -- Node2
9163
9164 procedure Set_Defining_Identifier
9165 (N : Node_Id; Val : Entity_Id); -- Node1
9166
9167 procedure Set_Defining_Unit_Name
9168 (N : Node_Id; Val : Node_Id); -- Node1
9169
9170 procedure Set_Delay_Alternative
9171 (N : Node_Id; Val : Node_Id); -- Node4
9172
9173 procedure Set_Delay_Statement
9174 (N : Node_Id; Val : Node_Id); -- Node2
9175
9176 procedure Set_Delta_Expression
9177 (N : Node_Id; Val : Node_Id); -- Node3
9178
9179 procedure Set_Digits_Expression
9180 (N : Node_Id; Val : Node_Id); -- Node2
9181
9182 procedure Set_Discr_Check_Funcs_Built
9183 (N : Node_Id; Val : Boolean := True); -- Flag11
9184
9185 procedure Set_Discrete_Choices
9186 (N : Node_Id; Val : List_Id); -- List4
9187
9188 procedure Set_Discrete_Range
9189 (N : Node_Id; Val : Node_Id); -- Node4
9190
9191 procedure Set_Discrete_Subtype_Definition
9192 (N : Node_Id; Val : Node_Id); -- Node4
9193
9194 procedure Set_Discrete_Subtype_Definitions
9195 (N : Node_Id; Val : List_Id); -- List2
9196
9197 procedure Set_Discriminant_Specifications
9198 (N : Node_Id; Val : List_Id); -- List4
9199
9200 procedure Set_Discriminant_Type
9201 (N : Node_Id; Val : Node_Id); -- Node5
9202
9203 procedure Set_Do_Accessibility_Check
9204 (N : Node_Id; Val : Boolean := True); -- Flag13
9205
9206 procedure Set_Do_Discriminant_Check
9207 (N : Node_Id; Val : Boolean := True); -- Flag13
9208
9209 procedure Set_Do_Division_Check
9210 (N : Node_Id; Val : Boolean := True); -- Flag13
9211
9212 procedure Set_Do_Length_Check
9213 (N : Node_Id; Val : Boolean := True); -- Flag4
9214
9215 procedure Set_Do_Overflow_Check
9216 (N : Node_Id; Val : Boolean := True); -- Flag17
9217
9218 procedure Set_Do_Range_Check
9219 (N : Node_Id; Val : Boolean := True); -- Flag9
9220
9221 procedure Set_Do_Storage_Check
9222 (N : Node_Id; Val : Boolean := True); -- Flag17
9223
9224 procedure Set_Do_Tag_Check
9225 (N : Node_Id; Val : Boolean := True); -- Flag13
9226
9227 procedure Set_Elaborate_All_Desirable
9228 (N : Node_Id; Val : Boolean := True); -- Flag9
9229
9230 procedure Set_Elaborate_All_Present
9231 (N : Node_Id; Val : Boolean := True); -- Flag14
9232
9233 procedure Set_Elaborate_Desirable
9234 (N : Node_Id; Val : Boolean := True); -- Flag11
9235
9236 procedure Set_Elaborate_Present
9237 (N : Node_Id; Val : Boolean := True); -- Flag4
9238
9239 procedure Set_Elaboration_Boolean
9240 (N : Node_Id; Val : Node_Id); -- Node2
9241
9242 procedure Set_Else_Actions
9243 (N : Node_Id; Val : List_Id); -- List3
9244
9245 procedure Set_Else_Statements
9246 (N : Node_Id; Val : List_Id); -- List4
9247
9248 procedure Set_Elsif_Parts
9249 (N : Node_Id; Val : List_Id); -- List3
9250
9251 procedure Set_Enclosing_Variant
9252 (N : Node_Id; Val : Node_Id); -- Node2
9253
9254 procedure Set_End_Label
9255 (N : Node_Id; Val : Node_Id); -- Node4
9256
9257 procedure Set_End_Span
9258 (N : Node_Id; Val : Uint); -- Uint5
9259
9260 procedure Set_Entity
9261 (N : Node_Id; Val : Node_Id); -- Node4
9262
9263 procedure Set_Entry_Body_Formal_Part
9264 (N : Node_Id; Val : Node_Id); -- Node5
9265
9266 procedure Set_Entry_Call_Alternative
9267 (N : Node_Id; Val : Node_Id); -- Node1
9268
9269 procedure Set_Entry_Call_Statement
9270 (N : Node_Id; Val : Node_Id); -- Node1
9271
9272 procedure Set_Entry_Direct_Name
9273 (N : Node_Id; Val : Node_Id); -- Node1
9274
9275 procedure Set_Entry_Index
9276 (N : Node_Id; Val : Node_Id); -- Node5
9277
9278 procedure Set_Entry_Index_Specification
9279 (N : Node_Id; Val : Node_Id); -- Node4
9280
9281 procedure Set_Etype
9282 (N : Node_Id; Val : Node_Id); -- Node5
9283
9284 procedure Set_Exception_Choices
9285 (N : Node_Id; Val : List_Id); -- List4
9286
9287 procedure Set_Exception_Handlers
9288 (N : Node_Id; Val : List_Id); -- List5
9289
9290 procedure Set_Exception_Junk
9291 (N : Node_Id; Val : Boolean := True); -- Flag8
9292
9293 procedure Set_Exception_Label
9294 (N : Node_Id; Val : Node_Id); -- Node5
9295
9296 procedure Set_Expansion_Delayed
9297 (N : Node_Id; Val : Boolean := True); -- Flag11
9298
9299 procedure Set_Explicit_Actual_Parameter
9300 (N : Node_Id; Val : Node_Id); -- Node3
9301
9302 procedure Set_Explicit_Generic_Actual_Parameter
9303 (N : Node_Id; Val : Node_Id); -- Node1
9304
9305 procedure Set_Expression
9306 (N : Node_Id; Val : Node_Id); -- Node3
9307
9308 procedure Set_Expressions
9309 (N : Node_Id; Val : List_Id); -- List1
9310
9311 procedure Set_First_Bit
9312 (N : Node_Id; Val : Node_Id); -- Node3
9313
9314 procedure Set_First_Inlined_Subprogram
9315 (N : Node_Id; Val : Entity_Id); -- Node3
9316
9317 procedure Set_First_Name
9318 (N : Node_Id; Val : Boolean := True); -- Flag5
9319
9320 procedure Set_First_Named_Actual
9321 (N : Node_Id; Val : Node_Id); -- Node4
9322
9323 procedure Set_First_Real_Statement
9324 (N : Node_Id; Val : Node_Id); -- Node2
9325
9326 procedure Set_First_Subtype_Link
9327 (N : Node_Id; Val : Entity_Id); -- Node5
9328
9329 procedure Set_Float_Truncate
9330 (N : Node_Id; Val : Boolean := True); -- Flag11
9331
9332 procedure Set_Formal_Type_Definition
9333 (N : Node_Id; Val : Node_Id); -- Node3
9334
9335 procedure Set_Forwards_OK
9336 (N : Node_Id; Val : Boolean := True); -- Flag5
9337
9338 procedure Set_From_At_Mod
9339 (N : Node_Id; Val : Boolean := True); -- Flag4
9340
9341 procedure Set_From_Aspect_Specification
9342 (N : Node_Id; Val : Boolean := True); -- Flag13
9343
9344 procedure Set_From_At_End
9345 (N : Node_Id; Val : Boolean := True); -- Flag4
9346
9347 procedure Set_From_Default
9348 (N : Node_Id; Val : Boolean := True); -- Flag6
9349
9350 procedure Set_Generic_Associations
9351 (N : Node_Id; Val : List_Id); -- List3
9352
9353 procedure Set_Generic_Formal_Declarations
9354 (N : Node_Id; Val : List_Id); -- List2
9355
9356 procedure Set_Generic_Parent
9357 (N : Node_Id; Val : Node_Id); -- Node5
9358
9359 procedure Set_Generic_Parent_Type
9360 (N : Node_Id; Val : Node_Id); -- Node4
9361
9362 procedure Set_Handled_Statement_Sequence
9363 (N : Node_Id; Val : Node_Id); -- Node4
9364
9365 procedure Set_Handler_List_Entry
9366 (N : Node_Id; Val : Node_Id); -- Node2
9367
9368 procedure Set_Has_Created_Identifier
9369 (N : Node_Id; Val : Boolean := True); -- Flag15
9370
9371 procedure Set_Has_Dynamic_Length_Check
9372 (N : Node_Id; Val : Boolean := True); -- Flag10
9373
9374 procedure Set_Has_Dynamic_Range_Check
9375 (N : Node_Id; Val : Boolean := True); -- Flag12
9376
9377 procedure Set_Has_Init_Expression
9378 (N : Node_Id; Val : Boolean := True); -- Flag14
9379
9380 procedure Set_Has_Local_Raise
9381 (N : Node_Id; Val : Boolean := True); -- Flag8
9382
9383 procedure Set_Has_No_Elaboration_Code
9384 (N : Node_Id; Val : Boolean := True); -- Flag17
9385
9386 procedure Set_Has_Pragma_CPU
9387 (N : Node_Id; Val : Boolean := True); -- Flag14
9388
9389 procedure Set_Has_Pragma_Priority
9390 (N : Node_Id; Val : Boolean := True); -- Flag6
9391
9392 procedure Set_Has_Pragma_Suppress_All
9393 (N : Node_Id; Val : Boolean := True); -- Flag14
9394
9395 procedure Set_Has_Private_View
9396 (N : Node_Id; Val : Boolean := True); -- Flag11
9397
9398 procedure Set_Has_Relative_Deadline_Pragma
9399 (N : Node_Id; Val : Boolean := True); -- Flag9
9400
9401 procedure Set_Has_Self_Reference
9402 (N : Node_Id; Val : Boolean := True); -- Flag13
9403
9404 procedure Set_Has_Storage_Size_Pragma
9405 (N : Node_Id; Val : Boolean := True); -- Flag5
9406
9407 procedure Set_Has_Task_Info_Pragma
9408 (N : Node_Id; Val : Boolean := True); -- Flag7
9409
9410 procedure Set_Has_Task_Name_Pragma
9411 (N : Node_Id; Val : Boolean := True); -- Flag8
9412
9413 procedure Set_Has_Wide_Character
9414 (N : Node_Id; Val : Boolean := True); -- Flag11
9415
9416 procedure Set_Has_Wide_Wide_Character
9417 (N : Node_Id; Val : Boolean := True); -- Flag13
9418
9419 procedure Set_Hidden_By_Use_Clause
9420 (N : Node_Id; Val : Elist_Id); -- Elist4
9421
9422 procedure Set_High_Bound
9423 (N : Node_Id; Val : Node_Id); -- Node2
9424
9425 procedure Set_Identifier
9426 (N : Node_Id; Val : Node_Id); -- Node1
9427
9428 procedure Set_Interface_List
9429 (N : Node_Id; Val : List_Id); -- List2
9430
9431 procedure Set_Interface_Present
9432 (N : Node_Id; Val : Boolean := True); -- Flag16
9433
9434 procedure Set_Implicit_With
9435 (N : Node_Id; Val : Boolean := True); -- Flag16
9436
9437 procedure Set_Import_Interface_Present
9438 (N : Node_Id; Val : Boolean := True); -- Flag16
9439
9440 procedure Set_In_Present
9441 (N : Node_Id; Val : Boolean := True); -- Flag15
9442
9443 procedure Set_Includes_Infinities
9444 (N : Node_Id; Val : Boolean := True); -- Flag11
9445
9446 procedure Set_Inherited_Discriminant
9447 (N : Node_Id; Val : Boolean := True); -- Flag13
9448
9449 procedure Set_Instance_Spec
9450 (N : Node_Id; Val : Node_Id); -- Node5
9451
9452 procedure Set_Intval
9453 (N : Node_Id; Val : Uint); -- Uint3
9454
9455 procedure Set_Is_Accessibility_Actual
9456 (N : Node_Id; Val : Boolean := True); -- Flag13
9457
9458 procedure Set_Is_Asynchronous_Call_Block
9459 (N : Node_Id; Val : Boolean := True); -- Flag7
9460
9461 procedure Set_Is_Boolean_Aspect
9462 (N : Node_Id; Val : Boolean := True); -- Flag16
9463
9464 procedure Set_Is_Component_Left_Opnd
9465 (N : Node_Id; Val : Boolean := True); -- Flag13
9466
9467 procedure Set_Is_Component_Right_Opnd
9468 (N : Node_Id; Val : Boolean := True); -- Flag14
9469
9470 procedure Set_Is_Controlling_Actual
9471 (N : Node_Id; Val : Boolean := True); -- Flag16
9472
9473 procedure Set_Is_Delayed_Aspect
9474 (N : Node_Id; Val : Boolean := True); -- Flag14
9475
9476 procedure Set_Is_Dynamic_Coextension
9477 (N : Node_Id; Val : Boolean := True); -- Flag18
9478
9479 procedure Set_Is_Elsif
9480 (N : Node_Id; Val : Boolean := True); -- Flag13
9481
9482 procedure Set_Is_Entry_Barrier_Function
9483 (N : Node_Id; Val : Boolean := True); -- Flag8
9484
9485 procedure Set_Is_Expanded_Build_In_Place_Call
9486 (N : Node_Id; Val : Boolean := True); -- Flag11
9487
9488 procedure Set_Is_Folded_In_Parser
9489 (N : Node_Id; Val : Boolean := True); -- Flag4
9490
9491 procedure Set_Is_In_Discriminant_Check
9492 (N : Node_Id; Val : Boolean := True); -- Flag11
9493
9494 procedure Set_Is_Machine_Number
9495 (N : Node_Id; Val : Boolean := True); -- Flag11
9496
9497 procedure Set_Is_Null_Loop
9498 (N : Node_Id; Val : Boolean := True); -- Flag16
9499
9500 procedure Set_Is_Overloaded
9501 (N : Node_Id; Val : Boolean := True); -- Flag5
9502
9503 procedure Set_Is_Power_Of_2_For_Shift
9504 (N : Node_Id; Val : Boolean := True); -- Flag13
9505
9506 procedure Set_Is_Protected_Subprogram_Body
9507 (N : Node_Id; Val : Boolean := True); -- Flag7
9508
9509 procedure Set_Is_Static_Coextension
9510 (N : Node_Id; Val : Boolean := True); -- Flag14
9511
9512 procedure Set_Is_Static_Expression
9513 (N : Node_Id; Val : Boolean := True); -- Flag6
9514
9515 procedure Set_Is_Subprogram_Descriptor
9516 (N : Node_Id; Val : Boolean := True); -- Flag16
9517
9518 procedure Set_Is_Task_Allocation_Block
9519 (N : Node_Id; Val : Boolean := True); -- Flag6
9520
9521 procedure Set_Is_Task_Master
9522 (N : Node_Id; Val : Boolean := True); -- Flag5
9523
9524 procedure Set_Iteration_Scheme
9525 (N : Node_Id; Val : Node_Id); -- Node2
9526
9527 procedure Set_Iterator_Specification
9528 (N : Node_Id; Val : Node_Id); -- Node2
9529
9530 procedure Set_Itype
9531 (N : Node_Id; Val : Entity_Id); -- Node1
9532
9533 procedure Set_Kill_Range_Check
9534 (N : Node_Id; Val : Boolean := True); -- Flag11
9535
9536 procedure Set_Last_Bit
9537 (N : Node_Id; Val : Node_Id); -- Node4
9538
9539 procedure Set_Last_Name
9540 (N : Node_Id; Val : Boolean := True); -- Flag6
9541
9542 procedure Set_Library_Unit
9543 (N : Node_Id; Val : Node_Id); -- Node4
9544
9545 procedure Set_Label_Construct
9546 (N : Node_Id; Val : Node_Id); -- Node2
9547
9548 procedure Set_Left_Opnd
9549 (N : Node_Id; Val : Node_Id); -- Node2
9550
9551 procedure Set_Limited_View_Installed
9552 (N : Node_Id; Val : Boolean := True); -- Flag18
9553
9554 procedure Set_Limited_Present
9555 (N : Node_Id; Val : Boolean := True); -- Flag17
9556
9557 procedure Set_Literals
9558 (N : Node_Id; Val : List_Id); -- List1
9559
9560 procedure Set_Local_Raise_Not_OK
9561 (N : Node_Id; Val : Boolean := True); -- Flag7
9562
9563 procedure Set_Local_Raise_Statements
9564 (N : Node_Id; Val : Elist_Id); -- Elist1
9565
9566 procedure Set_Loop_Actions
9567 (N : Node_Id; Val : List_Id); -- List2
9568
9569 procedure Set_Loop_Parameter_Specification
9570 (N : Node_Id; Val : Node_Id); -- Node4
9571
9572 procedure Set_Low_Bound
9573 (N : Node_Id; Val : Node_Id); -- Node1
9574
9575 procedure Set_Mod_Clause
9576 (N : Node_Id; Val : Node_Id); -- Node2
9577
9578 procedure Set_More_Ids
9579 (N : Node_Id; Val : Boolean := True); -- Flag5
9580
9581 procedure Set_Must_Be_Byte_Aligned
9582 (N : Node_Id; Val : Boolean := True); -- Flag14
9583
9584 procedure Set_Must_Not_Freeze
9585 (N : Node_Id; Val : Boolean := True); -- Flag8
9586
9587 procedure Set_Must_Not_Override
9588 (N : Node_Id; Val : Boolean := True); -- Flag15
9589
9590 procedure Set_Must_Override
9591 (N : Node_Id; Val : Boolean := True); -- Flag14
9592
9593 procedure Set_Name
9594 (N : Node_Id; Val : Node_Id); -- Node2
9595
9596 procedure Set_Names
9597 (N : Node_Id; Val : List_Id); -- List2
9598
9599 procedure Set_Next_Entity
9600 (N : Node_Id; Val : Node_Id); -- Node2
9601
9602 procedure Set_Next_Exit_Statement
9603 (N : Node_Id; Val : Node_Id); -- Node3
9604
9605 procedure Set_Next_Implicit_With
9606 (N : Node_Id; Val : Node_Id); -- Node3
9607
9608 procedure Set_Next_Named_Actual
9609 (N : Node_Id; Val : Node_Id); -- Node4
9610
9611 procedure Set_Next_Pragma
9612 (N : Node_Id; Val : Node_Id); -- Node1
9613
9614 procedure Set_Next_Rep_Item
9615 (N : Node_Id; Val : Node_Id); -- Node5
9616
9617 procedure Set_Next_Use_Clause
9618 (N : Node_Id; Val : Node_Id); -- Node3
9619
9620 procedure Set_No_Ctrl_Actions
9621 (N : Node_Id; Val : Boolean := True); -- Flag7
9622
9623 procedure Set_No_Elaboration_Check
9624 (N : Node_Id; Val : Boolean := True); -- Flag14
9625
9626 procedure Set_No_Entities_Ref_In_Spec
9627 (N : Node_Id; Val : Boolean := True); -- Flag8
9628
9629 procedure Set_No_Initialization
9630 (N : Node_Id; Val : Boolean := True); -- Flag13
9631
9632 procedure Set_No_Truncation
9633 (N : Node_Id; Val : Boolean := True); -- Flag17
9634
9635 procedure Set_Null_Present
9636 (N : Node_Id; Val : Boolean := True); -- Flag13
9637
9638 procedure Set_Null_Exclusion_Present
9639 (N : Node_Id; Val : Boolean := True); -- Flag11
9640
9641 procedure Set_Null_Exclusion_In_Return_Present
9642 (N : Node_Id; Val : Boolean := True); -- Flag14
9643
9644 procedure Set_Null_Record_Present
9645 (N : Node_Id; Val : Boolean := True); -- Flag17
9646
9647 procedure Set_Object_Definition
9648 (N : Node_Id; Val : Node_Id); -- Node4
9649
9650 procedure Set_Of_Present
9651 (N : Node_Id; Val : Boolean := True); -- Flag16
9652
9653 procedure Set_Original_Discriminant
9654 (N : Node_Id; Val : Node_Id); -- Node2
9655
9656 procedure Set_Original_Entity
9657 (N : Node_Id; Val : Entity_Id); -- Node2
9658
9659 procedure Set_Others_Discrete_Choices
9660 (N : Node_Id; Val : List_Id); -- List1
9661
9662 procedure Set_Out_Present
9663 (N : Node_Id; Val : Boolean := True); -- Flag17
9664
9665 procedure Set_Parameter_Associations
9666 (N : Node_Id; Val : List_Id); -- List3
9667
9668 procedure Set_Parameter_List_Truncated
9669 (N : Node_Id; Val : Boolean := True); -- Flag17
9670
9671 procedure Set_Parameter_Specifications
9672 (N : Node_Id; Val : List_Id); -- List3
9673
9674 procedure Set_Parameter_Type
9675 (N : Node_Id; Val : Node_Id); -- Node2
9676
9677 procedure Set_Parent_Spec
9678 (N : Node_Id; Val : Node_Id); -- Node4
9679
9680 procedure Set_Position
9681 (N : Node_Id; Val : Node_Id); -- Node2
9682
9683 procedure Set_Pragma_Argument_Associations
9684 (N : Node_Id; Val : List_Id); -- List2
9685
9686 procedure Set_Pragma_Enabled
9687 (N : Node_Id; Val : Boolean := True); -- Flag5
9688
9689 procedure Set_Pragma_Identifier
9690 (N : Node_Id; Val : Node_Id); -- Node4
9691
9692 procedure Set_Pragmas_After
9693 (N : Node_Id; Val : List_Id); -- List5
9694
9695 procedure Set_Pragmas_Before
9696 (N : Node_Id; Val : List_Id); -- List4
9697
9698 procedure Set_Prefix
9699 (N : Node_Id; Val : Node_Id); -- Node3
9700
9701 procedure Set_Present_Expr
9702 (N : Node_Id; Val : Uint); -- Uint3
9703
9704 procedure Set_Prev_Ids
9705 (N : Node_Id; Val : Boolean := True); -- Flag6
9706
9707 procedure Set_Print_In_Hex
9708 (N : Node_Id; Val : Boolean := True); -- Flag13
9709
9710 procedure Set_Private_Declarations
9711 (N : Node_Id; Val : List_Id); -- List3
9712
9713 procedure Set_Private_Present
9714 (N : Node_Id; Val : Boolean := True); -- Flag15
9715
9716 procedure Set_Procedure_To_Call
9717 (N : Node_Id; Val : Node_Id); -- Node2
9718
9719 procedure Set_Proper_Body
9720 (N : Node_Id; Val : Node_Id); -- Node1
9721
9722 procedure Set_Protected_Definition
9723 (N : Node_Id; Val : Node_Id); -- Node3
9724
9725 procedure Set_Protected_Present
9726 (N : Node_Id; Val : Boolean := True); -- Flag6
9727
9728 procedure Set_Raises_Constraint_Error
9729 (N : Node_Id; Val : Boolean := True); -- Flag7
9730
9731 procedure Set_Range_Constraint
9732 (N : Node_Id; Val : Node_Id); -- Node4
9733
9734 procedure Set_Range_Expression
9735 (N : Node_Id; Val : Node_Id); -- Node4
9736
9737 procedure Set_Real_Range_Specification
9738 (N : Node_Id; Val : Node_Id); -- Node4
9739
9740 procedure Set_Realval
9741 (N : Node_Id; Val : Ureal); -- Ureal3
9742
9743 procedure Set_Reason
9744 (N : Node_Id; Val : Uint); -- Uint3
9745
9746 procedure Set_Record_Extension_Part
9747 (N : Node_Id; Val : Node_Id); -- Node3
9748
9749 procedure Set_Redundant_Use
9750 (N : Node_Id; Val : Boolean := True); -- Flag13
9751
9752 procedure Set_Renaming_Exception
9753 (N : Node_Id; Val : Node_Id); -- Node2
9754
9755 procedure Set_Result_Definition
9756 (N : Node_Id; Val : Node_Id); -- Node4
9757
9758 procedure Set_Return_Object_Declarations
9759 (N : Node_Id; Val : List_Id); -- List3
9760
9761 procedure Set_Return_Statement_Entity
9762 (N : Node_Id; Val : Node_Id); -- Node5
9763
9764 procedure Set_Reverse_Present
9765 (N : Node_Id; Val : Boolean := True); -- Flag15
9766
9767 procedure Set_Right_Opnd
9768 (N : Node_Id; Val : Node_Id); -- Node3
9769
9770 procedure Set_Rounded_Result
9771 (N : Node_Id; Val : Boolean := True); -- Flag18
9772
9773 procedure Set_SCIL_Controlling_Tag
9774 (N : Node_Id; Val : Node_Id); -- Node5
9775
9776 procedure Set_SCIL_Entity
9777 (N : Node_Id; Val : Node_Id); -- Node4
9778
9779 procedure Set_SCIL_Tag_Value
9780 (N : Node_Id; Val : Node_Id); -- Node5
9781
9782 procedure Set_SCIL_Target_Prim
9783 (N : Node_Id; Val : Node_Id); -- Node2
9784
9785 procedure Set_Scope
9786 (N : Node_Id; Val : Node_Id); -- Node3
9787
9788 procedure Set_Select_Alternatives
9789 (N : Node_Id; Val : List_Id); -- List1
9790
9791 procedure Set_Selector_Name
9792 (N : Node_Id; Val : Node_Id); -- Node2
9793
9794 procedure Set_Selector_Names
9795 (N : Node_Id; Val : List_Id); -- List1
9796
9797 procedure Set_Shift_Count_OK
9798 (N : Node_Id; Val : Boolean := True); -- Flag4
9799
9800 procedure Set_Source_Type
9801 (N : Node_Id; Val : Entity_Id); -- Node1
9802
9803 procedure Set_Specification
9804 (N : Node_Id; Val : Node_Id); -- Node1
9805
9806 procedure Set_Split_PPC
9807 (N : Node_Id; Val : Boolean); -- Flag17
9808
9809 procedure Set_Statements
9810 (N : Node_Id; Val : List_Id); -- List3
9811
9812 procedure Set_Static_Processing_OK
9813 (N : Node_Id; Val : Boolean); -- Flag4
9814
9815 procedure Set_Storage_Pool
9816 (N : Node_Id; Val : Node_Id); -- Node1
9817
9818 procedure Set_Strval
9819 (N : Node_Id; Val : String_Id); -- Str3
9820
9821 procedure Set_Subtype_Indication
9822 (N : Node_Id; Val : Node_Id); -- Node5
9823
9824 procedure Set_Subtype_Mark
9825 (N : Node_Id; Val : Node_Id); -- Node4
9826
9827 procedure Set_Subtype_Marks
9828 (N : Node_Id; Val : List_Id); -- List2
9829
9830 procedure Set_Suppress_Assignment_Checks
9831 (N : Node_Id; Val : Boolean := True); -- Flag18
9832
9833 procedure Set_Suppress_Loop_Warnings
9834 (N : Node_Id; Val : Boolean := True); -- Flag17
9835
9836 procedure Set_Synchronized_Present
9837 (N : Node_Id; Val : Boolean := True); -- Flag7
9838
9839 procedure Set_Tagged_Present
9840 (N : Node_Id; Val : Boolean := True); -- Flag15
9841
9842 procedure Set_Target_Type
9843 (N : Node_Id; Val : Entity_Id); -- Node2
9844
9845 procedure Set_Task_Definition
9846 (N : Node_Id; Val : Node_Id); -- Node3
9847
9848 procedure Set_Task_Present
9849 (N : Node_Id; Val : Boolean := True); -- Flag5
9850
9851 procedure Set_Then_Actions
9852 (N : Node_Id; Val : List_Id); -- List2
9853
9854 procedure Set_Then_Statements
9855 (N : Node_Id; Val : List_Id); -- List2
9856
9857 procedure Set_Treat_Fixed_As_Integer
9858 (N : Node_Id; Val : Boolean := True); -- Flag14
9859
9860 procedure Set_Triggering_Alternative
9861 (N : Node_Id; Val : Node_Id); -- Node1
9862
9863 procedure Set_Triggering_Statement
9864 (N : Node_Id; Val : Node_Id); -- Node1
9865
9866 procedure Set_TSS_Elist
9867 (N : Node_Id; Val : Elist_Id); -- Elist3
9868
9869 procedure Set_Type_Definition
9870 (N : Node_Id; Val : Node_Id); -- Node3
9871
9872 procedure Set_Unit
9873 (N : Node_Id; Val : Node_Id); -- Node2
9874
9875 procedure Set_Unknown_Discriminants_Present
9876 (N : Node_Id; Val : Boolean := True); -- Flag13
9877
9878 procedure Set_Unreferenced_In_Spec
9879 (N : Node_Id; Val : Boolean := True); -- Flag7
9880
9881 procedure Set_Variant_Part
9882 (N : Node_Id; Val : Node_Id); -- Node4
9883
9884 procedure Set_Variants
9885 (N : Node_Id; Val : List_Id); -- List1
9886
9887 procedure Set_Visible_Declarations
9888 (N : Node_Id; Val : List_Id); -- List2
9889
9890 procedure Set_Was_Originally_Stub
9891 (N : Node_Id; Val : Boolean := True); -- Flag13
9892
9893 procedure Set_Withed_Body
9894 (N : Node_Id; Val : Node_Id); -- Node1
9895
9896 procedure Set_Zero_Cost_Handling
9897 (N : Node_Id; Val : Boolean := True); -- Flag5
9898
9899 -------------------------
9900 -- Iterator Procedures --
9901 -------------------------
9902
9903 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9904
9905 procedure Next_Entity (N : in out Node_Id);
9906 procedure Next_Named_Actual (N : in out Node_Id);
9907 procedure Next_Rep_Item (N : in out Node_Id);
9908 procedure Next_Use_Clause (N : in out Node_Id);
9909
9910 -------------------------------------------
9911 -- Miscellaneous Tree Access Subprograms --
9912 -------------------------------------------
9913
9914 function End_Location (N : Node_Id) return Source_Ptr;
9915 -- N is an N_If_Statement or N_Case_Statement node, and this function
9916 -- returns the location of the IF token in the END IF sequence by
9917 -- translating the value of the End_Span field.
9918
9919 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9920 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
9921 -- the End_Span field to correspond to the given value S. In other words,
9922 -- End_Span is set to the difference between S and Sloc (N), the starting
9923 -- location.
9924
9925 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
9926 -- Given an argument to a pragma Arg, this function returns the expression
9927 -- for the argument. This is Arg itself, or, in the case where Arg is a
9928 -- pragma argument association node, the expression from this node.
9929
9930 --------------------------------
9931 -- Node_Kind Membership Tests --
9932 --------------------------------
9933
9934 -- The following functions allow a convenient notation for testing whether
9935 -- a Node_Kind value matches any one of a list of possible values. In each
9936 -- case True is returned if the given T argument is equal to any of the V
9937 -- arguments. Note that there is a similar set of functions defined in
9938 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9939
9940 function Nkind_In
9941 (T : Node_Kind;
9942 V1 : Node_Kind;
9943 V2 : Node_Kind) return Boolean;
9944
9945 function Nkind_In
9946 (T : Node_Kind;
9947 V1 : Node_Kind;
9948 V2 : Node_Kind;
9949 V3 : Node_Kind) return Boolean;
9950
9951 function Nkind_In
9952 (T : Node_Kind;
9953 V1 : Node_Kind;
9954 V2 : Node_Kind;
9955 V3 : Node_Kind;
9956 V4 : Node_Kind) return Boolean;
9957
9958 function Nkind_In
9959 (T : Node_Kind;
9960 V1 : Node_Kind;
9961 V2 : Node_Kind;
9962 V3 : Node_Kind;
9963 V4 : Node_Kind;
9964 V5 : Node_Kind) return Boolean;
9965
9966 function Nkind_In
9967 (T : Node_Kind;
9968 V1 : Node_Kind;
9969 V2 : Node_Kind;
9970 V3 : Node_Kind;
9971 V4 : Node_Kind;
9972 V5 : Node_Kind;
9973 V6 : Node_Kind) return Boolean;
9974
9975 function Nkind_In
9976 (T : Node_Kind;
9977 V1 : Node_Kind;
9978 V2 : Node_Kind;
9979 V3 : Node_Kind;
9980 V4 : Node_Kind;
9981 V5 : Node_Kind;
9982 V6 : Node_Kind;
9983 V7 : Node_Kind) return Boolean;
9984
9985 function Nkind_In
9986 (T : Node_Kind;
9987 V1 : Node_Kind;
9988 V2 : Node_Kind;
9989 V3 : Node_Kind;
9990 V4 : Node_Kind;
9991 V5 : Node_Kind;
9992 V6 : Node_Kind;
9993 V7 : Node_Kind;
9994 V8 : Node_Kind) return Boolean;
9995
9996 function Nkind_In
9997 (T : Node_Kind;
9998 V1 : Node_Kind;
9999 V2 : Node_Kind;
10000 V3 : Node_Kind;
10001 V4 : Node_Kind;
10002 V5 : Node_Kind;
10003 V6 : Node_Kind;
10004 V7 : Node_Kind;
10005 V8 : Node_Kind;
10006 V9 : Node_Kind) return Boolean;
10007
10008 pragma Inline (Nkind_In);
10009 -- Inline all above functions
10010
10011 -----------------------
10012 -- Utility Functions --
10013 -----------------------
10014
10015 function Pragma_Name (N : Node_Id) return Name_Id;
10016 pragma Inline (Pragma_Name);
10017 -- Convenient function to obtain Chars field of Pragma_Identifier
10018
10019 -----------------------------
10020 -- Syntactic Parent Tables --
10021 -----------------------------
10022
10023 -- These tables show for each node, and for each of the five fields,
10024 -- whether the corresponding field is syntactic (True) or semantic (False).
10025 -- Unused entries are also set to False.
10026
10027 subtype Field_Num is Natural range 1 .. 5;
10028
10029 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10030
10031 -- Following entries can be built automatically from the sinfo sources
10032 -- using the makeisf utility (currently this program is in spitbol).
10033
10034 N_Identifier =>
10035 (1 => True, -- Chars (Name1)
10036 2 => False, -- Original_Discriminant (Node2-Sem)
10037 3 => False, -- unused
10038 4 => False, -- Entity (Node4-Sem)
10039 5 => False), -- Etype (Node5-Sem)
10040
10041 N_Integer_Literal =>
10042 (1 => False, -- unused
10043 2 => False, -- Original_Entity (Node2-Sem)
10044 3 => True, -- Intval (Uint3)
10045 4 => False, -- unused
10046 5 => False), -- Etype (Node5-Sem)
10047
10048 N_Real_Literal =>
10049 (1 => False, -- unused
10050 2 => False, -- Original_Entity (Node2-Sem)
10051 3 => True, -- Realval (Ureal3)
10052 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10053 5 => False), -- Etype (Node5-Sem)
10054
10055 N_Character_Literal =>
10056 (1 => True, -- Chars (Name1)
10057 2 => True, -- Char_Literal_Value (Uint2)
10058 3 => False, -- unused
10059 4 => False, -- Entity (Node4-Sem)
10060 5 => False), -- Etype (Node5-Sem)
10061
10062 N_String_Literal =>
10063 (1 => False, -- unused
10064 2 => False, -- unused
10065 3 => True, -- Strval (Str3)
10066 4 => False, -- unused
10067 5 => False), -- Etype (Node5-Sem)
10068
10069 N_Pragma =>
10070 (1 => False, -- Next_Pragma (Node1-Sem)
10071 2 => True, -- Pragma_Argument_Associations (List2)
10072 3 => True, -- Debug_Statement (Node3)
10073 4 => True, -- Pragma_Identifier (Node4)
10074 5 => False), -- Next_Rep_Item (Node5-Sem)
10075
10076 N_Pragma_Argument_Association =>
10077 (1 => True, -- Chars (Name1)
10078 2 => False, -- unused
10079 3 => True, -- Expression (Node3)
10080 4 => False, -- unused
10081 5 => False), -- unused
10082
10083 N_Defining_Identifier =>
10084 (1 => True, -- Chars (Name1)
10085 2 => False, -- Next_Entity (Node2-Sem)
10086 3 => False, -- Scope (Node3-Sem)
10087 4 => False, -- unused
10088 5 => False), -- Etype (Node5-Sem)
10089
10090 N_Full_Type_Declaration =>
10091 (1 => True, -- Defining_Identifier (Node1)
10092 2 => False, -- unused
10093 3 => True, -- Type_Definition (Node3)
10094 4 => True, -- Discriminant_Specifications (List4)
10095 5 => False), -- unused
10096
10097 N_Subtype_Declaration =>
10098 (1 => True, -- Defining_Identifier (Node1)
10099 2 => False, -- unused
10100 3 => False, -- unused
10101 4 => False, -- Generic_Parent_Type (Node4-Sem)
10102 5 => True), -- Subtype_Indication (Node5)
10103
10104 N_Subtype_Indication =>
10105 (1 => False, -- unused
10106 2 => False, -- unused
10107 3 => True, -- Constraint (Node3)
10108 4 => True, -- Subtype_Mark (Node4)
10109 5 => False), -- Etype (Node5-Sem)
10110
10111 N_Object_Declaration =>
10112 (1 => True, -- Defining_Identifier (Node1)
10113 2 => False, -- Handler_List_Entry (Node2-Sem)
10114 3 => True, -- Expression (Node3)
10115 4 => True, -- Object_Definition (Node4)
10116 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10117
10118 N_Number_Declaration =>
10119 (1 => True, -- Defining_Identifier (Node1)
10120 2 => False, -- unused
10121 3 => True, -- Expression (Node3)
10122 4 => False, -- unused
10123 5 => False), -- unused
10124
10125 N_Derived_Type_Definition =>
10126 (1 => False, -- unused
10127 2 => True, -- Interface_List (List2)
10128 3 => True, -- Record_Extension_Part (Node3)
10129 4 => False, -- unused
10130 5 => True), -- Subtype_Indication (Node5)
10131
10132 N_Range_Constraint =>
10133 (1 => False, -- unused
10134 2 => False, -- unused
10135 3 => False, -- unused
10136 4 => True, -- Range_Expression (Node4)
10137 5 => False), -- unused
10138
10139 N_Range =>
10140 (1 => True, -- Low_Bound (Node1)
10141 2 => True, -- High_Bound (Node2)
10142 3 => False, -- unused
10143 4 => False, -- unused
10144 5 => False), -- Etype (Node5-Sem)
10145
10146 N_Enumeration_Type_Definition =>
10147 (1 => True, -- Literals (List1)
10148 2 => False, -- unused
10149 3 => False, -- unused
10150 4 => True, -- End_Label (Node4)
10151 5 => False), -- unused
10152
10153 N_Defining_Character_Literal =>
10154 (1 => True, -- Chars (Name1)
10155 2 => False, -- Next_Entity (Node2-Sem)
10156 3 => False, -- Scope (Node3-Sem)
10157 4 => False, -- unused
10158 5 => False), -- Etype (Node5-Sem)
10159
10160 N_Signed_Integer_Type_Definition =>
10161 (1 => True, -- Low_Bound (Node1)
10162 2 => True, -- High_Bound (Node2)
10163 3 => False, -- unused
10164 4 => False, -- unused
10165 5 => False), -- unused
10166
10167 N_Modular_Type_Definition =>
10168 (1 => False, -- unused
10169 2 => False, -- unused
10170 3 => True, -- Expression (Node3)
10171 4 => False, -- unused
10172 5 => False), -- unused
10173
10174 N_Floating_Point_Definition =>
10175 (1 => False, -- unused
10176 2 => True, -- Digits_Expression (Node2)
10177 3 => False, -- unused
10178 4 => True, -- Real_Range_Specification (Node4)
10179 5 => False), -- unused
10180
10181 N_Real_Range_Specification =>
10182 (1 => True, -- Low_Bound (Node1)
10183 2 => True, -- High_Bound (Node2)
10184 3 => False, -- unused
10185 4 => False, -- unused
10186 5 => False), -- unused
10187
10188 N_Ordinary_Fixed_Point_Definition =>
10189 (1 => False, -- unused
10190 2 => False, -- unused
10191 3 => True, -- Delta_Expression (Node3)
10192 4 => True, -- Real_Range_Specification (Node4)
10193 5 => False), -- unused
10194
10195 N_Decimal_Fixed_Point_Definition =>
10196 (1 => False, -- unused
10197 2 => True, -- Digits_Expression (Node2)
10198 3 => True, -- Delta_Expression (Node3)
10199 4 => True, -- Real_Range_Specification (Node4)
10200 5 => False), -- unused
10201
10202 N_Digits_Constraint =>
10203 (1 => False, -- unused
10204 2 => True, -- Digits_Expression (Node2)
10205 3 => False, -- unused
10206 4 => True, -- Range_Constraint (Node4)
10207 5 => False), -- unused
10208
10209 N_Unconstrained_Array_Definition =>
10210 (1 => False, -- unused
10211 2 => True, -- Subtype_Marks (List2)
10212 3 => False, -- unused
10213 4 => True, -- Component_Definition (Node4)
10214 5 => False), -- unused
10215
10216 N_Constrained_Array_Definition =>
10217 (1 => False, -- unused
10218 2 => True, -- Discrete_Subtype_Definitions (List2)
10219 3 => False, -- unused
10220 4 => True, -- Component_Definition (Node4)
10221 5 => False), -- unused
10222
10223 N_Component_Definition =>
10224 (1 => False, -- unused
10225 2 => False, -- unused
10226 3 => True, -- Access_Definition (Node3)
10227 4 => False, -- unused
10228 5 => True), -- Subtype_Indication (Node5)
10229
10230 N_Discriminant_Specification =>
10231 (1 => True, -- Defining_Identifier (Node1)
10232 2 => False, -- unused
10233 3 => True, -- Expression (Node3)
10234 4 => False, -- unused
10235 5 => True), -- Discriminant_Type (Node5)
10236
10237 N_Index_Or_Discriminant_Constraint =>
10238 (1 => True, -- Constraints (List1)
10239 2 => False, -- unused
10240 3 => False, -- unused
10241 4 => False, -- unused
10242 5 => False), -- unused
10243
10244 N_Discriminant_Association =>
10245 (1 => True, -- Selector_Names (List1)
10246 2 => False, -- unused
10247 3 => True, -- Expression (Node3)
10248 4 => False, -- unused
10249 5 => False), -- unused
10250
10251 N_Record_Definition =>
10252 (1 => True, -- Component_List (Node1)
10253 2 => True, -- Interface_List (List2)
10254 3 => False, -- unused
10255 4 => True, -- End_Label (Node4)
10256 5 => False), -- unused
10257
10258 N_Component_List =>
10259 (1 => False, -- unused
10260 2 => False, -- unused
10261 3 => True, -- Component_Items (List3)
10262 4 => True, -- Variant_Part (Node4)
10263 5 => False), -- unused
10264
10265 N_Component_Declaration =>
10266 (1 => True, -- Defining_Identifier (Node1)
10267 2 => False, -- unused
10268 3 => True, -- Expression (Node3)
10269 4 => True, -- Component_Definition (Node4)
10270 5 => False), -- unused
10271
10272 N_Variant_Part =>
10273 (1 => True, -- Variants (List1)
10274 2 => True, -- Name (Node2)
10275 3 => False, -- unused
10276 4 => False, -- unused
10277 5 => False), -- unused
10278
10279 N_Variant =>
10280 (1 => True, -- Component_List (Node1)
10281 2 => False, -- Enclosing_Variant (Node2-Sem)
10282 3 => False, -- Present_Expr (Uint3-Sem)
10283 4 => True, -- Discrete_Choices (List4)
10284 5 => False), -- Dcheck_Function (Node5-Sem)
10285
10286 N_Others_Choice =>
10287 (1 => False, -- Others_Discrete_Choices (List1-Sem)
10288 2 => False, -- unused
10289 3 => False, -- unused
10290 4 => False, -- unused
10291 5 => False), -- unused
10292
10293 N_Access_To_Object_Definition =>
10294 (1 => False, -- unused
10295 2 => False, -- unused
10296 3 => False, -- unused
10297 4 => False, -- unused
10298 5 => True), -- Subtype_Indication (Node5)
10299
10300 N_Access_Function_Definition =>
10301 (1 => False, -- unused
10302 2 => False, -- unused
10303 3 => True, -- Parameter_Specifications (List3)
10304 4 => True, -- Result_Definition (Node4)
10305 5 => False), -- unused
10306
10307 N_Access_Procedure_Definition =>
10308 (1 => False, -- unused
10309 2 => False, -- unused
10310 3 => True, -- Parameter_Specifications (List3)
10311 4 => False, -- unused
10312 5 => False), -- unused
10313
10314 N_Access_Definition =>
10315 (1 => False, -- unused
10316 2 => False, -- unused
10317 3 => True, -- Access_To_Subprogram_Definition (Node3)
10318 4 => True, -- Subtype_Mark (Node4)
10319 5 => False), -- unused
10320
10321 N_Incomplete_Type_Declaration =>
10322 (1 => True, -- Defining_Identifier (Node1)
10323 2 => False, -- unused
10324 3 => False, -- unused
10325 4 => True, -- Discriminant_Specifications (List4)
10326 5 => False), -- unused
10327
10328 N_Explicit_Dereference =>
10329 (1 => False, -- unused
10330 2 => False, -- unused
10331 3 => True, -- Prefix (Node3)
10332 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10333 5 => False), -- Etype (Node5-Sem)
10334
10335 N_Indexed_Component =>
10336 (1 => True, -- Expressions (List1)
10337 2 => False, -- unused
10338 3 => True, -- Prefix (Node3)
10339 4 => False, -- unused
10340 5 => False), -- Etype (Node5-Sem)
10341
10342 N_Slice =>
10343 (1 => False, -- unused
10344 2 => False, -- unused
10345 3 => True, -- Prefix (Node3)
10346 4 => True, -- Discrete_Range (Node4)
10347 5 => False), -- Etype (Node5-Sem)
10348
10349 N_Selected_Component =>
10350 (1 => False, -- unused
10351 2 => True, -- Selector_Name (Node2)
10352 3 => True, -- Prefix (Node3)
10353 4 => False, -- unused
10354 5 => False), -- Etype (Node5-Sem)
10355
10356 N_Attribute_Reference =>
10357 (1 => True, -- Expressions (List1)
10358 2 => True, -- Attribute_Name (Name2)
10359 3 => True, -- Prefix (Node3)
10360 4 => False, -- Entity (Node4-Sem)
10361 5 => False), -- Etype (Node5-Sem)
10362
10363 N_Aggregate =>
10364 (1 => True, -- Expressions (List1)
10365 2 => True, -- Component_Associations (List2)
10366 3 => False, -- Aggregate_Bounds (Node3-Sem)
10367 4 => False, -- unused
10368 5 => False), -- Etype (Node5-Sem)
10369
10370 N_Component_Association =>
10371 (1 => True, -- Choices (List1)
10372 2 => False, -- Loop_Actions (List2-Sem)
10373 3 => True, -- Expression (Node3)
10374 4 => False, -- unused
10375 5 => False), -- unused
10376
10377 N_Extension_Aggregate =>
10378 (1 => True, -- Expressions (List1)
10379 2 => True, -- Component_Associations (List2)
10380 3 => True, -- Ancestor_Part (Node3)
10381 4 => False, -- unused
10382 5 => False), -- Etype (Node5-Sem)
10383
10384 N_Null =>
10385 (1 => False, -- unused
10386 2 => False, -- unused
10387 3 => False, -- unused
10388 4 => False, -- unused
10389 5 => False), -- Etype (Node5-Sem)
10390
10391 N_And_Then =>
10392 (1 => False, -- Actions (List1-Sem)
10393 2 => True, -- Left_Opnd (Node2)
10394 3 => True, -- Right_Opnd (Node3)
10395 4 => False, -- unused
10396 5 => False), -- Etype (Node5-Sem)
10397
10398 N_Or_Else =>
10399 (1 => False, -- Actions (List1-Sem)
10400 2 => True, -- Left_Opnd (Node2)
10401 3 => True, -- Right_Opnd (Node3)
10402 4 => False, -- unused
10403 5 => False), -- Etype (Node5-Sem)
10404
10405 N_In =>
10406 (1 => False, -- unused
10407 2 => True, -- Left_Opnd (Node2)
10408 3 => True, -- Right_Opnd (Node3)
10409 4 => True, -- Alternatives (List4)
10410 5 => False), -- Etype (Node5-Sem)
10411
10412 N_Not_In =>
10413 (1 => False, -- unused
10414 2 => True, -- Left_Opnd (Node2)
10415 3 => True, -- Right_Opnd (Node3)
10416 4 => True, -- Alternatives (List4)
10417 5 => False), -- Etype (Node5-Sem)
10418
10419 N_Op_And =>
10420 (1 => True, -- Chars (Name1)
10421 2 => True, -- Left_Opnd (Node2)
10422 3 => True, -- Right_Opnd (Node3)
10423 4 => False, -- Entity (Node4-Sem)
10424 5 => False), -- Etype (Node5-Sem)
10425
10426 N_Op_Or =>
10427 (1 => True, -- Chars (Name1)
10428 2 => True, -- Left_Opnd (Node2)
10429 3 => True, -- Right_Opnd (Node3)
10430 4 => False, -- Entity (Node4-Sem)
10431 5 => False), -- Etype (Node5-Sem)
10432
10433 N_Op_Xor =>
10434 (1 => True, -- Chars (Name1)
10435 2 => True, -- Left_Opnd (Node2)
10436 3 => True, -- Right_Opnd (Node3)
10437 4 => False, -- Entity (Node4-Sem)
10438 5 => False), -- Etype (Node5-Sem)
10439
10440 N_Op_Eq =>
10441 (1 => True, -- Chars (Name1)
10442 2 => True, -- Left_Opnd (Node2)
10443 3 => True, -- Right_Opnd (Node3)
10444 4 => False, -- Entity (Node4-Sem)
10445 5 => False), -- Etype (Node5-Sem)
10446
10447 N_Op_Ne =>
10448 (1 => True, -- Chars (Name1)
10449 2 => True, -- Left_Opnd (Node2)
10450 3 => True, -- Right_Opnd (Node3)
10451 4 => False, -- Entity (Node4-Sem)
10452 5 => False), -- Etype (Node5-Sem)
10453
10454 N_Op_Lt =>
10455 (1 => True, -- Chars (Name1)
10456 2 => True, -- Left_Opnd (Node2)
10457 3 => True, -- Right_Opnd (Node3)
10458 4 => False, -- Entity (Node4-Sem)
10459 5 => False), -- Etype (Node5-Sem)
10460
10461 N_Op_Le =>
10462 (1 => True, -- Chars (Name1)
10463 2 => True, -- Left_Opnd (Node2)
10464 3 => True, -- Right_Opnd (Node3)
10465 4 => False, -- Entity (Node4-Sem)
10466 5 => False), -- Etype (Node5-Sem)
10467
10468 N_Op_Gt =>
10469 (1 => True, -- Chars (Name1)
10470 2 => True, -- Left_Opnd (Node2)
10471 3 => True, -- Right_Opnd (Node3)
10472 4 => False, -- Entity (Node4-Sem)
10473 5 => False), -- Etype (Node5-Sem)
10474
10475 N_Op_Ge =>
10476 (1 => True, -- Chars (Name1)
10477 2 => True, -- Left_Opnd (Node2)
10478 3 => True, -- Right_Opnd (Node3)
10479 4 => False, -- Entity (Node4-Sem)
10480 5 => False), -- Etype (Node5-Sem)
10481
10482 N_Op_Add =>
10483 (1 => True, -- Chars (Name1)
10484 2 => True, -- Left_Opnd (Node2)
10485 3 => True, -- Right_Opnd (Node3)
10486 4 => False, -- Entity (Node4-Sem)
10487 5 => False), -- Etype (Node5-Sem)
10488
10489 N_Op_Subtract =>
10490 (1 => True, -- Chars (Name1)
10491 2 => True, -- Left_Opnd (Node2)
10492 3 => True, -- Right_Opnd (Node3)
10493 4 => False, -- Entity (Node4-Sem)
10494 5 => False), -- Etype (Node5-Sem)
10495
10496 N_Op_Concat =>
10497 (1 => True, -- Chars (Name1)
10498 2 => True, -- Left_Opnd (Node2)
10499 3 => True, -- Right_Opnd (Node3)
10500 4 => False, -- Entity (Node4-Sem)
10501 5 => False), -- Etype (Node5-Sem)
10502
10503 N_Op_Multiply =>
10504 (1 => True, -- Chars (Name1)
10505 2 => True, -- Left_Opnd (Node2)
10506 3 => True, -- Right_Opnd (Node3)
10507 4 => False, -- Entity (Node4-Sem)
10508 5 => False), -- Etype (Node5-Sem)
10509
10510 N_Op_Divide =>
10511 (1 => True, -- Chars (Name1)
10512 2 => True, -- Left_Opnd (Node2)
10513 3 => True, -- Right_Opnd (Node3)
10514 4 => False, -- Entity (Node4-Sem)
10515 5 => False), -- Etype (Node5-Sem)
10516
10517 N_Op_Mod =>
10518 (1 => True, -- Chars (Name1)
10519 2 => True, -- Left_Opnd (Node2)
10520 3 => True, -- Right_Opnd (Node3)
10521 4 => False, -- Entity (Node4-Sem)
10522 5 => False), -- Etype (Node5-Sem)
10523
10524 N_Op_Rem =>
10525 (1 => True, -- Chars (Name1)
10526 2 => True, -- Left_Opnd (Node2)
10527 3 => True, -- Right_Opnd (Node3)
10528 4 => False, -- Entity (Node4-Sem)
10529 5 => False), -- Etype (Node5-Sem)
10530
10531 N_Op_Expon =>
10532 (1 => True, -- Chars (Name1)
10533 2 => True, -- Left_Opnd (Node2)
10534 3 => True, -- Right_Opnd (Node3)
10535 4 => False, -- Entity (Node4-Sem)
10536 5 => False), -- Etype (Node5-Sem)
10537
10538 N_Op_Plus =>
10539 (1 => True, -- Chars (Name1)
10540 2 => False, -- unused
10541 3 => True, -- Right_Opnd (Node3)
10542 4 => False, -- Entity (Node4-Sem)
10543 5 => False), -- Etype (Node5-Sem)
10544
10545 N_Op_Minus =>
10546 (1 => True, -- Chars (Name1)
10547 2 => False, -- unused
10548 3 => True, -- Right_Opnd (Node3)
10549 4 => False, -- Entity (Node4-Sem)
10550 5 => False), -- Etype (Node5-Sem)
10551
10552 N_Op_Abs =>
10553 (1 => True, -- Chars (Name1)
10554 2 => False, -- unused
10555 3 => True, -- Right_Opnd (Node3)
10556 4 => False, -- Entity (Node4-Sem)
10557 5 => False), -- Etype (Node5-Sem)
10558
10559 N_Op_Not =>
10560 (1 => True, -- Chars (Name1)
10561 2 => False, -- unused
10562 3 => True, -- Right_Opnd (Node3)
10563 4 => False, -- Entity (Node4-Sem)
10564 5 => False), -- Etype (Node5-Sem)
10565
10566 N_Type_Conversion =>
10567 (1 => False, -- unused
10568 2 => False, -- unused
10569 3 => True, -- Expression (Node3)
10570 4 => True, -- Subtype_Mark (Node4)
10571 5 => False), -- Etype (Node5-Sem)
10572
10573 N_Qualified_Expression =>
10574 (1 => False, -- unused
10575 2 => False, -- unused
10576 3 => True, -- Expression (Node3)
10577 4 => True, -- Subtype_Mark (Node4)
10578 5 => False), -- Etype (Node5-Sem)
10579
10580 N_Quantified_Expression =>
10581 (1 => True, -- Condition (Node1)
10582 2 => True, -- Iterator_Specification
10583 3 => False, -- unused
10584 4 => True, -- Loop_Parameter_Specification (Node4)
10585 5 => False), -- Etype (Node5-Sem)
10586
10587 N_Allocator =>
10588 (1 => False, -- Storage_Pool (Node1-Sem)
10589 2 => False, -- Procedure_To_Call (Node2-Sem)
10590 3 => True, -- Expression (Node3)
10591 4 => False, -- Coextensions (Elist4-Sem)
10592 5 => False), -- Etype (Node5-Sem)
10593
10594 N_Null_Statement =>
10595 (1 => False, -- unused
10596 2 => False, -- unused
10597 3 => False, -- unused
10598 4 => False, -- unused
10599 5 => False), -- unused
10600
10601 N_Label =>
10602 (1 => True, -- Identifier (Node1)
10603 2 => False, -- unused
10604 3 => False, -- unused
10605 4 => False, -- unused
10606 5 => False), -- unused
10607
10608 N_Assignment_Statement =>
10609 (1 => False, -- unused
10610 2 => True, -- Name (Node2)
10611 3 => True, -- Expression (Node3)
10612 4 => False, -- unused
10613 5 => False), -- unused
10614
10615 N_If_Statement =>
10616 (1 => True, -- Condition (Node1)
10617 2 => True, -- Then_Statements (List2)
10618 3 => True, -- Elsif_Parts (List3)
10619 4 => True, -- Else_Statements (List4)
10620 5 => True), -- End_Span (Uint5)
10621
10622 N_Elsif_Part =>
10623 (1 => True, -- Condition (Node1)
10624 2 => True, -- Then_Statements (List2)
10625 3 => False, -- Condition_Actions (List3-Sem)
10626 4 => False, -- unused
10627 5 => False), -- unused
10628
10629 N_Case_Expression =>
10630 (1 => False, -- unused
10631 2 => False, -- unused
10632 3 => True, -- Expression (Node3)
10633 4 => True, -- Alternatives (List4)
10634 5 => False), -- unused
10635
10636 N_Case_Expression_Alternative =>
10637 (1 => False, -- Actions (List1-Sem)
10638 2 => False, -- unused
10639 3 => True, -- Statements (List3)
10640 4 => True, -- Expression (Node4)
10641 5 => False), -- unused
10642
10643 N_Case_Statement =>
10644 (1 => False, -- unused
10645 2 => False, -- unused
10646 3 => True, -- Expression (Node3)
10647 4 => True, -- Alternatives (List4)
10648 5 => True), -- End_Span (Uint5)
10649
10650 N_Case_Statement_Alternative =>
10651 (1 => False, -- unused
10652 2 => False, -- unused
10653 3 => True, -- Statements (List3)
10654 4 => True, -- Discrete_Choices (List4)
10655 5 => False), -- unused
10656
10657 N_Loop_Statement =>
10658 (1 => True, -- Identifier (Node1)
10659 2 => True, -- Iteration_Scheme (Node2)
10660 3 => True, -- Statements (List3)
10661 4 => True, -- End_Label (Node4)
10662 5 => False), -- unused
10663
10664 N_Iteration_Scheme =>
10665 (1 => True, -- Condition (Node1)
10666 2 => True, -- Iterator_Specification (Node2)
10667 3 => False, -- Condition_Actions (List3-Sem)
10668 4 => True, -- Loop_Parameter_Specification (Node4)
10669 5 => False), -- unused
10670
10671 N_Loop_Parameter_Specification =>
10672 (1 => True, -- Defining_Identifier (Node1)
10673 2 => False, -- unused
10674 3 => False, -- unused
10675 4 => True, -- Discrete_Subtype_Definition (Node4)
10676 5 => False), -- unused
10677
10678 N_Iterator_Specification =>
10679 (1 => True, -- Defining_Identifier (Node1)
10680 2 => True, -- Name (Node2)
10681 3 => False, -- Unused
10682 4 => False, -- Unused
10683 5 => True), -- Subtype_Indication (Node5)
10684
10685 N_Block_Statement =>
10686 (1 => True, -- Identifier (Node1)
10687 2 => True, -- Declarations (List2)
10688 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10689 4 => True, -- Handled_Statement_Sequence (Node4)
10690 5 => False), -- unused
10691
10692 N_Exit_Statement =>
10693 (1 => True, -- Condition (Node1)
10694 2 => True, -- Name (Node2)
10695 3 => False, -- unused
10696 4 => False, -- unused
10697 5 => False), -- unused
10698
10699 N_Goto_Statement =>
10700 (1 => False, -- unused
10701 2 => True, -- Name (Node2)
10702 3 => False, -- unused
10703 4 => False, -- unused
10704 5 => False), -- unused
10705
10706 N_Subprogram_Declaration =>
10707 (1 => True, -- Specification (Node1)
10708 2 => False, -- unused
10709 3 => False, -- Body_To_Inline (Node3-Sem)
10710 4 => False, -- Parent_Spec (Node4-Sem)
10711 5 => False), -- Corresponding_Body (Node5-Sem)
10712
10713 N_Abstract_Subprogram_Declaration =>
10714 (1 => True, -- Specification (Node1)
10715 2 => False, -- unused
10716 3 => False, -- unused
10717 4 => False, -- unused
10718 5 => False), -- unused
10719
10720 N_Function_Specification =>
10721 (1 => True, -- Defining_Unit_Name (Node1)
10722 2 => False, -- Elaboration_Boolean (Node2-Sem)
10723 3 => True, -- Parameter_Specifications (List3)
10724 4 => True, -- Result_Definition (Node4)
10725 5 => False), -- Generic_Parent (Node5-Sem)
10726
10727 N_Procedure_Specification =>
10728 (1 => True, -- Defining_Unit_Name (Node1)
10729 2 => False, -- Elaboration_Boolean (Node2-Sem)
10730 3 => True, -- Parameter_Specifications (List3)
10731 4 => False, -- unused
10732 5 => False), -- Generic_Parent (Node5-Sem)
10733
10734 N_Designator =>
10735 (1 => True, -- Identifier (Node1)
10736 2 => True, -- Name (Node2)
10737 3 => False, -- unused
10738 4 => False, -- unused
10739 5 => False), -- unused
10740
10741 N_Defining_Program_Unit_Name =>
10742 (1 => True, -- Defining_Identifier (Node1)
10743 2 => True, -- Name (Node2)
10744 3 => False, -- unused
10745 4 => False, -- unused
10746 5 => False), -- unused
10747
10748 N_Operator_Symbol =>
10749 (1 => True, -- Chars (Name1)
10750 2 => False, -- unused
10751 3 => True, -- Strval (Str3)
10752 4 => False, -- Entity (Node4-Sem)
10753 5 => False), -- Etype (Node5-Sem)
10754
10755 N_Defining_Operator_Symbol =>
10756 (1 => True, -- Chars (Name1)
10757 2 => False, -- Next_Entity (Node2-Sem)
10758 3 => False, -- Scope (Node3-Sem)
10759 4 => False, -- unused
10760 5 => False), -- Etype (Node5-Sem)
10761
10762 N_Parameter_Specification =>
10763 (1 => True, -- Defining_Identifier (Node1)
10764 2 => True, -- Parameter_Type (Node2)
10765 3 => True, -- Expression (Node3)
10766 4 => False, -- unused
10767 5 => False), -- Default_Expression (Node5-Sem)
10768
10769 N_Subprogram_Body =>
10770 (1 => True, -- Specification (Node1)
10771 2 => True, -- Declarations (List2)
10772 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10773 4 => True, -- Handled_Statement_Sequence (Node4)
10774 5 => False), -- Corresponding_Spec (Node5-Sem)
10775
10776 N_Parameterized_Expression =>
10777 (1 => True, -- Specification (Node1)
10778 2 => False, -- unused
10779 3 => True, -- Expression (Node3)
10780 4 => False, -- unused
10781 5 => False), -- unused
10782
10783 N_Procedure_Call_Statement =>
10784 (1 => False, -- Controlling_Argument (Node1-Sem)
10785 2 => True, -- Name (Node2)
10786 3 => True, -- Parameter_Associations (List3)
10787 4 => False, -- First_Named_Actual (Node4-Sem)
10788 5 => False), -- Etype (Node5-Sem)
10789
10790 N_Function_Call =>
10791 (1 => False, -- Controlling_Argument (Node1-Sem)
10792 2 => True, -- Name (Node2)
10793 3 => True, -- Parameter_Associations (List3)
10794 4 => False, -- First_Named_Actual (Node4-Sem)
10795 5 => False), -- Etype (Node5-Sem)
10796
10797 N_Parameter_Association =>
10798 (1 => False, -- unused
10799 2 => True, -- Selector_Name (Node2)
10800 3 => True, -- Explicit_Actual_Parameter (Node3)
10801 4 => False, -- Next_Named_Actual (Node4-Sem)
10802 5 => False), -- unused
10803
10804 N_Return_Statement =>
10805 (1 => False, -- Storage_Pool (Node1-Sem)
10806 2 => False, -- Procedure_To_Call (Node2-Sem)
10807 3 => True, -- Expression (Node3)
10808 4 => False, -- unused
10809 5 => False), -- Return_Statement_Entity (Node5-Sem)
10810
10811 N_Extended_Return_Statement =>
10812 (1 => False, -- Storage_Pool (Node1-Sem)
10813 2 => False, -- Procedure_To_Call (Node2-Sem)
10814 3 => True, -- Return_Object_Declarations (List3)
10815 4 => True, -- Handled_Statement_Sequence (Node4)
10816 5 => False), -- Return_Statement_Entity (Node5-Sem)
10817
10818 N_Package_Declaration =>
10819 (1 => True, -- Specification (Node1)
10820 2 => False, -- unused
10821 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10822 4 => False, -- Parent_Spec (Node4-Sem)
10823 5 => False), -- Corresponding_Body (Node5-Sem)
10824
10825 N_Package_Specification =>
10826 (1 => True, -- Defining_Unit_Name (Node1)
10827 2 => True, -- Visible_Declarations (List2)
10828 3 => True, -- Private_Declarations (List3)
10829 4 => True, -- End_Label (Node4)
10830 5 => False), -- Generic_Parent (Node5-Sem)
10831
10832 N_Package_Body =>
10833 (1 => True, -- Defining_Unit_Name (Node1)
10834 2 => True, -- Declarations (List2)
10835 3 => False, -- unused
10836 4 => True, -- Handled_Statement_Sequence (Node4)
10837 5 => False), -- Corresponding_Spec (Node5-Sem)
10838
10839 N_Private_Type_Declaration =>
10840 (1 => True, -- Defining_Identifier (Node1)
10841 2 => False, -- unused
10842 3 => False, -- unused
10843 4 => True, -- Discriminant_Specifications (List4)
10844 5 => False), -- unused
10845
10846 N_Private_Extension_Declaration =>
10847 (1 => True, -- Defining_Identifier (Node1)
10848 2 => True, -- Interface_List (List2)
10849 3 => False, -- unused
10850 4 => True, -- Discriminant_Specifications (List4)
10851 5 => True), -- Subtype_Indication (Node5)
10852
10853 N_Use_Package_Clause =>
10854 (1 => False, -- unused
10855 2 => True, -- Names (List2)
10856 3 => False, -- Next_Use_Clause (Node3-Sem)
10857 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10858 5 => False), -- unused
10859
10860 N_Use_Type_Clause =>
10861 (1 => False, -- unused
10862 2 => True, -- Subtype_Marks (List2)
10863 3 => False, -- Next_Use_Clause (Node3-Sem)
10864 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10865 5 => False), -- unused
10866
10867 N_Object_Renaming_Declaration =>
10868 (1 => True, -- Defining_Identifier (Node1)
10869 2 => True, -- Name (Node2)
10870 3 => True, -- Access_Definition (Node3)
10871 4 => True, -- Subtype_Mark (Node4)
10872 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10873
10874 N_Exception_Renaming_Declaration =>
10875 (1 => True, -- Defining_Identifier (Node1)
10876 2 => True, -- Name (Node2)
10877 3 => False, -- unused
10878 4 => False, -- unused
10879 5 => False), -- unused
10880
10881 N_Package_Renaming_Declaration =>
10882 (1 => True, -- Defining_Unit_Name (Node1)
10883 2 => True, -- Name (Node2)
10884 3 => False, -- unused
10885 4 => False, -- Parent_Spec (Node4-Sem)
10886 5 => False), -- unused
10887
10888 N_Subprogram_Renaming_Declaration =>
10889 (1 => True, -- Specification (Node1)
10890 2 => True, -- Name (Node2)
10891 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10892 4 => False, -- Parent_Spec (Node4-Sem)
10893 5 => False), -- Corresponding_Spec (Node5-Sem)
10894
10895 N_Generic_Package_Renaming_Declaration =>
10896 (1 => True, -- Defining_Unit_Name (Node1)
10897 2 => True, -- Name (Node2)
10898 3 => False, -- unused
10899 4 => False, -- Parent_Spec (Node4-Sem)
10900 5 => False), -- unused
10901
10902 N_Generic_Procedure_Renaming_Declaration =>
10903 (1 => True, -- Defining_Unit_Name (Node1)
10904 2 => True, -- Name (Node2)
10905 3 => False, -- unused
10906 4 => False, -- Parent_Spec (Node4-Sem)
10907 5 => False), -- unused
10908
10909 N_Generic_Function_Renaming_Declaration =>
10910 (1 => True, -- Defining_Unit_Name (Node1)
10911 2 => True, -- Name (Node2)
10912 3 => False, -- unused
10913 4 => False, -- Parent_Spec (Node4-Sem)
10914 5 => False), -- unused
10915
10916 N_Task_Type_Declaration =>
10917 (1 => True, -- Defining_Identifier (Node1)
10918 2 => True, -- Interface_List (List2)
10919 3 => True, -- Task_Definition (Node3)
10920 4 => True, -- Discriminant_Specifications (List4)
10921 5 => False), -- Corresponding_Body (Node5-Sem)
10922
10923 N_Single_Task_Declaration =>
10924 (1 => True, -- Defining_Identifier (Node1)
10925 2 => True, -- Interface_List (List2)
10926 3 => True, -- Task_Definition (Node3)
10927 4 => False, -- unused
10928 5 => False), -- unused
10929
10930 N_Task_Definition =>
10931 (1 => False, -- unused
10932 2 => True, -- Visible_Declarations (List2)
10933 3 => True, -- Private_Declarations (List3)
10934 4 => True, -- End_Label (Node4)
10935 5 => False), -- unused
10936
10937 N_Task_Body =>
10938 (1 => True, -- Defining_Identifier (Node1)
10939 2 => True, -- Declarations (List2)
10940 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10941 4 => True, -- Handled_Statement_Sequence (Node4)
10942 5 => False), -- Corresponding_Spec (Node5-Sem)
10943
10944 N_Protected_Type_Declaration =>
10945 (1 => True, -- Defining_Identifier (Node1)
10946 2 => True, -- Interface_List (List2)
10947 3 => True, -- Protected_Definition (Node3)
10948 4 => True, -- Discriminant_Specifications (List4)
10949 5 => False), -- Corresponding_Body (Node5-Sem)
10950
10951 N_Single_Protected_Declaration =>
10952 (1 => True, -- Defining_Identifier (Node1)
10953 2 => True, -- Interface_List (List2)
10954 3 => True, -- Protected_Definition (Node3)
10955 4 => False, -- unused
10956 5 => False), -- unused
10957
10958 N_Protected_Definition =>
10959 (1 => False, -- unused
10960 2 => True, -- Visible_Declarations (List2)
10961 3 => True, -- Private_Declarations (List3)
10962 4 => True, -- End_Label (Node4)
10963 5 => False), -- unused
10964
10965 N_Protected_Body =>
10966 (1 => True, -- Defining_Identifier (Node1)
10967 2 => True, -- Declarations (List2)
10968 3 => False, -- unused
10969 4 => True, -- End_Label (Node4)
10970 5 => False), -- Corresponding_Spec (Node5-Sem)
10971
10972 N_Entry_Declaration =>
10973 (1 => True, -- Defining_Identifier (Node1)
10974 2 => False, -- unused
10975 3 => True, -- Parameter_Specifications (List3)
10976 4 => True, -- Discrete_Subtype_Definition (Node4)
10977 5 => False), -- Corresponding_Body (Node5-Sem)
10978
10979 N_Accept_Statement =>
10980 (1 => True, -- Entry_Direct_Name (Node1)
10981 2 => True, -- Declarations (List2)
10982 3 => True, -- Parameter_Specifications (List3)
10983 4 => True, -- Handled_Statement_Sequence (Node4)
10984 5 => True), -- Entry_Index (Node5)
10985
10986 N_Entry_Body =>
10987 (1 => True, -- Defining_Identifier (Node1)
10988 2 => True, -- Declarations (List2)
10989 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10990 4 => True, -- Handled_Statement_Sequence (Node4)
10991 5 => True), -- Entry_Body_Formal_Part (Node5)
10992
10993 N_Entry_Body_Formal_Part =>
10994 (1 => True, -- Condition (Node1)
10995 2 => False, -- unused
10996 3 => True, -- Parameter_Specifications (List3)
10997 4 => True, -- Entry_Index_Specification (Node4)
10998 5 => False), -- unused
10999
11000 N_Entry_Index_Specification =>
11001 (1 => True, -- Defining_Identifier (Node1)
11002 2 => False, -- unused
11003 3 => False, -- unused
11004 4 => True, -- Discrete_Subtype_Definition (Node4)
11005 5 => False), -- unused
11006
11007 N_Entry_Call_Statement =>
11008 (1 => False, -- unused
11009 2 => True, -- Name (Node2)
11010 3 => True, -- Parameter_Associations (List3)
11011 4 => False, -- First_Named_Actual (Node4-Sem)
11012 5 => False), -- unused
11013
11014 N_Requeue_Statement =>
11015 (1 => False, -- unused
11016 2 => True, -- Name (Node2)
11017 3 => False, -- unused
11018 4 => False, -- unused
11019 5 => False), -- unused
11020
11021 N_Delay_Until_Statement =>
11022 (1 => False, -- unused
11023 2 => False, -- unused
11024 3 => True, -- Expression (Node3)
11025 4 => False, -- unused
11026 5 => False), -- unused
11027
11028 N_Delay_Relative_Statement =>
11029 (1 => False, -- unused
11030 2 => False, -- unused
11031 3 => True, -- Expression (Node3)
11032 4 => False, -- unused
11033 5 => False), -- unused
11034
11035 N_Selective_Accept =>
11036 (1 => True, -- Select_Alternatives (List1)
11037 2 => False, -- unused
11038 3 => False, -- unused
11039 4 => True, -- Else_Statements (List4)
11040 5 => False), -- unused
11041
11042 N_Accept_Alternative =>
11043 (1 => True, -- Condition (Node1)
11044 2 => True, -- Accept_Statement (Node2)
11045 3 => True, -- Statements (List3)
11046 4 => True, -- Pragmas_Before (List4)
11047 5 => False), -- Accept_Handler_Records (List5-Sem)
11048
11049 N_Delay_Alternative =>
11050 (1 => True, -- Condition (Node1)
11051 2 => True, -- Delay_Statement (Node2)
11052 3 => True, -- Statements (List3)
11053 4 => True, -- Pragmas_Before (List4)
11054 5 => False), -- unused
11055
11056 N_Terminate_Alternative =>
11057 (1 => True, -- Condition (Node1)
11058 2 => False, -- unused
11059 3 => False, -- unused
11060 4 => True, -- Pragmas_Before (List4)
11061 5 => True), -- Pragmas_After (List5)
11062
11063 N_Timed_Entry_Call =>
11064 (1 => True, -- Entry_Call_Alternative (Node1)
11065 2 => False, -- unused
11066 3 => False, -- unused
11067 4 => True, -- Delay_Alternative (Node4)
11068 5 => False), -- unused
11069
11070 N_Entry_Call_Alternative =>
11071 (1 => True, -- Entry_Call_Statement (Node1)
11072 2 => False, -- unused
11073 3 => True, -- Statements (List3)
11074 4 => True, -- Pragmas_Before (List4)
11075 5 => False), -- unused
11076
11077 N_Conditional_Entry_Call =>
11078 (1 => True, -- Entry_Call_Alternative (Node1)
11079 2 => False, -- unused
11080 3 => False, -- unused
11081 4 => True, -- Else_Statements (List4)
11082 5 => False), -- unused
11083
11084 N_Asynchronous_Select =>
11085 (1 => True, -- Triggering_Alternative (Node1)
11086 2 => True, -- Abortable_Part (Node2)
11087 3 => False, -- unused
11088 4 => False, -- unused
11089 5 => False), -- unused
11090
11091 N_Triggering_Alternative =>
11092 (1 => True, -- Triggering_Statement (Node1)
11093 2 => False, -- unused
11094 3 => True, -- Statements (List3)
11095 4 => True, -- Pragmas_Before (List4)
11096 5 => False), -- unused
11097
11098 N_Abortable_Part =>
11099 (1 => False, -- unused
11100 2 => False, -- unused
11101 3 => True, -- Statements (List3)
11102 4 => False, -- unused
11103 5 => False), -- unused
11104
11105 N_Abort_Statement =>
11106 (1 => False, -- unused
11107 2 => True, -- Names (List2)
11108 3 => False, -- unused
11109 4 => False, -- unused
11110 5 => False), -- unused
11111
11112 N_Compilation_Unit =>
11113 (1 => True, -- Context_Items (List1)
11114 2 => True, -- Unit (Node2)
11115 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11116 4 => False, -- Library_Unit (Node4-Sem)
11117 5 => True), -- Aux_Decls_Node (Node5)
11118
11119 N_Compilation_Unit_Aux =>
11120 (1 => True, -- Actions (List1)
11121 2 => True, -- Declarations (List2)
11122 3 => False, -- Default_Storage_Pool (Node3)
11123 4 => True, -- Config_Pragmas (List4)
11124 5 => True), -- Pragmas_After (List5)
11125
11126 N_With_Clause =>
11127 (1 => False, -- unused
11128 2 => True, -- Name (Node2)
11129 3 => False, -- unused
11130 4 => False, -- Library_Unit (Node4-Sem)
11131 5 => False), -- Corresponding_Spec (Node5-Sem)
11132
11133 N_Subprogram_Body_Stub =>
11134 (1 => True, -- Specification (Node1)
11135 2 => False, -- unused
11136 3 => False, -- unused
11137 4 => False, -- Library_Unit (Node4-Sem)
11138 5 => False), -- Corresponding_Body (Node5-Sem)
11139
11140 N_Package_Body_Stub =>
11141 (1 => True, -- Defining_Identifier (Node1)
11142 2 => False, -- unused
11143 3 => False, -- unused
11144 4 => False, -- Library_Unit (Node4-Sem)
11145 5 => False), -- Corresponding_Body (Node5-Sem)
11146
11147 N_Task_Body_Stub =>
11148 (1 => True, -- Defining_Identifier (Node1)
11149 2 => False, -- unused
11150 3 => False, -- unused
11151 4 => False, -- Library_Unit (Node4-Sem)
11152 5 => False), -- Corresponding_Body (Node5-Sem)
11153
11154 N_Protected_Body_Stub =>
11155 (1 => True, -- Defining_Identifier (Node1)
11156 2 => False, -- unused
11157 3 => False, -- unused
11158 4 => False, -- Library_Unit (Node4-Sem)
11159 5 => False), -- Corresponding_Body (Node5-Sem)
11160
11161 N_Subunit =>
11162 (1 => True, -- Proper_Body (Node1)
11163 2 => True, -- Name (Node2)
11164 3 => False, -- Corresponding_Stub (Node3-Sem)
11165 4 => False, -- unused
11166 5 => False), -- unused
11167
11168 N_Exception_Declaration =>
11169 (1 => True, -- Defining_Identifier (Node1)
11170 2 => False, -- unused
11171 3 => False, -- Expression (Node3-Sem)
11172 4 => False, -- unused
11173 5 => False), -- unused
11174
11175 N_Handled_Sequence_Of_Statements =>
11176 (1 => True, -- At_End_Proc (Node1)
11177 2 => False, -- First_Real_Statement (Node2-Sem)
11178 3 => True, -- Statements (List3)
11179 4 => True, -- End_Label (Node4)
11180 5 => True), -- Exception_Handlers (List5)
11181
11182 N_Exception_Handler =>
11183 (1 => False, -- Local_Raise_Statements (Elist1)
11184 2 => True, -- Choice_Parameter (Node2)
11185 3 => True, -- Statements (List3)
11186 4 => True, -- Exception_Choices (List4)
11187 5 => False), -- Exception_Label (Node5)
11188
11189 N_Raise_Statement =>
11190 (1 => False, -- unused
11191 2 => True, -- Name (Node2)
11192 3 => True, -- Expression (Node3)
11193 4 => False, -- unused
11194 5 => False), -- unused
11195
11196 N_Generic_Subprogram_Declaration =>
11197 (1 => True, -- Specification (Node1)
11198 2 => True, -- Generic_Formal_Declarations (List2)
11199 3 => False, -- unused
11200 4 => False, -- Parent_Spec (Node4-Sem)
11201 5 => False), -- Corresponding_Body (Node5-Sem)
11202
11203 N_Generic_Package_Declaration =>
11204 (1 => True, -- Specification (Node1)
11205 2 => True, -- Generic_Formal_Declarations (List2)
11206 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11207 4 => False, -- Parent_Spec (Node4-Sem)
11208 5 => False), -- Corresponding_Body (Node5-Sem)
11209
11210 N_Package_Instantiation =>
11211 (1 => True, -- Defining_Unit_Name (Node1)
11212 2 => True, -- Name (Node2)
11213 3 => True, -- Generic_Associations (List3)
11214 4 => False, -- Parent_Spec (Node4-Sem)
11215 5 => False), -- Instance_Spec (Node5-Sem)
11216
11217 N_Procedure_Instantiation =>
11218 (1 => True, -- Defining_Unit_Name (Node1)
11219 2 => True, -- Name (Node2)
11220 3 => True, -- Generic_Associations (List3)
11221 4 => False, -- Parent_Spec (Node4-Sem)
11222 5 => False), -- Instance_Spec (Node5-Sem)
11223
11224 N_Function_Instantiation =>
11225 (1 => True, -- Defining_Unit_Name (Node1)
11226 2 => True, -- Name (Node2)
11227 3 => True, -- Generic_Associations (List3)
11228 4 => False, -- Parent_Spec (Node4-Sem)
11229 5 => False), -- Instance_Spec (Node5-Sem)
11230
11231 N_Generic_Association =>
11232 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
11233 2 => True, -- Selector_Name (Node2)
11234 3 => False, -- unused
11235 4 => False, -- unused
11236 5 => False), -- unused
11237
11238 N_Formal_Object_Declaration =>
11239 (1 => True, -- Defining_Identifier (Node1)
11240 2 => False, -- unused
11241 3 => True, -- Access_Definition (Node3)
11242 4 => True, -- Subtype_Mark (Node4)
11243 5 => True), -- Default_Expression (Node5)
11244
11245 N_Formal_Type_Declaration =>
11246 (1 => True, -- Defining_Identifier (Node1)
11247 2 => False, -- unused
11248 3 => True, -- Formal_Type_Definition (Node3)
11249 4 => True, -- Discriminant_Specifications (List4)
11250 5 => False), -- unused
11251
11252 N_Formal_Private_Type_Definition =>
11253 (1 => False, -- unused
11254 2 => False, -- unused
11255 3 => False, -- unused
11256 4 => False, -- unused
11257 5 => False), -- unused
11258
11259 N_Formal_Derived_Type_Definition =>
11260 (1 => False, -- unused
11261 2 => True, -- Interface_List (List2)
11262 3 => False, -- unused
11263 4 => True, -- Subtype_Mark (Node4)
11264 5 => False), -- unused
11265
11266 N_Formal_Discrete_Type_Definition =>
11267 (1 => False, -- unused
11268 2 => False, -- unused
11269 3 => False, -- unused
11270 4 => False, -- unused
11271 5 => False), -- unused
11272
11273 N_Formal_Signed_Integer_Type_Definition =>
11274 (1 => False, -- unused
11275 2 => False, -- unused
11276 3 => False, -- unused
11277 4 => False, -- unused
11278 5 => False), -- unused
11279
11280 N_Formal_Modular_Type_Definition =>
11281 (1 => False, -- unused
11282 2 => False, -- unused
11283 3 => False, -- unused
11284 4 => False, -- unused
11285 5 => False), -- unused
11286
11287 N_Formal_Floating_Point_Definition =>
11288 (1 => False, -- unused
11289 2 => False, -- unused
11290 3 => False, -- unused
11291 4 => False, -- unused
11292 5 => False), -- unused
11293
11294 N_Formal_Ordinary_Fixed_Point_Definition =>
11295 (1 => False, -- unused
11296 2 => False, -- unused
11297 3 => False, -- unused
11298 4 => False, -- unused
11299 5 => False), -- unused
11300
11301 N_Formal_Decimal_Fixed_Point_Definition =>
11302 (1 => False, -- unused
11303 2 => False, -- unused
11304 3 => False, -- unused
11305 4 => False, -- unused
11306 5 => False), -- unused
11307
11308 N_Formal_Concrete_Subprogram_Declaration =>
11309 (1 => True, -- Specification (Node1)
11310 2 => True, -- Default_Name (Node2)
11311 3 => False, -- unused
11312 4 => False, -- unused
11313 5 => False), -- unused
11314
11315 N_Formal_Abstract_Subprogram_Declaration =>
11316 (1 => True, -- Specification (Node1)
11317 2 => True, -- Default_Name (Node2)
11318 3 => False, -- unused
11319 4 => False, -- unused
11320 5 => False), -- unused
11321
11322 N_Formal_Package_Declaration =>
11323 (1 => True, -- Defining_Identifier (Node1)
11324 2 => True, -- Name (Node2)
11325 3 => True, -- Generic_Associations (List3)
11326 4 => False, -- unused
11327 5 => False), -- Instance_Spec (Node5-Sem)
11328
11329 N_Attribute_Definition_Clause =>
11330 (1 => True, -- Chars (Name1)
11331 2 => True, -- Name (Node2)
11332 3 => True, -- Expression (Node3)
11333 4 => False, -- unused
11334 5 => False), -- Next_Rep_Item (Node5-Sem)
11335
11336 N_Aspect_Specification =>
11337 (1 => True, -- Identifier (Node1)
11338 2 => False, -- Aspect_Rep_Item (Node2-Sem)
11339 3 => True, -- Expression (Node3)
11340 4 => False, -- Entity (Node4-Sem)
11341 5 => False), -- Next_Rep_Item (Node5-Sem)
11342
11343 N_Enumeration_Representation_Clause =>
11344 (1 => True, -- Identifier (Node1)
11345 2 => False, -- unused
11346 3 => True, -- Array_Aggregate (Node3)
11347 4 => False, -- unused
11348 5 => False), -- Next_Rep_Item (Node5-Sem)
11349
11350 N_Record_Representation_Clause =>
11351 (1 => True, -- Identifier (Node1)
11352 2 => True, -- Mod_Clause (Node2)
11353 3 => True, -- Component_Clauses (List3)
11354 4 => False, -- unused
11355 5 => False), -- Next_Rep_Item (Node5-Sem)
11356
11357 N_Component_Clause =>
11358 (1 => True, -- Component_Name (Node1)
11359 2 => True, -- Position (Node2)
11360 3 => True, -- First_Bit (Node3)
11361 4 => True, -- Last_Bit (Node4)
11362 5 => False), -- unused
11363
11364 N_Code_Statement =>
11365 (1 => False, -- unused
11366 2 => False, -- unused
11367 3 => True, -- Expression (Node3)
11368 4 => False, -- unused
11369 5 => False), -- unused
11370
11371 N_Op_Rotate_Left =>
11372 (1 => True, -- Chars (Name1)
11373 2 => True, -- Left_Opnd (Node2)
11374 3 => True, -- Right_Opnd (Node3)
11375 4 => False, -- Entity (Node4-Sem)
11376 5 => False), -- Etype (Node5-Sem)
11377
11378 N_Op_Rotate_Right =>
11379 (1 => True, -- Chars (Name1)
11380 2 => True, -- Left_Opnd (Node2)
11381 3 => True, -- Right_Opnd (Node3)
11382 4 => False, -- Entity (Node4-Sem)
11383 5 => False), -- Etype (Node5-Sem)
11384
11385 N_Op_Shift_Left =>
11386 (1 => True, -- Chars (Name1)
11387 2 => True, -- Left_Opnd (Node2)
11388 3 => True, -- Right_Opnd (Node3)
11389 4 => False, -- Entity (Node4-Sem)
11390 5 => False), -- Etype (Node5-Sem)
11391
11392 N_Op_Shift_Right_Arithmetic =>
11393 (1 => True, -- Chars (Name1)
11394 2 => True, -- Left_Opnd (Node2)
11395 3 => True, -- Right_Opnd (Node3)
11396 4 => False, -- Entity (Node4-Sem)
11397 5 => False), -- Etype (Node5-Sem)
11398
11399 N_Op_Shift_Right =>
11400 (1 => True, -- Chars (Name1)
11401 2 => True, -- Left_Opnd (Node2)
11402 3 => True, -- Right_Opnd (Node3)
11403 4 => False, -- Entity (Node4-Sem)
11404 5 => False), -- Etype (Node5-Sem)
11405
11406 N_Delta_Constraint =>
11407 (1 => False, -- unused
11408 2 => False, -- unused
11409 3 => True, -- Delta_Expression (Node3)
11410 4 => True, -- Range_Constraint (Node4)
11411 5 => False), -- unused
11412
11413 N_At_Clause =>
11414 (1 => True, -- Identifier (Node1)
11415 2 => False, -- unused
11416 3 => True, -- Expression (Node3)
11417 4 => False, -- unused
11418 5 => False), -- unused
11419
11420 N_Mod_Clause =>
11421 (1 => False, -- unused
11422 2 => False, -- unused
11423 3 => True, -- Expression (Node3)
11424 4 => True, -- Pragmas_Before (List4)
11425 5 => False), -- unused
11426
11427 N_Conditional_Expression =>
11428 (1 => True, -- Expressions (List1)
11429 2 => False, -- Then_Actions (List2-Sem)
11430 3 => False, -- Else_Actions (List3-Sem)
11431 4 => False, -- unused
11432 5 => False), -- Etype (Node5-Sem)
11433
11434 N_Expanded_Name =>
11435 (1 => True, -- Chars (Name1)
11436 2 => True, -- Selector_Name (Node2)
11437 3 => True, -- Prefix (Node3)
11438 4 => False, -- Entity (Node4-Sem)
11439 5 => False), -- Etype (Node5-Sem)
11440
11441 N_Expression_With_Actions =>
11442 (1 => True, -- Actions (List1)
11443 2 => False, -- unused
11444 3 => True, -- Expression (Node3)
11445 4 => False, -- unused
11446 5 => False), -- unused
11447
11448 N_Free_Statement =>
11449 (1 => False, -- Storage_Pool (Node1-Sem)
11450 2 => False, -- Procedure_To_Call (Node2-Sem)
11451 3 => True, -- Expression (Node3)
11452 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11453 5 => False), -- unused
11454
11455 N_Freeze_Entity =>
11456 (1 => True, -- Actions (List1)
11457 2 => False, -- Access_Types_To_Process (Elist2-Sem)
11458 3 => False, -- TSS_Elist (Elist3-Sem)
11459 4 => False, -- Entity (Node4-Sem)
11460 5 => False), -- First_Subtype_Link (Node5-Sem)
11461
11462 N_Implicit_Label_Declaration =>
11463 (1 => True, -- Defining_Identifier (Node1)
11464 2 => False, -- Label_Construct (Node2-Sem)
11465 3 => False, -- unused
11466 4 => False, -- unused
11467 5 => False), -- unused
11468
11469 N_Itype_Reference =>
11470 (1 => False, -- Itype (Node1-Sem)
11471 2 => False, -- unused
11472 3 => False, -- unused
11473 4 => False, -- unused
11474 5 => False), -- unused
11475
11476 N_Raise_Constraint_Error =>
11477 (1 => True, -- Condition (Node1)
11478 2 => False, -- unused
11479 3 => True, -- Reason (Uint3)
11480 4 => False, -- unused
11481 5 => False), -- Etype (Node5-Sem)
11482
11483 N_Raise_Program_Error =>
11484 (1 => True, -- Condition (Node1)
11485 2 => False, -- unused
11486 3 => True, -- Reason (Uint3)
11487 4 => False, -- unused
11488 5 => False), -- Etype (Node5-Sem)
11489
11490 N_Raise_Storage_Error =>
11491 (1 => True, -- Condition (Node1)
11492 2 => False, -- unused
11493 3 => True, -- Reason (Uint3)
11494 4 => False, -- unused
11495 5 => False), -- Etype (Node5-Sem)
11496
11497 N_Push_Constraint_Error_Label =>
11498 (1 => False, -- unused
11499 2 => False, -- unused
11500 3 => False, -- unused
11501 4 => False, -- unused
11502 5 => False), -- unused
11503
11504 N_Push_Program_Error_Label =>
11505 (1 => False, -- Exception_Label
11506 2 => False, -- unused
11507 3 => False, -- unused
11508 4 => False, -- unused
11509 5 => False), -- Exception_Label
11510
11511 N_Push_Storage_Error_Label =>
11512 (1 => False, -- Exception_Label
11513 2 => False, -- unused
11514 3 => False, -- unused
11515 4 => False, -- unused
11516 5 => False), -- Exception_Label
11517
11518 N_Pop_Constraint_Error_Label =>
11519 (1 => False, -- unused
11520 2 => False, -- unused
11521 3 => False, -- unused
11522 4 => False, -- unused
11523 5 => False), -- unused
11524
11525 N_Pop_Program_Error_Label =>
11526 (1 => False, -- unused
11527 2 => False, -- unused
11528 3 => False, -- unused
11529 4 => False, -- unused
11530 5 => False), -- unused
11531
11532 N_Pop_Storage_Error_Label =>
11533 (1 => False, -- unused
11534 2 => False, -- unused
11535 3 => False, -- unused
11536 4 => False, -- unused
11537 5 => False), -- unused
11538
11539 N_Reference =>
11540 (1 => False, -- unused
11541 2 => False, -- unused
11542 3 => True, -- Prefix (Node3)
11543 4 => False, -- unused
11544 5 => False), -- Etype (Node5-Sem)
11545
11546 N_Subprogram_Info =>
11547 (1 => True, -- Identifier (Node1)
11548 2 => False, -- unused
11549 3 => False, -- unused
11550 4 => False, -- unused
11551 5 => False), -- Etype (Node5-Sem)
11552
11553 N_Unchecked_Expression =>
11554 (1 => False, -- unused
11555 2 => False, -- unused
11556 3 => True, -- Expression (Node3)
11557 4 => False, -- unused
11558 5 => False), -- Etype (Node5-Sem)
11559
11560 N_Unchecked_Type_Conversion =>
11561 (1 => False, -- unused
11562 2 => False, -- unused
11563 3 => True, -- Expression (Node3)
11564 4 => True, -- Subtype_Mark (Node4)
11565 5 => False), -- Etype (Node5-Sem)
11566
11567 N_Validate_Unchecked_Conversion =>
11568 (1 => False, -- Source_Type (Node1-Sem)
11569 2 => False, -- Target_Type (Node2-Sem)
11570 3 => False, -- unused
11571 4 => False, -- unused
11572 5 => False), -- unused
11573
11574 -- Entries for SCIL nodes
11575
11576 N_SCIL_Dispatch_Table_Tag_Init =>
11577 (1 => False, -- unused
11578 2 => False, -- unused
11579 3 => False, -- unused
11580 4 => False, -- SCIL_Entity (Node4-Sem)
11581 5 => False), -- unused
11582
11583 N_SCIL_Dispatching_Call =>
11584 (1 => False, -- unused
11585 2 => False, -- SCIL_Target_Prim (Node2-Sem)
11586 3 => False, -- unused
11587 4 => False, -- SCIL_Entity (Node4-Sem)
11588 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
11589
11590 N_SCIL_Membership_Test =>
11591 (1 => False, -- unused
11592 2 => False, -- unused
11593 3 => False, -- unused
11594 4 => False, -- SCIL_Entity (Node4-Sem)
11595 5 => False), -- SCIL_Tag_Value (Node5-Sem)
11596
11597 -- Entries for Empty, Error and Unused. Even thought these have a Chars
11598 -- field for debugging purposes, they are not really syntactic fields, so
11599 -- we mark all fields as unused.
11600
11601 N_Empty =>
11602 (1 => False, -- unused
11603 2 => False, -- unused
11604 3 => False, -- unused
11605 4 => False, -- unused
11606 5 => False), -- unused
11607
11608 N_Error =>
11609 (1 => False, -- unused
11610 2 => False, -- unused
11611 3 => False, -- unused
11612 4 => False, -- unused
11613 5 => False), -- unused
11614
11615 N_Unused_At_Start =>
11616 (1 => False, -- unused
11617 2 => False, -- unused
11618 3 => False, -- unused
11619 4 => False, -- unused
11620 5 => False), -- unused
11621
11622 N_Unused_At_End =>
11623 (1 => False, -- unused
11624 2 => False, -- unused
11625 3 => False, -- unused
11626 4 => False, -- unused
11627 5 => False)); -- unused
11628
11629 --------------------
11630 -- Inline Pragmas --
11631 --------------------
11632
11633 pragma Inline (ABE_Is_Certain);
11634 pragma Inline (Abort_Present);
11635 pragma Inline (Abortable_Part);
11636 pragma Inline (Abstract_Present);
11637 pragma Inline (Accept_Handler_Records);
11638 pragma Inline (Accept_Statement);
11639 pragma Inline (Access_Definition);
11640 pragma Inline (Access_To_Subprogram_Definition);
11641 pragma Inline (Access_Types_To_Process);
11642 pragma Inline (Actions);
11643 pragma Inline (Activation_Chain_Entity);
11644 pragma Inline (Acts_As_Spec);
11645 pragma Inline (Actual_Designated_Subtype);
11646 pragma Inline (Address_Warning_Posted);
11647 pragma Inline (Aggregate_Bounds);
11648 pragma Inline (Aliased_Present);
11649 pragma Inline (All_Others);
11650 pragma Inline (All_Present);
11651 pragma Inline (Alternatives);
11652 pragma Inline (Ancestor_Part);
11653 pragma Inline (Array_Aggregate);
11654 pragma Inline (Aspect_Cancel);
11655 pragma Inline (Aspect_Rep_Item);
11656 pragma Inline (Assignment_OK);
11657 pragma Inline (Associated_Node);
11658 pragma Inline (At_End_Proc);
11659 pragma Inline (Attribute_Name);
11660 pragma Inline (Aux_Decls_Node);
11661 pragma Inline (Backwards_OK);
11662 pragma Inline (Bad_Is_Detected);
11663 pragma Inline (Body_To_Inline);
11664 pragma Inline (Body_Required);
11665 pragma Inline (By_Ref);
11666 pragma Inline (Box_Present);
11667 pragma Inline (Char_Literal_Value);
11668 pragma Inline (Chars);
11669 pragma Inline (Check_Address_Alignment);
11670 pragma Inline (Choice_Parameter);
11671 pragma Inline (Choices);
11672 pragma Inline (Class_Present);
11673 pragma Inline (Coextensions);
11674 pragma Inline (Comes_From_Extended_Return_Statement);
11675 pragma Inline (Compile_Time_Known_Aggregate);
11676 pragma Inline (Component_Associations);
11677 pragma Inline (Component_Clauses);
11678 pragma Inline (Component_Definition);
11679 pragma Inline (Component_Items);
11680 pragma Inline (Component_List);
11681 pragma Inline (Component_Name);
11682 pragma Inline (Componentwise_Assignment);
11683 pragma Inline (Condition);
11684 pragma Inline (Condition_Actions);
11685 pragma Inline (Config_Pragmas);
11686 pragma Inline (Constant_Present);
11687 pragma Inline (Constraint);
11688 pragma Inline (Constraints);
11689 pragma Inline (Context_Installed);
11690 pragma Inline (Context_Items);
11691 pragma Inline (Context_Pending);
11692 pragma Inline (Controlling_Argument);
11693 pragma Inline (Conversion_OK);
11694 pragma Inline (Corresponding_Body);
11695 pragma Inline (Corresponding_Formal_Spec);
11696 pragma Inline (Corresponding_Generic_Association);
11697 pragma Inline (Corresponding_Integer_Value);
11698 pragma Inline (Corresponding_Spec);
11699 pragma Inline (Corresponding_Stub);
11700 pragma Inline (Dcheck_Function);
11701 pragma Inline (Debug_Statement);
11702 pragma Inline (Declarations);
11703 pragma Inline (Default_Expression);
11704 pragma Inline (Default_Storage_Pool);
11705 pragma Inline (Default_Name);
11706 pragma Inline (Defining_Identifier);
11707 pragma Inline (Defining_Unit_Name);
11708 pragma Inline (Delay_Alternative);
11709 pragma Inline (Delay_Statement);
11710 pragma Inline (Delta_Expression);
11711 pragma Inline (Digits_Expression);
11712 pragma Inline (Discr_Check_Funcs_Built);
11713 pragma Inline (Discrete_Choices);
11714 pragma Inline (Discrete_Range);
11715 pragma Inline (Discrete_Subtype_Definition);
11716 pragma Inline (Discrete_Subtype_Definitions);
11717 pragma Inline (Discriminant_Specifications);
11718 pragma Inline (Discriminant_Type);
11719 pragma Inline (Do_Accessibility_Check);
11720 pragma Inline (Do_Discriminant_Check);
11721 pragma Inline (Do_Length_Check);
11722 pragma Inline (Do_Division_Check);
11723 pragma Inline (Do_Overflow_Check);
11724 pragma Inline (Do_Range_Check);
11725 pragma Inline (Do_Storage_Check);
11726 pragma Inline (Do_Tag_Check);
11727 pragma Inline (Elaborate_Present);
11728 pragma Inline (Elaborate_All_Desirable);
11729 pragma Inline (Elaborate_All_Present);
11730 pragma Inline (Elaborate_Desirable);
11731 pragma Inline (Elaboration_Boolean);
11732 pragma Inline (Else_Actions);
11733 pragma Inline (Else_Statements);
11734 pragma Inline (Elsif_Parts);
11735 pragma Inline (Enclosing_Variant);
11736 pragma Inline (End_Label);
11737 pragma Inline (End_Span);
11738 pragma Inline (Entity);
11739 pragma Inline (Entity_Or_Associated_Node);
11740 pragma Inline (Entry_Body_Formal_Part);
11741 pragma Inline (Entry_Call_Alternative);
11742 pragma Inline (Entry_Call_Statement);
11743 pragma Inline (Entry_Direct_Name);
11744 pragma Inline (Entry_Index);
11745 pragma Inline (Entry_Index_Specification);
11746 pragma Inline (Etype);
11747 pragma Inline (Exception_Choices);
11748 pragma Inline (Exception_Handlers);
11749 pragma Inline (Exception_Junk);
11750 pragma Inline (Exception_Label);
11751 pragma Inline (Expansion_Delayed);
11752 pragma Inline (Explicit_Actual_Parameter);
11753 pragma Inline (Explicit_Generic_Actual_Parameter);
11754 pragma Inline (Expression);
11755 pragma Inline (Expressions);
11756 pragma Inline (First_Bit);
11757 pragma Inline (First_Inlined_Subprogram);
11758 pragma Inline (First_Name);
11759 pragma Inline (First_Named_Actual);
11760 pragma Inline (First_Real_Statement);
11761 pragma Inline (First_Subtype_Link);
11762 pragma Inline (Float_Truncate);
11763 pragma Inline (Formal_Type_Definition);
11764 pragma Inline (Forwards_OK);
11765 pragma Inline (From_Aspect_Specification);
11766 pragma Inline (From_At_End);
11767 pragma Inline (From_At_Mod);
11768 pragma Inline (From_Default);
11769 pragma Inline (Generic_Associations);
11770 pragma Inline (Generic_Formal_Declarations);
11771 pragma Inline (Generic_Parent);
11772 pragma Inline (Generic_Parent_Type);
11773 pragma Inline (Handled_Statement_Sequence);
11774 pragma Inline (Handler_List_Entry);
11775 pragma Inline (Has_Created_Identifier);
11776 pragma Inline (Has_Dynamic_Length_Check);
11777 pragma Inline (Has_Dynamic_Range_Check);
11778 pragma Inline (Has_Init_Expression);
11779 pragma Inline (Has_Local_Raise);
11780 pragma Inline (Has_Self_Reference);
11781 pragma Inline (Has_No_Elaboration_Code);
11782 pragma Inline (Has_Pragma_CPU);
11783 pragma Inline (Has_Pragma_Priority);
11784 pragma Inline (Has_Pragma_Suppress_All);
11785 pragma Inline (Has_Private_View);
11786 pragma Inline (Has_Relative_Deadline_Pragma);
11787 pragma Inline (Has_Storage_Size_Pragma);
11788 pragma Inline (Has_Task_Info_Pragma);
11789 pragma Inline (Has_Task_Name_Pragma);
11790 pragma Inline (Has_Wide_Character);
11791 pragma Inline (Has_Wide_Wide_Character);
11792 pragma Inline (Hidden_By_Use_Clause);
11793 pragma Inline (High_Bound);
11794 pragma Inline (Identifier);
11795 pragma Inline (Implicit_With);
11796 pragma Inline (Interface_List);
11797 pragma Inline (Interface_Present);
11798 pragma Inline (Includes_Infinities);
11799 pragma Inline (Import_Interface_Present);
11800 pragma Inline (In_Present);
11801 pragma Inline (Inherited_Discriminant);
11802 pragma Inline (Instance_Spec);
11803 pragma Inline (Intval);
11804 pragma Inline (Iterator_Specification);
11805 pragma Inline (Is_Accessibility_Actual);
11806 pragma Inline (Is_Asynchronous_Call_Block);
11807 pragma Inline (Is_Boolean_Aspect);
11808 pragma Inline (Is_Component_Left_Opnd);
11809 pragma Inline (Is_Component_Right_Opnd);
11810 pragma Inline (Is_Controlling_Actual);
11811 pragma Inline (Is_Delayed_Aspect);
11812 pragma Inline (Is_Dynamic_Coextension);
11813 pragma Inline (Is_Elsif);
11814 pragma Inline (Is_Entry_Barrier_Function);
11815 pragma Inline (Is_Expanded_Build_In_Place_Call);
11816 pragma Inline (Is_Folded_In_Parser);
11817 pragma Inline (Is_In_Discriminant_Check);
11818 pragma Inline (Is_Machine_Number);
11819 pragma Inline (Is_Null_Loop);
11820 pragma Inline (Is_Overloaded);
11821 pragma Inline (Is_Power_Of_2_For_Shift);
11822 pragma Inline (Is_Protected_Subprogram_Body);
11823 pragma Inline (Is_Static_Coextension);
11824 pragma Inline (Is_Static_Expression);
11825 pragma Inline (Is_Subprogram_Descriptor);
11826 pragma Inline (Is_Task_Allocation_Block);
11827 pragma Inline (Is_Task_Master);
11828 pragma Inline (Iteration_Scheme);
11829 pragma Inline (Itype);
11830 pragma Inline (Kill_Range_Check);
11831 pragma Inline (Last_Bit);
11832 pragma Inline (Last_Name);
11833 pragma Inline (Library_Unit);
11834 pragma Inline (Label_Construct);
11835 pragma Inline (Left_Opnd);
11836 pragma Inline (Limited_View_Installed);
11837 pragma Inline (Limited_Present);
11838 pragma Inline (Literals);
11839 pragma Inline (Local_Raise_Not_OK);
11840 pragma Inline (Local_Raise_Statements);
11841 pragma Inline (Loop_Actions);
11842 pragma Inline (Loop_Parameter_Specification);
11843 pragma Inline (Low_Bound);
11844 pragma Inline (Mod_Clause);
11845 pragma Inline (More_Ids);
11846 pragma Inline (Must_Be_Byte_Aligned);
11847 pragma Inline (Must_Not_Freeze);
11848 pragma Inline (Must_Not_Override);
11849 pragma Inline (Must_Override);
11850 pragma Inline (Name);
11851 pragma Inline (Names);
11852 pragma Inline (Next_Entity);
11853 pragma Inline (Next_Exit_Statement);
11854 pragma Inline (Next_Implicit_With);
11855 pragma Inline (Next_Named_Actual);
11856 pragma Inline (Next_Pragma);
11857 pragma Inline (Next_Rep_Item);
11858 pragma Inline (Next_Use_Clause);
11859 pragma Inline (No_Ctrl_Actions);
11860 pragma Inline (No_Elaboration_Check);
11861 pragma Inline (No_Entities_Ref_In_Spec);
11862 pragma Inline (No_Initialization);
11863 pragma Inline (No_Truncation);
11864 pragma Inline (Null_Present);
11865 pragma Inline (Null_Exclusion_Present);
11866 pragma Inline (Null_Exclusion_In_Return_Present);
11867 pragma Inline (Null_Record_Present);
11868 pragma Inline (Object_Definition);
11869 pragma Inline (Of_Present);
11870 pragma Inline (Original_Discriminant);
11871 pragma Inline (Original_Entity);
11872 pragma Inline (Others_Discrete_Choices);
11873 pragma Inline (Out_Present);
11874 pragma Inline (Parameter_Associations);
11875 pragma Inline (Parameter_Specifications);
11876 pragma Inline (Parameter_List_Truncated);
11877 pragma Inline (Parameter_Type);
11878 pragma Inline (Parent_Spec);
11879 pragma Inline (Position);
11880 pragma Inline (Pragma_Argument_Associations);
11881 pragma Inline (Pragma_Enabled);
11882 pragma Inline (Pragma_Identifier);
11883 pragma Inline (Pragmas_After);
11884 pragma Inline (Pragmas_Before);
11885 pragma Inline (Prefix);
11886 pragma Inline (Present_Expr);
11887 pragma Inline (Prev_Ids);
11888 pragma Inline (Print_In_Hex);
11889 pragma Inline (Private_Declarations);
11890 pragma Inline (Private_Present);
11891 pragma Inline (Procedure_To_Call);
11892 pragma Inline (Proper_Body);
11893 pragma Inline (Protected_Definition);
11894 pragma Inline (Protected_Present);
11895 pragma Inline (Raises_Constraint_Error);
11896 pragma Inline (Range_Constraint);
11897 pragma Inline (Range_Expression);
11898 pragma Inline (Real_Range_Specification);
11899 pragma Inline (Realval);
11900 pragma Inline (Reason);
11901 pragma Inline (Record_Extension_Part);
11902 pragma Inline (Redundant_Use);
11903 pragma Inline (Renaming_Exception);
11904 pragma Inline (Result_Definition);
11905 pragma Inline (Return_Object_Declarations);
11906 pragma Inline (Return_Statement_Entity);
11907 pragma Inline (Reverse_Present);
11908 pragma Inline (Right_Opnd);
11909 pragma Inline (Rounded_Result);
11910 pragma Inline (SCIL_Controlling_Tag);
11911 pragma Inline (SCIL_Entity);
11912 pragma Inline (SCIL_Tag_Value);
11913 pragma Inline (SCIL_Target_Prim);
11914 pragma Inline (Scope);
11915 pragma Inline (Select_Alternatives);
11916 pragma Inline (Selector_Name);
11917 pragma Inline (Selector_Names);
11918 pragma Inline (Shift_Count_OK);
11919 pragma Inline (Source_Type);
11920 pragma Inline (Specification);
11921 pragma Inline (Split_PPC);
11922 pragma Inline (Statements);
11923 pragma Inline (Static_Processing_OK);
11924 pragma Inline (Storage_Pool);
11925 pragma Inline (Strval);
11926 pragma Inline (Subtype_Indication);
11927 pragma Inline (Subtype_Mark);
11928 pragma Inline (Subtype_Marks);
11929 pragma Inline (Suppress_Assignment_Checks);
11930 pragma Inline (Suppress_Loop_Warnings);
11931 pragma Inline (Synchronized_Present);
11932 pragma Inline (Tagged_Present);
11933 pragma Inline (Target_Type);
11934 pragma Inline (Task_Definition);
11935 pragma Inline (Task_Present);
11936 pragma Inline (Then_Actions);
11937 pragma Inline (Then_Statements);
11938 pragma Inline (Triggering_Alternative);
11939 pragma Inline (Triggering_Statement);
11940 pragma Inline (Treat_Fixed_As_Integer);
11941 pragma Inline (TSS_Elist);
11942 pragma Inline (Type_Definition);
11943 pragma Inline (Unit);
11944 pragma Inline (Unknown_Discriminants_Present);
11945 pragma Inline (Unreferenced_In_Spec);
11946 pragma Inline (Variant_Part);
11947 pragma Inline (Variants);
11948 pragma Inline (Visible_Declarations);
11949 pragma Inline (Was_Originally_Stub);
11950 pragma Inline (Withed_Body);
11951 pragma Inline (Zero_Cost_Handling);
11952
11953 pragma Inline (Set_ABE_Is_Certain);
11954 pragma Inline (Set_Abort_Present);
11955 pragma Inline (Set_Abortable_Part);
11956 pragma Inline (Set_Abstract_Present);
11957 pragma Inline (Set_Accept_Handler_Records);
11958 pragma Inline (Set_Accept_Statement);
11959 pragma Inline (Set_Access_Definition);
11960 pragma Inline (Set_Access_To_Subprogram_Definition);
11961 pragma Inline (Set_Access_Types_To_Process);
11962 pragma Inline (Set_Actions);
11963 pragma Inline (Set_Activation_Chain_Entity);
11964 pragma Inline (Set_Acts_As_Spec);
11965 pragma Inline (Set_Actual_Designated_Subtype);
11966 pragma Inline (Set_Address_Warning_Posted);
11967 pragma Inline (Set_Aggregate_Bounds);
11968 pragma Inline (Set_Aliased_Present);
11969 pragma Inline (Set_All_Others);
11970 pragma Inline (Set_All_Present);
11971 pragma Inline (Set_Alternatives);
11972 pragma Inline (Set_Ancestor_Part);
11973 pragma Inline (Set_Array_Aggregate);
11974 pragma Inline (Set_Aspect_Cancel);
11975 pragma Inline (Set_Aspect_Rep_Item);
11976 pragma Inline (Set_Assignment_OK);
11977 pragma Inline (Set_Associated_Node);
11978 pragma Inline (Set_At_End_Proc);
11979 pragma Inline (Set_Attribute_Name);
11980 pragma Inline (Set_Aux_Decls_Node);
11981 pragma Inline (Set_Backwards_OK);
11982 pragma Inline (Set_Bad_Is_Detected);
11983 pragma Inline (Set_Body_To_Inline);
11984 pragma Inline (Set_Body_Required);
11985 pragma Inline (Set_By_Ref);
11986 pragma Inline (Set_Box_Present);
11987 pragma Inline (Set_Char_Literal_Value);
11988 pragma Inline (Set_Chars);
11989 pragma Inline (Set_Check_Address_Alignment);
11990 pragma Inline (Set_Choice_Parameter);
11991 pragma Inline (Set_Choices);
11992 pragma Inline (Set_Class_Present);
11993 pragma Inline (Set_Coextensions);
11994 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11995 pragma Inline (Set_Compile_Time_Known_Aggregate);
11996 pragma Inline (Set_Component_Associations);
11997 pragma Inline (Set_Component_Clauses);
11998 pragma Inline (Set_Component_Definition);
11999 pragma Inline (Set_Component_Items);
12000 pragma Inline (Set_Component_List);
12001 pragma Inline (Set_Component_Name);
12002 pragma Inline (Set_Componentwise_Assignment);
12003 pragma Inline (Set_Condition);
12004 pragma Inline (Set_Condition_Actions);
12005 pragma Inline (Set_Config_Pragmas);
12006 pragma Inline (Set_Constant_Present);
12007 pragma Inline (Set_Constraint);
12008 pragma Inline (Set_Constraints);
12009 pragma Inline (Set_Context_Installed);
12010 pragma Inline (Set_Context_Items);
12011 pragma Inline (Set_Context_Pending);
12012 pragma Inline (Set_Controlling_Argument);
12013 pragma Inline (Set_Conversion_OK);
12014 pragma Inline (Set_Corresponding_Body);
12015 pragma Inline (Set_Corresponding_Formal_Spec);
12016 pragma Inline (Set_Corresponding_Generic_Association);
12017 pragma Inline (Set_Corresponding_Integer_Value);
12018 pragma Inline (Set_Corresponding_Spec);
12019 pragma Inline (Set_Corresponding_Stub);
12020 pragma Inline (Set_Dcheck_Function);
12021 pragma Inline (Set_Debug_Statement);
12022 pragma Inline (Set_Declarations);
12023 pragma Inline (Set_Default_Expression);
12024 pragma Inline (Set_Default_Storage_Pool);
12025 pragma Inline (Set_Default_Name);
12026 pragma Inline (Set_Defining_Identifier);
12027 pragma Inline (Set_Defining_Unit_Name);
12028 pragma Inline (Set_Delay_Alternative);
12029 pragma Inline (Set_Delay_Statement);
12030 pragma Inline (Set_Delta_Expression);
12031 pragma Inline (Set_Digits_Expression);
12032 pragma Inline (Set_Discr_Check_Funcs_Built);
12033 pragma Inline (Set_Discrete_Choices);
12034 pragma Inline (Set_Discrete_Range);
12035 pragma Inline (Set_Discrete_Subtype_Definition);
12036 pragma Inline (Set_Discrete_Subtype_Definitions);
12037 pragma Inline (Set_Discriminant_Specifications);
12038 pragma Inline (Set_Discriminant_Type);
12039 pragma Inline (Set_Do_Accessibility_Check);
12040 pragma Inline (Set_Do_Discriminant_Check);
12041 pragma Inline (Set_Do_Length_Check);
12042 pragma Inline (Set_Do_Division_Check);
12043 pragma Inline (Set_Do_Overflow_Check);
12044 pragma Inline (Set_Do_Range_Check);
12045 pragma Inline (Set_Do_Storage_Check);
12046 pragma Inline (Set_Do_Tag_Check);
12047 pragma Inline (Set_Elaborate_Present);
12048 pragma Inline (Set_Elaborate_All_Desirable);
12049 pragma Inline (Set_Elaborate_All_Present);
12050 pragma Inline (Set_Elaborate_Desirable);
12051 pragma Inline (Set_Elaboration_Boolean);
12052 pragma Inline (Set_Else_Actions);
12053 pragma Inline (Set_Else_Statements);
12054 pragma Inline (Set_Elsif_Parts);
12055 pragma Inline (Set_Enclosing_Variant);
12056 pragma Inline (Set_End_Label);
12057 pragma Inline (Set_End_Span);
12058 pragma Inline (Set_Entity);
12059 pragma Inline (Set_Entry_Body_Formal_Part);
12060 pragma Inline (Set_Entry_Call_Alternative);
12061 pragma Inline (Set_Entry_Call_Statement);
12062 pragma Inline (Set_Entry_Direct_Name);
12063 pragma Inline (Set_Entry_Index);
12064 pragma Inline (Set_Entry_Index_Specification);
12065 pragma Inline (Set_Etype);
12066 pragma Inline (Set_Exception_Choices);
12067 pragma Inline (Set_Exception_Handlers);
12068 pragma Inline (Set_Exception_Junk);
12069 pragma Inline (Set_Exception_Label);
12070 pragma Inline (Set_Expansion_Delayed);
12071 pragma Inline (Set_Explicit_Actual_Parameter);
12072 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12073 pragma Inline (Set_Expression);
12074 pragma Inline (Set_Expressions);
12075 pragma Inline (Set_First_Bit);
12076 pragma Inline (Set_First_Inlined_Subprogram);
12077 pragma Inline (Set_First_Name);
12078 pragma Inline (Set_First_Named_Actual);
12079 pragma Inline (Set_First_Real_Statement);
12080 pragma Inline (Set_First_Subtype_Link);
12081 pragma Inline (Set_Float_Truncate);
12082 pragma Inline (Set_Formal_Type_Definition);
12083 pragma Inline (Set_Forwards_OK);
12084 pragma Inline (Set_From_Aspect_Specification);
12085 pragma Inline (Set_From_At_End);
12086 pragma Inline (Set_From_At_Mod);
12087 pragma Inline (Set_From_Default);
12088 pragma Inline (Set_Generic_Associations);
12089 pragma Inline (Set_Generic_Formal_Declarations);
12090 pragma Inline (Set_Generic_Parent);
12091 pragma Inline (Set_Generic_Parent_Type);
12092 pragma Inline (Set_Handled_Statement_Sequence);
12093 pragma Inline (Set_Handler_List_Entry);
12094 pragma Inline (Set_Has_Created_Identifier);
12095 pragma Inline (Set_Has_Dynamic_Length_Check);
12096 pragma Inline (Set_Has_Init_Expression);
12097 pragma Inline (Set_Has_Local_Raise);
12098 pragma Inline (Set_Has_Dynamic_Range_Check);
12099 pragma Inline (Set_Has_No_Elaboration_Code);
12100 pragma Inline (Set_Has_Pragma_CPU);
12101 pragma Inline (Set_Has_Pragma_Priority);
12102 pragma Inline (Set_Has_Pragma_Suppress_All);
12103 pragma Inline (Set_Has_Private_View);
12104 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12105 pragma Inline (Set_Has_Storage_Size_Pragma);
12106 pragma Inline (Set_Has_Task_Info_Pragma);
12107 pragma Inline (Set_Has_Task_Name_Pragma);
12108 pragma Inline (Set_Has_Wide_Character);
12109 pragma Inline (Set_Has_Wide_Wide_Character);
12110 pragma Inline (Set_Hidden_By_Use_Clause);
12111 pragma Inline (Set_High_Bound);
12112 pragma Inline (Set_Identifier);
12113 pragma Inline (Set_Implicit_With);
12114 pragma Inline (Set_Includes_Infinities);
12115 pragma Inline (Set_Interface_List);
12116 pragma Inline (Set_Interface_Present);
12117 pragma Inline (Set_Import_Interface_Present);
12118 pragma Inline (Set_In_Present);
12119 pragma Inline (Set_Inherited_Discriminant);
12120 pragma Inline (Set_Instance_Spec);
12121 pragma Inline (Set_Intval);
12122 pragma Inline (Set_Iterator_Specification);
12123 pragma Inline (Set_Is_Accessibility_Actual);
12124 pragma Inline (Set_Is_Asynchronous_Call_Block);
12125 pragma Inline (Set_Is_Boolean_Aspect);
12126 pragma Inline (Set_Is_Component_Left_Opnd);
12127 pragma Inline (Set_Is_Component_Right_Opnd);
12128 pragma Inline (Set_Is_Controlling_Actual);
12129 pragma Inline (Set_Is_Delayed_Aspect);
12130 pragma Inline (Set_Is_Dynamic_Coextension);
12131 pragma Inline (Set_Is_Elsif);
12132 pragma Inline (Set_Is_Entry_Barrier_Function);
12133 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12134 pragma Inline (Set_Is_Folded_In_Parser);
12135 pragma Inline (Set_Is_In_Discriminant_Check);
12136 pragma Inline (Set_Is_Machine_Number);
12137 pragma Inline (Set_Is_Null_Loop);
12138 pragma Inline (Set_Is_Overloaded);
12139 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12140 pragma Inline (Set_Is_Protected_Subprogram_Body);
12141 pragma Inline (Set_Has_Self_Reference);
12142 pragma Inline (Set_Is_Static_Coextension);
12143 pragma Inline (Set_Is_Static_Expression);
12144 pragma Inline (Set_Is_Subprogram_Descriptor);
12145 pragma Inline (Set_Is_Task_Allocation_Block);
12146 pragma Inline (Set_Is_Task_Master);
12147 pragma Inline (Set_Iteration_Scheme);
12148 pragma Inline (Set_Itype);
12149 pragma Inline (Set_Kill_Range_Check);
12150 pragma Inline (Set_Last_Bit);
12151 pragma Inline (Set_Last_Name);
12152 pragma Inline (Set_Library_Unit);
12153 pragma Inline (Set_Label_Construct);
12154 pragma Inline (Set_Left_Opnd);
12155 pragma Inline (Set_Limited_View_Installed);
12156 pragma Inline (Set_Limited_Present);
12157 pragma Inline (Set_Literals);
12158 pragma Inline (Set_Local_Raise_Not_OK);
12159 pragma Inline (Set_Local_Raise_Statements);
12160 pragma Inline (Set_Loop_Actions);
12161 pragma Inline (Set_Loop_Parameter_Specification);
12162 pragma Inline (Set_Low_Bound);
12163 pragma Inline (Set_Mod_Clause);
12164 pragma Inline (Set_More_Ids);
12165 pragma Inline (Set_Must_Be_Byte_Aligned);
12166 pragma Inline (Set_Must_Not_Freeze);
12167 pragma Inline (Set_Must_Not_Override);
12168 pragma Inline (Set_Must_Override);
12169 pragma Inline (Set_Name);
12170 pragma Inline (Set_Names);
12171 pragma Inline (Set_Next_Entity);
12172 pragma Inline (Set_Next_Exit_Statement);
12173 pragma Inline (Set_Next_Implicit_With);
12174 pragma Inline (Set_Next_Named_Actual);
12175 pragma Inline (Set_Next_Pragma);
12176 pragma Inline (Set_Next_Rep_Item);
12177 pragma Inline (Set_Next_Use_Clause);
12178 pragma Inline (Set_No_Ctrl_Actions);
12179 pragma Inline (Set_No_Elaboration_Check);
12180 pragma Inline (Set_No_Entities_Ref_In_Spec);
12181 pragma Inline (Set_No_Initialization);
12182 pragma Inline (Set_No_Truncation);
12183 pragma Inline (Set_Null_Present);
12184 pragma Inline (Set_Null_Exclusion_Present);
12185 pragma Inline (Set_Null_Exclusion_In_Return_Present);
12186 pragma Inline (Set_Null_Record_Present);
12187 pragma Inline (Set_Object_Definition);
12188 pragma Inline (Set_Of_Present);
12189 pragma Inline (Set_Original_Discriminant);
12190 pragma Inline (Set_Original_Entity);
12191 pragma Inline (Set_Others_Discrete_Choices);
12192 pragma Inline (Set_Out_Present);
12193 pragma Inline (Set_Parameter_Associations);
12194 pragma Inline (Set_Parameter_Specifications);
12195 pragma Inline (Set_Parameter_List_Truncated);
12196 pragma Inline (Set_Parameter_Type);
12197 pragma Inline (Set_Parent_Spec);
12198 pragma Inline (Set_Position);
12199 pragma Inline (Set_Pragma_Argument_Associations);
12200 pragma Inline (Set_Pragma_Enabled);
12201 pragma Inline (Set_Pragma_Identifier);
12202 pragma Inline (Set_Pragmas_After);
12203 pragma Inline (Set_Pragmas_Before);
12204 pragma Inline (Set_Prefix);
12205 pragma Inline (Set_Present_Expr);
12206 pragma Inline (Set_Prev_Ids);
12207 pragma Inline (Set_Print_In_Hex);
12208 pragma Inline (Set_Private_Declarations);
12209 pragma Inline (Set_Private_Present);
12210 pragma Inline (Set_Procedure_To_Call);
12211 pragma Inline (Set_Proper_Body);
12212 pragma Inline (Set_Protected_Definition);
12213 pragma Inline (Set_Protected_Present);
12214 pragma Inline (Set_Raises_Constraint_Error);
12215 pragma Inline (Set_Range_Constraint);
12216 pragma Inline (Set_Range_Expression);
12217 pragma Inline (Set_Real_Range_Specification);
12218 pragma Inline (Set_Realval);
12219 pragma Inline (Set_Reason);
12220 pragma Inline (Set_Record_Extension_Part);
12221 pragma Inline (Set_Redundant_Use);
12222 pragma Inline (Set_Renaming_Exception);
12223 pragma Inline (Set_Result_Definition);
12224 pragma Inline (Set_Return_Object_Declarations);
12225 pragma Inline (Set_Reverse_Present);
12226 pragma Inline (Set_Right_Opnd);
12227 pragma Inline (Set_Rounded_Result);
12228 pragma Inline (Set_SCIL_Controlling_Tag);
12229 pragma Inline (Set_SCIL_Entity);
12230 pragma Inline (Set_SCIL_Tag_Value);
12231 pragma Inline (Set_SCIL_Target_Prim);
12232 pragma Inline (Set_Scope);
12233 pragma Inline (Set_Select_Alternatives);
12234 pragma Inline (Set_Selector_Name);
12235 pragma Inline (Set_Selector_Names);
12236 pragma Inline (Set_Shift_Count_OK);
12237 pragma Inline (Set_Source_Type);
12238 pragma Inline (Set_Specification);
12239 pragma Inline (Set_Split_PPC);
12240 pragma Inline (Set_Statements);
12241 pragma Inline (Set_Static_Processing_OK);
12242 pragma Inline (Set_Storage_Pool);
12243 pragma Inline (Set_Strval);
12244 pragma Inline (Set_Subtype_Indication);
12245 pragma Inline (Set_Subtype_Mark);
12246 pragma Inline (Set_Subtype_Marks);
12247 pragma Inline (Set_Suppress_Assignment_Checks);
12248 pragma Inline (Set_Suppress_Loop_Warnings);
12249 pragma Inline (Set_Synchronized_Present);
12250 pragma Inline (Set_Tagged_Present);
12251 pragma Inline (Set_Target_Type);
12252 pragma Inline (Set_Task_Definition);
12253 pragma Inline (Set_Task_Present);
12254 pragma Inline (Set_Then_Actions);
12255 pragma Inline (Set_Then_Statements);
12256 pragma Inline (Set_Triggering_Alternative);
12257 pragma Inline (Set_Triggering_Statement);
12258 pragma Inline (Set_Treat_Fixed_As_Integer);
12259 pragma Inline (Set_TSS_Elist);
12260 pragma Inline (Set_Type_Definition);
12261 pragma Inline (Set_Unit);
12262 pragma Inline (Set_Unknown_Discriminants_Present);
12263 pragma Inline (Set_Unreferenced_In_Spec);
12264 pragma Inline (Set_Variant_Part);
12265 pragma Inline (Set_Variants);
12266 pragma Inline (Set_Visible_Declarations);
12267 pragma Inline (Set_Was_Originally_Stub);
12268 pragma Inline (Set_Withed_Body);
12269 pragma Inline (Set_Zero_Cost_Handling);
12270
12271 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
12272 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
12273 -- should refer to N_Simple_Return_Statement.
12274
12275 end Sinfo;