1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
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 2, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 -- This package defines the structure of the abstract syntax tree. The Tree
35 -- package provides a basic tree structure. Sinfo describes how this
36 -- structure is used to represent the syntax of an Ada program.
38 -- Note: the grammar used here is taken from Version 5.95 of the RM, dated
39 -- November 1994. The grammar in the RM is followed very closely in the tree
40 -- design, and is repeated as part of this source file.
42 -- The tree contains not only the full syntactic representation of the
43 -- program, but also the results of semantic analysis. In particular, the
44 -- nodes for defining identifiers, defining character literals and defining
45 -- operator symbols, collectively referred to as entities, represent what
46 -- would normally be regarded as the symbol table information. In addition
47 -- a number of the tree nodes contain semantic information.
49 -- WARNING: There is a C version of this package. Any changes to this
50 -- source file must be properly reflected in this C header file sinfo.h
51 -- which is created automatically from sinfo.ads using xsinfo.adb.
53 with Types; use Types;
54 with Uintp; use Uintp;
55 with Urealp; use Urealp;
59 ---------------------------------
60 -- Making Changes to This File --
61 ---------------------------------
63 -- If changes are made to this file, a number of related steps must be
64 -- carried out to ensure consistency. First, if a field access function
65 -- is added, it appears in seven places:
67 -- The documentation associated with the node
68 -- The spec of the access function in sinfo.ads
69 -- The body of the access function in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the access function
71 -- The spec of the set procedure in sinfo.ads
72 -- The body of the set procedure in sinfo.adb
73 -- The pragma Inline at the end of sinfo.ads for the set procedure
75 -- The field chosen must be consistent in all places, and, for a node
76 -- that is a subexpression, must not overlap any of the standard
79 -- In addition, if any of the standard expression fields is changed, then
80 -- the utiliy program which creates the Treeprs spec (in file treeprs.ads)
81 -- must be updated appropriately, since it special cases expression fields.
83 -- If a new tree node is added, then the following changes are made
85 -- Add it to the documentation in the appropriate place
86 -- Add its fields to this documentation section
87 -- Define it in the appropriate classification in Node_Kind
88 -- In the body (sinfo), add entries to the access functions for all
89 -- its fields (except standard expression fields) to include the new
90 -- node in the checks.
91 -- Add an appropriate section to the case statement in sprint.adb
92 -- Add an appropriate section to the case statement in sem.adb
93 -- Add an appropriate section to the case statement in exp_util.adb
94 -- (Insert_Actions procedure)
95 -- For a subexpression, add an appropriate section to the case
96 -- statement in sem_eval.adb
97 -- For a subexpression, add an appropriate section to the case
98 -- statement in sem_res.adb
100 -- Finally, four utility programs must be run:
102 -- Run CSinfo to check that you have made the changes consistently.
103 -- It checks most of the rules given above, with clear error messages.
104 -- This utility reads sinfo.ads and sinfo.adb and generates a report
105 -- to standard output.
107 -- Run XSinfo to create a-sinfo.h, the corresponding C header. This
108 -- utility reads sinfo.ads and generates a-sinfo.h. Note that it
109 -- does not need to read sinfo.adb, since the contents of the body
110 -- are algorithmically determinable from the spec.
112 -- Run XTreeprs to create treeprs.ads, an updated version of
113 -- the module that is used to drive the tree print routine. This
114 -- utility reads (but does not modify) treeprs.adt, the template
115 -- that provides the basic structure of the file, and then fills
116 -- in the data from the comments in sinfo.ads.
118 -- Run XNmake to create nmake.ads and nmake.adb, the package body
119 -- and spec of the Nmake package which contains functions for
120 -- constructing nodes.
122 -- Note: sometime we could write a utility that actually generated the
123 -- body of sinfo from the spec instead of simply checking it, since, as
124 -- noted above, the contents of the body can be determined from the spec.
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
130 -- Generally the structure of the tree very closely follows the grammar
131 -- as defined in the RM. However, certain nodes are omitted to save
132 -- space and simplify semantic processing. Two general classes of such
133 -- omitted nodes are as follows:
135 -- If the only possibilities for a non-terminal are one or more other
136 -- non terminals (i.e. the rule is a "skinny" rule), then usually the
137 -- corresponding node is omitted from the tree, and the target construct
138 -- appears directly. For example, a real type definition is either a
139 -- floating point definition or a fixed point definition. No explicit
140 -- node appears for real type definition. Instead either the floating
141 -- point definition or fixed point definition appears directly.
143 -- If a non-terminal corresponds to a list of some other non-terminal
144 -- (possibly with separating punctuation), then usually it is omitted
145 -- from the tree, and a list of components appears instead. For
146 -- example, sequence of statements does not appear explicitly in the
147 -- tree. Instead a list of statements appears directly.
149 -- Some additional cases of omitted nodes occur and are documented
150 -- individually. In particular, many nodes are omitted in the tree
151 -- generated for an expression.
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations,
159 -- number declarations etc.)
161 -- The semantics of such statements are equivalent to a series of
162 -- identical declarations of single defining identifiers (except that
163 -- conformance checks require the same grouping of identifiers in the
166 -- To simplify semantic processing, the parser breaks down such multiple
167 -- declaration cases into sequences of single declarations, duplicating
168 -- type and initialization information as required. The flags More_Ids
169 -- and Prev_Ids are used to record the original form of the source in
170 -- the case where the original source used a list of names, More_Ids
171 -- being set on all but the last name and Prev_Ids being set on all
172 -- but the first name. These flags are used to reconstruct the original
173 -- source (e.g. in the Sprint package), and also are included in the
174 -- conformance checks, but otherwise have no semantic significance.
176 -- Note: the reason that we use More_Ids and Prev_Ids rather than
177 -- First_Name and Last_Name flags is so that the flags are off in the
178 -- normal one identifier case, which minimizes tree print output.
180 -----------------------
181 -- Use of Node Lists --
182 -----------------------
184 -- With a few exceptions, if a construction of the form {non-terminal}
185 -- appears in the tree, lists are used in the corresponding tree node
186 -- (see package Nlists for handling of node lists). In this case a field
187 -- of the parent node points to a list of nodes for the non-terminal. The
188 -- field name for such fields has a plural name which always ends in "s".
189 -- For example, a case statement has a field Alternatives pointing to a
190 -- list of case statement alternative nodes.
192 -- Only fields pointing to lists have names ending in "s", so generally
193 -- the structure is strongly typed, fields not ending in s point to
194 -- single nodes, and fields ending in s point to lists.
196 -- The following example shows how a traversal of a list is written. We
197 -- suppose here that Stmt points to a N_Case_Statement node which has
198 -- a list field called Alternatives:
200 -- Alt := First (Alternatives (Stmt));
201 -- while Present (Alt) loop
203 -- -- processing for case statement alternative Alt
205 -- Alt := Next (Alt);
208 -- The Present function tests for Empty, which in this case signals the
209 -- end of the list. First returns Empty immediately if the list is empty.
210 -- Present is defined in Atree, First and Next are defined in Nlists.
212 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
213 -- contexts, which is handled as described in the previous section, and
214 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
215 -- using the First_Name and Last_Name flags, as further detailed in the
216 -- description of the N_With_Clause node.
222 -- Pragmas can appear in many different context, but are not included
223 -- in the grammar. Still they must appear in the tree, so they can be
224 -- properly processed.
226 -- Two approaches are used. In some cases, an extra field is defined
227 -- in an appropriate node that contains a list of pragmas appearing
228 -- in the expected context. For example pragmas can appear before an
229 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
230 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
232 -- The other approach is to simply allow pragmas to appear in syntactic
233 -- lists where the grammar (of course) does not include the possibility.
234 -- For example, the Variants field of an N_Variant_Part node points to
235 -- a list that can contain both N_Pragma and N_Variant nodes.
237 -- To make processing easier in the latter case, the Nlists package
238 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
239 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be
240 -- handled ignoring all pragmas.
242 -- In the case of the variants list, we can either write:
244 -- Variant := First (Variants (N));
245 -- while Present (Variant) loop
247 -- Variant := Next (Variant);
252 -- Variant := First_Non_Pragma (Variants (N));
253 -- while Present (Variant) loop
255 -- Variant := Next_Non_Pragma (Variant);
258 -- In the first form of the loop, Variant can either be an N_Pragma or
259 -- an N_Variant node. In the second form, Variant can only be N_Variant
260 -- since all pragmas are skipped.
262 ---------------------
263 -- Optional Fields --
264 ---------------------
266 -- Fields which correspond to a section of the syntax enclosed in square
267 -- brackets are generally omitted (and the corresponding field set to
268 -- Empty for a node, or No_List for a list). The documentation of such
269 -- fields notes these cases. One exception to this rule occurs in the
270 -- case of possibly empty statement sequences (such as the sequence of
271 -- statements in an entry call alternative). Such cases appear in the
272 -- syntax rules as [SEQUENCE_OF_STATEMENTS] and the fields corresponding
273 -- to such optional statement sequences always contain an empty list (not
274 -- No_List) if no statements are present.
276 -- Note: the utility program that constructs the body and spec of the
277 -- Nmake package relies on the format of the comments to determine if
278 -- a field should have a default value in the corresponding make routine.
279 -- The rule is that if the first line of the description of the field
280 -- contains the string "(set to xxx if", then a default value of xxx is
281 -- provided for this field in the corresponding Make_yyy routine.
283 -----------------------------------
284 -- Note on Body/Spec Terminology --
285 -----------------------------------
287 -- In informal discussions about Ada, it is customary to refer to package
288 -- and subprogram specs and bodies. However, this is not technically
289 -- correct, what is normally referred to as a spec or specification is in
290 -- fact a package declaration or subprogram declaration. We are careful
291 -- in GNAT to use the correct terminology and in particular, the full
292 -- word specification is never used as an incorrect substitute for
293 -- declaration. The structure and terminology used in the tree also
294 -- reflects the grammar and thus uses declaration and specification in
295 -- the technically correct manner.
297 -- However, there are contexts in which the informal terminology is
298 -- useful. We have the word "body" to refer to the Interp_Etype declared by
299 -- the declaration of a unit body, and in some contexts we need a
300 -- similar term to refer to the entity declared by the package or
301 -- subprogram declaration, and simply using declaration can be confusing
302 -- since the body also has a declaration.
304 -- An example of such a context is the link between the package body
305 -- and its declaration. With_Declaration is confusing, since
306 -- the package body itself is a declaration.
308 -- To deal with this problem, we reserve the informal term Spec, i.e.
309 -- the popular abbreviation used in this context, to refer to the entity
310 -- declared by the package or subprogram declaration. So in the above
311 -- example case, the field in the body is called With_Spec.
313 -- Another important context for the use of the word Spec is in error
314 -- messages, where a hyper-correct use of declaration would be confusing
315 -- to a typical Ada programmer, and even for an expert programmer can
316 -- cause confusion since the body has a declaration as well.
320 -- Declaration always refers to the syntactic entity that is called
321 -- a declaration. In particular, subprogram declaration
322 -- and package declaration are used to describe the
323 -- syntactic entity that includes the semicolon.
325 -- Specification always refers to the syntactic entity that is called
326 -- a specification. In particular, the terms procedure
327 -- specification, function specification, package
328 -- specification, subprogram specification always refer
329 -- to the syntactic entity that has no semicolon.
331 -- Spec is an informal term, used to refer to the entity
332 -- that is declared by a task declaration, protected
333 -- declaration, generic declaration, subprogram
334 -- declaration or package declaration.
336 -- This convention is followed throughout the GNAT documentation
337 -- both internal and external, and in all error message text.
339 ------------------------
340 -- Internal Use Nodes --
341 ------------------------
343 -- These are Node_Kind settings used in the internal implementation
344 -- which are not logically part of the specification.
347 -- Completely unused entry at the start of the enumeration type. This
348 -- is inserted so that no legitimate value is zero, which helps to get
349 -- better debugging behavior, since zero is a likely uninitialized value).
352 -- Completely unused entry at the end of the enumeration type. This is
353 -- handy so that arrays with Node_Kind as the index type have an extra
354 -- entry at the end (see for example the use of the Pchar_Pos_Array in
355 -- Treepr, where the extra entry provides the limit value when dealing
356 -- with the last used entry in the array).
358 -----------------------------------------
359 -- Note on the settings of Sloc fields --
360 -----------------------------------------
362 -- The Sloc field of nodes that come from the source is set by the
363 -- parser. For internal nodes, and nodes generated during expansion
364 -- the Sloc is usually set in the call to the constructor for the node.
365 -- In general the Sloc value chosen for an internal node is the Sloc of
366 -- the source node whose processing is responsible for the expansion. For
367 -- example, the Sloc of an inherited primitive operation is the Sloc of
368 -- the corresponding derived type declaration.
370 -- For the nodes of a generic instantiation, the Sloc value is encoded
371 -- to represent both the original Sloc in the generic unit, and the Sloc
372 -- of the instantiation itself. See Sinput.ads for details.
374 -- Subprogram instances create two callable entities: one is the visible
375 -- subprogram instance, and the other is an anonymous subprogram nested
376 -- within a wrapper package that contains the renamings for the actuals.
377 -- Both of these entities have the Sloc of the defining entity in the
378 -- instantiation node. This simplifies some ASIS queries.
380 -----------------------
381 -- Field Definitions --
382 -----------------------
384 -- In the following node definitions, all fields, both syntactic and
385 -- semantic, are documented. The one exception is in the case of entities
386 -- (defining indentifiers, character literals and operator symbols),
387 -- where the usage of the fields depends on the entity kind. Entity
388 -- fields are fully documented in the separate package Einfo.
390 -- In the node definitions, three common sets of fields are abbreviated
391 -- to save both space in the documentation, and also space in the string
392 -- (defined in Tree_Print_Strings) used to print trees. The following
393 -- abbreviations are used:
395 -- Note: the utility program that creates the Treeprs spec (in the file
396 -- xtreeprs.adb) knows about the special fields here, so it must be
397 -- modified if any change is made to these fields.
399 -- "plus fields for binary operator"
400 -- Chars (Name1) Name_Id for the operator
401 -- Left_Opnd (Node2) left operand expression
402 -- Right_Opnd (Node3) right operand expression
403 -- Entity (Node4-Sem) defining entity for operator
404 -- Associated_Node (Node4-Sem) for generic processing
405 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
406 -- Has_Private_View (Flag11-Sem) set in generic units.
408 -- "plus fields for unary operator"
409 -- Chars (Name1) Name_Id for the operator
410 -- Right_Opnd (Node3) right operand expression
411 -- Entity (Node4-Sem) defining entity for operator
412 -- Associated_Node (Node4-Sem) for generic processing
413 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
414 -- Has_Private_View (Flag11-Sem) set in generic units.
416 -- "plus fields for expression"
417 -- Paren_Count number of parentheses levels
418 -- Etype (Node5-Sem) type of the expression
419 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
420 -- Is_Static_Expression (Flag6-Sem) set for static expression
421 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
422 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
423 -- Do_Range_Check (Flag9-Sem) set if a range check needed
424 -- Assignment_OK (Flag15-Sem) set if modification is OK
425 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
427 -- Note: see under (EXPRESSION) for further details on the use of
428 -- the Paren_Count field to record the number of parentheses levels.
430 -- Node_Kind is the type used in the Nkind field to indicate the node
431 -- kind. The actual definition of this type is given later (the reason
432 -- for this is that we want the descriptions ordered by logical chapter
433 -- in the RM, but the type definition is reordered to facilitate the
434 -- definition of some subtype ranges. The individual descriptions of
435 -- the nodes show how the various fields are used in each node kind,
436 -- as well as providing logical names for the fields. Functions and
437 -- procedures are provided for accessing and setting these fields
438 -- using these logical names.
440 -----------------------
441 -- Gigi Restrictions --
442 -----------------------
444 -- The tree passed to Gigi is more restricted than the general tree form.
445 -- For example, as a result of expansion, most of the tasking nodes can
446 -- never appear. For each node to which either a complete or partial
447 -- restriction applies, a note entitled "Gigi restriction" appears which
448 -- documents the restriction.
450 -- Note that most of these restrictions apply only to trees generated when
451 -- code is being generated, since they involved expander actions that
454 ------------------------
455 -- Common Flag Fields --
456 ------------------------
458 -- The following flag fields appear in all nodes
461 -- This flag is used to indicate that a node (and all its children
462 -- have been analyzed. It is used to avoid reanalysis of a node that
463 -- has already been analyzed, both for efficiency and functional
464 -- correctness reasons.
466 -- Comes_From_Source (Flag2)
467 -- This flag is on for any nodes built by the scanner or parser from
468 -- the source program, and off for any nodes built by the analyzer or
469 -- expander. It indicates that a node comes from the original source.
470 -- This flag is defined in Atree.
472 -- Error_Posted (Flag3)
473 -- This flag is used to avoid multiple error messages being posted
474 -- on or referring to the same node. This flag is set if an error
475 -- message refers to a node or is posted on its source location,
476 -- and has the effect of inhibiting further messages involving
479 -- Has_Dynamic_Length_Check (Flag10-Sem)
480 -- This flag is present on all nodes. It is set to indicate that one
481 -- of the routines in unit Checks has generated a length check action
482 -- which has been inserted at the flagged node. This is used to avoid
483 -- the generation of duplicate checks.
485 -- Has_Dynamic_Range_Check (Flag12-Sem)
486 -- This flag is present on all nodes. It is set to indicate that one
487 -- of the routines in unit Checks has generated a range check action
488 -- which has been inserted at the flagged node. This is used to avoid
489 -- the generation of duplicate checks.
491 ------------------------------------
492 -- Description of Semantic Fields --
493 ------------------------------------
495 -- The meaning of the syntactic fields is generally clear from their
496 -- names without any further description, since the names are chosen
497 -- to correspond very closely to the syntax in the reference manual.
498 -- This section describes the usage of the semantic fields, which are
499 -- used to contain additional information determined during semantic
502 -- ABE_Is_Certain (Flag18-Sem)
503 -- This flag is set in an instantiation node or a call node is
504 -- determined to be sure to raise an ABE. This is used to trigger
505 -- special handling of such cases, particularly in the instantiation
506 -- case where we avoid instantiating the body if this flag is set.
507 -- This flag is also present in an N_Formal_Package_Declaration_Node
508 -- since formal package declarations are treated like instantiations,
509 -- but it is always set to False in this context.
511 -- Accept_Handler_Records (List5-Sem)
512 -- This field is present only in an N_Accept_Alternative node. It is
513 -- used to temporarily hold the exception handler records from an
514 -- accept statement in a selective accept. These exception handlers
515 -- will eventually be placed in the Handler_Records list of the
516 -- procedure built for this accept (see Expand_N_Selective_Accept
517 -- procedure in Exp_Ch9 for further details).
519 -- Access_Types_To_Process (Elist2-Sem)
520 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
521 -- Contains the list of access types which may require specific
522 -- treatment when the nature of the type completion is completely
523 -- known. An example of such treatement is the generation of the
524 -- associated_final_chain.
526 -- Actions (List1-Sem)
527 -- This field contains a sequence of actions that are associated
528 -- with the node holding the field. See the individual node types
529 -- for details of how this field is used, as well as the description
530 -- of the specific use for a particular node type.
532 -- Activation_Chain_Entity (Node3-Sem)
533 -- This is used in tree nodes representing task activators (blocks,
534 -- subprogram bodies, package declarations, and task bodies). It is
535 -- initially Empty, and then gets set to point to the entity for the
536 -- declared Activation_Chain variable when the first task is declared.
537 -- When tasks are declared in the corresponding declarative region
538 -- this entity is located by name (its name is always _Chain) and
539 -- the declared tasks are added to the chain.
541 -- Acts_As_Spec (Flag4-Sem)
542 -- A flag set in the N_Subprogram_Body node for a subprogram body
543 -- which is acting as its own spec. This flag also appears in the
544 -- compilation unit node at the library level for such a subprogram
545 -- (see further description in spec of Lib package).
547 -- Actual_Designated_Subtype (Node2-Sem)
548 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If
549 -- GIGI needs to known the dynamic constrained subtype of the designated
550 -- object, this attribute is set to that type. This is done for
551 -- N_Free_Statements for access-to-classwide types and access to
552 -- unconstrained packed array types, and for N_Explicit_Dereference
553 -- when the designated type is an unconstrained packed array and the
554 -- dereference is the prefix of a 'Size attribute reference.
556 -- Aggregate_Bounds (Node3-Sem)
557 -- Present in array N_Aggregate nodes. If the aggregate contains
558 -- component associations this field points to an N_Range node whose
559 -- bounds give the lowest and highest discrete choice values. If the
560 -- named aggregate contains a dynamic or null choice this field is
561 -- empty. If the aggregate contains positional elements this field
562 -- points to an N_Integer_Literal node giving the number of positional
563 -- elements. Note that if the aggregate contains positional elements
564 -- and an other choice the N_Integer_Literal only accounts for the
565 -- number of positional elements.
567 -- All_Others (Flag11-Sem)
568 -- Present in an N_Others_Choice node. This flag is set in the case
569 -- of an others exception where all exceptions are to be caught, even
570 -- those that are not normally handled (in particular the tasking abort
571 -- signal). This is used for translation of the at end handler into
572 -- a normal exception handler.
574 -- Assignment_OK (Flag15-Sem)
575 -- This flag is set in a subexpression node for an object, indicating
576 -- that the associated object can be modified, even if this would not
577 -- normally be permissible (either by direct assignment, or by being
578 -- passed as an out or in-out parameter). This is used by the expander
579 -- for a number of purposes, including initialzation of constants and
580 -- limited type objects (such as tasks), setting discriminant fields,
581 -- setting tag values, etc. N_Object_Declaration nodes also have this
582 -- flag defined. Here it is used to indicate that an initialization
583 -- expression is valid, even where it would normally not be allowed
584 -- (e.g. where the type involved is limited).
586 -- Associated_Node (Node4-Sem)
587 -- Present in nodes that can denote an entity: identifiers, character
588 -- literals, operator symbols, expanded names, operator nodes, and
589 -- attribute reference nodes (all these nodes have an Entity field).
590 -- This field is also present in N_Aggregate, N_Selected_Component,
591 -- and N_Extension_Aggregate nodes. This field is used in generic
592 -- processing to create links between the generic template and the
593 -- generic copy. See Sem_Ch12.Get_Associated_Node for full details.
594 -- Note that this field overlaps Entity, which is fine, since, as
595 -- explained in Sem_Ch12, the normal function of Entity is not
596 -- required at the point where the Associated_Node is set. Note
597 -- also, that in generic templates, this means that the Entity field
598 -- does not necessarily point to an Entity. Since the back end is
599 -- expected to ignore generic templates, this is harmless.
601 -- At_End_Proc (Node1)
602 -- This field is present in an N_Handled_Sequence_Of_Statements node.
603 -- It contains an identifier reference for the cleanup procedure to
604 -- be called. See description of this node for further details.
606 -- Backwards_OK (Flag6-Sem)
607 -- A flag present in the N_Assignment_Statement node. It is used only
608 -- if the type being assigned is an array type, and is set if analysis
609 -- determines that it is definitely safe to do the copy backwards, i.e.
610 -- starting at the highest addressed element. Note that if neither of
611 -- the flags Forwards_OK or Backwards_OK is set, it means that the
612 -- front end could not determine that either direction is definitely
613 -- safe, and a runtime check is required.
615 -- Body_To_Inline (Node3-Sem)
616 -- present in subprogram declarations. Denotes analyzed but unexpanded
617 -- body of subprogram, to be used when inlining calls. Present when the
618 -- subprogram has an Inline pragma and inlining is enabled. If the
619 -- declaration is completed by a renaming_as_body, and the renamed en-
620 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
621 -- which is used directly in later calls to the original subprogram.
623 -- Body_Required (Flag13-Sem)
624 -- A flag that appears in the N_Compilation_Unit node indicating that
625 -- the corresponding unit requires a body. For the package case, this
626 -- indicates that a completion is required. In Ada 95, if the flag
627 -- is not set for the package case, then a body may not be present.
628 -- In Ada 83, if the flag is not set for the package case, then a
629 -- body is optional. For a subprogram declaration, the flag is set
630 -- except in the case where a pragma Import or Interface applies,
631 -- in which case no body is permitted (in Ada 83 or Ada 95).
633 -- By_Ref (Flag5-Sem)
634 -- A flag present in the N_Return_Statement_Node. It is set when the
635 -- returned expression is already allocated on the secondary stack
636 -- and thus the result is passed by reference rather than copied
639 -- Check_Address_Alignment (Flag11-Sem)
640 -- A flag present in N_Attribute_Definition clause for a 'Address
641 -- attribute definition. This flag is set if a dynamic check should
642 -- be generated at the freeze point for the entity to which this
643 -- address clause applies. The reason that we need this flag is that
644 -- we want to check for range checks being suppressed at the point
645 -- where the attribute definition clause is given, rather than
646 -- testing this at the freeze point.
648 -- Compile_Time_Known_Aggregate (Flag18-Sem)
649 -- Present in N_Aggregate nodes. Set for aggregates which can be
650 -- fully evaluated at compile time without raising constraint error.
651 -- Such aggregates can be passed as is to Gigi without any expansion.
652 -- See Sem_Aggr for the specific conditions under which an aggregate
653 -- has this flag set. See also the flag Static_Processing_OK.
655 -- Condition_Actions (List3-Sem)
656 -- This field appears in else-if nodes and in the iteration scheme
657 -- node for while loops. This field is only used during semantic
658 -- processing to temporarily hold actions inserted into the tree.
659 -- In the tree passed to gigi, the condition actions field is always
660 -- set to No_List. For details on how this field is used, see the
661 -- routine Insert_Actions in package Exp_Util, and also the expansion
662 -- routines for the relevant nodes.
664 -- Controlling_Argument (Node1-Sem)
665 -- This field is set in procedure and function call nodes if the call
666 -- is a dispatching call (it is Empty for a non-dispatching call).
667 -- It indicates the source of the controlling tag for the call. For
668 -- Procedure calls, the Controlling_Argument is one of the actuals.
669 -- For a function that has a dispatching result, it is an entity in
670 -- the context of the call that can provide a tag, or else it is the
671 -- tag of the root type of the class. It can also specify a tag
672 -- directly rather than being a tagged object. The latter is needed
673 -- by the implementations of AI-239 and AI-260.
675 -- Conversion_OK (Flag14-Sem)
676 -- A flag set on type conversion nodes to indicate that the conversion
677 -- is to be considered as being valid, even though it is the case that
678 -- the conversion is not valid Ada. This is used for the Enum_Rep,
679 -- Fixed_Value and Integer_Value attributes, for internal conversions
680 -- done for fixed-point operations, and for certain conversions for
681 -- calls to initialization procedures. If Conversion_OK is set, then
682 -- Etype must be set (the analyzer assumes that Etype has been set).
683 -- For the case of fixed-point operands, it also indicates that the
684 -- conversion is to be a direct conversion of the underlying integer
685 -- result, with no regard to the small operand.
687 -- Corresponding_Body (Node5-Sem)
688 -- This field is set in subprogram declarations, package declarations,
689 -- entry declarations of protected types, and in generic units. It
690 -- points to the defining entity for the corresponding body (NOT the
691 -- node for the body itself).
693 -- Corresponding_Formal_Spec (Node3-Sem)
694 -- This field is set in subprogram renaming declarations, where it points
695 -- to the defining entity for a formal subprogram in the case where the
696 -- renaming corresponds to a generic formal subprogram association in an
697 -- instantiation. The field is Empty if the renaming does not correspond
698 -- to such a formal association.
700 -- Corresponding_Generic_Association (Node5-Sem)
701 -- This field is defined for object declarations and object renaming
702 -- declarations. It is set for the declarations within an instance that
703 -- map generic formals to their actuals. If set, the field points to
704 -- a generic_association which is the original parent of the expression
705 -- or name appearing in the declaration. This simplifies ASIS queries.
707 -- Corresponding_Integer_Value (Uint4-Sem)
708 -- This field is set in real literals of fixed-point types (it is not
709 -- used for floating-point types). It contains the integer value used
710 -- to represent the fixed-point value. It is also set on the universal
711 -- real literals used to represent bounds of fixed-point base types
712 -- and their first named subtypes.
714 -- Corresponding_Spec (Node5-Sem)
715 -- This field is set in subprogram, package, task, and protected body
716 -- nodes, where it points to the defining entity in the corresponding
717 -- spec. The attribute is also set in N_With_Clause nodes, where
718 -- it points to the defining entity for the with'ed spec, and in
719 -- a subprogram renaming declaration when it is a Renaming_As_Body.
720 -- The field is Empty if there is no corresponding spec, as in the
721 -- case of a subprogram body that serves as its own spec.
723 -- Corresponding_Stub (Node3-Sem)
724 -- This field is present in an N_Subunit node. It holds the node in
725 -- the parent unit that is the stub declaration for the subunit. it is
726 -- set when analysis of the stub forces loading of the proper body. If
727 -- expansion of the proper body creates new declarative nodes, they are
728 -- inserted at the point of the corresponding_stub.
730 -- Dcheck_Function (Node5-Sem)
731 -- This field is present in an N_Variant node, It references the entity
732 -- for the discriminant checking function for the variant.
734 -- Debug_Statement (Node3)
735 -- This field is present in an N_Pragma node. It is used only for
736 -- a Debug pragma or pragma Assert with a second parameter. The
737 -- parameter is of the form of an expression, as required by the
738 -- pragma syntax, but is actually a procedure call. To simplify
739 -- semantic processing, the parser creates a copy of the argument
740 -- rearranged into a procedure call statement and places it in the
741 -- Debug_Statement field. Note that this field is considered a
742 -- syntactic field, since it is created by the parser.
744 -- Default_Expression (Node5-Sem)
745 -- This field is Empty if there is no default expression. If there
746 -- is a simple default expression (one with no side effects), then
747 -- this field simply contains a copy of the Expression field (both
748 -- point to the tree for the default expression). Default_Expression
749 -- is used for conformance checking.
751 -- Delay_Finalize_Attach (Flag14-Sem)
752 -- This flag is present in an N_Object_Declaration node. If it is set,
753 -- then in the case of a controlled type being declared and initialized,
754 -- the normal code for attaching the result to the appropriate local
755 -- finalization list is suppressed. This is used for functions that
756 -- return controlled types without using the secondary stack, where
757 -- it is the caller who must do the attachment.
759 -- Discr_Check_Funcs_Built (Flag11-Sem)
760 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
761 -- discriminant checking functions are constructed. The purpose is to
762 -- avoid attempting to set these functions more than once.
764 -- Do_Accessibility_Check (Flag13-Sem)
765 -- This flag is set on N_Parameter_Specification nodes to indicate
766 -- that an accessibility check is required for the parameter. It is
767 -- not yet decided who takes care of this check (TBD ???).
769 -- Do_Discriminant_Check (Flag13-Sem)
770 -- This flag is set on N_Selected_Component nodes to indicate that a
771 -- discriminant check is required using the discriminant check routine
772 -- associated with the selector. The actual check is generated by the
773 -- expander when processing selected components.
775 -- Do_Division_Check (Flag13-Sem)
776 -- This flag is set on a division operator (/ mod rem) to indicate
777 -- that a zero divide check is required. The actual check is dealt
778 -- with by the backend (all the front end does is to set the flag).
780 -- Do_Length_Check (Flag4-Sem)
781 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
782 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
783 -- is required. It is not determined who deals with this flag (???).
785 -- Do_Overflow_Check (Flag17-Sem)
786 -- This flag is set on an operator where an overflow check is required
787 -- on the operation. The actual check is dealt with by the backend
788 -- (all the front end does is to set the flag). The other cases where
789 -- this flag is used is on a Type_Conversion node and for attribute
790 -- reference nodes. For a type conversion, it means that the conversion
791 -- is from one base type to another, and the value may not fit in the
792 -- target base type. See also the description of Do_Range_Check for
793 -- this case. The only attribute references which use this flag are
794 -- Pred and Succ, where it means that the result should be checked
795 -- for going outside the base range.
797 -- Do_Range_Check (Flag9-Sem)
798 -- This flag is set on an expression which appears in a context where
799 -- a range check is required. The target type is clear from the
800 -- context. The contexts in which this flag can appear are limited to
803 -- Right side of an assignment. In this case the target type is
804 -- taken from the left side of the assignment, which is referenced
805 -- by the Name of the N_Assignment_Statement node.
807 -- Subscript expressions in an indexed component. In this case the
808 -- target type is determined from the type of the array, which is
809 -- referenced by the Prefix of the N_Indexed_Component node.
811 -- Argument expression for a parameter, appearing either directly
812 -- in the Parameter_Associations list of a call or as the Expression
813 -- of an N_Parameter_Association node that appears in this list. In
814 -- either case, the check is against the type of the formal. Note
815 -- that the flag is relevant only in IN and IN OUT parameters, and
816 -- will be ignored for OUT parameters, where no check is required
817 -- in the call, and if a check is required on the return, it is
818 -- generated explicitly with a type conversion.
820 -- Initialization expression for the initial value in an object
821 -- declaration. In this case the Do_Range_Check flag is set on
822 -- the initialization expression, and the check is against the
823 -- range of the type of the object being declared.
825 -- The expression of a type conversion. In this case the range check
826 -- is against the target type of the conversion. See also the use of
827 -- Do_Overflow_Check on a type conversion. The distinction is that
828 -- the overflow check protects against a value that is outside the
829 -- range of the target base type, whereas a range check checks that
830 -- the resulting value (which is a value of the base type of the
831 -- target type), satisfies the range constraint of the target type.
833 -- Note: when a range check is required in contexts other than those
834 -- listed above (e.g. in a return statement), an additional type
835 -- conversion node is introduced to represent the required check.
837 -- Do_Storage_Check (Flag17-Sem)
838 -- This flag is set in an N_Allocator node to indicate that a storage
839 -- check is required for the allocation, or in an N_Subprogram_Body
840 -- node to indicate that a stack check is required in the subprogram
841 -- prolog. The N_Allocator case is handled by the routine that expands
842 -- the call to the runtime routine. The N_Subprogram_Body case is
843 -- handled by the backend, and all the semantics does is set the flag.
845 -- Do_Tag_Check (Flag13-Sem)
846 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
847 -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt
848 -- node to indicate that the tag check can be suppressed. It is not
849 -- yet decided how this flag is used (TBD ???).
851 -- Elaborate_Present (Flag4-Sem)
852 -- This flag is set in the N_With_Clause node to indicate that pragma
853 -- Elaborate pragma appears for the with'ed units.
855 -- Elaborate_All_Desirable (Flag9-Sem)
856 -- This flag is set in the N_With_Clause mode to indicate that the static
857 -- elaboration processing has determined that an Elaborate_All pragma is
858 -- desirable for correct elaboration for this unit.
860 -- Elaborate_All_Present (Flag14-Sem)
861 -- This flag is set in the N_With_Clause node to indicate that a
862 -- pragma Elaborate_All pragma appears for the with'ed units.
864 -- Elaborate_Desirable (Flag11-Sem)
865 -- This flag is set in the N_With_Clause mode to indicate that the static
866 -- elaboration processing has determined that an Elaborate pragma is
867 -- desirable for correct elaboration for this unit.
869 -- Elaboration_Boolean (Node2-Sem)
870 -- This field is present in function and procedure specification
871 -- nodes. If set, it points to the entity for a Boolean flag that
872 -- must be tested for certain calls to check for access before
873 -- elaboration. See body of Sem_Elab for further details. This
874 -- field is Empty if no elaboration boolean is required.
876 -- Else_Actions (List3-Sem)
877 -- This field is present in conditional expression nodes. During code
878 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
879 -- actions at an appropriate place in the tree to get elaborated at the
880 -- right time. For conditional expressions, we have to be sure that the
881 -- actions for the Else branch are only elaborated if the condition is
882 -- False. The Else_Actions field is used as a temporary parking place
883 -- for these actions. The final tree is always rewritten to eliminate
884 -- the need for this field, so in the tree passed to Gigi, this field
885 -- is always set to No_List.
887 -- Enclosing_Variant (Node2-Sem)
888 -- This field is present in the N_Variant node and identifies the
889 -- Node_Id corresponding to the immediately enclosing variant when
890 -- the variant is nested, and N_Empty otherwise. Set during semantic
891 -- processing of the variant part of a record type.
893 -- Entity (Node4-Sem)
894 -- Appears in all direct names (identifier, character literal,
895 -- operator symbol), as well as expanded names, and attributes that
896 -- denote entities, such as 'Class. Points to the entity for the
897 -- corresponding defining occurrence. Set after name resolution.
898 -- In the case of identifiers in a WITH list, the corresponding
899 -- defining occurrence is in a separately compiled file, and this
900 -- pointer must be set using the library Load procedure. Note that
901 -- during name resolution, the value in Entity may be temporarily
902 -- incorrect (e.g. during overload resolution, Entity is initially
903 -- set to the first possible correct interpretation, and then later
904 -- modified if necessary to contain the correct value after resolution).
905 -- Note that this field overlaps Associated_Node, which is used during
906 -- generic processing (see Sem_Ch12 for details). Note also that in
907 -- generic templates, this means that the Entity field does not always
908 -- point to an Entity. Since the back end is expected to ignore
909 -- generic templates, this is harmless.
911 -- Entity_Or_Associated_Node (Node4-Sem)
912 -- A synonym for both Entity and Associated_Node. Used by convention
913 -- in the code when referencing this field in cases where it is not
914 -- known whether the field contains an Entity or an Associated_Node.
917 -- Appears in all expression nodes, all direct names, and all
918 -- entities. Points to the entity for the related type. Set after
919 -- type resolution. Normally this is the actual subtype of the
920 -- expression. However, in certain contexts such as the right side
921 -- of an assignment, subscripts, arguments to calls, returned value
922 -- in a function, initial value etc. it is the desired target type.
923 -- In the event that this is different from the actual type, the
924 -- Do_Range_Check flag will be set if a range check is required.
925 -- Note: if the Is_Overloaded flag is set, then Etype points to
926 -- an essentially arbitrary choice from the possible set of types.
928 -- Exception_Junk (Flag7-Sem)
929 -- This flag is set in a various nodes appearing in a statement
930 -- sequence to indicate that the corresponding node is an artifact
931 -- of the generated code for exception handling, and should be
932 -- ignored when analyzing the control flow of the relevant sequence
933 -- of statements (e.g. to check that it does not end with a bad
934 -- return statement).
936 -- Expansion_Delayed (Flag11-Sem)
937 -- Set on aggregates and extension aggregates that need a top-down
938 -- rather than bottom up expansion. Typically aggregate expansion
939 -- happens bottom up. For nested aggregates the expansion is delayed
940 -- until the enclosing aggregate itself is expanded, e.g. in the context
941 -- of a declaration. To delay it we set this flag. This is done to
942 -- avoid creating a temporary for each level of a nested aggregates,
943 -- and also to prevent the premature generation of constraint checks.
944 -- This is also a requirement if we want to generate the proper
945 -- attachment to the internal finalization lists (for record with
946 -- controlled components). Top down expansion of aggregates is also
947 -- used for in-place array aggregate assignment or initialization.
948 -- When the full context is known, the target of the assignment or
949 -- initialization is used to generate the left-hand side of individual
950 -- assignment to each sub-component.
952 -- First_Inlined_Subprogram (Node3-Sem)
953 -- Present in the N_Compilation_Unit node for the main program. Points
954 -- to a chain of entities for subprograms that are to be inlined. The
955 -- Next_Inlined_Subprogram field of these entities is used as a link
956 -- pointer with Empty marking the end of the list. This field is Empty
957 -- if there are no inlined subprograms or inlining is not active.
959 -- First_Named_Actual (Node4-Sem)
960 -- Present in procedure call statement and function call nodes, and
961 -- also in Intrinsic nodes. Set during semantic analysis to point to
962 -- the first named parameter where parameters are ordered by declaration
963 -- order (as opposed to the actual order in the call which may be
964 -- different due to named associations). Note: this field points to the
965 -- explicit actual parameter itself, not the N_Parameter_Association
966 -- node (its parent).
968 -- First_Real_Statement (Node2-Sem)
969 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
970 -- Empty. Used only when declarations are moved into the statement
971 -- part of a construct as a result of wrapping an AT END handler that
972 -- is required to cover the declarations. In this case, this field is
973 -- used to remember the location in the statements list of the first
974 -- real statement, i.e. the statement that used to be first in the
975 -- statement list before the declarations were prepended.
977 -- First_Subtype_Link (Node5-Sem)
978 -- Present in N_Freeze_Entity node for an anonymous base type that
979 -- is implicitly created by the declaration of a first subtype. It
980 -- points to the entity for the first subtype.
982 -- Float_Truncate (Flag11-Sem)
983 -- A flag present in type conversion nodes. This is used for float
984 -- to integer conversions where truncation is required rather than
985 -- rounding. Note that Gigi does not handle type conversions from real
986 -- to integer with rounding (see Expand_N_Type_Conversion).
988 -- Forwards_OK (Flag5-Sem)
989 -- A flag present in the N_Assignment_Statement node. It is used only
990 -- if the type being assigned is an array type, and is set if analysis
991 -- determines that it is definitely safe to do the copy forwards, i.e.
992 -- starting at the lowest addressed element. Note that if neither of
993 -- the flags Forwards_OK or Backwards_OK is set, it means that the
994 -- front end could not determine that either direction is definitely
995 -- safe, and a runtime check is required.
997 -- From_At_Mod (Flag4-Sem)
998 -- This flag is set on the attribute definition clause node that is
999 -- generated by a transformation of an at mod phrase in a record
1000 -- representation clause. This is used to give slightly different
1001 -- (Ada 83 compatible) semantics to such a clause, namely it is
1002 -- used to specify a minimum acceptable alignment for the base type
1003 -- and all subtypes. In Ada 95 terms, the actual alignment of the
1004 -- base type and all subtypes must be a multiple of the given value,
1005 -- and the representation clause is considered to be type specific
1006 -- instead of subtype specific.
1008 -- From_Default (Flag6-Sem)
1009 -- This flag is set on the subprogram renaming declaration created in
1010 -- an instance for a formal subprogram, when the formal is declared
1011 -- with a box, and there is no explicit actual. If the flag is present,
1012 -- the declaration is treated as an implicit reference to the formal in
1015 -- Generic_Parent (Node5-Sem)
1016 -- Generic_parent is defined on declaration nodes that are instances.
1017 -- The value of Generic_Parent is the generic entity from which the
1018 -- instance is obtained. Generic_Parent is also defined for the renaming
1019 -- declarations and object declarations created for the actuals in an
1020 -- instantiation. The generic parent of such a declaration is the
1021 -- corresponding generic association in the Instantiation node.
1023 -- Generic_Parent_Type (Node4-Sem)
1024 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for
1025 -- the actuals of formal private and derived types. Within the instance,
1026 -- the operations on the actual are those inherited from the parent.
1027 -- For a formal private type, the parent type is the generic type
1028 -- itself. The Generic_Parent_Type is also used in an instance to
1029 -- determine whether a private operation overrides an inherited one.
1031 -- Handler_List_Entry (Node2-Sem)
1032 -- This field is present in N_Object_Declaration nodes. It is set only
1033 -- for the Handler_Record entry generated for an exception in zero cost
1034 -- exception handling mode. It references the corresponding item in the
1035 -- handler list, and is used to delete this entry if the corresponding
1036 -- handler is deleted during optimization. For further details on why
1037 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1039 -- Has_No_Elaboration_Code (Flag17-Sem)
1040 -- A flag that appears in the N_Compilation_Unit node to indicate
1041 -- whether or not elaboration code is present for this unit. It is
1042 -- initially set true for subprogram specs and bodies and for all
1043 -- generic units and false for non-generic package specs and bodies.
1044 -- Gigi may set the flag in the non-generic package case if it
1045 -- determines that no elaboration code is generated. Note that this
1046 -- flag is not related to the Is_Preelaborated status, there can be
1047 -- preelaborated packages that generate elaboration code, and non-
1048 -- preelaborated packages which do not generate elaboration code.
1050 -- Has_Priority_Pragma (Flag6-Sem)
1051 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1052 -- N_Protected_Definition nodes to flag the presence of either
1053 -- a Priority or Interrupt_Priority pragma in the declaration
1054 -- sequence (public or private in the task and protected cases)
1056 -- Has_Private_View (Flag11-Sem)
1057 -- A flag present in generic nodes that have an entity, to indicate
1058 -- that the node has a private type. Used to exchange private
1059 -- and full declarations if the visibility at instantiation is
1060 -- different from the visibility at generic definition.
1062 -- Has_Storage_Size_Pragma (Flag5-Sem)
1063 -- A flag present in an N_Task_Definition node to flag the presence
1064 -- of a Storage_Size pragma
1066 -- Has_Task_Info_Pragma (Flag7-Sem)
1067 -- A flag present in an N_Task_Definition node to flag the presence
1068 -- of a Task_Info pragma. Used to detect duplicate pragmas.
1070 -- Has_Task_Name_Pragma (Flag8-Sem)
1071 -- A flag present in N_Task_Definition nodes to flag the presence
1072 -- of a Task_Name pragma in the declaration sequence for the task.
1074 -- Has_Wide_Character (Flag11-Sem)
1075 -- Present in string literals, set if any wide character (i.e. a
1076 -- character code outside the Character range) appears in the string.
1078 -- Hidden_By_Use_Clause (Elist4-Sem)
1079 -- An entity list present in use clauses that appear within
1080 -- instantiations. For the resolution of local entities, entities
1081 -- introduced by these use clauses have priority over global ones,
1082 -- and outer entities must be explicitly hidden/restored on exit.
1084 -- Implicit_With (Flag16-Sem)
1085 -- This flag is set in the N_With_Clause node that is implicitly
1086 -- generated for runtime units that are loaded by the expander, and
1087 -- also for package System, if it is loaded implicitly by a use of
1088 -- the 'Address or 'Tag attribute
1090 -- Includes_Infinities (Flag11-Sem)
1091 -- This flag is present in N_Range nodes. It is set for the range
1092 -- of unconstrained float types defined in Standard, which include
1093 -- not only the given range of values, but also legtitimately can
1094 -- include infinite values. This flag is false for any float type
1095 -- for which an explicit range is given by the programmer, even if
1096 -- that range is identical to the range for float.
1098 -- Instance_Spec (Node5-Sem)
1099 -- This field is present in generic instantiation nodes, and also in
1100 -- formal package declaration nodes (formal package declarations are
1101 -- treated in a manner very similar to package instantiations). It
1102 -- points to the node for the spec of the instance, inserted as part
1103 -- of the semantic processing for instantiations in Sem_Ch12.
1105 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1106 -- A flag set in a Block_Statement node to indicate that it is the
1107 -- expansion of an asynchronous entry call. Such a block needs a
1108 -- cleanup handler to assure that the call is cancelled.
1110 -- Is_Component_Left_Opnd (Flag13-Sem)
1111 -- Is_Component_Right_Opnd (Flag14-Sem)
1112 -- Present in concatenation nodes, to indicate that the corresponding
1113 -- operand is of the component type of the result. Used in resolving
1114 -- concatenation nodes in instances.
1116 -- Is_Controlling_Actual (Flag16-Sem)
1117 -- This flag is set on in an expression that is a controlling argument
1118 -- in a dispatching call. It is off in all other cases. See Sem_Disp
1119 -- for details of its use.
1121 -- Is_In_Discriminant_Check (Flag11-Sem)
1122 -- This flag is present in a selected component, and is used to
1123 -- indicate that the reference occurs within a discriminant check.
1124 -- The significance is that optimizations based on assuming that
1125 -- the discriminant check has a correct value cannot be performed
1126 -- in this case (or the disriminant check may be optimized away!)
1128 -- Is_Machine_Number (Flag11-Sem)
1129 -- This flag is set in an N_Real_Literal node to indicate that the
1130 -- value is a machine number. This avoids some unnecessary cases
1131 -- of converting real literals to machine numbers.
1133 -- Is_Null_Loop (Flag16-Sem)
1134 -- This flag is set in an N_Loop_Statement node if the corresponding
1135 -- loop can be determined to be null at compile time. This is used to
1136 -- suppress any warnings that would otherwise be issued inside the
1137 -- loop since they are probably not useful.
1139 -- Is_Overloaded (Flag5-Sem)
1140 -- A flag present in all expression nodes. Used temporarily during
1141 -- overloading determination. The setting of this flag is not
1142 -- relevant once overloading analysis is complete.
1144 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1145 -- A flag present only in N_Op_Expon nodes. It is set when the
1146 -- exponentiation is of the forma 2 ** N, where the type of N is
1147 -- an unsigned integral subtype whose size does not exceed the size
1148 -- of Standard_Integer (i.e. a type that can be safely converted to
1149 -- Natural), and the exponentiation appears as the right operand of
1150 -- an integer multiplication or an integer division where the dividend
1151 -- is unsigned. It is also required that overflow checking is off for
1152 -- both the exponentiation and the multiply/divide node. If this set
1153 -- of conditions holds, and the flag is set, then the division or
1154 -- multiplication can be (and is) converted to a shift.
1156 -- Is_Overloaded (Flag5-Sem)
1157 -- A flag present in all expression nodes. Used temporarily during
1158 -- overloading determination. The setting of this flag is not
1159 -- relevant once overloading analysis is complete.
1161 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1162 -- A flag set in a Subprogram_Body block to indicate that it is the
1163 -- implemenation of a protected subprogram. Such a body needs a
1164 -- cleanup handler to make sure that the associated protected object
1165 -- is unlocked when the subprogram completes.
1167 -- Is_Static_Expression (Flag6-Sem)
1168 -- Indicates that an expression is a static expression (RM 4.9). See
1169 -- spec of package Sem_Eval for full details on the use of this flag.
1171 -- Is_Subprogram_Descriptor (Flag16-Sem)
1172 -- Present in N_Object_Declaration, and set only for the object
1173 -- declaration generated for a subprogram descriptor in fast exception
1174 -- mode. See Exp_Ch11 for details of use.
1176 -- Is_Task_Allocation_Block (Flag6-Sem)
1177 -- A flag set in a Block_Statement node to indicate that it is the
1178 -- expansion of a task allocator, or the allocator of an object
1179 -- containing tasks. Such a block requires a cleanup handler to call
1180 -- Expunge_Unactivted_Tasks to complete any tasks that have been
1181 -- allocated but not activated when the allocator completes abnormally.
1183 -- Is_Task_Master (Flag5-Sem)
1184 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node
1185 -- to indicate that the construct is a task master (i.e. has declared
1186 -- tasks or declares an access to a task type).
1188 -- Itype (Node1-Sem)
1189 -- Used in N_Itype_Reference node to reference an itype for which it
1190 -- is important to ensure that it is defined. See description of this
1191 -- node for further details.
1193 -- Kill_Range_Check (Flag11-Sem)
1194 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1195 -- result should not be subjected to range checks. This is used for
1196 -- the implementation of Normalize_Scalars.
1198 -- Label_Construct (Node2-Sem)
1199 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1200 -- N_Block_Statement or N_Loop_Statement node to which the label
1201 -- declaration applies. This is not currently used in the compiler
1202 -- itself, but it is useful in the implementation of ASIS queries.
1204 -- Library_Unit (Node4-Sem)
1205 -- In a stub node, the Library_Unit field points to the compilation unit
1206 -- node of the corresponding subunit.
1208 -- In a with clause node, the Library_Unit field points to the spec
1209 -- of the with'ed unit.
1211 -- In a compilation unit node, the use of this field depends on
1214 -- For a subprogram body, the Library_Unit field points to the
1215 -- compilation unit node of the corresponding spec, unless
1216 -- Acts_As_Spec is set, in which case it points to itself.
1218 -- For a package body, the Library_Unit field points to the
1219 -- compilation unit node of the corresponding spec.
1221 -- For a subprogram spec to which pragma Inline applies, the
1222 -- Library_Unit field points to the compilation unit node of
1223 -- the corresponding body, if inlining is active.
1225 -- For a generic declaration, the Library_Unit field points
1226 -- to the compilation unit node of the corresponding generic body.
1228 -- For a subunit, the Library_Unit field points to the compilation
1229 -- unit node of the parent body.
1231 -- Note that this field is not used to hold the parent pointer for a
1232 -- child unit (which might in any case need to use it for some other
1233 -- purpose as described above). Instead for a child unit, implicit
1234 -- with's are generated for all parents.
1236 -- Loop_Actions (List2-Sem)
1237 -- A list present in Component_Association nodes in array aggregates.
1238 -- Used to collect actions that must be executed within the loop because
1239 -- they may need to be evaluated anew each time through.
1241 -- Limited_View_Installed (Flag18-Sem)
1242 -- Present in With_Clauses and in package specifications. If set on a
1243 -- with_clause, it indicates that this clause has created the current
1244 -- limited view of the designated package. On a package specification,
1245 -- it indicates that the limited view has already been created because
1246 -- the package is mentioned in a limited_with_clause in the closure of
1247 -- the unit being compiled.
1249 -- Must_Be_Byte_Aligned (Flag14-Sem)
1250 -- This flag is present in N_Attribute_Reference nodes. It can be set
1251 -- only for the Address and Unrestricted_Access attributes. If set it
1252 -- means that the object for which the address/access is given must be
1253 -- on a byte (more accurately a storage unit) boundary. If necessary,
1254 -- a copy of the object is to be made before taking the address (this
1255 -- copy is in the current scope on the stack frame). This is used for
1256 -- certain cases of code generated by the expander that passes
1257 -- parameters by address.
1259 -- The reason the copy is not made by the front end is that the back
1260 -- end has more information about type layout and may be able to (but
1261 -- is not guaranteed to) prevent making unnecessary copies.
1263 -- Must_Not_Freeze (Flag8-Sem)
1264 -- A flag present in all expression nodes. Normally expressions cause
1265 -- freezing as described in the RM. If this flag is set, then this
1266 -- is inhibited. This is used by the analyzer and expander to label
1267 -- nodes that are created by semantic analysis or expansion and which
1268 -- must not cause freezing even though they normally would. This flag
1269 -- is also present in an N_Subtype_Indication node, since we also use
1270 -- these in calls to Freeze_Expression.
1272 -- Next_Entity (Node2-Sem)
1273 -- Present in defining identifiers, defining character literals and
1274 -- defining operator symbols (i.e. in all entities). The entities of
1275 -- a scope are chained, and this field is used as the forward pointer
1276 -- for this list. See Einfo for further details.
1278 -- Next_Named_Actual (Node4-Sem)
1279 -- Present in parameter association node. Set during semantic
1280 -- analysis to point to the next named parameter, where parameters
1281 -- are ordered by declaration order (as opposed to the actual order
1282 -- in the call, which may be different due to named associations).
1283 -- Not that this field points to the explicit actual parameter itself,
1284 -- not to the N_Parameter_Association node (its parent).
1286 -- Next_Rep_Item (Node4-Sem)
1287 -- Present in pragma nodes and attribute definition nodes. Used to
1288 -- link representation items that apply to an entity. See description
1289 -- of First_Rep_Item field in Einfo for full details.
1291 -- Next_Use_Clause (Node3-Sem)
1292 -- While use clauses are active during semantic processing, they
1293 -- are chained from the scope stack entry, using Next_Use_Clause
1294 -- as a link pointer, with Empty marking the end of the list. The
1295 -- head pointer is in the scope stack entry (First_Use_Clause). At
1296 -- the end of semantic processing (i.e. when Gigi sees the tree,
1297 -- the contents of this field is undefined and should not be read).
1299 -- No_Ctrl_Actions (Flag7-Sem)
1300 -- Present in N_Assignment_Statement to indicate that no finalize nor
1301 -- nor adjust should take place on this assignment eventhough the rhs
1302 -- is controlled. This is used in init procs and aggregate expansions
1303 -- where the generated assignments are more initialisations than real
1306 -- No_Elaboration_Check (Flag14-Sem)
1307 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1308 -- that no elaboration check is needed on the call, because it appears
1309 -- in the context of a local Suppress pragma. This is used on calls
1310 -- within task bodies, where the actual elaboration checks are applied
1311 -- after analysis, when the local scope stack is not present.
1313 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1314 -- Present in N_With_Clause nodes. Set if the with clause is on the
1315 -- package or subprogram spec where the main unit is the corresponding
1316 -- body, and no entities of the with'ed unit are referenced by the spec
1317 -- (an entity may still be referenced in the body, so this flag is used
1318 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1321 -- No_Initialization (Flag13-Sem)
1322 -- Present in N_Object_Declaration & N_Allocator to indicate
1323 -- that the object must not be initialized (by Initialize or a
1324 -- call to an init proc). This is needed for controlled aggregates.
1325 -- When the Object declaration has an expression, this flag means
1326 -- that this expression should not be taken into account (needed
1327 -- for in place initialization with aggregates)
1329 -- No_Truncation (Flag17-Sem)
1330 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1331 -- only if the RM_Size of the source is greater than the RM_Size of the
1332 -- target for scalar operands. Normally in such a case we truncate some
1333 -- higher order bits of the source, and then sign/zero extend the result
1334 -- to form the output value. But if this flag is set, then we do not do
1335 -- any truncation, so for example, if an 8 bit input is converted to a
1336 -- 5 bit result which is in fact stored in 8 bits, then the high order
1337 -- three bits of the target result will be copied from the source. This
1338 -- is used for properly setting out of range values for use by pragmas
1339 -- Initialize_Scalars and Normalize_Scalars.
1341 -- Original_Discriminant (Node2-Sem)
1342 -- Present in identifiers. Used in references to discriminants that
1343 -- appear in generic units. Because the names of the discriminants
1344 -- may be different in an instance, we use this field to recover the
1345 -- position of the discriminant in the original type, and replace it
1346 -- with the discriminant at the same position in the instantiated type.
1348 -- Original_Entity (Node2-Sem)
1349 -- Present in numeric literals. Used to denote the named number that
1350 -- has been constant-folded into the given literal. If literal is from
1351 -- source, or the result of some other constant-folding operation, then
1352 -- Original_Entity is empty. This field is needed to handle properly
1353 -- named numbers in generic units, where the Associated_Node field
1354 -- interferes with the Entity field, making it impossible to preserve
1355 -- the original entity at the point of instantiation (ASIS problem).
1357 -- Others_Discrete_Choices (List1-Sem)
1358 -- When a case statement or variant is analyzed, the semantic checks
1359 -- determine the actual list of choices that correspond to an others
1360 -- choice. This list is materialized for later use by the expander
1361 -- and the Others_Discrete_Choices field of an N_Others_Choice node
1362 -- points to this materialized list of choices, which is in standard
1363 -- format for a list of discrete choices, except that of course it
1364 -- cannot contain an N_Others_Choice entry.
1366 -- Parameter_List_Truncated (Flag17-Sem)
1367 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes.
1368 -- Set (for OpenVMS ports of GNAT only) if the parameter list is
1369 -- truncated as a result of a First_Optional_Parameter specification
1370 -- in an Import_Function, Import_Procedure, or Import_Valued_Procedure
1371 -- pragma. The truncation is done by the expander by removing trailing
1372 -- parameters from the argument list, in accordance with the set of
1373 -- rules allowing such parameter removal. In particular, parameters
1374 -- can be removed working from the end of the parameter list backwards
1375 -- up to and including the entry designated by First_Optional_Parameter
1376 -- in the Import pragma. Parameters can be removed if they are implicit
1377 -- and the default value is a known-at-compile-time value, including
1378 -- the use of the Null_Parameter attribute, or if explicit parameter
1379 -- values are present that match the corresponding defaults.
1381 -- Parent_Spec (Node4-Sem)
1382 -- For a library unit that is a child unit spec (package or subprogram
1383 -- declaration, generic declaration or instantiation, or library level
1384 -- rename, this field points to the compilation unit node for the parent
1385 -- package specification. This field is Empty for library bodies (the
1386 -- parent spec in this case can be found from the corresponding spec).
1388 -- Present_Expr (Uint3-Sem)
1389 -- Present in an N_Variant node. This has a meaningful value only after
1390 -- Gigi has back annotated the tree with representation information.
1391 -- At this point, it contains a reference to a gcc expression that
1392 -- depends on the values of one or more discriminants. Give a set of
1393 -- discriminant values, this expression evaluates to False (zero) if
1394 -- variant is not present, and True (non-zero) if it is present. See
1395 -- unit Repinfo for further details on gigi back annotation. This
1396 -- field is used during ASIS processing (data decomposition annex)
1397 -- to determine if a field is present or not.
1399 -- Print_In_Hex (Flag13-Sem)
1400 -- Set on an N_Integer_Literal node to indicate that the value should
1401 -- be printed in hexadecimal in the sprint listing. Has no effect on
1402 -- legality or semantics of program, only on the displayed output.
1403 -- This is used to clarify output from the packed array cases.
1405 -- Procedure_To_Call (Node4-Sem)
1406 -- Present in N_Allocator, N_Free_Statement, and N_Return_Statement
1407 -- nodes. References the entity for the declaration of the procedure
1408 -- to be called to accomplish the required operation (i.e. for the
1409 -- Allocate procedure in the case of N_Allocator and N_Return_Statement
1410 -- (for allocating the return value), and for the Deallocate procedure
1411 -- in the case of N_Free_Statement.
1413 -- Raises_Constraint_Error (Flag7-Sem)
1414 -- Set on an expression whose evaluation will definitely fail a
1415 -- constraint error check. In the case of static expressions, this
1416 -- flag must be set accurately (and if it is set, the expression is
1417 -- typically illegal unless it appears as a non-elaborated branch of
1418 -- a short-circuit form). For a non-static expression, this flag may
1419 -- be set whenever an expression (e.g. an aggregate) is known to raise
1420 -- constraint error. If set, the expression definitely will raise CE
1421 -- if elaborated at runtime. If not set, the expression may or may
1422 -- not raise CE. In other words, on static expressions, the flag is
1423 -- set accurately, on non-static expressions it is set conservatively.
1425 -- Redundant_Use (Flag13-Sem)
1426 -- A flag present in nodes that can appear as an operand in a use
1427 -- clause or use type clause (identifiers, expanded names, attribute
1428 -- references). Set to indicate that a use is redundant (and therefore
1429 -- need not be undone on scope exit).
1431 -- Return_Type (Node2-Sem)
1432 -- Present in N_Return_Statement node. For a procedure, this is set
1433 -- to Standard_Void_Type. For a function it references the entity
1434 -- for the returned type.
1436 -- Rounded_Result (Flag18-Sem)
1437 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1438 -- Used in the fixed-point cases to indicate that the result must be
1439 -- rounded as a result of the use of the 'Round attribute. Also used
1440 -- for integer N_Op_Divide nodes to indicate that the result should
1441 -- be rounded to the nearest integer (breaking ties away from zero),
1442 -- rather than truncated towards zero as usual. These rounded integer
1443 -- operations are the result of expansion of rounded fixed-point
1444 -- divide, conversion and multiplication operations.
1446 -- Scope (Node3-Sem)
1447 -- Present in defining identifiers, defining character literals and
1448 -- defining operator symbols (i.e. in all entities). The entities of
1449 -- a scope all use this field to reference the corresponding scope
1450 -- entity. See Einfo for further details.
1452 -- Shift_Count_OK (Flag4-Sem)
1453 -- A flag present in shift nodes to indicate that the shift count is
1454 -- known to be in range, i.e. is in the range from zero to word length
1455 -- minus one. If this flag is not set, then the shift count may be
1456 -- outside this range, i.e. larger than the word length, and the code
1457 -- must ensure that such shift counts give the appropriate result.
1459 -- Source_Type (Node1-Sem)
1460 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1461 -- source type entity for the unchecked conversion instantiation
1462 -- which gigi must do size validation for.
1464 -- Static_Processing_OK (Flag4-Sem)
1465 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1466 -- flag is set, the full value of the aggregate can be determined at
1467 -- compile time and the aggregate can be passed as is to the back-end.
1468 -- In this event it is irrelevant whether this flag is set or not.
1469 -- However, if the Compile_Time_Known_Aggregate flag is not set but
1470 -- Static_Processing_OK is set, the aggregate can (but need not) be
1471 -- converted into a compile time known aggregate by the expander.
1472 -- See Sem_Aggr for the specific conditions under which an aggregate
1473 -- has its Static_Processing_OK flag set.
1475 -- Storage_Pool (Node1-Sem)
1476 -- Present in N_Allocator, N_Free_Statement and N_Return_Statement
1477 -- nodes. References the entity for the storage pool to be used for
1478 -- the allocate or free call or for the allocation of the returned
1479 -- value from a function. Empty indicates that the global default
1480 -- default pool is to be used. Note that in the case of a return
1481 -- statement, this field is set only if the function returns a
1482 -- value of a type whose size is not known at compile time on the
1483 -- secondary stack. It is never set on targets for which the target
1484 -- parameter Targparm.Functions_Return_By_DSP_On_Target is True.
1486 -- Target_Type (Node2-Sem)
1487 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1488 -- target type entity for the unchecked conversion instantiation
1489 -- which gigi must do size validation for.
1491 -- Then_Actions (List3-Sem)
1492 -- This field is present in conditional expression nodes. During code
1493 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1494 -- actions at an appropriate place in the tree to get elaborated at the
1495 -- right time. For conditional expressions, we have to be sure that the
1496 -- actions for the Then branch are only elaborated if the condition is
1497 -- True. The Then_Actions field is used as a temporary parking place
1498 -- for these actions. The final tree is always rewritten to eliminate
1499 -- the need for this field, so in the tree passed to Gigi, this field
1500 -- is always set to No_List.
1502 -- Treat_Fixed_As_Integer (Flag14-Sem)
1503 -- This flag appears in operator nodes for divide, multiply, mod and
1504 -- rem on fixed-point operands. It indicates that the operands are
1505 -- to be treated as integer values, ignoring small values. This flag
1506 -- is only set as a result of expansion of fixed-point operations.
1507 -- Typically a fixed-point multplication in the source generates
1508 -- subsidiary multiplication and division operations that work with
1509 -- the underlying integer values and have this flag set. Note that
1510 -- this flag is not needed on other arithmetic operations (add, neg,
1511 -- subtract etc) since in these cases it is always the case that fixed
1512 -- is treated as integer. The Etype field MUST be set if this flag
1513 -- is set. The analyzer knows to leave such nodes alone, and whoever
1514 -- makes them must set the correct Etype value.
1516 -- TSS_Elist (Elist3-Sem)
1517 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1518 -- entries for each TSS (type support subprogram) associated with the
1519 -- frozen type. The elements of the list are the entities for the
1520 -- subprograms (see package Exp_TSS for further details). Set to
1521 -- No_Elist if there are no type support subprograms for the type
1522 -- or if the freeze node is not for a type.
1524 -- Unreferenced_In_Spec (Flag7-Sem)
1525 -- Present in N_With_Clause nodes. Set if the with clause is on the
1526 -- package or subprogram spec where the main unit is the corresponding
1527 -- body, and is not referenced by the spec (it may still be referenced
1528 -- by the body, so this flag is used to generate the proper message
1529 -- (see Sem_Util.Check_Unused_Withs for details)
1531 -- Was_Originally_Stub (Flag13-Sem)
1532 -- This flag is set in the node for a proper body that replaces a
1533 -- stub. During the analysis procedure, stubs in some situations
1534 -- get rewritten by the corresponding bodies, and we set this flag
1535 -- to remember that this happened. Note that it is not good enough
1536 -- to rely on the use of Original_Node here because of the case of
1537 -- nested instantiations where the substituted node can be copied.
1539 -- Zero_Cost_Handling (Flag5-Sem)
1540 -- This flag is set in all handled sequence of statement and exception
1541 -- handler nodes if eceptions are to be handled using the zero-cost
1542 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1543 -- a-except.ads/adb and s-except.ads for full details). What gigi
1544 -- needs to do for such a handler is simply to put the code in the
1545 -- handler somewhere. The front end has generated all necessary labels.
1547 --------------------------------------------------
1548 -- Note on Use of End_Label and End_Span Fields --
1549 --------------------------------------------------
1551 -- Several constructs have end lines:
1553 -- Loop Statement end loop [loop_IDENTIFIER];
1554 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1555 -- Task Definition end [task_IDENTIFIER]
1556 -- Protected Definition end [protected_IDENTIFIER]
1557 -- Protected Body end [protected_IDENTIFIER]
1559 -- Block Statement end [block_IDENTIFIER];
1560 -- Subprogram Body end [DESIGNATOR];
1561 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1562 -- Task Body end [task_IDENTIFIER];
1563 -- Accept Statement end [entry_IDENTIFIER]];
1564 -- Entry Body end [entry_IDENTIFIER];
1566 -- If Statement end if;
1567 -- Case Statement end case;
1569 -- Record Definition end record;
1570 -- Enumeration Definition );
1572 -- The End_Label and End_Span fields are used to mark the locations
1573 -- of these lines, and also keep track of the label in the case where
1574 -- a label is present.
1576 -- For the first group above, the End_Label field of the corresponding
1577 -- node is used to point to the label identifier. In the case where
1578 -- there is no label in the source, the parser supplies a dummy
1579 -- identifier (with Comes_From_Source set to False), and the Sloc
1580 -- of this dummy identifier marks the location of the token following
1583 -- For the second group, the use of End_Label is similar, but the
1584 -- End_Label is found in the N_Handled_Sequence_Of_Statements node.
1585 -- This is done simply because in some cases there is no room in
1588 -- For the third group, there is never any label, and instead of
1589 -- using End_Label, we use the End_Span field which gives the
1590 -- location of the token following END, relative to the starting
1591 -- Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node)
1592 -- to get the Sloc of the IF or CASE following the End_Label.
1594 -- The record definition case is handled specially, we treat it
1595 -- as though it required an optional label which is never present,
1596 -- and so the parser always builds a dummy identifier with Comes
1597 -- From Source set False. The reason we do this, rather than using
1598 -- End_Span in this case, is that we want to generate a cross-ref
1599 -- entry for the end of a record, since it represents a scope for
1600 -- name declaration purposes.
1602 -- The enumeration definition case is handled in an exactly similar
1603 -- manner, building a dummy identifier to get a cross-reference.
1605 -- Note: the reason we store the difference as a Uint, instead of
1606 -- storing the Source_Ptr value directly, is that Source_Ptr values
1607 -- cannot be distinguished from other types of values, and we count
1608 -- on all general use fields being self describing. To make things
1609 -- easier for clients, note that we provide function End_Location,
1610 -- and procedure Set_End_Location to allow access to the logical
1611 -- value (which is the Source_Ptr value for the end token).
1613 ---------------------
1614 -- Syntactic Nodes --
1615 ---------------------
1617 ---------------------
1618 -- 2.3 Identifier --
1619 ---------------------
1621 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1622 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1624 -- An IDENTIFIER shall not be a reserved word
1626 -- In the Ada grammar identifiers are the bottom level tokens which
1627 -- have very few semantics. Actual program identifiers are direct
1628 -- names. If we were being 100% honest with the grammar, then we would
1629 -- have a node called N_Direct_Name which would point to an identifier.
1630 -- However, that's too many extra nodes, so we just use the N_Identifier
1631 -- node directly as a direct name, and it contains the expression fields
1632 -- and Entity field that correspond to its use as a direct name. In
1633 -- those few cases where identifiers appear in contexts where they are
1634 -- not direct names (pragmas, pragma argument associations, attribute
1635 -- references and attribute definition clauses), the Chars field of the
1636 -- node contains the Name_Id for the identifier name.
1638 -- Note: in GNAT, a reserved word can be treated as an identifier
1639 -- in two cases. First, an incorrect use of a reserved word as an
1640 -- identifier is diagnosed and then treated as a normal identifier.
1641 -- Second, an attribute designator of the form of a reserved word
1642 -- (access, delta, digits, range) is treated as an identifier.
1644 -- Note: The set of letters that is permitted in an identifier depends
1645 -- on the character set in use. See package Csets for full details.
1648 -- Sloc points to identifier
1649 -- Chars (Name1) contains the Name_Id for the identifier
1650 -- Entity (Node4-Sem)
1651 -- Associated_Node (Node4-Sem)
1652 -- Original_Discriminant (Node2-Sem)
1653 -- Redundant_Use (Flag13-Sem)
1654 -- Has_Private_View (Flag11-Sem) (set in generic units)
1655 -- plus fields for expression
1657 --------------------------
1658 -- 2.4 Numeric Literal --
1659 --------------------------
1661 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1663 ----------------------------
1664 -- 2.4.1 Decimal Literal --
1665 ----------------------------
1667 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1669 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1671 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1673 -- Decimal literals appear in the tree as either integer literal nodes
1674 -- or real literal nodes, depending on whether a period is present.
1676 -- Note: literal nodes appear as a result of direct use of literals
1677 -- in the source program, and also as the result of evaluating
1678 -- expressions at compile time. In the latter case, it is possible
1679 -- to construct real literals that have no syntactic representation
1680 -- using the standard literal format. Such literals are listed by
1681 -- Sprint using the notation [numerator / denominator].
1683 -- Note: the value of an integer literal node created by the front end
1684 -- is never outside the range of values of the base type. However, it
1685 -- can be the case that the value is outside the range of the
1686 -- particular subtype. This happens in the case of integer overflows
1687 -- with checks suppressed.
1689 -- N_Integer_Literal
1690 -- Sloc points to literal
1691 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1692 -- has been constant-folded into its literal value.
1693 -- Intval (Uint3) contains integer value of literal
1694 -- plus fields for expression
1695 -- Print_In_Hex (Flag13-Sem)
1698 -- Sloc points to literal
1699 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1700 -- has been constant-folded into its literal value.
1701 -- Realval (Ureal3) contains real value of literal
1702 -- Corresponding_Integer_Value (Uint4-Sem)
1703 -- Is_Machine_Number (Flag11-Sem)
1704 -- plus fields for expression
1706 --------------------------
1707 -- 2.4.2 Based Literal --
1708 --------------------------
1710 -- BASED_LITERAL ::=
1711 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1715 -- BASED_NUMERAL ::=
1716 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1718 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1720 -- Based literals appear in the tree as either integer literal nodes
1721 -- or real literal nodes, depending on whether a period is present.
1723 ----------------------------
1724 -- 2.5 Character Literal --
1725 ----------------------------
1727 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1729 -- N_Character_Literal
1730 -- Sloc points to literal
1731 -- Chars (Name1) contains the Name_Id for the identifier
1732 -- Char_Literal_Value (Uint2) contains the literal value
1733 -- Entity (Node4-Sem)
1734 -- Associated_Node (Node4-Sem)
1735 -- Has_Private_View (Flag11-Sem) set in generic units.
1736 -- plus fields for expression
1738 -- Note: the Entity field will be missing (and set to Empty) for
1739 -- character literals whose type is Standard.Wide_Character or
1740 -- Standard.Character or a type derived from one of these two.
1741 -- In this case the character literal stands for its own coding.
1742 -- The reason we take this irregular short cut is to avoid the
1743 -- need to build lots of junk defining character literal nodes.
1745 -------------------------
1746 -- 2.6 String Literal --
1747 -------------------------
1749 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1751 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1752 -- single GRAPHIC_CHARACTER other than a quotation mark.
1755 -- Sloc points to literal
1756 -- Strval (Str3) contains Id of string value
1757 -- Has_Wide_Character (Flag11-Sem)
1758 -- plus fields for expression
1764 -- A COMMENT starts with two adjacent hyphens and extends up to the
1765 -- end of the line. A COMMENT may appear on any line of a program.
1767 -- Comments are skipped by the scanner and do not appear in the tree.
1768 -- It is possible to reconstruct the position of comments with respect
1769 -- to the elements of the tree by using the source position (Sloc)
1770 -- pointers that appear in every tree node.
1776 -- PRAGMA ::= pragma IDENTIFIER
1777 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1779 -- Note that a pragma may appear in the tree anywhere a declaration
1780 -- or a statement may appear, as well as in some other situations
1781 -- which are explicitly documented.
1784 -- Sloc points to PRAGMA
1785 -- Chars (Name1) identifier name from pragma identifier
1786 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1787 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1788 -- Next_Rep_Item (Node4-Sem)
1790 -- Note: we should have a section on what pragmas are passed on to
1791 -- the back end to be processed. This section should note that pragma
1792 -- Psect_Object is always converted to Common_Object, but there are
1793 -- undoubtedly many other similar notes required ???
1795 --------------------------------------
1796 -- 2.8 Pragma Argument Association --
1797 --------------------------------------
1799 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1800 -- [pragma_argument_IDENTIFIER =>] NAME
1801 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1803 -- N_Pragma_Argument_Association
1804 -- Sloc points to first token in association
1805 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1806 -- Expression (Node3)
1808 ------------------------
1809 -- 2.9 Reserved Word --
1810 ------------------------
1812 -- Reserved words are parsed by the scanner, and returned as the
1813 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1815 ----------------------------
1816 -- 3.1 Basic Declaration --
1817 ----------------------------
1819 -- BASIC_DECLARATION ::=
1820 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1821 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1822 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1823 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1824 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1825 -- | GENERIC_INSTANTIATION
1827 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1828 -- see further description in section on semantic nodes.
1830 -- Also, in the tree that is constructed, a pragma may appear
1831 -- anywhere that a declaration may appear.
1833 ------------------------------
1834 -- 3.1 Defining Identifier --
1835 ------------------------------
1837 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1839 -- A defining identifier is an entity, which has additional fields
1840 -- depending on the setting of the Ekind field. These additional
1841 -- fields are defined (and access subprograms declared) in package
1844 -- Note: N_Defining_Identifier is an extended node whose fields are
1845 -- deliberate layed out to match the layout of fields in an ordinary
1846 -- N_Identifier node allowing for easy alteration of an identifier
1847 -- node into a defining identifier node. For details, see procedure
1848 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1850 -- N_Defining_Identifier
1851 -- Sloc points to identifier
1852 -- Chars (Name1) contains the Name_Id for the identifier
1853 -- Next_Entity (Node2-Sem)
1854 -- Scope (Node3-Sem)
1855 -- Etype (Node5-Sem)
1857 -----------------------------
1858 -- 3.2.1 Type Declaration --
1859 -----------------------------
1861 -- TYPE_DECLARATION ::=
1862 -- FULL_TYPE_DECLARATION
1863 -- | INCOMPLETE_TYPE_DECLARATION
1864 -- | PRIVATE_TYPE_DECLARATION
1865 -- | PRIVATE_EXTENSION_DECLARATION
1867 ----------------------------------
1868 -- 3.2.1 Full Type Declaration --
1869 ----------------------------------
1871 -- FULL_TYPE_DECLARATION ::=
1872 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1873 -- is TYPE_DEFINITION;
1874 -- | TASK_TYPE_DECLARATION
1875 -- | PROTECTED_TYPE_DECLARATION
1877 -- The full type declaration node is used only for the first case. The
1878 -- second case (concurrent type declaration), is represented directly
1879 -- by a task type declaration or a protected type declaration.
1881 -- N_Full_Type_Declaration
1882 -- Sloc points to TYPE
1883 -- Defining_Identifier (Node1)
1884 -- Discriminant_Specifications (List4) (set to No_List if none)
1885 -- Type_Definition (Node3)
1886 -- Discr_Check_Funcs_Built (Flag11-Sem)
1888 ----------------------------
1889 -- 3.2.1 Type Definition --
1890 ----------------------------
1892 -- TYPE_DEFINITION ::=
1893 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
1894 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
1895 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
1896 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
1898 --------------------------------
1899 -- 3.2.2 Subtype Declaration --
1900 --------------------------------
1902 -- SUBTYPE_DECLARATION ::=
1903 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
1905 -- The subtype indication field is set to Empty for subtypes
1906 -- declared in package Standard (Positive, Natural).
1908 -- N_Subtype_Declaration
1909 -- Sloc points to SUBTYPE
1910 -- Defining_Identifier (Node1)
1911 -- Null_Exclusion_Present (Flag11)
1912 -- Subtype_Indication (Node5)
1913 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
1914 -- Exception_Junk (Flag7-Sem)
1916 -------------------------------
1917 -- 3.2.2 Subtype Indication --
1918 -------------------------------
1920 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
1922 -- Note: if no constraint is present, the subtype indication appears
1923 -- directly in the tree as a subtype mark. The N_Subtype_Indication
1924 -- node is used only if a constraint is present.
1926 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
1927 -- with the null-exclusion part (see AI-231), we had to introduce a new
1928 -- attribute in all the parents of subtype_indication nodes to indicate
1929 -- if the null-exclusion is present.
1931 -- Note: the reason that this node has expression fields is that a
1932 -- subtype indication can appear as an operand of a membership test.
1934 -- N_Subtype_Indication
1935 -- Sloc points to first token of subtype mark
1936 -- Subtype_Mark (Node4)
1937 -- Constraint (Node3)
1938 -- Etype (Node5-Sem)
1939 -- Must_Not_Freeze (Flag8-Sem)
1941 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
1942 -- reason for this redundancy is so that in a list of array index types,
1943 -- the Etype can be uniformly accessed to determine the subscript type.
1944 -- This means that no Itype is constructed for the actual subtype that
1945 -- is created by the subtype indication. If such an Itype is required,
1946 -- it is constructed in the context in which the indication appears.
1948 -------------------------
1949 -- 3.2.2 Subtype Mark --
1950 -------------------------
1952 -- SUBTYPE_MARK ::= subtype_NAME
1954 -----------------------
1955 -- 3.2.2 Constraint --
1956 -----------------------
1958 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
1960 ------------------------------
1961 -- 3.2.2 Scalar Constraint --
1962 ------------------------------
1964 -- SCALAR_CONSTRAINT ::=
1965 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
1967 ---------------------------------
1968 -- 3.2.2 Composite Constraint --
1969 ---------------------------------
1971 -- COMPOSITE_CONSTRAINT ::=
1972 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
1974 -------------------------------
1975 -- 3.3.1 Object Declaration --
1976 -------------------------------
1978 -- OBJECT_DECLARATION ::=
1979 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1980 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
1981 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1982 -- ACCESS_DEFINITION [:= EXPRESSION];
1983 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1984 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
1985 -- | SINGLE_TASK_DECLARATION
1986 -- | SINGLE_PROTECTED_DECLARATION
1988 -- Note: aliased is not permitted in Ada 83 mode
1990 -- The N_Object_Declaration node is only for the first two cases.
1991 -- Single task declaration is handled by P_Task (9.1)
1992 -- Single protected declaration is handled by P_protected (9.5)
1994 -- Although the syntax allows multiple identifiers in the list, the
1995 -- semantics is as though successive declarations were given with
1996 -- identical type definition and expression components. To simplify
1997 -- semantic processing, the parser represents a multiple declaration
1998 -- case as a sequence of single declarations, using the More_Ids and
1999 -- Prev_Ids flags to preserve the original source form as described
2000 -- in the section on "Handling of Defining Identifier Lists".
2002 -- Note: if a range check is required for the initialization
2003 -- expression then the Do_Range_Check flag is set in the Expression,
2004 -- with the check being done against the type given by the object
2005 -- definition, which is also the Etype of the defining identifier.
2007 -- Note: the contents of the Expression field must be ignored (i.e.
2008 -- treated as though it were Empty) if No_Initialization is set True.
2010 -- Note: the back end places some restrictions on the form of the
2011 -- Expression field. If the object being declared is Atomic, then
2012 -- the Expression may not have the form of an aggregate (since this
2013 -- might cause the back end to generate separate assignments). It
2014 -- also cannot be a reference to an object marked as a true constant
2015 -- (Is_True_Constant flag set), where the object is itself initalized
2016 -- with an aggregate. If necessary the front end must generate an
2017 -- extra temporary (with Is_True_Constant set False), and initialize
2018 -- this temporary as required (the temporary itself is not atomic).
2020 -- Note: there is not node kind for object definition. Instead, the
2021 -- corresponding field holds a subtype indication, an array type
2022 -- definition, or (Ada 2005, AI-406) an access definition.
2024 -- N_Object_Declaration
2025 -- Sloc points to first identifier
2026 -- Defining_Identifier (Node1)
2027 -- Aliased_Present (Flag4) set if ALIASED appears
2028 -- Constant_Present (Flag17) set if CONSTANT appears
2029 -- Null_Exclusion_Present (Flag11)
2030 -- Object_Definition (Node4) subtype indic./array type def./ access def.
2031 -- Expression (Node3) (set to Empty if not present)
2032 -- Handler_List_Entry (Node2-Sem)
2033 -- Corresponding_Generic_Association (Node5-Sem)
2034 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2035 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2036 -- No_Initialization (Flag13-Sem)
2037 -- Assignment_OK (Flag15-Sem)
2038 -- Exception_Junk (Flag7-Sem)
2039 -- Delay_Finalize_Attach (Flag14-Sem)
2040 -- Is_Subprogram_Descriptor (Flag16-Sem)
2042 -------------------------------------
2043 -- 3.3.1 Defining Identifier List --
2044 -------------------------------------
2046 -- DEFINING_IDENTIFIER_LIST ::=
2047 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2049 -------------------------------
2050 -- 3.3.2 Number Declaration --
2051 -------------------------------
2053 -- NUMBER_DECLARATION ::=
2054 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2056 -- Although the syntax allows multiple identifiers in the list, the
2057 -- semantics is as though successive declarations were given with
2058 -- identical expressions. To simplify semantic processing, the parser
2059 -- represents a multiple declaration case as a sequence of single
2060 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2061 -- the original source form as described in the section on "Handling
2062 -- of Defining Identifier Lists".
2064 -- N_Number_Declaration
2065 -- Sloc points to first identifier
2066 -- Defining_Identifier (Node1)
2067 -- Expression (Node3)
2068 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2069 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2071 ----------------------------------
2072 -- 3.4 Derived Type Definition --
2073 ----------------------------------
2075 -- DERIVED_TYPE_DEFINITION ::=
2076 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2077 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2079 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2082 -- Note: a record extension part is required if ABSTRACT is present
2084 -- N_Derived_Type_Definition
2085 -- Sloc points to NEW
2086 -- Abstract_Present (Flag4)
2087 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2088 -- Subtype_Indication (Node5)
2089 -- Record_Extension_Part (Node3) (set to Empty if not present)
2090 -- Limited_Present (Flag17)
2091 -- Task_Present (Flag5) set in task interfaces
2092 -- Protected_Present (Flag6) set in protected interfaces
2093 -- Synchronized_Present (Flag7) set in interfaces
2094 -- Interface_List (List2) (set to No_List if none)
2095 -- Interface_Present (Flag16) set in abstract interfaces
2097 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2098 -- Interface_List, and Interface_Present are used for abstract
2099 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2101 ---------------------------
2102 -- 3.5 Range Constraint --
2103 ---------------------------
2105 -- RANGE_CONSTRAINT ::= range RANGE
2107 -- N_Range_Constraint
2108 -- Sloc points to RANGE
2109 -- Range_Expression (Node4)
2116 -- RANGE_ATTRIBUTE_REFERENCE
2117 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2119 -- Note: the case of a range given as a range attribute reference
2120 -- appears directly in the tree as an attribute reference.
2122 -- Note: the field name for a reference to a range is Range_Expression
2123 -- rather than Range, because range is a reserved keyword in Ada!
2125 -- Note: the reason that this node has expression fields is that a
2126 -- range can appear as an operand of a membership test. The Etype
2127 -- field is the type of the range (we do NOT construct an implicit
2128 -- subtype to represent the range exactly).
2131 -- Sloc points to ..
2132 -- Low_Bound (Node1)
2133 -- High_Bound (Node2)
2134 -- Includes_Infinities (Flag11)
2135 -- plus fields for expression
2137 -- Note: if the range appears in a context, such as a subtype
2138 -- declaration, where range checks are required on one or both of
2139 -- the expression fields, then type conversion nodes are inserted
2140 -- to represent the required checks.
2142 ----------------------------------------
2143 -- 3.5.1 Enumeration Type Definition --
2144 ----------------------------------------
2146 -- ENUMERATION_TYPE_DEFINITION ::=
2147 -- (ENUMERATION_LITERAL_SPECIFICATION
2148 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2150 -- Note: the Literals field in the node described below is null for
2151 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2152 -- which special processing handles these types as special cases.
2154 -- N_Enumeration_Type_Definition
2155 -- Sloc points to left parenthesis
2156 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2157 -- End_Label (Node4) (set to Empty if internally generated record)
2159 ----------------------------------------------
2160 -- 3.5.1 Enumeration Literal Specification --
2161 ----------------------------------------------
2163 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2164 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2166 ---------------------------------------
2167 -- 3.5.1 Defining Character Literal --
2168 ---------------------------------------
2170 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2172 -- A defining character literal is an entity, which has additional
2173 -- fields depending on the setting of the Ekind field. These
2174 -- additional fields are defined (and access subprograms declared)
2175 -- in package Einfo.
2177 -- Note: N_Defining_Character_Literal is an extended node whose fields
2178 -- are deliberate layed out to match the layout of fields in an ordinary
2179 -- N_Character_Literal node allowing for easy alteration of a character
2180 -- literal node into a defining character literal node. For details, see
2181 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2183 -- N_Defining_Character_Literal
2184 -- Sloc points to literal
2185 -- Chars (Name1) contains the Name_Id for the identifier
2186 -- Next_Entity (Node2-Sem)
2187 -- Scope (Node3-Sem)
2188 -- Etype (Node5-Sem)
2190 ------------------------------------
2191 -- 3.5.4 Integer Type Definition --
2192 ------------------------------------
2194 -- Note: there is an error in this rule in the latest version of the
2195 -- grammar, so we have retained the old rule pending clarification.
2197 -- INTEGER_TYPE_DEFINITION ::=
2198 -- SIGNED_INTEGER_TYPE_DEFINITION
2199 -- | MODULAR_TYPE_DEFINITION
2201 -------------------------------------------
2202 -- 3.5.4 Signed Integer Type Definition --
2203 -------------------------------------------
2205 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2206 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2208 -- Note: the Low_Bound and High_Bound fields are set to Empty
2209 -- for integer types defined in package Standard.
2211 -- N_Signed_Integer_Type_Definition
2212 -- Sloc points to RANGE
2213 -- Low_Bound (Node1)
2214 -- High_Bound (Node2)
2216 ------------------------------------
2217 -- 3.5.4 Modular Type Definition --
2218 ------------------------------------
2220 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2222 -- N_Modular_Type_Definition
2223 -- Sloc points to MOD
2224 -- Expression (Node3)
2226 ---------------------------------
2227 -- 3.5.6 Real Type Definition --
2228 ---------------------------------
2230 -- REAL_TYPE_DEFINITION ::=
2231 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2233 --------------------------------------
2234 -- 3.5.7 Floating Point Definition --
2235 --------------------------------------
2237 -- FLOATING_POINT_DEFINITION ::=
2238 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2240 -- Note: The Digits_Expression and Real_Range_Specifications fields
2241 -- are set to Empty for floating-point types declared in Standard.
2243 -- N_Floating_Point_Definition
2244 -- Sloc points to DIGITS
2245 -- Digits_Expression (Node2)
2246 -- Real_Range_Specification (Node4) (set to Empty if not present)
2248 -------------------------------------
2249 -- 3.5.7 Real Range Specification --
2250 -------------------------------------
2252 -- REAL_RANGE_SPECIFICATION ::=
2253 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2255 -- N_Real_Range_Specification
2256 -- Sloc points to RANGE
2257 -- Low_Bound (Node1)
2258 -- High_Bound (Node2)
2260 -----------------------------------
2261 -- 3.5.9 Fixed Point Definition --
2262 -----------------------------------
2264 -- FIXED_POINT_DEFINITION ::=
2265 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2267 --------------------------------------------
2268 -- 3.5.9 Ordinary Fixed Point Definition --
2269 --------------------------------------------
2271 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2272 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2274 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2276 -- N_Ordinary_Fixed_Point_Definition
2277 -- Sloc points to DELTA
2278 -- Delta_Expression (Node3)
2279 -- Real_Range_Specification (Node4)
2281 -------------------------------------------
2282 -- 3.5.9 Decimal Fixed Point Definition --
2283 -------------------------------------------
2285 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2286 -- delta static_EXPRESSION
2287 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2289 -- Note: decimal types are not permitted in Ada 83 mode
2291 -- N_Decimal_Fixed_Point_Definition
2292 -- Sloc points to DELTA
2293 -- Delta_Expression (Node3)
2294 -- Digits_Expression (Node2)
2295 -- Real_Range_Specification (Node4) (set to Empty if not present)
2297 ------------------------------
2298 -- 3.5.9 Digits Constraint --
2299 ------------------------------
2301 -- DIGITS_CONSTRAINT ::=
2302 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2304 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2305 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2307 -- N_Digits_Constraint
2308 -- Sloc points to DIGITS
2309 -- Digits_Expression (Node2)
2310 -- Range_Constraint (Node4) (set to Empty if not present)
2312 --------------------------------
2313 -- 3.6 Array Type Definition --
2314 --------------------------------
2316 -- ARRAY_TYPE_DEFINITION ::=
2317 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2319 -----------------------------------------
2320 -- 3.6 Unconstrained Array Definition --
2321 -----------------------------------------
2323 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2324 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2325 -- COMPONENT_DEFINITION
2327 -- Note: dimensionality of array is indicated by number of entries in
2328 -- the Subtype_Marks list, which has one entry for each dimension.
2330 -- N_Unconstrained_Array_Definition
2331 -- Sloc points to ARRAY
2332 -- Subtype_Marks (List2)
2333 -- Component_Definition (Node4)
2335 -----------------------------------
2336 -- 3.6 Index Subtype Definition --
2337 -----------------------------------
2339 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2341 -- There is no explicit node in the tree for an index subtype
2342 -- definition since the N_Unconstrained_Array_Definition node
2343 -- incorporates the type marks which appear in this context.
2345 ---------------------------------------
2346 -- 3.6 Constrained Array Definition --
2347 ---------------------------------------
2349 -- CONSTRAINED_ARRAY_DEFINITION ::=
2350 -- array (DISCRETE_SUBTYPE_DEFINITION
2351 -- {, DISCRETE_SUBTYPE_DEFINITION})
2352 -- of COMPONENT_DEFINITION
2354 -- Note: dimensionality of array is indicated by number of entries
2355 -- in the Discrete_Subtype_Definitions list, which has one entry
2356 -- for each dimension.
2358 -- N_Constrained_Array_Definition
2359 -- Sloc points to ARRAY
2360 -- Discrete_Subtype_Definitions (List2)
2361 -- Component_Definition (Node4)
2363 --------------------------------------
2364 -- 3.6 Discrete Subtype Definition --
2365 --------------------------------------
2367 -- DISCRETE_SUBTYPE_DEFINITION ::=
2368 -- discrete_SUBTYPE_INDICATION | RANGE
2370 -------------------------------
2371 -- 3.6 Component Definition --
2372 -------------------------------
2374 -- COMPONENT_DEFINITION ::=
2375 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2377 -- Note: although the syntax does not permit a component definition to
2378 -- be an anonymous array (and the parser will diagnose such an attempt
2379 -- with an appropriate message), it is possible for anonymous arrays
2380 -- to appear as component definitions. The semantics and back end handle
2381 -- this case properly, and the expander in fact generates such cases.
2382 -- Access_Definition is an optional field that gives support to
2383 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2384 -- Subtype_Indication field or else the Access_Definition field.
2386 -- N_Component_Definition
2387 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2388 -- Aliased_Present (Flag4)
2389 -- Null_Exclusion_Present (Flag11)
2390 -- Subtype_Indication (Node5) (set to Empty if not present)
2391 -- Access_Definition (Node3) (set to Empty if not present)
2393 -----------------------------
2394 -- 3.6.1 Index Constraint --
2395 -----------------------------
2397 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2399 -- It is not in general possible to distinguish between discriminant
2400 -- constraints and index constraints at parse time, since a simple
2401 -- name could be either the subtype mark of a discrete range, or an
2402 -- expression in a discriminant association with no name. Either
2403 -- entry appears simply as the name, and the semantic parse must
2404 -- distinguish between the two cases. Thus we use a common tree
2405 -- node format for both of these constraint types.
2407 -- See Discriminant_Constraint for format of node
2409 ---------------------------
2410 -- 3.6.1 Discrete Range --
2411 ---------------------------
2413 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2415 ----------------------------
2416 -- 3.7 Discriminant Part --
2417 ----------------------------
2419 -- DISCRIMINANT_PART ::=
2420 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2422 ------------------------------------
2423 -- 3.7 Unknown Discriminant Part --
2424 ------------------------------------
2426 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2428 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2430 -- There is no explicit node in the tree for an unknown discriminant
2431 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2434 ----------------------------------
2435 -- 3.7 Known Discriminant Part --
2436 ----------------------------------
2438 -- KNOWN_DISCRIMINANT_PART ::=
2439 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2441 -------------------------------------
2442 -- 3.7 Discriminant Specification --
2443 -------------------------------------
2445 -- DISCRIMINANT_SPECIFICATION ::=
2446 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2447 -- [:= DEFAULT_EXPRESSION]
2448 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2449 -- [:= DEFAULT_EXPRESSION]
2451 -- Although the syntax allows multiple identifiers in the list, the
2452 -- semantics is as though successive specifications were given with
2453 -- identical type definition and expression components. To simplify
2454 -- semantic processing, the parser represents a multiple declaration
2455 -- case as a sequence of single specifications, using the More_Ids and
2456 -- Prev_Ids flags to preserve the original source form as described
2457 -- in the section on "Handling of Defining Identifier Lists".
2459 -- N_Discriminant_Specification
2460 -- Sloc points to first identifier
2461 -- Defining_Identifier (Node1)
2462 -- Null_Exclusion_Present (Flag11)
2463 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2464 -- Expression (Node3) (set to Empty if no default expression)
2465 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2466 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2468 -----------------------------
2469 -- 3.7 Default Expression --
2470 -----------------------------
2472 -- DEFAULT_EXPRESSION ::= EXPRESSION
2474 ------------------------------------
2475 -- 3.7.1 Discriminant Constraint --
2476 ------------------------------------
2478 -- DISCRIMINANT_CONSTRAINT ::=
2479 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2481 -- It is not in general possible to distinguish between discriminant
2482 -- constraints and index constraints at parse time, since a simple
2483 -- name could be either the subtype mark of a discrete range, or an
2484 -- expression in a discriminant association with no name. Either
2485 -- entry appears simply as the name, and the semantic parse must
2486 -- distinguish between the two cases. Thus we use a common tree
2487 -- node format for both of these constraint types.
2489 -- N_Index_Or_Discriminant_Constraint
2490 -- Sloc points to left paren
2491 -- Constraints (List1) points to list of discrete ranges or
2492 -- discriminant associations
2494 -------------------------------------
2495 -- 3.7.1 Discriminant Association --
2496 -------------------------------------
2498 -- DISCRIMINANT_ASSOCIATION ::=
2499 -- [discriminant_SELECTOR_NAME
2500 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2502 -- Note: a discriminant association that has no selector name list
2503 -- appears directly as an expression in the tree.
2505 -- N_Discriminant_Association
2506 -- Sloc points to first token of discriminant association
2507 -- Selector_Names (List1) (always non-empty, since if no selector
2508 -- names are present, this node is not used, see comment above)
2509 -- Expression (Node3)
2511 ---------------------------------
2512 -- 3.8 Record Type Definition --
2513 ---------------------------------
2515 -- RECORD_TYPE_DEFINITION ::=
2516 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2518 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2520 -- There is no explicit node in the tree for a record type definition.
2521 -- Instead the flags for Tagged_Present and Limited_Present appear in
2522 -- the N_Record_Definition node for a record definition appearing in
2523 -- the context of a record type definition.
2525 ----------------------------
2526 -- 3.8 Record Definition --
2527 ----------------------------
2529 -- RECORD_DEFINITION ::=
2535 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2536 -- flags appear only for a record definition appearing in a record
2539 -- Note: the NULL RECORD case is not permitted in Ada 83
2541 -- N_Record_Definition
2542 -- Sloc points to RECORD or NULL
2543 -- End_Label (Node4) (set to Empty if internally generated record)
2544 -- Abstract_Present (Flag4)
2545 -- Tagged_Present (Flag15)
2546 -- Limited_Present (Flag17)
2547 -- Component_List (Node1) empty in null record case
2548 -- Null_Present (Flag13) set in null record case
2549 -- Task_Present (Flag5) set in task interfaces
2550 -- Protected_Present (Flag6) set in protected interfaces
2551 -- Synchronized_Present (Flag7) set in interfaces
2552 -- Interface_Present (Flag16) set in abstract interfaces
2553 -- Interface_List (List2) (set to No_List if none)
2555 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2556 -- Interface_List and Interface_Present are used for abstract
2557 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2559 -------------------------
2560 -- 3.8 Component List --
2561 -------------------------
2563 -- COMPONENT_LIST ::=
2564 -- COMPONENT_ITEM {COMPONENT_ITEM}
2565 -- | {COMPONENT_ITEM} VARIANT_PART
2569 -- Sloc points to first token of component list
2570 -- Component_Items (List3)
2571 -- Variant_Part (Node4) (set to Empty if no variant part)
2572 -- Null_Present (Flag13)
2574 -------------------------
2575 -- 3.8 Component Item --
2576 -------------------------
2578 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2580 -- Note: A component item can also be a pragma, and in the tree
2581 -- that is obtained after semantic processing, a component item
2582 -- can be an N_Null node resulting from a non-recognized pragma.
2584 --------------------------------
2585 -- 3.8 Component Declaration --
2586 --------------------------------
2588 -- COMPONENT_DECLARATION ::=
2589 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2590 -- [:= DEFAULT_EXPRESSION]
2592 -- Note: although the syntax does not permit a component definition to
2593 -- be an anonymous array (and the parser will diagnose such an attempt
2594 -- with an appropriate message), it is possible for anonymous arrays
2595 -- to appear as component definitions. The semantics and back end handle
2596 -- this case properly, and the expander in fact generates such cases.
2598 -- Although the syntax allows multiple identifiers in the list, the
2599 -- semantics is as though successive declarations were given with the
2600 -- same component definition and expression components. To simplify
2601 -- semantic processing, the parser represents a multiple declaration
2602 -- case as a sequence of single declarations, using the More_Ids and
2603 -- Prev_Ids flags to preserve the original source form as described
2604 -- in the section on "Handling of Defining Identifier Lists".
2606 -- N_Component_Declaration
2607 -- Sloc points to first identifier
2608 -- Defining_Identifier (Node1)
2609 -- Component_Definition (Node4)
2610 -- Expression (Node3) (set to Empty if no default expression)
2611 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2612 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2614 -------------------------
2615 -- 3.8.1 Variant Part --
2616 -------------------------
2619 -- case discriminant_DIRECT_NAME is
2624 -- Note: the variants list can contain pragmas as well as variants.
2625 -- In a properly formed program there is at least one variant.
2628 -- Sloc points to CASE
2632 --------------------
2634 --------------------
2637 -- when DISCRETE_CHOICE_LIST =>
2641 -- Sloc points to WHEN
2642 -- Discrete_Choices (List4)
2643 -- Component_List (Node1)
2644 -- Enclosing_Variant (Node2-Sem)
2645 -- Present_Expr (Uint3-Sem)
2646 -- Dcheck_Function (Node5-Sem)
2648 ---------------------------------
2649 -- 3.8.1 Discrete Choice List --
2650 ---------------------------------
2652 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2654 ----------------------------
2655 -- 3.8.1 Discrete Choice --
2656 ----------------------------
2658 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2660 -- Note: in Ada 83 mode, the expression must be a simple expression
2662 -- The only choice that appears explicitly is the OTHERS choice, as
2663 -- defined here. Other cases of discrete choice (expression and
2664 -- discrete range) appear directly. This production is also used
2665 -- for the OTHERS possibility of an exception choice.
2667 -- Note: in accordance with the syntax, the parser does not check that
2668 -- OTHERS appears at the end on its own in a choice list context. This
2669 -- is a semantic check.
2672 -- Sloc points to OTHERS
2673 -- Others_Discrete_Choices (List1-Sem)
2674 -- All_Others (Flag11-Sem)
2676 ----------------------------------
2677 -- 3.9.1 Record Extension Part --
2678 ----------------------------------
2680 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2682 -- Note: record extension parts are not permitted in Ada 83 mode
2684 --------------------------------------
2685 -- 3.9.4 Interface Type Definition --
2686 --------------------------------------
2688 -- INTERFACE_TYPE_DEFINITION ::=
2689 -- [limited | task | protected | synchronized]
2690 -- interface [interface_list]
2692 -- Note: Interfaces are implemented with N_Record_Definition and
2693 -- N_Derived_Type_Definition nodes because most of the support
2694 -- for the analysis of abstract types has been reused to
2695 -- analyze abstract interfaces.
2697 ----------------------------------
2698 -- 3.10 Access Type Definition --
2699 ----------------------------------
2701 -- ACCESS_TYPE_DEFINITION ::=
2702 -- ACCESS_TO_OBJECT_DEFINITION
2703 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2705 --------------------------
2706 -- 3.10 Null Exclusion --
2707 --------------------------
2709 -- NULL_EXCLUSION ::= not null
2711 ---------------------------------------
2712 -- 3.10 Access To Object Definition --
2713 ---------------------------------------
2715 -- ACCESS_TO_OBJECT_DEFINITION ::=
2716 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2717 -- SUBTYPE_INDICATION
2719 -- N_Access_To_Object_Definition
2720 -- Sloc points to ACCESS
2721 -- All_Present (Flag15)
2722 -- Null_Exclusion_Present (Flag11)
2723 -- Subtype_Indication (Node5)
2724 -- Constant_Present (Flag17)
2726 -----------------------------------
2727 -- 3.10 General Access Modifier --
2728 -----------------------------------
2730 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2732 -- Note: general access modifiers are not permitted in Ada 83 mode
2734 -- There is no explicit node in the tree for general access modifier.
2735 -- Instead the All_Present or Constant_Present flags are set in the
2738 -------------------------------------------
2739 -- 3.10 Access To Subprogram Definition --
2740 -------------------------------------------
2742 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2743 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2744 -- | [NULL_EXCLUSION] access [protected] function
2745 -- PARAMETER_AND_RESULT_PROFILE
2747 -- Note: access to subprograms are not permitted in Ada 83 mode
2749 -- N_Access_Function_Definition
2750 -- Sloc points to ACCESS
2751 -- Null_Exclusion_Present (Flag11)
2752 -- Protected_Present (Flag6)
2753 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2754 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2756 -- N_Access_Procedure_Definition
2757 -- Sloc points to ACCESS
2758 -- Null_Exclusion_Present (Flag11)
2759 -- Protected_Present (Flag6)
2760 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2762 -----------------------------
2763 -- 3.10 Access Definition --
2764 -----------------------------
2766 -- ACCESS_DEFINITION ::=
2767 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2768 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2770 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2772 -- N_Access_Definition
2773 -- Sloc points to ACCESS
2774 -- Null_Exclusion_Present (Flag11)
2775 -- All_Present (Flag15)
2776 -- Constant_Present (Flag17)
2777 -- Subtype_Mark (Node4)
2778 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2780 -----------------------------------------
2781 -- 3.10.1 Incomplete Type Declaration --
2782 -----------------------------------------
2784 -- INCOMPLETE_TYPE_DECLARATION ::=
2785 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2787 -- N_Incomplete_Type_Declaration
2788 -- Sloc points to TYPE
2789 -- Defining_Identifier (Node1)
2790 -- Discriminant_Specifications (List4) (set to No_List if no
2791 -- discriminant part, or if the discriminant part is an
2792 -- unknown discriminant part)
2793 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2794 -- Tagged_Present (Flag15)
2796 ----------------------------
2797 -- 3.11 Declarative Part --
2798 ----------------------------
2800 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2802 -- Note: although the parser enforces the syntactic requirement that
2803 -- a declarative part can contain only declarations, the semantic
2804 -- processing may add statements to the list of actions in a
2805 -- declarative part, so the code generator should be prepared
2806 -- to accept a statement in this position.
2808 ----------------------------
2809 -- 3.11 Declarative Item --
2810 ----------------------------
2812 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2814 ----------------------------------
2815 -- 3.11 Basic Declarative Item --
2816 ----------------------------------
2818 -- BASIC_DECLARATIVE_ITEM ::=
2819 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2825 -- BODY ::= PROPER_BODY | BODY_STUB
2827 -----------------------
2828 -- 3.11 Proper Body --
2829 -----------------------
2832 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2839 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2840 -- | INDEXED_COMPONENT | SLICE
2841 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2842 -- | TYPE_CONVERSION | FUNCTION_CALL
2843 -- | CHARACTER_LITERAL
2845 ----------------------
2846 -- 4.1 Direct Name --
2847 ----------------------
2849 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
2855 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
2857 -------------------------------
2858 -- 4.1 Explicit Dereference --
2859 -------------------------------
2861 -- EXPLICIT_DEREFERENCE ::= NAME . all
2863 -- N_Explicit_Dereference
2864 -- Sloc points to ALL
2866 -- Actual_Designated_Subtype (Node2-Sem)
2867 -- plus fields for expression
2869 -------------------------------
2870 -- 4.1 Implicit Dereference --
2871 -------------------------------
2873 -- IMPLICIT_DEREFERENCE ::= NAME
2875 ------------------------------
2876 -- 4.1.1 Indexed Component --
2877 ------------------------------
2879 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
2881 -- Note: the parser may generate this node in some situations where it
2882 -- should be a function call. The semantic pass must correct this
2883 -- misidentification (which is inevitable at the parser level).
2885 -- N_Indexed_Component
2886 -- Sloc contains a copy of the Sloc value of the Prefix
2888 -- Expressions (List1)
2889 -- plus fields for expression
2891 -- Note: if any of the subscripts requires a range check, then the
2892 -- Do_Range_Check flag is set on the corresponding expression, with
2893 -- the index type being determined from the type of the Prefix, which
2894 -- references the array being indexed.
2896 -- Note: in a fully analyzed and expanded indexed component node, and
2897 -- hence in any such node that gigi sees, if the prefix is an access
2898 -- type, then an explicit dereference operation has been inserted.
2904 -- SLICE ::= PREFIX (DISCRETE_RANGE)
2906 -- Note: an implicit subtype is created to describe the resulting
2907 -- type, so that the bounds of this type are the bounds of the slice.
2910 -- Sloc points to first token of prefix
2912 -- Discrete_Range (Node4)
2913 -- plus fields for expression
2915 -------------------------------
2916 -- 4.1.3 Selected Component --
2917 -------------------------------
2919 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
2921 -- Note: selected components that are semantically expanded names get
2922 -- changed during semantic processing into the separate N_Expanded_Name
2923 -- node. See description of this node in the section on semantic nodes.
2925 -- N_Selected_Component
2926 -- Sloc points to period
2928 -- Selector_Name (Node2)
2929 -- Associated_Node (Node4-Sem)
2930 -- Do_Discriminant_Check (Flag13-Sem)
2931 -- Is_In_Discriminant_Check (Flag11-Sem)
2932 -- plus fields for expression
2934 --------------------------
2935 -- 4.1.3 Selector Name --
2936 --------------------------
2938 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
2940 --------------------------------
2941 -- 4.1.4 Attribute Reference --
2942 --------------------------------
2944 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
2946 -- Note: the syntax is quite ambiguous at this point. Consider:
2948 -- A'Length (X) X is part of the attribute designator
2949 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
2950 -- A'Class (X) X is the expression of a type conversion
2952 -- It would be possible for the parser to distinguish these cases
2953 -- by looking at the attribute identifier. However, that would mean
2954 -- more work in introducing new implementation defined attributes,
2955 -- and also it would mean that special processing for attributes
2956 -- would be scattered around, instead of being centralized in the
2957 -- semantic routine that handles an N_Attribute_Reference node.
2958 -- Consequently, the parser in all the above cases stores the
2959 -- expression (X in these examples) as a single element list in
2960 -- in the Expressions field of the N_Attribute_Reference node.
2962 -- Similarly, for attributes like Max which take two arguments,
2963 -- we store the two arguments as a two element list in the
2964 -- Expressions field. Of course it is clear at parse time that
2965 -- this case is really a function call with an attribute as the
2966 -- prefix, but it turns out to be convenient to handle the two
2967 -- argument case in a similar manner to the one argument case,
2968 -- and indeed in general the parser will accept any number of
2969 -- expressions in this position and store them as a list in the
2970 -- attribute reference node. This allows for future addition of
2971 -- attributes that take more than two arguments.
2973 -- Note: named associates are not permitted in function calls where
2974 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
2975 -- to skip the normal subprogram argument processing.
2977 -- Note: for the attributes whose designators are technically keywords,
2978 -- i.e. digits, access, delta, range, the Attribute_Name field contains
2979 -- the corresponding name, even though no identifier is involved.
2981 -- Note: the generated code may contain stream attributes applied to
2982 -- limited types for which no stream routines exist officially. In such
2983 -- case, the result is to use the stream attribute for the underlying
2984 -- full type, or in the case of a protected type, the components
2985 -- (including any disriminants) are merely streamed in order.
2987 -- See Exp_Attr for a complete description of which attributes are
2988 -- passed onto Gigi, and which are handled entirely by the front end.
2990 -- Gigi restriction: For the Pos attribute, the prefix cannot be
2991 -- a non-standard enumeration type or a nonzero/zero semantics
2992 -- boolean type, so the value is simply the stored representation.
2994 -- Note: In generated code, the Address and Unrestricted_Access
2995 -- attributes can be applied to any expression, and the meaning is
2996 -- to create an object containing the value (the object is in the
2997 -- current stack frame), and pass the address of this value. If the
2998 -- Must_Be_Byte_Aligned flag is set, then the object whose address
2999 -- is taken must be on a byte (storage unit) boundary, and if it is
3000 -- not (or may not be), then the generated code must create a copy
3001 -- that is byte aligned, and pass the address of this copy.
3003 -- N_Attribute_Reference
3004 -- Sloc points to apostrophe
3006 -- Attribute_Name (Name2) identifier name from attribute designator
3007 -- Expressions (List1) (set to No_List if no associated expressions)
3008 -- Entity (Node4-Sem) used if the attribute yields a type
3009 -- Associated_Node (Node4-Sem)
3010 -- Do_Overflow_Check (Flag17-Sem)
3011 -- Redundant_Use (Flag13-Sem)
3012 -- Must_Be_Byte_Aligned (Flag14)
3013 -- plus fields for expression
3015 ---------------------------------
3016 -- 4.1.4 Attribute Designator --
3017 ---------------------------------
3019 -- ATTRIBUTE_DESIGNATOR ::=
3020 -- IDENTIFIER [(static_EXPRESSION)]
3021 -- | access | delta | digits
3023 -- There is no explicit node in the tree for an attribute designator.
3024 -- Instead the Attribute_Name and Expressions fields of the parent
3025 -- node (N_Attribute_Reference node) hold the information.
3027 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3028 -- designator, then they are treated as identifiers internally
3029 -- rather than the keywords of the same name.
3031 --------------------------------------
3032 -- 4.1.4 Range Attribute Reference --
3033 --------------------------------------
3035 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3037 -- A range attribute reference is represented in the tree using the
3038 -- normal N_Attribute_Reference node.
3040 ---------------------------------------
3041 -- 4.1.4 Range Attribute Designator --
3042 ---------------------------------------
3044 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3046 -- A range attribute designator is represented in the tree using the
3047 -- normal N_Attribute_Reference node.
3049 --------------------
3051 --------------------
3054 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3056 -----------------------------
3057 -- 4.3.1 Record Aggregate --
3058 -----------------------------
3060 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3063 -- Sloc points to left parenthesis
3064 -- Expressions (List1) (set to No_List if none or null record case)
3065 -- Component_Associations (List2) (set to No_List if none)
3066 -- Null_Record_Present (Flag17)
3067 -- Aggregate_Bounds (Node3-Sem)
3068 -- Associated_Node (Node4-Sem)
3069 -- Static_Processing_OK (Flag4-Sem)
3070 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3071 -- Expansion_Delayed (Flag11-Sem)
3072 -- plus fields for expression
3074 -- Note: this structure is used for both record and array aggregates
3075 -- since the two cases are not separable by the parser. The parser
3076 -- makes no attempt to enforce consistency here, so it is up to the
3077 -- semantic phase to make sure that the aggregate is consistent (i.e.
3078 -- that it is not a "half-and-half" case that mixes record and array
3079 -- syntax. In particular, for a record aggregate, the expressions
3080 -- field will be set if there are positional associations.
3082 -- Note: gigi/gcc can handle array aggregates correctly providing that
3083 -- they are entirely positional, and the array subtype involved has a
3084 -- known at compile time length and is not bit packed, or a convention
3085 -- Fortran array with more than one dimension. If these conditions
3086 -- are not met, then the front end must translate the aggregate into
3087 -- an appropriate set of assignments into a temporary.
3089 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3090 -- of record aggregates, including those for packed, and rep-claused
3091 -- records, and also variant records, providing that there are no
3092 -- variable length fields whose size is not known at runtime, and
3093 -- providing that the aggregate is presented in fully named form.
3095 ----------------------------------------------
3096 -- 4.3.1 Record Component Association List --
3097 ----------------------------------------------
3099 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3100 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3103 -- There is no explicit node in the tree for a record component
3104 -- association list. Instead the Null_Record_Present flag is set in
3105 -- the parent node for the NULL RECORD case.
3107 ------------------------------------------------------
3108 -- 4.3.1 Record Component Association (also 4.3.3) --
3109 ------------------------------------------------------
3111 -- RECORD_COMPONENT_ASSOCIATION ::=
3112 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3114 -- N_Component_Association
3115 -- Sloc points to first selector name
3117 -- Loop_Actions (List2-Sem)
3118 -- Expression (Node3)
3119 -- Box_Present (Flag15)
3121 -- Note: this structure is used for both record component associations
3122 -- and array component associations, since the two cases aren't always
3123 -- separable by the parser. The choices list may represent either a
3124 -- list of selector names in the record aggregate case, or a list of
3125 -- discrete choices in the array aggregate case or an N_Others_Choice
3126 -- node (which appears as a singleton list). Box_Present gives support
3127 -- to Ada 2005 (AI-287).
3129 -----------------------------------
3130 -- 4.3.1 Commponent Choice List --
3131 -----------------------------------
3133 -- COMPONENT_CHOICE_LIST ::=
3134 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3137 -- The entries of a component choice list appear in the Choices list
3138 -- of the associated N_Component_Association, as either selector
3139 -- names, or as an N_Others_Choice node.
3141 --------------------------------
3142 -- 4.3.2 Extension Aggregate --
3143 --------------------------------
3145 -- EXTENSION_AGGREGATE ::=
3146 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3148 -- Note: extension aggregates are not permitted in Ada 83 mode
3150 -- N_Extension_Aggregate
3151 -- Sloc points to left parenthesis
3152 -- Ancestor_Part (Node3)
3153 -- Associated_Node (Node4-Sem)
3154 -- Expressions (List1) (set to No_List if none or null record case)
3155 -- Component_Associations (List2) (set to No_List if none)
3156 -- Null_Record_Present (Flag17)
3157 -- Expansion_Delayed (Flag11-Sem)
3158 -- plus fields for expression
3160 --------------------------
3161 -- 4.3.2 Ancestor Part --
3162 --------------------------
3164 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3166 ----------------------------
3167 -- 4.3.3 Array Aggregate --
3168 ----------------------------
3170 -- ARRAY_AGGREGATE ::=
3171 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3173 ---------------------------------------
3174 -- 4.3.3 Positional Array Aggregate --
3175 ---------------------------------------
3177 -- POSITIONAL_ARRAY_AGGREGATE ::=
3178 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3179 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3181 -- See Record_Aggregate (4.3.1) for node structure
3183 ----------------------------------
3184 -- 4.3.3 Named Array Aggregate --
3185 ----------------------------------
3187 -- NAMED_ARRAY_AGGREGATE ::=
3188 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3190 -- See Record_Aggregate (4.3.1) for node structure
3192 ----------------------------------------
3193 -- 4.3.3 Array Component Association --
3194 ----------------------------------------
3196 -- ARRAY_COMPONENT_ASSOCIATION ::=
3197 -- DISCRETE_CHOICE_LIST => EXPRESSION
3199 -- See Record_Component_Association (4.3.1) for node structure
3201 --------------------------------------------------
3202 -- 4.4 Expression/Relation/Term/Factor/Primary --
3203 --------------------------------------------------
3206 -- RELATION {and RELATION} | RELATION {and then RELATION}
3207 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3208 -- | RELATION {xor RELATION}
3211 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3212 -- | SIMPLE_EXPRESSION [not] in RANGE
3213 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3215 -- SIMPLE_EXPRESSION ::=
3216 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3218 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3220 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3222 -- No nodes are generated for any of these constructs. Instead, the
3223 -- node for the operator appears directly. When we refer to an
3224 -- expression in this description, we mean any of the possible
3225 -- consistuent components of an expression (e.g. identifier is
3226 -- an example of an expression).
3233 -- NUMERIC_LITERAL | null
3234 -- | STRING_LITERAL | AGGREGATE
3235 -- | NAME | QUALIFIED_EXPRESSION
3236 -- | ALLOCATOR | (EXPRESSION)
3238 -- Usually there is no explicit node in the tree for primary. Instead
3239 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3240 -- exceptions. First, there is an explicit node for a null primary.
3243 -- Sloc points to NULL
3244 -- plus fields for expression
3246 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3247 -- that the parser keep track of which subexpressions are enclosed
3248 -- in parentheses, and how many levels of parentheses are used. This
3249 -- information is required for optimization purposes, and also for
3250 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3251 -- conform with ((((1)))) in the body).
3253 -- The parentheses are recorded by keeping a Paren_Count field in every
3254 -- subexpression node (it is actually present in all nodes, but only
3255 -- used in subexpression nodes). This count records the number of
3256 -- levels of parentheses. If the number of levels in the source exceeds
3257 -- the maximum accomodated by this count, then the count is simply left
3258 -- at the maximum value. This means that there are some pathalogical
3259 -- cases of failure to detect conformance failures (e.g. an expression
3260 -- with 500 levels of parens will conform with one with 501 levels),
3261 -- but we do not need to lose sleep over this.
3263 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3264 -- type N_Parenthesized_Expression used to accurately record unlimited
3265 -- numbers of levels of parentheses. However, it turned out to be a
3266 -- real nuisance to have to take into account the possible presence of
3267 -- this node during semantic analysis, since basically parentheses have
3268 -- zero relevance to semantic analysis.
3270 -- Note: the level of parentheses always present in things like
3271 -- aggregates does not count, only the parentheses in the primary
3272 -- (EXPRESSION) affect the setting of the Paren_Count field.
3274 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3275 -- treated as though it were Empty) if No_Initialization is set True.
3277 --------------------------------------
3278 -- 4.5 Short Circuit Control Forms --
3279 --------------------------------------
3282 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3284 -- Gigi restriction: For both these control forms, the operand and
3285 -- result types are always Standard.Boolean. The expander inserts the
3286 -- required conversion operations where needed to ensure this is the
3290 -- Sloc points to AND of AND THEN
3291 -- Left_Opnd (Node2)
3292 -- Right_Opnd (Node3)
3293 -- Actions (List1-Sem)
3294 -- plus fields for expression
3297 -- Sloc points to OR of OR ELSE
3298 -- Left_Opnd (Node2)
3299 -- Right_Opnd (Node3)
3300 -- Actions (List1-Sem)
3301 -- plus fields for expression
3303 -- Note: The Actions field is used to hold actions associated with
3304 -- the right hand operand. These have to be treated specially since
3305 -- they are not unconditionally executed. See Insert_Actions for a
3306 -- more detailed description of how these actions are handled.
3308 ---------------------------
3309 -- 4.5 Membership Tests --
3310 ---------------------------
3313 -- SIMPLE_EXPRESSION [not] in RANGE
3314 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3316 -- Note: although the grammar above allows only a range or a
3317 -- subtype mark, the parser in fact will accept any simple
3318 -- expression in place of a subtype mark. This means that the
3319 -- semantic analyzer must be prepared to deal with, and diagnose
3320 -- a simple expression other than a name for the right operand.
3321 -- This simplifies error recovery in the parser.
3324 -- Sloc points to IN
3325 -- Left_Opnd (Node2)
3326 -- Right_Opnd (Node3)
3327 -- plus fields for expression
3330 -- Sloc points to NOT of NOT IN
3331 -- Left_Opnd (Node2)
3332 -- Right_Opnd (Node3)
3333 -- plus fields for expression
3335 --------------------
3337 --------------------
3339 -- LOGICAL_OPERATOR ::= and | or | xor
3341 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3343 -- BINARY_ADDING_OPERATOR ::= + | - | &
3345 -- UNARY_ADDING_OPERATOR ::= + | -
3347 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3349 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3351 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3358 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3359 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3360 -- All handling of smalls for multiplication and division is handled
3361 -- by the front end (mod and rem result only from expansion). Gigi
3362 -- thus never needs to worry about small values (for other operators
3363 -- operating on fixed-point, e.g. addition, the small value does not
3364 -- have any semantic effect anyway, these are always integer operations.
3366 -- Gigi restriction: For all operators taking Boolean operands, the
3367 -- type is always Standard.Boolean. The expander inserts the required
3368 -- conversion operations where needed to ensure this is the case.
3371 -- Sloc points to AND
3372 -- Do_Length_Check (Flag4-Sem)
3373 -- plus fields for binary operator
3374 -- plus fields for expression
3377 -- Sloc points to OR
3378 -- Do_Length_Check (Flag4-Sem)
3379 -- plus fields for binary operator
3380 -- plus fields for expression
3383 -- Sloc points to XOR
3384 -- Do_Length_Check (Flag4-Sem)
3385 -- plus fields for binary operator
3386 -- plus fields for expression
3390 -- plus fields for binary operator
3391 -- plus fields for expression
3394 -- Sloc points to /=
3395 -- plus fields for binary operator
3396 -- plus fields for expression
3400 -- plus fields for binary operator
3401 -- plus fields for expression
3404 -- Sloc points to <=
3405 -- plus fields for binary operator
3406 -- plus fields for expression
3410 -- plus fields for binary operator
3411 -- plus fields for expression
3414 -- Sloc points to >=
3415 -- plus fields for binary operator
3416 -- plus fields for expression
3419 -- Sloc points to + (binary)
3420 -- plus fields for binary operator
3421 -- plus fields for expression
3424 -- Sloc points to - (binary)
3425 -- plus fields for binary operator
3426 -- plus fields for expression
3430 -- Is_Component_Left_Opnd (Flag13-Sem)
3431 -- Is_Component_Right_Opnd (Flag14-Sem)
3432 -- plus fields for binary operator
3433 -- plus fields for expression
3437 -- Treat_Fixed_As_Integer (Flag14-Sem)
3438 -- Rounded_Result (Flag18-Sem)
3439 -- plus fields for binary operator
3440 -- plus fields for expression
3444 -- Treat_Fixed_As_Integer (Flag14-Sem)
3445 -- Do_Division_Check (Flag13-Sem)
3446 -- Rounded_Result (Flag18-Sem)
3447 -- plus fields for binary operator
3448 -- plus fields for expression
3451 -- Sloc points to MOD
3452 -- Treat_Fixed_As_Integer (Flag14-Sem)
3453 -- Do_Division_Check (Flag13-Sem)
3454 -- plus fields for binary operator
3455 -- plus fields for expression
3458 -- Sloc points to REM
3459 -- Treat_Fixed_As_Integer (Flag14-Sem)
3460 -- Do_Division_Check (Flag13-Sem)
3461 -- plus fields for binary operator
3462 -- plus fields for expression
3465 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3466 -- Sloc points to **
3467 -- plus fields for binary operator
3468 -- plus fields for expression
3471 -- Sloc points to + (unary)
3472 -- plus fields for unary operator
3473 -- plus fields for expression
3476 -- Sloc points to - (unary)
3477 -- plus fields for unary operator
3478 -- plus fields for expression
3481 -- Sloc points to ABS
3482 -- plus fields for unary operator
3483 -- plus fields for expression
3486 -- Sloc points to NOT
3487 -- plus fields for unary operator
3488 -- plus fields for expression
3490 -- See also shift operators in section B.2
3492 -- Note on fixed-point operations passed to Gigi: For adding operators,
3493 -- the semantics is to treat these simply as integer operations, with
3494 -- the small values being ignored (the bounds are already stored in
3495 -- units of small, so that constraint checking works as usual). For the
3496 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3497 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3498 -- thus treat these nodes in identical manner, ignoring small values.
3500 --------------------------
3501 -- 4.6 Type Conversion --
3502 --------------------------
3504 -- TYPE_CONVERSION ::=
3505 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3507 -- In the (NAME) case, the name is stored as the expression
3509 -- Note: the parser never generates a type conversion node, since it
3510 -- looks like an indexed component which is generated by preference.
3511 -- The semantic pass must correct this misidentification.
3513 -- Gigi handles conversions that involve no change in the root type,
3514 -- and also all conversions from integer to floating-point types.
3515 -- Conversions from floating-point to integer are only handled in
3516 -- the case where Float_Truncate flag set. Other conversions from
3517 -- floating-point to integer (involving rounding) and all conversions
3518 -- involving fixed-point types are handled by the expander.
3520 -- Sprint syntax if Float_Truncate set: X^(Y)
3521 -- Sprint syntax if Conversion_OK set X?(Y)
3522 -- Sprint syntax if both flags set X?^(Y)
3524 -- Note: If either the operand or result type is fixed-point, Gigi will
3525 -- only see a type conversion node with Conversion_OK set. The front end
3526 -- takes care of all handling of small's for fixed-point conversions.
3528 -- N_Type_Conversion
3529 -- Sloc points to first token of subtype mark
3530 -- Subtype_Mark (Node4)
3531 -- Expression (Node3)
3532 -- Do_Tag_Check (Flag13-Sem)
3533 -- Do_Length_Check (Flag4-Sem)
3534 -- Do_Overflow_Check (Flag17-Sem)
3535 -- Float_Truncate (Flag11-Sem)
3536 -- Rounded_Result (Flag18-Sem)
3537 -- Conversion_OK (Flag14-Sem)
3538 -- plus fields for expression
3540 -- Note: if a range check is required, then the Do_Range_Check flag
3541 -- is set in the Expression with the check being done against the
3542 -- target type range (after the base type conversion, if any).
3544 -------------------------------
3545 -- 4.7 Qualified Expression --
3546 -------------------------------
3548 -- QUALIFIED_EXPRESSION ::=
3549 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3551 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3552 -- the expression, so the Expression field of this node always points
3553 -- to a parenthesized expression in this case (i.e. Paren_Count will
3554 -- always be non-zero for the referenced expression if it is not an
3557 -- N_Qualified_Expression
3558 -- Sloc points to apostrophe
3559 -- Subtype_Mark (Node4)
3560 -- Expression (Node3) expression or aggregate
3561 -- plus fields for expression
3563 --------------------
3565 --------------------
3568 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3570 -- Sprint syntax (when storage pool present)
3571 -- new xxx (storage_pool = pool)
3574 -- Sloc points to NEW
3575 -- Expression (Node3) subtype indication or qualified expression
3576 -- Null_Exclusion_Present (Flag11)
3577 -- Storage_Pool (Node1-Sem)
3578 -- Procedure_To_Call (Node4-Sem)
3579 -- No_Initialization (Flag13-Sem)
3580 -- Do_Storage_Check (Flag17-Sem)
3581 -- plus fields for expression
3583 ---------------------------------
3584 -- 5.1 Sequence Of Statements --
3585 ---------------------------------
3587 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3589 -- Note: Although the parser will not accept a declaration as a
3590 -- statement, the semantic analyzer may insert declarations (e.g.
3591 -- declarations of implicit types needed for execution of other
3592 -- statements) into a sequence of statements, so the code genmerator
3593 -- should be prepared to accept a declaration where a statement is
3594 -- expected. Note also that pragmas can appear as statements.
3596 --------------------
3598 --------------------
3601 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3603 -- There is no explicit node in the tree for a statement. Instead, the
3604 -- individual statement appears directly. Labels are treated as a
3605 -- kind of statement, i.e. they are linked into a statement list at
3606 -- the point they appear, so the labeled statement appears following
3607 -- the label or labels in the statement list.
3609 ---------------------------
3610 -- 5.1 Simple Statement --
3611 ---------------------------
3613 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3614 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3615 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3616 -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3617 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3618 -- | ABORT_STATEMENT | RAISE_STATEMENT
3621 -----------------------------
3622 -- 5.1 Compound Statement --
3623 -----------------------------
3625 -- COMPOUND_STATEMENT ::=
3626 -- IF_STATEMENT | CASE_STATEMENT
3627 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3628 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3630 -------------------------
3631 -- 5.1 Null Statement --
3632 -------------------------
3634 -- NULL_STATEMENT ::= null;
3637 -- Sloc points to NULL
3643 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3645 -- Note that the occurrence of a label is not a defining identifier,
3646 -- but rather a referencing occurrence. The defining occurrence is
3647 -- in the implicit label declaration which occurs in the innermost
3651 -- Sloc points to <<
3652 -- Identifier (Node1) direct name of statement identifier
3653 -- Exception_Junk (Flag7-Sem)
3655 -------------------------------
3656 -- 5.1 Statement Identifier --
3657 -------------------------------
3659 -- STATEMENT_INDENTIFIER ::= DIRECT_NAME
3661 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3662 -- (not an OPERATOR_SYMBOL)
3664 -------------------------------
3665 -- 5.2 Assignment Statement --
3666 -------------------------------
3668 -- ASSIGNMENT_STATEMENT ::=
3669 -- variable_NAME := EXPRESSION;
3671 -- N_Assignment_Statement
3672 -- Sloc points to :=
3674 -- Expression (Node3)
3675 -- Do_Tag_Check (Flag13-Sem)
3676 -- Do_Length_Check (Flag4-Sem)
3677 -- Forwards_OK (Flag5-Sem)
3678 -- Backwards_OK (Flag6-Sem)
3679 -- No_Ctrl_Actions (Flag7-Sem)
3681 -- Note: if a range check is required, then the Do_Range_Check flag
3682 -- is set in the Expression (right hand side), with the check being
3683 -- done against the type of the Name (left hand side).
3685 -- Note: the back end places some restrictions on the form of the
3686 -- Expression field. If the object being assigned to is Atomic, then
3687 -- the Expression may not have the form of an aggregate (since this
3688 -- might cause the back end to generate separate assignments). It
3689 -- also cannot be a reference to an object marked as a true constant
3690 -- (Is_True_Constant flag set), where the object is itself initalized
3691 -- with an aggregate. If necessary the front end must generate an
3692 -- extra temporary (with Is_True_Constant set False), and initialize
3693 -- this temporary as required (the temporary itself is not atomic).
3695 -----------------------
3696 -- 5.3 If Statement --
3697 -----------------------
3700 -- if CONDITION then
3701 -- SEQUENCE_OF_STATEMENTS
3702 -- {elsif CONDITION then
3703 -- SEQUENCE_OF_STATEMENTS}
3705 -- SEQUENCE_OF_STATEMENTS]
3708 -- Gigi restriction: This expander ensures that the type of the
3709 -- Condition fields is always Standard.Boolean, even if the type
3710 -- in the source is some non-standard boolean type.
3713 -- Sloc points to IF
3714 -- Condition (Node1)
3715 -- Then_Statements (List2)
3716 -- Elsif_Parts (List3) (set to No_List if none present)
3717 -- Else_Statements (List4) (set to No_List if no else part present)
3718 -- End_Span (Uint5) (set to No_Uint if expander generated)
3721 -- Sloc points to ELSIF
3722 -- Condition (Node1)
3723 -- Then_Statements (List2)
3724 -- Condition_Actions (List3-Sem)
3726 --------------------
3728 --------------------
3730 -- CONDITION ::= boolean_EXPRESSION
3732 -------------------------
3733 -- 5.4 Case Statement --
3734 -------------------------
3736 -- CASE_STATEMENT ::=
3737 -- case EXPRESSION is
3738 -- CASE_STATEMENT_ALTERNATIVE
3739 -- {CASE_STATEMENT_ALTERNATIVE}
3742 -- Note: the Alternatives can contain pragmas. These only occur at
3743 -- the start of the list, since any pragmas occurring after the first
3744 -- alternative are absorbed into the corresponding statement sequence.
3747 -- Sloc points to CASE
3748 -- Expression (Node3)
3749 -- Alternatives (List4)
3750 -- End_Span (Uint5) (set to No_Uint if expander generated)
3752 -------------------------------------
3753 -- 5.4 Case Statement Alternative --
3754 -------------------------------------
3756 -- CASE_STATEMENT_ALTERNATIVE ::=
3757 -- when DISCRETE_CHOICE_LIST =>
3758 -- SEQUENCE_OF_STATEMENTS
3760 -- N_Case_Statement_Alternative
3761 -- Sloc points to WHEN
3762 -- Discrete_Choices (List4)
3763 -- Statements (List3)
3765 -------------------------
3766 -- 5.5 Loop Statement --
3767 -------------------------
3769 -- LOOP_STATEMENT ::=
3770 -- [loop_STATEMENT_IDENTIFIER :]
3771 -- [ITERATION_SCHEME] loop
3772 -- SEQUENCE_OF_STATEMENTS
3773 -- end loop [loop_IDENTIFIER];
3775 -- Note: The occurrence of a loop label is not a defining identifier
3776 -- but rather a referencing occurrence. The defining occurrence is in
3777 -- the implicit label declaration which occurs in the innermost
3780 -- Note: there is always a loop statement identifier present in
3781 -- the tree, even if none was given in the source. In the case where
3782 -- no loop identifier is given in the source, the parser creates
3783 -- a name of the form _Loop_n, where n is a decimal integer (the
3784 -- two underlines ensure that the loop names created in this manner
3785 -- do not conflict with any user defined identifiers), and the flag
3786 -- Has_Created_Identifier is set to True. The only exception to the
3787 -- rule that all loop statement nodes have identifiers occurs for
3788 -- loops constructed by the expander, and the semantic analyzer will
3789 -- create and supply dummy loop identifiers in these cases.
3792 -- Sloc points to LOOP
3793 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3794 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3795 -- Statements (List3)
3796 -- End_Label (Node4)
3797 -- Has_Created_Identifier (Flag15)
3798 -- Is_Null_Loop (Flag16)
3800 --------------------------
3801 -- 5.5 Iteration Scheme --
3802 --------------------------
3804 -- ITERATION_SCHEME ::=
3805 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3807 -- Gigi restriction: This expander ensures that the type of the
3808 -- Condition field is always Standard.Boolean, even if the type
3809 -- in the source is some non-standard boolean type.
3811 -- N_Iteration_Scheme
3812 -- Sloc points to WHILE or FOR
3813 -- Condition (Node1) (set to Empty if FOR case)
3814 -- Condition_Actions (List3-Sem)
3815 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3817 ---------------------------------------
3818 -- 5.5 Loop parameter specification --
3819 ---------------------------------------
3821 -- LOOP_PARAMETER_SPECIFICATION ::=
3822 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3824 -- N_Loop_Parameter_Specification
3825 -- Sloc points to first identifier
3826 -- Defining_Identifier (Node1)
3827 -- Reverse_Present (Flag15)
3828 -- Discrete_Subtype_Definition (Node4)
3830 --------------------------
3831 -- 5.6 Block Statement --
3832 --------------------------
3834 -- BLOCK_STATEMENT ::=
3835 -- [block_STATEMENT_IDENTIFIER:]
3837 -- DECLARATIVE_PART]
3839 -- HANDLED_SEQUENCE_OF_STATEMENTS
3840 -- end [block_IDENTIFIER];
3842 -- Note that the occurrence of a block identifier is not a defining
3843 -- identifier, but rather a referencing occurrence. The defining
3844 -- occurrence is in the implicit label declaration which occurs in
3845 -- the innermost enclosing block.
3847 -- Note: there is always a block statement identifier present in
3848 -- the tree, even if none was given in the source. In the case where
3849 -- no block identifier is given in the source, the parser creates
3850 -- a name of the form _Block_n, where n is a decimal integer (the
3851 -- two underlines ensure that the block names created in this manner
3852 -- do not conflict with any user defined identifiers), and the flag
3853 -- Has_Created_Identifier is set to True. The only exception to the
3854 -- rule that all loop statement nodes have identifiers occurs for
3855 -- blocks constructed by the expander, and the semantic analyzer
3856 -- creates and supplies dummy names for the blocks).
3858 -- N_Block_Statement
3859 -- Sloc points to DECLARE or BEGIN
3860 -- Identifier (Node1) block direct name (set to Empty if not present)
3861 -- Declarations (List2) (set to No_List if no DECLARE part)
3862 -- Handled_Statement_Sequence (Node4)
3863 -- Is_Task_Master (Flag5-Sem)
3864 -- Activation_Chain_Entity (Node3-Sem)
3865 -- Has_Created_Identifier (Flag15)
3866 -- Is_Task_Allocation_Block (Flag6)
3867 -- Is_Asynchronous_Call_Block (Flag7)
3869 -------------------------
3870 -- 5.7 Exit Statement --
3871 -------------------------
3873 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
3875 -- Gigi restriction: This expander ensures that the type of the
3876 -- Condition field is always Standard.Boolean, even if the type
3877 -- in the source is some non-standard boolean type.
3880 -- Sloc points to EXIT
3881 -- Name (Node2) (set to Empty if no loop name present)
3882 -- Condition (Node1) (set to Empty if no when part present)
3884 -------------------------
3885 -- 5.9 Goto Statement --
3886 -------------------------
3888 -- GOTO_STATEMENT ::= goto label_NAME;
3891 -- Sloc points to GOTO
3893 -- Exception_Junk (Flag7-Sem)
3895 ---------------------------------
3896 -- 6.1 Subprogram Declaration --
3897 ---------------------------------
3899 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
3901 -- N_Subprogram_Declaration
3902 -- Sloc points to FUNCTION or PROCEDURE
3903 -- Specification (Node1)
3904 -- Body_To_Inline (Node3-Sem)
3905 -- Corresponding_Body (Node5-Sem)
3906 -- Parent_Spec (Node4-Sem)
3908 ------------------------------------------
3909 -- 6.1 Abstract Subprogram Declaration --
3910 ------------------------------------------
3912 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
3913 -- SUBPROGRAM_SPECIFICATION is abstract;
3915 -- N_Abstract_Subprogram_Declaration
3916 -- Sloc points to ABSTRACT
3917 -- Specification (Node1)
3919 -----------------------------------
3920 -- 6.1 Subprogram Specification --
3921 -----------------------------------
3923 -- SUBPROGRAM_SPECIFICATION ::=
3924 -- [[not] overriding]
3925 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
3926 -- | [[not] overriding]
3927 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
3929 -- Note: there are no separate nodes for the profiles, instead the
3930 -- information appears directly in the following nodes.
3932 -- N_Function_Specification
3933 -- Sloc points to FUNCTION
3934 -- Defining_Unit_Name (Node1) (the designator)
3935 -- Elaboration_Boolean (Node2-Sem)
3936 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3937 -- Null_Exclusion_Present (Flag11)
3938 -- Result_Definition (Node4) for result subtype
3939 -- Generic_Parent (Node5-Sem)
3940 -- Must_Override (Flag14) set if overriding indicator present
3941 -- Must_Not_Override (Flag15) set if not_overriding indicator present
3943 -- N_Procedure_Specification
3944 -- Sloc points to PROCEDURE
3945 -- Defining_Unit_Name (Node1)
3946 -- Elaboration_Boolean (Node2-Sem)
3947 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3948 -- Generic_Parent (Node5-Sem)
3949 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
3950 -- Must_Override (Flag14) set if overriding indicator present
3951 -- Must_Not_Override (Flag15) set if not_overriding indicator present
3953 -- Note: overriding indicator is an Ada 2005 feature
3955 ---------------------
3956 -- 6.1 Designator --
3957 ---------------------
3960 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
3962 -- Designators that are simply identifiers or operator symbols appear
3963 -- directly in the tree in this form. The following node is used only
3964 -- in the case where the designator has a parent unit name component.
3967 -- Sloc points to period
3968 -- Name (Node2) holds the parent unit name. Note that this is always
3969 -- non-Empty, since this node is only used for the case where a
3970 -- parent library unit package name is present.
3971 -- Identifier (Node1)
3973 -- Note that the identifier can also be an operator symbol here
3975 ------------------------------
3976 -- 6.1 Defining Designator --
3977 ------------------------------
3979 -- DEFINING_DESIGNATOR ::=
3980 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
3982 -------------------------------------
3983 -- 6.1 Defining Program Unit Name --
3984 -------------------------------------
3986 -- DEFINING_PROGRAM_UNIT_NAME ::=
3987 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
3989 -- The parent unit name is present only in the case of a child unit
3990 -- name (permissible only for Ada 95 for a library level unit, i.e.
3991 -- a unit at scope level one). If no such name is present, the defining
3992 -- program unit name is represented simply as the defining identifier.
3993 -- In the child unit case, the following node is used to represent the
3996 -- N_Defining_Program_Unit_Name
3997 -- Sloc points to period
3998 -- Name (Node2) holds the parent unit name. Note that this is always
3999 -- non-Empty, since this node is only used for the case where a
4000 -- parent unit name is present.
4001 -- Defining_Identifier (Node1)
4003 --------------------------
4004 -- 6.1 Operator Symbol --
4005 --------------------------
4007 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4009 -- Note: the fields of the N_Operator_Symbol node are laid out to
4010 -- match the corresponding fields of an N_Character_Literal node. This
4011 -- allows easy conversion of the operator symbol node into a character
4012 -- literal node in the case where a string constant of the form of an
4013 -- operator symbol is scanned out as such, but turns out semantically
4014 -- to be a string literal that is not an operator. For details see
4015 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4017 -- N_Operator_Symbol
4018 -- Sloc points to literal
4019 -- Chars (Name1) contains the Name_Id for the operator symbol
4020 -- Strval (Str3) Id of string value. This is used if the operator
4021 -- symbol turns out to be a normal string after all.
4022 -- Entity (Node4-Sem)
4023 -- Associated_Node (Node4-Sem)
4024 -- Has_Private_View (Flag11-Sem) set in generic units.
4025 -- Etype (Node5-Sem)
4027 -- Note: the Strval field may be set to No_String for generated
4028 -- operator symbols that are known not to be string literals
4031 -----------------------------------
4032 -- 6.1 Defining Operator Symbol --
4033 -----------------------------------
4035 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4037 -- A defining operator symbol is an entity, which has additional
4038 -- fields depending on the setting of the Ekind field. These
4039 -- additional fields are defined (and access subprograms declared)
4040 -- in package Einfo.
4042 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4043 -- are deliberately layed out to match the layout of fields in an
4044 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4045 -- an operator symbol node into a defining operator symbol node.
4046 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4047 -- for further details.
4049 -- N_Defining_Operator_Symbol
4050 -- Sloc points to literal
4051 -- Chars (Name1) contains the Name_Id for the operator symbol
4052 -- Next_Entity (Node2-Sem)
4053 -- Scope (Node3-Sem)
4054 -- Etype (Node5-Sem)
4056 ----------------------------
4057 -- 6.1 Parameter Profile --
4058 ----------------------------
4060 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4062 ---------------------------------------
4063 -- 6.1 Parameter and Result Profile --
4064 ---------------------------------------
4066 -- PARAMETER_AND_RESULT_PROFILE ::=
4067 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4068 -- | [FORMAL_PART] return ACCESS_DEFINITION
4070 -- There is no explicit node in the tree for a parameter and result
4071 -- profile. Instead the information appears directly in the parent.
4073 ----------------------
4074 -- 6.1 Formal part --
4075 ----------------------
4078 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4080 ----------------------------------
4081 -- 6.1 Parameter specification --
4082 ----------------------------------
4084 -- PARAMETER_SPECIFICATION ::=
4085 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4086 -- [:= DEFAULT_EXPRESSION]
4087 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4088 -- [:= DEFAULT_EXPRESSION]
4090 -- Although the syntax allows multiple identifiers in the list, the
4091 -- semantics is as though successive specifications were given with
4092 -- identical type definition and expression components. To simplify
4093 -- semantic processing, the parser represents a multiple declaration
4094 -- case as a sequence of single Specifications, using the More_Ids and
4095 -- Prev_Ids flags to preserve the original source form as described
4096 -- in the section on "Handling of Defining Identifier Lists".
4098 -- N_Parameter_Specification
4099 -- Sloc points to first identifier
4100 -- Defining_Identifier (Node1)
4101 -- In_Present (Flag15)
4102 -- Out_Present (Flag17)
4103 -- Null_Exclusion_Present (Flag11)
4104 -- Parameter_Type (Node2) subtype mark or access definition
4105 -- Expression (Node3) (set to Empty if no default expression present)
4106 -- Do_Accessibility_Check (Flag13-Sem)
4107 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4108 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4109 -- Default_Expression (Node5-Sem)
4115 -- MODE ::= [in] | in out | out
4117 -- There is no explicit node in the tree for the Mode. Instead the
4118 -- In_Present and Out_Present flags are set in the parent node to
4119 -- record the presence of keywords specifying the mode.
4121 --------------------------
4122 -- 6.3 Subprogram Body --
4123 --------------------------
4125 -- SUBPROGRAM_BODY ::=
4126 -- SUBPROGRAM_SPECIFICATION is
4129 -- HANDLED_SEQUENCE_OF_STATEMENTS
4130 -- end [DESIGNATOR];
4132 -- N_Subprogram_Body
4133 -- Sloc points to FUNCTION or PROCEDURE
4134 -- Specification (Node1)
4135 -- Declarations (List2)
4136 -- Handled_Statement_Sequence (Node4)
4137 -- Activation_Chain_Entity (Node3-Sem)
4138 -- Corresponding_Spec (Node5-Sem)
4139 -- Acts_As_Spec (Flag4-Sem)
4140 -- Bad_Is_Detected (Flag15) used only by parser
4141 -- Do_Storage_Check (Flag17-Sem)
4142 -- Has_Priority_Pragma (Flag6-Sem)
4143 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4144 -- Is_Task_Master (Flag5-Sem)
4145 -- Was_Originally_Stub (Flag13-Sem)
4147 -----------------------------------
4148 -- 6.4 Procedure Call Statement --
4149 -----------------------------------
4151 -- PROCEDURE_CALL_STATEMENT ::=
4152 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4154 -- Note: the reason that a procedure call has expression fields is
4155 -- that it semantically resembles an expression, e.g. overloading is
4156 -- allowed and a type is concocted for semantic processing purposes.
4157 -- Certain of these fields, such as Parens are not relevant, but it
4158 -- is easier to just supply all of them together!
4160 -- N_Procedure_Call_Statement
4161 -- Sloc points to first token of name or prefix
4162 -- Name (Node2) stores name or prefix
4163 -- Parameter_Associations (List3) (set to No_List if no
4164 -- actual parameter part)
4165 -- First_Named_Actual (Node4-Sem)
4166 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4167 -- Do_Tag_Check (Flag13-Sem)
4168 -- No_Elaboration_Check (Flag14-Sem)
4169 -- Parameter_List_Truncated (Flag17-Sem)
4170 -- ABE_Is_Certain (Flag18-Sem)
4171 -- plus fields for expression
4173 -- If any IN parameter requires a range check, then the corresponding
4174 -- argument expression has the Do_Range_Check flag set, and the range
4175 -- check is done against the formal type. Note that this argument
4176 -- expression may appear directly in the Parameter_Associations list,
4177 -- or may be a descendent of an N_Parameter_Association node that
4178 -- appears in this list.
4180 ------------------------
4181 -- 6.4 Function Call --
4182 ------------------------
4184 -- FUNCTION_CALL ::=
4185 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4187 -- Note: the parser may generate an indexed component node or simply
4188 -- a name node instead of a function call node. The semantic pass must
4189 -- correct this misidentification.
4192 -- Sloc points to first token of name or prefix
4193 -- Name (Node2) stores name or prefix
4194 -- Parameter_Associations (List3) (set to No_List if no
4195 -- actual parameter part)
4196 -- First_Named_Actual (Node4-Sem)
4197 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4198 -- Do_Tag_Check (Flag13-Sem)
4199 -- No_Elaboration_Check (Flag14-Sem)
4200 -- Parameter_List_Truncated (Flag17-Sem)
4201 -- ABE_Is_Certain (Flag18-Sem)
4202 -- plus fields for expression
4204 --------------------------------
4205 -- 6.4 Actual Parameter Part --
4206 --------------------------------
4208 -- ACTUAL_PARAMETER_PART ::=
4209 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4211 --------------------------------
4212 -- 6.4 Parameter Association --
4213 --------------------------------
4215 -- PARAMETER_ASSOCIATION ::=
4216 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4218 -- Note: the N_Parameter_Association node is built only if a formal
4219 -- parameter selector name is present, otherwise the parameter
4220 -- association appears in the tree simply as the node for the
4221 -- explicit actual parameter.
4223 -- N_Parameter_Association
4224 -- Sloc points to formal parameter
4225 -- Selector_Name (Node2) (always non-Empty, since this node is
4226 -- only used if a formal parameter selector name is present)
4227 -- Explicit_Actual_Parameter (Node3)
4228 -- Next_Named_Actual (Node4-Sem)
4230 ---------------------------
4231 -- 6.4 Actual Parameter --
4232 ---------------------------
4234 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4236 ---------------------------
4237 -- 6.5 Return Statement --
4238 ---------------------------
4240 -- RETURN_STATEMENT ::= return [EXPRESSION];
4242 -- N_Return_Statement
4243 -- Sloc points to RETURN
4244 -- Expression (Node3) (set to Empty if no expression present)
4245 -- Storage_Pool (Node1-Sem)
4246 -- Procedure_To_Call (Node4-Sem)
4247 -- Do_Tag_Check (Flag13-Sem)
4248 -- Return_Type (Node2-Sem)
4249 -- By_Ref (Flag5-Sem)
4251 -- Note: if a range check is required, then Do_Range_Check is set
4252 -- on the Expression. The range check is against Return_Type.
4254 ------------------------------
4255 -- 7.1 Package Declaration --
4256 ------------------------------
4258 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4260 -- Note: the activation chain entity for a package spec is used for
4261 -- all tasks declared in the package spec, or in the package body.
4263 -- N_Package_Declaration
4264 -- Sloc points to PACKAGE
4265 -- Specification (Node1)
4266 -- Corresponding_Body (Node5-Sem)
4267 -- Parent_Spec (Node4-Sem)
4268 -- Activation_Chain_Entity (Node3-Sem)
4270 --------------------------------
4271 -- 7.1 Package Specification --
4272 --------------------------------
4274 -- PACKAGE_SPECIFICATION ::=
4275 -- package DEFINING_PROGRAM_UNIT_NAME is
4276 -- {BASIC_DECLARATIVE_ITEM}
4278 -- {BASIC_DECLARATIVE_ITEM}]
4279 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4281 -- N_Package_Specification
4282 -- Sloc points to PACKAGE
4283 -- Defining_Unit_Name (Node1)
4284 -- Visible_Declarations (List2)
4285 -- Private_Declarations (List3) (set to No_List if no private
4287 -- End_Label (Node4)
4288 -- Generic_Parent (Node5-Sem)
4289 -- Limited_View_Installed (Flag18-Sem)
4291 -----------------------
4292 -- 7.1 Package Body --
4293 -----------------------
4296 -- package body DEFINING_PROGRAM_UNIT_NAME is
4299 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4300 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4303 -- Sloc points to PACKAGE
4304 -- Defining_Unit_Name (Node1)
4305 -- Declarations (List2)
4306 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4307 -- Corresponding_Spec (Node5-Sem)
4308 -- Was_Originally_Stub (Flag13-Sem)
4310 -- Note: if a source level package does not contain a handled sequence
4311 -- of statements, then the parser supplies a dummy one with a null
4312 -- sequence of statements. Comes_From_Source will be False in this
4313 -- constructed sequence. The reason we need this is for the End_Label
4314 -- field in the HSS.
4316 -----------------------------------
4317 -- 7.4 Private Type Declaration --
4318 -----------------------------------
4320 -- PRIVATE_TYPE_DECLARATION ::=
4321 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4322 -- is [[abstract] tagged] [limited] private;
4324 -- Note: TAGGED is not permitted in Ada 83 mode
4326 -- N_Private_Type_Declaration
4327 -- Sloc points to TYPE
4328 -- Defining_Identifier (Node1)
4329 -- Discriminant_Specifications (List4) (set to No_List if no
4330 -- discriminant part)
4331 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4332 -- Abstract_Present (Flag4)
4333 -- Tagged_Present (Flag15)
4334 -- Limited_Present (Flag17)
4336 ----------------------------------------
4337 -- 7.4 Private Extension Declaration --
4338 ----------------------------------------
4340 -- PRIVATE_EXTENSION_DECLARATION ::=
4341 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4342 -- [abstract] [limited] new ancestor_SUBTYPE_INDICATION
4343 -- [and INTERFACE_LIST] with private;
4345 -- Note: LIMITED, and private extension declarations are not allowed
4348 -- N_Private_Extension_Declaration
4349 -- Sloc points to TYPE
4350 -- Defining_Identifier (Node1)
4351 -- Discriminant_Specifications (List4) (set to No_List if no
4352 -- discriminant part)
4353 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4354 -- Abstract_Present (Flag4)
4355 -- Limited_Present (Flag17)
4356 -- Subtype_Indication (Node5)
4357 -- Interface_List (List2) (set to No_List if none)
4359 ---------------------
4360 -- 8.4 Use Clause --
4361 ---------------------
4363 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4365 -----------------------------
4366 -- 8.4 Use Package Clause --
4367 -----------------------------
4369 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4371 -- N_Use_Package_Clause
4372 -- Sloc points to USE
4374 -- Next_Use_Clause (Node3-Sem)
4375 -- Hidden_By_Use_Clause (Elist4-Sem)
4377 --------------------------
4378 -- 8.4 Use Type Clause --
4379 --------------------------
4381 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4383 -- Note: use type clause is not permitted in Ada 83 mode
4385 -- N_Use_Type_Clause
4386 -- Sloc points to USE
4387 -- Subtype_Marks (List2)
4388 -- Next_Use_Clause (Node3-Sem)
4389 -- Hidden_By_Use_Clause (Elist4-Sem)
4391 -------------------------------
4392 -- 8.5 Renaming Declaration --
4393 -------------------------------
4395 -- RENAMING_DECLARATION ::=
4396 -- OBJECT_RENAMING_DECLARATION
4397 -- | EXCEPTION_RENAMING_DECLARATION
4398 -- | PACKAGE_RENAMING_DECLARATION
4399 -- | SUBPROGRAM_RENAMING_DECLARATION
4400 -- | GENERIC_RENAMING_DECLARATION
4402 --------------------------------------
4403 -- 8.5 Object Renaming Declaration --
4404 --------------------------------------
4406 -- OBJECT_RENAMING_DECLARATION ::=
4407 -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME;
4408 -- | DEFINING_IDENTIFIER : ACCESS_DEFINITION renames object_NAME;
4410 -- Note: Access_Definition is an optional field that gives support to
4411 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4412 -- Subtype_Indication field or else the Access_Definition field.
4414 -- N_Object_Renaming_Declaration
4415 -- Sloc points to first identifier
4416 -- Defining_Identifier (Node1)
4417 -- Subtype_Mark (Node4) (set to Empty if not present)
4418 -- Access_Definition (Node3) (set to Empty if not present)
4420 -- Corresponding_Generic_Association (Node5-Sem)
4422 -----------------------------------------
4423 -- 8.5 Exception Renaming Declaration --
4424 -----------------------------------------
4426 -- EXCEPTION_RENAMING_DECLARATION ::=
4427 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4429 -- N_Exception_Renaming_Declaration
4430 -- Sloc points to first identifier
4431 -- Defining_Identifier (Node1)
4434 ---------------------------------------
4435 -- 8.5 Package Renaming Declaration --
4436 ---------------------------------------
4438 -- PACKAGE_RENAMING_DECLARATION ::=
4439 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4441 -- N_Package_Renaming_Declaration
4442 -- Sloc points to PACKAGE
4443 -- Defining_Unit_Name (Node1)
4445 -- Parent_Spec (Node4-Sem)
4447 ------------------------------------------
4448 -- 8.5 Subprogram Renaming Declaration --
4449 ------------------------------------------
4451 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4452 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4454 -- N_Subprogram_Renaming_Declaration
4455 -- Sloc points to RENAMES
4456 -- Specification (Node1)
4458 -- Parent_Spec (Node4-Sem)
4459 -- Corresponding_Spec (Node5-Sem)
4460 -- Corresponding_Formal_Spec (Node3-Sem)
4461 -- From_Default (Flag6-Sem)
4463 -----------------------------------------
4464 -- 8.5.5 Generic Renaming Declaration --
4465 -----------------------------------------
4467 -- GENERIC_RENAMING_DECLARATION ::=
4468 -- generic package DEFINING_PROGRAM_UNIT_NAME
4469 -- renames generic_package_NAME
4470 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4471 -- renames generic_procedure_NAME
4472 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4473 -- renames generic_function_NAME
4475 -- N_Generic_Package_Renaming_Declaration
4476 -- Sloc points to GENERIC
4477 -- Defining_Unit_Name (Node1)
4479 -- Parent_Spec (Node4-Sem)
4481 -- N_Generic_Procedure_Renaming_Declaration
4482 -- Sloc points to GENERIC
4483 -- Defining_Unit_Name (Node1)
4485 -- Parent_Spec (Node4-Sem)
4487 -- N_Generic_Function_Renaming_Declaration
4488 -- Sloc points to GENERIC
4489 -- Defining_Unit_Name (Node1)
4491 -- Parent_Spec (Node4-Sem)
4493 --------------------------------
4494 -- 9.1 Task Type Declaration --
4495 --------------------------------
4497 -- TASK_TYPE_DECLARATION ::=
4498 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4499 -- [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4501 -- N_Task_Type_Declaration
4502 -- Sloc points to TASK
4503 -- Defining_Identifier (Node1)
4504 -- Discriminant_Specifications (List4) (set to No_List if no
4505 -- discriminant part)
4506 -- Interface_List (List2) (set to No_List if none)
4507 -- Task_Definition (Node3) (set to Empty if not present)
4508 -- Corresponding_Body (Node5-Sem)
4510 ----------------------------------
4511 -- 9.1 Single Task Declaration --
4512 ----------------------------------
4514 -- SINGLE_TASK_DECLARATION ::=
4515 -- task DEFINING_IDENTIFIER
4516 -- [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4518 -- N_Single_Task_Declaration
4519 -- Sloc points to TASK
4520 -- Defining_Identifier (Node1)
4521 -- Interface_List (List2) (set to No_List if none)
4522 -- Task_Definition (Node3) (set to Empty if not present)
4524 --------------------------
4525 -- 9.1 Task Definition --
4526 --------------------------
4528 -- TASK_DEFINITION ::=
4532 -- end [task_IDENTIFIER]
4534 -- Note: as a result of semantic analysis, the list of task items can
4535 -- include implicit type declarations resulting from entry families.
4537 -- N_Task_Definition
4538 -- Sloc points to first token of task definition
4539 -- Visible_Declarations (List2)
4540 -- Private_Declarations (List3) (set to No_List if no private part)
4541 -- End_Label (Node4)
4542 -- Has_Priority_Pragma (Flag6-Sem)
4543 -- Has_Storage_Size_Pragma (Flag5-Sem)
4544 -- Has_Task_Info_Pragma (Flag7-Sem)
4545 -- Has_Task_Name_Pragma (Flag8-Sem)
4547 --------------------
4549 --------------------
4551 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4553 --------------------
4555 --------------------
4558 -- task body task_DEFINING_IDENTIFIER is
4561 -- HANDLED_SEQUENCE_OF_STATEMENTS
4562 -- end [task_IDENTIFIER];
4564 -- Gigi restriction: This node never appears
4567 -- Sloc points to TASK
4568 -- Defining_Identifier (Node1)
4569 -- Declarations (List2)
4570 -- Handled_Statement_Sequence (Node4)
4571 -- Is_Task_Master (Flag5-Sem)
4572 -- Activation_Chain_Entity (Node3-Sem)
4573 -- Corresponding_Spec (Node5-Sem)
4574 -- Was_Originally_Stub (Flag13-Sem)
4576 -------------------------------------
4577 -- 9.4 Protected Type Declaration --
4578 -------------------------------------
4580 -- PROTECTED_TYPE_DECLARATION ::=
4581 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4582 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4584 -- Note: protected type declarations are not permitted in Ada 83 mode
4586 -- N_Protected_Type_Declaration
4587 -- Sloc points to PROTECTED
4588 -- Defining_Identifier (Node1)
4589 -- Discriminant_Specifications (List4) (set to No_List if no
4590 -- discriminant part)
4591 -- Interface_List (List2) (set to No_List if none)
4592 -- Protected_Definition (Node3)
4593 -- Corresponding_Body (Node5-Sem)
4595 ---------------------------------------
4596 -- 9.4 Single Protected Declaration --
4597 ---------------------------------------
4599 -- SINGLE_PROTECTED_DECLARATION ::=
4600 -- protected DEFINING_IDENTIFIER
4601 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4603 -- Note: single protected declarations are not allowed in Ada 83 mode
4605 -- N_Single_Protected_Declaration
4606 -- Sloc points to PROTECTED
4607 -- Defining_Identifier (Node1)
4608 -- Interface_List (List2) (set to No_List if none)
4609 -- Protected_Definition (Node3)
4611 -------------------------------
4612 -- 9.4 Protected Definition --
4613 -------------------------------
4615 -- PROTECTED_DEFINITION ::=
4616 -- {PROTECTED_OPERATION_DECLARATION}
4618 -- {PROTECTED_ELEMENT_DECLARATION}]
4619 -- end [protected_IDENTIFIER]
4621 -- N_Protected_Definition
4622 -- Sloc points to first token of protected definition
4623 -- Visible_Declarations (List2)
4624 -- Private_Declarations (List3) (set to No_List if no private part)
4625 -- End_Label (Node4)
4626 -- Has_Priority_Pragma (Flag6-Sem)
4628 ------------------------------------------
4629 -- 9.4 Protected Operation Declaration --
4630 ------------------------------------------
4632 -- PROTECTED_OPERATION_DECLARATION ::=
4633 -- SUBPROGRAM_DECLARATION
4634 -- | ENTRY_DECLARATION
4635 -- | REPRESENTATION_CLAUSE
4637 ----------------------------------------
4638 -- 9.4 Protected Element Declaration --
4639 ----------------------------------------
4641 -- PROTECTED_ELEMENT_DECLARATION ::=
4642 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4644 -------------------------
4645 -- 9.4 Protected Body --
4646 -------------------------
4648 -- PROTECTED_BODY ::=
4649 -- protected body DEFINING_IDENTIFIER is
4650 -- {PROTECTED_OPERATION_ITEM}
4651 -- end [protected_IDENTIFIER];
4653 -- Note: protected bodies are not allowed in Ada 83 mode
4655 -- Gigi restriction: This node never appears
4658 -- Sloc points to PROTECTED
4659 -- Defining_Identifier (Node1)
4660 -- Declarations (List2) protected operation items (and pragmas)
4661 -- End_Label (Node4)
4662 -- Corresponding_Spec (Node5-Sem)
4663 -- Was_Originally_Stub (Flag13-Sem)
4665 -----------------------------------
4666 -- 9.4 Protected Operation Item --
4667 -----------------------------------
4669 -- PROTECTED_OPERATION_ITEM ::=
4670 -- SUBPROGRAM_DECLARATION
4671 -- | SUBPROGRAM_BODY
4673 -- | REPRESENTATION_CLAUSE
4675 ------------------------------
4676 -- 9.5.2 Entry Declaration --
4677 ------------------------------
4679 -- ENTRY_DECLARATION ::=
4680 -- [[not] overriding]
4681 -- entry DEFINING_IDENTIFIER
4682 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4684 -- N_Entry_Declaration
4685 -- Sloc points to ENTRY
4686 -- Defining_Identifier (Node1)
4687 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4688 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4689 -- Corresponding_Body (Node5-Sem)
4690 -- Must_Override (Flag14) set if overriding indicator present
4691 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4693 -- Note: overriding indicator is an Ada 2005 feature
4695 -----------------------------
4696 -- 9.5.2 Accept statement --
4697 -----------------------------
4699 -- ACCEPT_STATEMENT ::=
4700 -- accept entry_DIRECT_NAME
4701 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4702 -- HANDLED_SEQUENCE_OF_STATEMENTS
4703 -- end [entry_IDENTIFIER]];
4705 -- Gigi restriction: This node never appears
4707 -- Note: there are no explicit declarations allowed in an accept
4708 -- statement. However, the implicit declarations for any statement
4709 -- identifiers (labels and block/loop identifiers) are declarations
4710 -- that belong logically to the accept statement, and that is why
4711 -- there is a Declarations field in this node.
4713 -- N_Accept_Statement
4714 -- Sloc points to ACCEPT
4715 -- Entry_Direct_Name (Node1)
4716 -- Entry_Index (Node5) (set to Empty if not present)
4717 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4718 -- Handled_Statement_Sequence (Node4)
4719 -- Declarations (List2) (set to No_List if no declarations)
4721 ------------------------
4722 -- 9.5.2 Entry Index --
4723 ------------------------
4725 -- ENTRY_INDEX ::= EXPRESSION
4727 -----------------------
4728 -- 9.5.2 Entry Body --
4729 -----------------------
4732 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4735 -- HANDLED_SEQUENCE_OF_STATEMENTS
4736 -- end [entry_IDENTIFIER];
4738 -- ENTRY_BARRIER ::= when CONDITION
4740 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4741 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4742 -- too full (it would otherwise have too many fields)
4744 -- Gigi restriction: This node never appears
4747 -- Sloc points to ENTRY
4748 -- Defining_Identifier (Node1)
4749 -- Entry_Body_Formal_Part (Node5)
4750 -- Declarations (List2)
4751 -- Handled_Statement_Sequence (Node4)
4752 -- Activation_Chain_Entity (Node3-Sem)
4754 -----------------------------------
4755 -- 9.5.2 Entry Body Formal Part --
4756 -----------------------------------
4758 -- ENTRY_BODY_FORMAL_PART ::=
4759 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4761 -- Note that an entry body formal part node is present even if it is
4762 -- empty. This reflects the grammar, in which it is the components of
4763 -- the entry body formal part that are optional, not the entry body
4764 -- formal part itself. Also this means that the barrier condition
4765 -- always has somewhere to be stored.
4767 -- Gigi restriction: This node never appears
4769 -- N_Entry_Body_Formal_Part
4770 -- Sloc points to first token
4771 -- Entry_Index_Specification (Node4) (set to Empty if not present)
4772 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4773 -- Condition (Node1) from entry barrier of entry body
4775 --------------------------
4776 -- 9.5.2 Entry Barrier --
4777 --------------------------
4779 -- ENTRY_BARRIER ::= when CONDITION
4781 --------------------------------------
4782 -- 9.5.2 Entry Index Specification --
4783 --------------------------------------
4785 -- ENTRY_INDEX_SPECIFICATION ::=
4786 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
4788 -- Gigi restriction: This node never appears
4790 -- N_Entry_Index_Specification
4791 -- Sloc points to FOR
4792 -- Defining_Identifier (Node1)
4793 -- Discrete_Subtype_Definition (Node4)
4795 ---------------------------------
4796 -- 9.5.3 Entry Call Statement --
4797 ---------------------------------
4799 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
4801 -- The parser may generate a procedure call for this construct. The
4802 -- semantic pass must correct this misidentification where needed.
4804 -- Gigi restriction: This node never appears
4806 -- N_Entry_Call_Statement
4807 -- Sloc points to first token of name
4809 -- Parameter_Associations (List3) (set to No_List if no
4810 -- actual parameter part)
4811 -- First_Named_Actual (Node4-Sem)
4813 ------------------------------
4814 -- 9.5.4 Requeue Statement --
4815 ------------------------------
4817 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
4819 -- Note: requeue statements are not permitted in Ada 83 mode
4821 -- Gigi restriction: This node never appears
4823 -- N_Requeue_Statement
4824 -- Sloc points to REQUEUE
4826 -- Abort_Present (Flag15)
4828 --------------------------
4829 -- 9.6 Delay Statement --
4830 --------------------------
4832 -- DELAY_STATEMENT ::=
4833 -- DELAY_UNTIL_STATEMENT
4834 -- | DELAY_RELATIVE_STATEMENT
4836 --------------------------------
4837 -- 9.6 Delay Until Statement --
4838 --------------------------------
4840 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
4842 -- Note: delay until statements are not permitted in Ada 83 mode
4844 -- Gigi restriction: This node never appears
4846 -- N_Delay_Until_Statement
4847 -- Sloc points to DELAY
4848 -- Expression (Node3)
4850 -----------------------------------
4851 -- 9.6 Delay Relative Statement --
4852 -----------------------------------
4854 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
4856 -- Gigi restriction: This node never appears
4858 -- N_Delay_Relative_Statement
4859 -- Sloc points to DELAY
4860 -- Expression (Node3)
4862 ---------------------------
4863 -- 9.7 Select Statement --
4864 ---------------------------
4866 -- SELECT_STATEMENT ::=
4868 -- | TIMED_ENTRY_CALL
4869 -- | CONDITIONAL_ENTRY_CALL
4870 -- | ASYNCHRONOUS_SELECT
4872 -----------------------------
4873 -- 9.7.1 Selective Accept --
4874 -----------------------------
4876 -- SELECTIVE_ACCEPT ::=
4879 -- SELECT_ALTERNATIVE
4882 -- SELECT_ALTERNATIVE}
4884 -- SEQUENCE_OF_STATEMENTS]
4887 -- Gigi restriction: This node never appears
4889 -- Note: the guard expression, if present, appears in the node for
4890 -- the select alternative.
4892 -- N_Selective_Accept
4893 -- Sloc points to SELECT
4894 -- Select_Alternatives (List1)
4895 -- Else_Statements (List4) (set to No_List if no else part)
4901 -- GUARD ::= when CONDITION =>
4903 -- As noted above, the CONDITION that is part of a GUARD is included
4904 -- in the node for the select alernative for convenience.
4906 -------------------------------
4907 -- 9.7.1 Select Alternative --
4908 -------------------------------
4910 -- SELECT_ALTERNATIVE ::=
4911 -- ACCEPT_ALTERNATIVE
4912 -- | DELAY_ALTERNATIVE
4913 -- | TERMINATE_ALTERNATIVE
4915 -------------------------------
4916 -- 9.7.1 Accept Alternative --
4917 -------------------------------
4919 -- ACCEPT_ALTERNATIVE ::=
4920 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
4922 -- Gigi restriction: This node never appears
4924 -- N_Accept_Alternative
4925 -- Sloc points to ACCEPT
4926 -- Accept_Statement (Node2)
4927 -- Condition (Node1) from the guard (set to Empty if no guard present)
4928 -- Statements (List3) (set to Empty_List if no statements)
4929 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4930 -- Accept_Handler_Records (List5-Sem)
4932 ------------------------------
4933 -- 9.7.1 Delay Alternative --
4934 ------------------------------
4936 -- DELAY_ALTERNATIVE ::=
4937 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
4939 -- Gigi restriction: This node never appears
4941 -- N_Delay_Alternative
4942 -- Sloc points to DELAY
4943 -- Delay_Statement (Node2)
4944 -- Condition (Node1) from the guard (set to Empty if no guard present)
4945 -- Statements (List3) (set to Empty_List if no statements)
4946 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4948 ----------------------------------
4949 -- 9.7.1 Terminate Alternative --
4950 ----------------------------------
4952 -- TERMINATE_ALTERNATIVE ::= terminate;
4954 -- Gigi restriction: This node never appears
4956 -- N_Terminate_Alternative
4957 -- Sloc points to TERMINATE
4958 -- Condition (Node1) from the guard (set to Empty if no guard present)
4959 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4960 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
4962 -----------------------------
4963 -- 9.7.2 Timed Entry Call --
4964 -----------------------------
4966 -- TIMED_ENTRY_CALL ::=
4968 -- ENTRY_CALL_ALTERNATIVE
4970 -- DELAY_ALTERNATIVE
4973 -- Gigi restriction: This node never appears
4975 -- N_Timed_Entry_Call
4976 -- Sloc points to SELECT
4977 -- Entry_Call_Alternative (Node1)
4978 -- Delay_Alternative (Node4)
4980 -----------------------------------
4981 -- 9.7.2 Entry Call Alternative --
4982 -----------------------------------
4984 -- ENTRY_CALL_ALTERNATIVE ::=
4985 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
4987 -- PROCEDURE_OR_ENTRY_CALL ::=
4988 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
4990 -- Gigi restriction: This node never appears
4992 -- N_Entry_Call_Alternative
4993 -- Sloc points to first token of entry call statement
4994 -- Entry_Call_Statement (Node1)
4995 -- Statements (List3) (set to Empty_List if no statements)
4996 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4998 -----------------------------------
4999 -- 9.7.3 Conditional Entry Call --
5000 -----------------------------------
5002 -- CONDITIONAL_ENTRY_CALL ::=
5004 -- ENTRY_CALL_ALTERNATIVE
5006 -- SEQUENCE_OF_STATEMENTS
5009 -- Gigi restriction: This node never appears
5011 -- N_Conditional_Entry_Call
5012 -- Sloc points to SELECT
5013 -- Entry_Call_Alternative (Node1)
5014 -- Else_Statements (List4)
5016 --------------------------------
5017 -- 9.7.4 Asynchronous Select --
5018 --------------------------------
5020 -- ASYNCHRONOUS_SELECT ::=
5022 -- TRIGGERING_ALTERNATIVE
5027 -- Note: asynchronous select is not permitted in Ada 83 mode
5029 -- Gigi restriction: This node never appears
5031 -- N_Asynchronous_Select
5032 -- Sloc points to SELECT
5033 -- Triggering_Alternative (Node1)
5034 -- Abortable_Part (Node2)
5036 -----------------------------------
5037 -- 9.7.4 Triggering Alternative --
5038 -----------------------------------
5040 -- TRIGGERING_ALTERNATIVE ::=
5041 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5043 -- Gigi restriction: This node never appears
5045 -- N_Triggering_Alternative
5046 -- Sloc points to first token of triggering statement
5047 -- Triggering_Statement (Node1)
5048 -- Statements (List3) (set to Empty_List if no statements)
5049 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5051 ---------------------------------
5052 -- 9.7.4 Triggering Statement --
5053 ---------------------------------
5055 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5057 ---------------------------
5058 -- 9.7.4 Abortable Part --
5059 ---------------------------
5061 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5063 -- Gigi restriction: This node never appears
5066 -- Sloc points to ABORT
5067 -- Statements (List3)
5069 --------------------------
5070 -- 9.8 Abort Statement --
5071 --------------------------
5073 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5075 -- Gigi restriction: This node never appears
5077 -- N_Abort_Statement
5078 -- Sloc points to ABORT
5081 -------------------------
5082 -- 10.1.1 Compilation --
5083 -------------------------
5085 -- COMPILATION ::= {COMPILATION_UNIT}
5087 -- There is no explicit node in the tree for a compilation, since in
5088 -- general the compiler is processing only a single compilation unit
5089 -- at a time. It is possible to parse multiple units in syntax check
5090 -- only mode, but they the trees are discarded in any case.
5092 ------------------------------
5093 -- 10.1.1 Compilation Unit --
5094 ------------------------------
5096 -- COMPILATION_UNIT ::=
5097 -- CONTEXT_CLAUSE LIBRARY_ITEM
5098 -- | CONTEXT_CLAUSE SUBUNIT
5100 -- The N_Compilation_Unit node itself respresents the above syntax.
5101 -- However, there are two additional items not reflected in the above
5102 -- syntax. First we have the global declarations that are added by the
5103 -- code generator. These are outer level declarations (so they cannot
5104 -- be represented as being inside the units). An example is the wrapper
5105 -- subprograms that are created to do ABE checking. As always a list of
5106 -- declarations can contain actions as well (i.e. statements), and such
5107 -- statements are executed as part of the elaboration of the unit. Note
5108 -- that all such declarations are elaborated before the library unit.
5110 -- Similarly, certain actions need to be elaborated at the completion
5111 -- of elaboration of the library unit (notably the statement that sets
5112 -- the Boolean flag indicating that elaboration is complete).
5114 -- The third item not reflected in the syntax is pragmas that appear
5115 -- after the compilation unit. As always pragmas are a problem since
5116 -- they are not part of the formal syntax, but can be stuck into the
5117 -- source following a set of ad hoc rules, and we have to find an ad
5118 -- hoc way of sticking them into the tree. For pragmas that appear
5119 -- before the library unit, we just consider them to be part of the
5120 -- context clause, and pragmas can appear in the Context_Items list
5121 -- of the compilation unit. However, pragmas can also appear after
5122 -- the library item.
5124 -- To deal with all these problems, we create an auxiliary node for
5125 -- a compilation unit, referenced from the N_Compilation_Unit node
5126 -- that contains these three items.
5128 -- N_Compilation_Unit
5129 -- Sloc points to first token of defining unit name
5130 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5131 -- Context_Items (List1) context items and pragmas preceding unit
5132 -- Private_Present (Flag15) set if library unit has private keyword
5133 -- Unit (Node2) library item or subunit
5134 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5135 -- Has_No_Elaboration_Code (Flag17-Sem)
5136 -- Body_Required (Flag13-Sem) set for spec if body is required
5137 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5138 -- First_Inlined_Subprogram (Node3-Sem)
5140 -- N_Compilation_Unit_Aux
5141 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5142 -- Declarations (List2) (set to No_List if no global declarations)
5143 -- Actions (List1) (set to No_List if no actions)
5144 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5145 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5147 --------------------------
5148 -- 10.1.1 Library Item --
5149 --------------------------
5152 -- [private] LIBRARY_UNIT_DECLARATION
5153 -- | LIBRARY_UNIT_BODY
5154 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5156 -- Note: PRIVATE is not allowed in Ada 83 mode
5158 -- There is no explicit node in the tree for library item, instead
5159 -- the declaration or body, and the flag for private if present,
5160 -- appear in the N_Compilation_Unit clause.
5162 ----------------------------------------
5163 -- 10.1.1 Library Unit Declararation --
5164 ----------------------------------------
5166 -- LIBRARY_UNIT_DECLARATION ::=
5167 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5168 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5170 -------------------------------------------------
5171 -- 10.1.1 Library Unit Renaming Declararation --
5172 -------------------------------------------------
5174 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5175 -- PACKAGE_RENAMING_DECLARATION
5176 -- | GENERIC_RENAMING_DECLARATION
5177 -- | SUBPROGRAM_RENAMING_DECLARATION
5179 -------------------------------
5180 -- 10.1.1 Library unit body --
5181 -------------------------------
5183 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5185 ------------------------------
5186 -- 10.1.1 Parent Unit Name --
5187 ------------------------------
5189 -- PARENT_UNIT_NAME ::= NAME
5191 ----------------------------
5192 -- 10.1.2 Context clause --
5193 ----------------------------
5195 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5197 -- The context clause can include pragmas, and any pragmas that appear
5198 -- before the context clause proper (i.e. all configuration pragmas,
5199 -- also appear at the front of this list).
5201 --------------------------
5202 -- 10.1.2 Context_Item --
5203 --------------------------
5205 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5207 -------------------------
5208 -- 10.1.2 With clause --
5209 -------------------------
5212 -- with library_unit_NAME {,library_unit_NAME};
5214 -- A separate With clause is built for each name, so that we have
5215 -- a Corresponding_Spec field for each with'ed spec. The flags
5216 -- First_Name and Last_Name are used to reconstruct the exact
5217 -- source form. When a list of names appears in one with clause,
5218 -- the first name in the list has First_Name set, and the last
5219 -- has Last_Name set. If the with clause has only one name, then
5220 -- both of the flags First_Name and Last_Name are set in this name.
5222 -- Note: in the case of implicit with's that are installed by the
5223 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5224 -- set to Standard_Location, but it is incorrect to test the Sloc
5225 -- to find out if a with clause is implicit, test the flag instead.
5228 -- Sloc points to first token of library unit name
5230 -- Library_Unit (Node4-Sem)
5231 -- Corresponding_Spec (Node5-Sem)
5232 -- First_Name (Flag5) (set to True if first name or only one name)
5233 -- Last_Name (Flag6) (set to True if last name or only one name)
5234 -- Context_Installed (Flag13-Sem)
5235 -- Elaborate_Present (Flag4-Sem)
5236 -- Elaborate_All_Present (Flag14-Sem)
5237 -- Elaborate_All_Desirable (Flag9-Sem)
5238 -- Elaborate_Desirable (Flag11-Sem)
5239 -- Private_Present (Flag15) set if with_clause has private keyword
5240 -- Implicit_With (Flag16-Sem)
5241 -- Limited_Present (Flag17) set if LIMITED is present
5242 -- Limited_View_Installed (Flag18-Sem)
5243 -- Unreferenced_In_Spec (Flag7-Sem)
5244 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5246 -- Note: Limited_Present and Limited_View_Installed give support to
5247 -- Ada 2005 (AI-50217).
5248 -- Similarly, Private_Present gives support to AI-50262.
5250 ----------------------
5251 -- With_Type clause --
5252 ----------------------
5254 -- This is a GNAT extension, used to implement mutually recursive
5255 -- types declared in different packages.
5257 -- WITH_TYPE_CLAUSE ::=
5258 -- with type type_NAME is access | with type type_NAME is tagged
5260 -- N_With_Type_Clause
5261 -- Sloc points to first token of type name
5263 -- Tagged_Present (Flag15)
5265 ---------------------
5266 -- 10.2 Body stub --
5267 ---------------------
5270 -- SUBPROGRAM_BODY_STUB
5271 -- | PACKAGE_BODY_STUB
5273 -- | PROTECTED_BODY_STUB
5275 ----------------------------------
5276 -- 10.1.3 Subprogram Body Stub --
5277 ----------------------------------
5279 -- SUBPROGRAM_BODY_STUB ::=
5280 -- SUBPROGRAM_SPECIFICATION is separate;
5282 -- N_Subprogram_Body_Stub
5283 -- Sloc points to FUNCTION or PROCEDURE
5284 -- Specification (Node1)
5285 -- Library_Unit (Node4-Sem) points to the subunit
5286 -- Corresponding_Body (Node5-Sem)
5288 -------------------------------
5289 -- 10.1.3 Package Body Stub --
5290 -------------------------------
5292 -- PACKAGE_BODY_STUB ::=
5293 -- package body DEFINING_IDENTIFIER is separate;
5295 -- N_Package_Body_Stub
5296 -- Sloc points to PACKAGE
5297 -- Defining_Identifier (Node1)
5298 -- Library_Unit (Node4-Sem) points to the subunit
5299 -- Corresponding_Body (Node5-Sem)
5301 ----------------------------
5302 -- 10.1.3 Task Body Stub --
5303 ----------------------------
5305 -- TASK_BODY_STUB ::=
5306 -- task body DEFINING_IDENTIFIER is separate;
5309 -- Sloc points to TASK
5310 -- Defining_Identifier (Node1)
5311 -- Library_Unit (Node4-Sem) points to the subunit
5312 -- Corresponding_Body (Node5-Sem)
5314 ---------------------------------
5315 -- 10.1.3 Protected Body Stub --
5316 ---------------------------------
5318 -- PROTECTED_BODY_STUB ::=
5319 -- protected body DEFINING_IDENTIFIER is separate;
5321 -- Note: protected body stubs are not allowed in Ada 83 mode
5323 -- N_Protected_Body_Stub
5324 -- Sloc points to PROTECTED
5325 -- Defining_Identifier (Node1)
5326 -- Library_Unit (Node4-Sem) points to the subunit
5327 -- Corresponding_Body (Node5-Sem)
5329 ---------------------
5330 -- 10.1.3 Subunit --
5331 ---------------------
5333 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5336 -- Sloc points to SEPARATE
5337 -- Name (Node2) is the name of the parent unit
5338 -- Proper_Body (Node1) is the subunit body
5339 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5341 ---------------------------------
5342 -- 11.1 Exception Declaration --
5343 ---------------------------------
5345 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5347 -- For consistency with object declarations etc, the parser converts
5348 -- the case of multiple identifiers being declared to a series of
5349 -- declarations in which the expression is copied, using the More_Ids
5350 -- and Prev_Ids flags to remember the souce form as described in the
5351 -- section on "Handling of Defining Identifier Lists".
5353 -- N_Exception_Declaration
5354 -- Sloc points to EXCEPTION
5355 -- Defining_Identifier (Node1)
5356 -- Expression (Node3-Sem)
5357 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5358 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5360 ------------------------------------------
5361 -- 11.2 Handled Sequence Of Statements --
5362 ------------------------------------------
5364 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5365 -- SEQUENCE_OF_STATEMENTS
5367 -- EXCEPTION_HANDLER
5368 -- {EXCEPTION_HANDLER}]
5370 -- cleanup_procedure_call (param, param, param, ...);]
5372 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5373 -- used only internally currently, but is considered to be syntactic.
5374 -- At the moment, the only cleanup action allowed is a single call to
5375 -- a parameterless procedure, and the Identifier field of the node is
5376 -- the procedure to be called. Also there is a current restriction
5377 -- that exception handles and a cleanup cannot be present in the same
5378 -- frame, so at least one of Exception_Handlers or the Identifier must
5381 -- Actually, more accurately, this restriction applies to the original
5382 -- source program. In the expanded tree, if the At_End_Proc field is
5383 -- present, then there will also be an exception handler of the form:
5385 -- when all others =>
5389 -- where cleanup is the procedure to be generated. The reason we do
5390 -- this is so that the front end can handle the necessary entries in
5391 -- the exception tables, and other exception handler actions required
5392 -- as part of the normal handling for exception handlers.
5394 -- The AT END cleanup handler protects only the sequence of statements
5395 -- (not the associated declarations of the parent), just like exception
5396 -- handlers. The big difference is that the cleanup procedure is called
5397 -- on either a normal or an abnormal exit from the statement sequence.
5399 -- Note: the list of Exception_Handlers can contain pragmas as well
5400 -- as actual handlers. In practice these pragmas can only occur at
5401 -- the start of the list, since any pragmas occurring later on will
5402 -- be included in the statement list of the corresponding handler.
5404 -- Note: although in the Ada syntax, the sequence of statements in
5405 -- a handled sequence of statements can only contain statements, we
5406 -- allow free mixing of declarations and statements in the resulting
5407 -- expanded tree. This is for example used to deal with the case of
5408 -- a cleanup procedure that must handle declarations as well as the
5409 -- statements of a block.
5411 -- N_Handled_Sequence_Of_Statements
5412 -- Sloc points to first token of first statement
5413 -- Statements (List3)
5414 -- End_Label (Node4) (set to Empty if expander generated)
5415 -- Exception_Handlers (List5) (set to No_List if none present)
5416 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5417 -- First_Real_Statement (Node2-Sem)
5418 -- Zero_Cost_Handling (Flag5-Sem)
5420 -- Note: the parent always contains a Declarations field which contains
5421 -- declarations associated with the handled sequence of statements. This
5422 -- is true even in the case of an accept statement (see description of
5423 -- the N_Accept_Statement node).
5425 -- End_Label refers to the containing construct
5427 -----------------------------
5428 -- 11.2 Exception Handler --
5429 -----------------------------
5431 -- EXCEPTION_HANDLER ::=
5432 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5433 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5434 -- SEQUENCE_OF_STATEMENTS
5436 -- Note: choice parameter specification is not allowed in Ada 83 mode
5438 -- N_Exception_Handler
5439 -- Sloc points to WHEN
5440 -- Choice_Parameter (Node2) (set to Empty if not present)
5441 -- Exception_Choices (List4)
5442 -- Statements (List3)
5443 -- Zero_Cost_Handling (Flag5-Sem)
5445 ------------------------------------------
5446 -- 11.2 Choice parameter specification --
5447 ------------------------------------------
5449 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5451 ----------------------------
5452 -- 11.2 Exception Choice --
5453 ----------------------------
5455 -- EXCEPTION_CHOICE ::= exception_NAME | others
5457 -- Except in the case of OTHERS, no explicit node appears in the tree
5458 -- for exception choice. Instead the exception name appears directly.
5459 -- An OTHERS choice is represented by a N_Others_Choice node (see
5462 -- Note: for the exception choice created for an at end handler, the
5463 -- exception choice is an N_Others_Choice node with All_Others set.
5465 ---------------------------
5466 -- 11.3 Raise Statement --
5467 ---------------------------
5469 -- RAISE_STATEMENT ::= raise [exception_NAME];
5471 -- In Ada 2005, we have
5473 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5475 -- N_Raise_Statement
5476 -- Sloc points to RAISE
5477 -- Name (Node2) (set to Empty if no exception name present)
5478 -- Expression (Node3) (set to Empty if no expression present)
5480 -------------------------------
5481 -- 12.1 Generic Declaration --
5482 -------------------------------
5484 -- GENERIC_DECLARATION ::=
5485 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5487 ------------------------------------------
5488 -- 12.1 Generic Subprogram Declaration --
5489 ------------------------------------------
5491 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5492 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5494 -- Note: Generic_Formal_Declarations can include pragmas
5496 -- N_Generic_Subprogram_Declaration
5497 -- Sloc points to GENERIC
5498 -- Specification (Node1) subprogram specification
5499 -- Corresponding_Body (Node5-Sem)
5500 -- Generic_Formal_Declarations (List2) from generic formal part
5501 -- Parent_Spec (Node4-Sem)
5503 ---------------------------------------
5504 -- 12.1 Generic Package Declaration --
5505 ---------------------------------------
5507 -- GENERIC_PACKAGE_DECLARATION ::=
5508 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5510 -- Note: when we do generics right, the Activation_Chain_Entity entry
5511 -- for this node can be removed (since the expander won't see generic
5512 -- units any more)???.
5514 -- Note: Generic_Formal_Declarations can include pragmas
5516 -- N_Generic_Package_Declaration
5517 -- Sloc points to GENERIC
5518 -- Specification (Node1) package specification
5519 -- Corresponding_Body (Node5-Sem)
5520 -- Generic_Formal_Declarations (List2) from generic formal part
5521 -- Parent_Spec (Node4-Sem)
5522 -- Activation_Chain_Entity (Node3-Sem)
5524 -------------------------------
5525 -- 12.1 Generic Formal Part --
5526 -------------------------------
5528 -- GENERIC_FORMAL_PART ::=
5529 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5531 ------------------------------------------------
5532 -- 12.1 Generic Formal Parameter Declaration --
5533 ------------------------------------------------
5535 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5536 -- FORMAL_OBJECT_DECLARATION
5537 -- | FORMAL_TYPE_DECLARATION
5538 -- | FORMAL_SUBPROGRAM_DECLARATION
5539 -- | FORMAL_PACKAGE_DECLARATION
5541 ---------------------------------
5542 -- 12.3 Generic Instantiation --
5543 ---------------------------------
5545 -- GENERIC_INSTANTIATION ::=
5546 -- package DEFINING_PROGRAM_UNIT_NAME is
5547 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5548 -- | [[not] overriding]
5549 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5550 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5551 -- | [[not] overriding]
5552 -- function DEFINING_DESIGNATOR is
5553 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5555 -- N_Package_Instantiation
5556 -- Sloc points to PACKAGE
5557 -- Defining_Unit_Name (Node1)
5559 -- Generic_Associations (List3) (set to No_List if no
5560 -- generic actual part)
5561 -- Parent_Spec (Node4-Sem)
5562 -- Instance_Spec (Node5-Sem)
5563 -- ABE_Is_Certain (Flag18-Sem)
5565 -- N_Procedure_Instantiation
5566 -- Sloc points to PROCEDURE
5567 -- Defining_Unit_Name (Node1)
5569 -- Parent_Spec (Node4-Sem)
5570 -- Generic_Associations (List3) (set to No_List if no
5571 -- generic actual part)
5572 -- Instance_Spec (Node5-Sem)
5573 -- Must_Override (Flag14) set if overriding indicator present
5574 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5575 -- ABE_Is_Certain (Flag18-Sem)
5577 -- N_Function_Instantiation
5578 -- Sloc points to FUNCTION
5579 -- Defining_Unit_Name (Node1)
5581 -- Generic_Associations (List3) (set to No_List if no
5582 -- generic actual part)
5583 -- Parent_Spec (Node4-Sem)
5584 -- Instance_Spec (Node5-Sem)
5585 -- Must_Override (Flag14) set if overriding indicator present
5586 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5587 -- ABE_Is_Certain (Flag18-Sem)
5589 -- Note: overriding indicator is an Ada 2005 feature
5591 ------------------------------
5592 -- 12.3 Generic Actual Part --
5593 ------------------------------
5595 -- GENERIC_ACTUAL_PART ::=
5596 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5598 -------------------------------
5599 -- 12.3 Generic Association --
5600 -------------------------------
5602 -- GENERIC_ASSOCIATION ::=
5603 -- [generic_formal_parameter_SELECTOR_NAME =>]
5604 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER
5606 -- Note: unlike the procedure call case, a generic association node
5607 -- is generated for every association, even if no formal is present.
5608 -- In this case the parser will leave the Selector_Name field set
5609 -- to Empty, to be filled in later by the semantic pass.
5611 -- N_Generic_Association
5612 -- Sloc points to first token of generic association
5613 -- Selector_Name (Node2) (set to Empty if no formal
5614 -- parameter selector name)
5615 -- Explicit_Generic_Actual_Parameter (Node1)
5617 ---------------------------------------------
5618 -- 12.3 Explicit Generic Actual Parameter --
5619 ---------------------------------------------
5621 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5622 -- EXPRESSION | variable_NAME | subprogram_NAME
5623 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5625 -------------------------------------
5626 -- 12.4 Formal Object Declaration --
5627 -------------------------------------
5629 -- FORMAL_OBJECT_DECLARATION ::=
5630 -- DEFINING_IDENTIFIER_LIST :
5631 -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5633 -- Although the syntax allows multiple identifiers in the list, the
5634 -- semantics is as though successive declarations were given with
5635 -- identical type definition and expression components. To simplify
5636 -- semantic processing, the parser represents a multiple declaration
5637 -- case as a sequence of single declarations, using the More_Ids and
5638 -- Prev_Ids flags to preserve the original source form as described
5639 -- in the section on "Handling of Defining Identifier Lists".
5641 -- N_Formal_Object_Declaration
5642 -- Sloc points to first identifier
5643 -- Defining_Identifier (Node1)
5644 -- In_Present (Flag15)
5645 -- Out_Present (Flag17)
5646 -- Subtype_Mark (Node4)
5647 -- Expression (Node3) (set to Empty if no default expression)
5648 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5649 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5651 -----------------------------------
5652 -- 12.5 Formal Type Declaration --
5653 -----------------------------------
5655 -- FORMAL_TYPE_DECLARATION ::=
5656 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5657 -- is FORMAL_TYPE_DEFINITION;
5659 -- N_Formal_Type_Declaration
5660 -- Sloc points to TYPE
5661 -- Defining_Identifier (Node1)
5662 -- Formal_Type_Definition (Node3)
5663 -- Discriminant_Specifications (List4) (set to No_List if no
5664 -- discriminant part)
5665 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5667 ----------------------------------
5668 -- 12.5 Formal type definition --
5669 ----------------------------------
5671 -- FORMAL_TYPE_DEFINITION ::=
5672 -- FORMAL_PRIVATE_TYPE_DEFINITION
5673 -- | FORMAL_DERIVED_TYPE_DEFINITION
5674 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5675 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5676 -- | FORMAL_MODULAR_TYPE_DEFINITION
5677 -- | FORMAL_FLOATING_POINT_DEFINITION
5678 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5679 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5680 -- | FORMAL_ARRAY_TYPE_DEFINITION
5681 -- | FORMAL_ACCESS_TYPE_DEFINITION
5682 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5684 ---------------------------------------------
5685 -- 12.5.1 Formal Private Type Definition --
5686 ---------------------------------------------
5688 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5689 -- [[abstract] tagged] [limited] private
5691 -- Note: TAGGED is not allowed in Ada 83 mode
5693 -- N_Formal_Private_Type_Definition
5694 -- Sloc points to PRIVATE
5695 -- Abstract_Present (Flag4)
5696 -- Tagged_Present (Flag15)
5697 -- Limited_Present (Flag17)
5699 --------------------------------------------
5700 -- 12.5.1 Formal Derived Type Definition --
5701 --------------------------------------------
5703 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5704 -- [abstract] new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5705 -- Note: this construct is not allowed in Ada 83 mode
5707 -- N_Formal_Derived_Type_Definition
5708 -- Sloc points to NEW
5709 -- Subtype_Mark (Node4)
5710 -- Private_Present (Flag15)
5711 -- Abstract_Present (Flag4)
5712 -- Interface_List (List2) (set to No_List if none)
5714 ---------------------------------------------
5715 -- 12.5.2 Formal Discrete Type Definition --
5716 ---------------------------------------------
5718 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5720 -- N_Formal_Discrete_Type_Definition
5723 ---------------------------------------------------
5724 -- 12.5.2 Formal Signed Integer Type Definition --
5725 ---------------------------------------------------
5727 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5729 -- N_Formal_Signed_Integer_Type_Definition
5730 -- Sloc points to RANGE
5732 --------------------------------------------
5733 -- 12.5.2 Formal Modular Type Definition --
5734 --------------------------------------------
5736 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5738 -- N_Formal_Modular_Type_Definition
5739 -- Sloc points to MOD
5741 ----------------------------------------------
5742 -- 12.5.2 Formal Floating Point Definition --
5743 ----------------------------------------------
5745 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5747 -- N_Formal_Floating_Point_Definition
5748 -- Sloc points to DIGITS
5750 ----------------------------------------------------
5751 -- 12.5.2 Formal Ordinary Fixed Point Definition --
5752 ----------------------------------------------------
5754 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
5756 -- N_Formal_Ordinary_Fixed_Point_Definition
5757 -- Sloc points to DELTA
5759 ---------------------------------------------------
5760 -- 12.5.2 Formal Decimal Fixed Point Definition --
5761 ---------------------------------------------------
5763 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
5765 -- Note: formal decimal fixed point definition not allowed in Ada 83
5767 -- N_Formal_Decimal_Fixed_Point_Definition
5768 -- Sloc points to DELTA
5770 ------------------------------------------
5771 -- 12.5.3 Formal Array Type Definition --
5772 ------------------------------------------
5774 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
5776 -------------------------------------------
5777 -- 12.5.4 Formal Access Type Definition --
5778 -------------------------------------------
5780 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
5782 ----------------------------------------------
5783 -- 12.5.5 Formal Interface Type Definition --
5784 ----------------------------------------------
5786 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
5788 -----------------------------------------
5789 -- 12.6 Formal Subprogram Declaration --
5790 -----------------------------------------
5792 -- FORMAL_SUBPROGRAM_DECLARATION ::=
5793 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
5794 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
5796 --------------------------------------------------
5797 -- 12.6 Formal Concrete Subprogram Declaration --
5798 --------------------------------------------------
5800 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
5801 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
5803 -- N_Formal_Concrete_Subprogram_Declaration
5804 -- Sloc points to WITH
5805 -- Specification (Node1)
5806 -- Default_Name (Node2) (set to Empty if no subprogram default)
5807 -- Box_Present (Flag15)
5809 -- Note: if no subprogram default is present, then Name is set
5810 -- to Empty, and Box_Present is False.
5812 --------------------------------------------------
5813 -- 12.6 Formal Abstract Subprogram Declaration --
5814 --------------------------------------------------
5816 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
5817 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
5819 -- N_Formal_Abstract_Subprogram_Declaration
5820 -- Sloc points to WITH
5821 -- Specification (Node1)
5822 -- Default_Name (Node2) (set to Empty if no subprogram default)
5823 -- Box_Present (Flag15)
5825 -- Note: if no subprogram default is present, then Name is set
5826 -- to Empty, and Box_Present is False.
5828 ------------------------------
5829 -- 12.6 Subprogram Default --
5830 ------------------------------
5832 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
5834 -- There is no separate node in the tree for a subprogram default.
5835 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
5836 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
5837 -- default name or box indication, as needed.
5839 ------------------------
5840 -- 12.6 Default Name --
5841 ------------------------
5843 -- DEFAULT_NAME ::= NAME
5845 --------------------------------------
5846 -- 12.7 Formal Package Declaration --
5847 --------------------------------------
5849 -- FORMAL_PACKAGE_DECLARATION ::=
5850 -- with package DEFINING_IDENTIFIER
5851 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
5853 -- Note: formal package declarations not allowed in Ada 83 mode
5855 -- N_Formal_Package_Declaration
5856 -- Sloc points to WITH
5857 -- Defining_Identifier (Node1)
5859 -- Generic_Associations (List3) (set to No_List if (<>) case or
5860 -- empty generic actual part)
5861 -- Box_Present (Flag15)
5862 -- Instance_Spec (Node5-Sem)
5863 -- ABE_Is_Certain (Flag18-Sem)
5865 --------------------------------------
5866 -- 12.7 Formal Package Actual Part --
5867 --------------------------------------
5869 -- FORMAL_PACKAGE_ACTUAL_PART ::=
5870 -- (<>) | [GENERIC_ACTUAL_PART]
5872 -- There is no explicit node in the tree for a formal package
5873 -- actual part. Instead the information appears in the parent node
5874 -- (i.e. the formal package declaration node itself).
5876 ---------------------------------
5877 -- 13.1 Representation clause --
5878 ---------------------------------
5880 -- REPRESENTATION_CLAUSE ::=
5881 -- ATTRIBUTE_DEFINITION_CLAUSE
5882 -- | ENUMERATION_REPRESENTATION_CLAUSE
5883 -- | RECORD_REPRESENTATION_CLAUSE
5886 ----------------------
5887 -- 13.1 Local Name --
5888 ----------------------
5892 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
5893 -- | library_unit_NAME
5895 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
5896 -- as an attribute reference, which has essentially the same form.
5898 ---------------------------------------
5899 -- 13.3 Attribute definition clause --
5900 ---------------------------------------
5902 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
5903 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
5904 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
5906 -- In Ada 83, the expression must be a simple expression and the
5907 -- local name must be a direct name.
5909 -- Note: the only attribute definition clause that is processed by
5910 -- gigi is an address clause. For all other cases, the information
5911 -- is extracted by the front end and either results in setting entity
5912 -- information, e.g. Esize for the Size clause, or in appropriate
5913 -- expansion actions (e.g. in the case of Storage_Size).
5915 -- For an address clause, Gigi constructs the appropriate addressing
5916 -- code. It also ensures that no aliasing optimizations are made
5917 -- for the object for which the address clause appears.
5919 -- Note: for an address clause used to achieve an overlay:
5923 -- for B'Address use A'Address;
5925 -- the above rule means that Gigi will ensure that no optimizations
5926 -- will be made for B that would violate the implementation advice
5927 -- of RM 13.3(19). However, this advice applies only to B and not
5928 -- to A, which seems unfortunate. The GNAT front end will mark the
5929 -- object A as volatile to also prevent unwanted optimization
5930 -- assumptions based on no aliasing being made for B.
5932 -- N_Attribute_Definition_Clause
5933 -- Sloc points to FOR
5934 -- Name (Node2) the local name
5935 -- Chars (Name1) the identifier name from the attribute designator
5936 -- Expression (Node3) the expression or name
5937 -- Next_Rep_Item (Node4-Sem)
5938 -- From_At_Mod (Flag4-Sem)
5939 -- Check_Address_Alignment (Flag11-Sem)
5941 ---------------------------------------------
5942 -- 13.4 Enumeration representation clause --
5943 ---------------------------------------------
5945 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
5946 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
5948 -- In Ada 83, the name must be a direct name
5950 -- N_Enumeration_Representation_Clause
5951 -- Sloc points to FOR
5952 -- Identifier (Node1) direct name
5953 -- Array_Aggregate (Node3)
5954 -- Next_Rep_Item (Node4-Sem)
5956 ---------------------------------
5957 -- 13.4 Enumeration aggregate --
5958 ---------------------------------
5960 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
5962 ------------------------------------------
5963 -- 13.5.1 Record representation clause --
5964 ------------------------------------------
5966 -- RECORD_REPRESENTATION_CLAUSE ::=
5967 -- for first_subtype_LOCAL_NAME use
5968 -- record [MOD_CLAUSE]
5969 -- {COMPONENT_CLAUSE}
5972 -- Gigi restriction: Mod_Clause is always Empty (if present it is
5973 -- replaced by a corresponding Alignment attribute definition clause).
5975 -- Note: Component_Clauses can include pragmas
5977 -- N_Record_Representation_Clause
5978 -- Sloc points to FOR
5979 -- Identifier (Node1) direct name
5980 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
5981 -- Component_Clauses (List3)
5982 -- Next_Rep_Item (Node4-Sem)
5984 ------------------------------
5985 -- 13.5.1 Component clause --
5986 ------------------------------
5988 -- COMPONENT_CLAUSE ::=
5989 -- component_LOCAL_NAME at POSITION
5990 -- range FIRST_BIT .. LAST_BIT;
5992 -- N_Component_Clause
5993 -- Sloc points to AT
5994 -- Component_Name (Node1) points to Name or Attribute_Reference
5996 -- First_Bit (Node3)
5999 ----------------------
6000 -- 13.5.1 Position --
6001 ----------------------
6003 -- POSITION ::= static_EXPRESSION
6005 -----------------------
6006 -- 13.5.1 First_Bit --
6007 -----------------------
6009 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6011 ----------------------
6012 -- 13.5.1 Last_Bit --
6013 ----------------------
6015 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6017 --------------------------
6018 -- 13.8 Code statement --
6019 --------------------------
6021 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6023 -- Note: in GNAT, the qualified expression has the form
6025 -- Asm_Insn'(Asm (...));
6029 -- Asm_Insn'(Asm_Volatile (...))
6031 -- See package System.Machine_Code in file s-maccod.ads for details
6032 -- on the allowed parameters to Asm[_Volatile]. There are two ways
6033 -- this node can arise, as a code statement, in which case the
6034 -- expression is the qualified expression, or as a result of the
6035 -- expansion of an intrinsic call to the Asm or Asm_Input procedure.
6038 -- Sloc points to first token of the expression
6039 -- Expression (Node3)
6041 -- Note: package Exp_Code contains an abstract functional interface
6042 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6044 ------------------------
6045 -- 13.12 Restriction --
6046 ------------------------
6049 -- restriction_IDENTIFIER
6050 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6052 -- There is no explicit node for restrictions. Instead the restriction
6053 -- appears in normal pragma syntax as a pragma argument association,
6054 -- which has the same syntactic form.
6056 --------------------------
6057 -- B.2 Shift Operators --
6058 --------------------------
6060 -- Calls to the intrinsic shift functions are converted to one of
6061 -- the following shift nodes, which have the form of normal binary
6062 -- operator names. Note that for a given shift operation, one node
6063 -- covers all possible types, as for normal operators.
6065 -- Note: it is perfectly permissible for the expander to generate
6066 -- shift operation nodes directly, in which case they will be analyzed
6067 -- and parsed in the usual manner.
6069 -- Sprint syntax: shift-function-name!(expr, count)
6071 -- Note: the Left_Opnd field holds the first argument (the value to
6072 -- be shifted). The Right_Opnd field holds the second argument (the
6073 -- shift count). The Chars field is the name of the intrinsic function.
6076 -- Sloc points to the function name
6077 -- plus fields for binary operator
6078 -- plus fields for expression
6079 -- Shift_Count_OK (Flag4-Sem)
6081 -- N_Op_Rotate_Right
6082 -- Sloc points to the function name
6083 -- plus fields for binary operator
6084 -- plus fields for expression
6085 -- Shift_Count_OK (Flag4-Sem)
6088 -- Sloc points to the function name
6089 -- plus fields for binary operator
6090 -- plus fields for expression
6091 -- Shift_Count_OK (Flag4-Sem)
6093 -- N_Op_Shift_Right_Arithmetic
6094 -- Sloc points to the function name
6095 -- plus fields for binary operator
6096 -- plus fields for expression
6097 -- Shift_Count_OK (Flag4-Sem)
6100 -- Sloc points to the function name
6101 -- plus fields for binary operator
6102 -- plus fields for expression
6103 -- Shift_Count_OK (Flag4-Sem)
6105 --------------------------
6106 -- Obsolescent Features --
6107 --------------------------
6109 -- The syntax descriptions and tree nodes for obsolescent features are
6110 -- grouped together, corresponding to their location in appendix I in
6111 -- the RM. However, parsing and semantic analysis for these constructs
6112 -- is located in an appropriate chapter (see individual notes).
6114 ---------------------------
6115 -- J.3 Delta Constraint --
6116 ---------------------------
6118 -- Note: the parse routine for this construct is located in section
6119 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6120 -- where delta constraint logically belongs.
6122 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6124 -- N_Delta_Constraint
6125 -- Sloc points to DELTA
6126 -- Delta_Expression (Node3)
6127 -- Range_Constraint (Node4) (set to Empty if not present)
6129 --------------------
6131 --------------------
6133 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6135 -- Note: the parse routine for this construct is located in Par-Ch13,
6136 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6137 -- belongs if it were not obsolescent.
6139 -- Note: in Ada 83 the expression must be a simple expression
6141 -- Gigi restriction: This node never appears, it is rewritten as an
6142 -- address attribute definition clause.
6145 -- Sloc points to FOR
6146 -- Identifier (Node1)
6147 -- Expression (Node3)
6149 ---------------------
6150 -- J.8 Mod clause --
6151 ---------------------
6153 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6155 -- Note: the parse routine for this construct is located in Par-Ch13,
6156 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6157 -- belongs if it were not obsolescent.
6159 -- Note: in Ada 83, the expression must be a simple expression
6161 -- Gigi restriction: this node never appears. It is replaced
6162 -- by a corresponding Alignment attribute definition clause.
6164 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6165 -- its name has "clause" in it. This is rather strange, but is quite
6166 -- definitely specified. The pragmas before are collected in the
6167 -- Pragmas_Before field of the mod clause node itself, and pragmas
6168 -- after are simply swallowed up in the list of component clauses.
6171 -- Sloc points to AT
6172 -- Expression (Node3)
6173 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6175 --------------------
6176 -- Semantic Nodes --
6177 --------------------
6179 -- These semantic nodes are used to hold additional semantic information.
6180 -- They are inserted into the tree as a result of semantic processing.
6181 -- Although there are no legitimate source syntax constructions that
6182 -- correspond directly to these nodes, we need a source syntax for the
6183 -- reconstructed tree printed by Sprint, and the node descriptions here
6184 -- show this syntax.
6186 ----------------------------
6187 -- Conditional Expression --
6188 ----------------------------
6190 -- This node is used to represent an expression corresponding to the
6191 -- C construct (condition ? then-expression : else_expression), where
6192 -- Expressions is a three element list, whose first expression is the
6193 -- condition, and whose second and third expressions are the then and
6194 -- else expressions respectively.
6196 -- Note: the Then_Actions and Else_Actions fields are always set to
6197 -- No_List in the tree passed to Gigi. These fields are used only
6198 -- for temporary processing purposes in the expander.
6200 -- Sprint syntax: (if expr then expr else expr)
6202 -- N_Conditional_Expression
6203 -- Sloc points to related node
6204 -- Expressions (List1)
6205 -- Then_Actions (List2-Sem)
6206 -- Else_Actions (List3-Sem)
6207 -- plus fields for expression
6209 -- Note: in the case where a debug source file is generated, the Sloc
6210 -- for this node points to the IF keyword in the Sprint file output.
6216 -- The N_Expanded_Name node is used to represent a selected component
6217 -- name that has been resolved to an expanded name. The semantic phase
6218 -- replaces N_Selected_Component nodes that represent names by the use
6219 -- of this node, leaving the N_Selected_Component node used only when
6220 -- the prefix is a record or protected type.
6222 -- The fields of the N_Expanded_Name node are layed out identically
6223 -- to those of the N_Selected_Component node, allowing conversion of
6224 -- an expanded name node to a selected component node to be done
6225 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6227 -- There is no special sprint syntax for an expanded name
6230 -- Sloc points to the period
6231 -- Chars (Name1) copy of Chars field of selector name
6233 -- Selector_Name (Node2)
6234 -- Entity (Node4-Sem)
6235 -- Associated_Node (Node4-Sem)
6236 -- Redundant_Use (Flag13-Sem)
6237 -- Has_Private_View (Flag11-Sem) set in generic units.
6238 -- plus fields for expression
6240 --------------------
6241 -- Free Statement --
6242 --------------------
6244 -- The N_Free_Statement node is generated as a result of a call to an
6245 -- instantiation of Unchecked_Deallocation. The instantiation of this
6246 -- generic is handled specially and generates this node directly.
6248 -- Sprint syntax: free expression
6251 -- Sloc is copied from the unchecked deallocation call
6252 -- Expression (Node3) argument to unchecked deallocation call
6253 -- Storage_Pool (Node1-Sem)
6254 -- Procedure_To_Call (Node4-Sem)
6255 -- Actual_Designated_Subtype (Node2-Sem)
6257 -- Note: in the case where a debug source file is generated, the Sloc
6258 -- for this node points to the FREE keyword in the Sprint file output.
6264 -- This node marks the point in a declarative part at which an entity
6265 -- declared therein becomes frozen. The expander places initialization
6266 -- procedures for types at those points. Gigi uses the freezing point
6267 -- to elaborate entities that may depend on previous private types.
6269 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6270 -- a full description of the use of this node.
6272 -- The Entity field points back to the entity for the type (whose
6273 -- Freeze_Node field points back to this freeze node).
6275 -- The Actions field contains a list of declarations and statements
6276 -- generated by the expander which are associated with the freeze
6277 -- node, and are elaborated as though the freeze node were replaced
6278 -- by this sequence of actions.
6280 -- Note: the Sloc field in the freeze node references a construct
6281 -- associated with the freezing point. This is used for posting
6282 -- messages in some error/warning situations, e.g. the case where
6283 -- a primitive operation of a tagged type is declared too late.
6285 -- Sprint syntax: freeze entity-name [
6290 -- Sloc points near freeze point (see above special note)
6291 -- Entity (Node4-Sem)
6292 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6293 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6294 -- Actions (List1) (set to No_List if no freeze actions)
6295 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6297 -- The Actions field holds actions associated with the freeze. These
6298 -- actions are elaborated at the point where the type is frozen.
6300 -- Note: in the case where a debug source file is generated, the Sloc
6301 -- for this node points to the FREEZE keyword in the Sprint file output.
6303 --------------------------------
6304 -- Implicit Label Declaration --
6305 --------------------------------
6307 -- An implicit label declaration is created for every occurrence of a
6308 -- label on a statement or a label on a block or loop. It is chained
6309 -- in the declarations of the innermost enclosing block as specified
6310 -- in RM section 5.1 (3).
6312 -- The Defining_Identifier is the actual identifier for the
6313 -- statement identifier. Note that the occurrence of the label
6314 -- is a reference, NOT the defining occurrence. The defining
6315 -- occurrence occurs at the head of the innermost enclosing
6316 -- block, and is represented by this node.
6318 -- Note: from the grammar, this might better be called an implicit
6319 -- statement identifier declaration, but the term we choose seems
6320 -- friendlier, since at least informally statement identifiers are
6321 -- called labels in both cases (i.e. when used in labels, and when
6322 -- used as the identifiers of blocks and loops).
6324 -- Note: although this is logically a semantic node, since it does
6325 -- not correspond directly to a source syntax construction, these
6326 -- nodes are actually created by the parser in a post pass done just
6327 -- after parsing is complete, before semantic analysis is started (see
6328 -- the Par.Labl subunit in file par-labl.adb).
6330 -- Sprint syntax: labelname : label;
6332 -- N_Implicit_Label_Declaration
6333 -- Sloc points to the << of the label
6334 -- Defining_Identifier (Node1)
6335 -- Label_Construct (Node2-Sem)
6337 -- Note: in the case where a debug source file is generated, the Sloc
6338 -- for this node points to the label name in the generated declaration.
6340 ---------------------
6341 -- Itype_Reference --
6342 ---------------------
6344 -- This node is used to create a reference to an Itype. The only
6345 -- purpose is to make sure that the Itype is defined if this is the
6348 -- A typical use of this node is when an Itype is to be referenced in
6349 -- two branches of an if statement. In this case it is important that
6350 -- the first use of the Itype not be inside the conditional, since
6351 -- then it might not be defined if the wrong branch of the if is
6352 -- taken in the case where the definition generates elaboration code.
6354 -- The Itype field points to the referenced Itype
6356 -- sprint syntax: reference itype-name
6358 -- N_Itype_Reference
6359 -- Sloc points to the node generating the reference
6360 -- Itype (Node1-Sem)
6362 -- Note: in the case where a debug source file is generated, the Sloc
6363 -- for this node points to the REFERENCE keyword in the file output.
6365 ---------------------
6366 -- Raise_xxx_Error --
6367 ---------------------
6369 -- One of these nodes is created during semantic analysis to replace
6370 -- a node for an expression that is determined to definitely raise
6371 -- the corresponding exception.
6373 -- The N_Raise_xxx_Error node may also stand alone in place
6374 -- of a declaration or statement, in which case it simply causes
6375 -- the exception to be raised (i.e. it is equivalent to a raise
6376 -- statement that raises the corresponding exception). This use
6377 -- is distinguished by the fact that the Etype in this case is
6378 -- Standard_Void_Type, In the subexprssion case, the Etype is the
6379 -- same as the type of the subexpression which it replaces.
6381 -- If Condition is empty, then the raise is unconditional. If the
6382 -- Condition field is non-empty, it is a boolean expression which
6383 -- is first evaluated, and the exception is raised only if the
6384 -- value of the expression is True. In the unconditional case, the
6385 -- creation of this node is usually accompanied by a warning message
6386 -- error. The creation of this node will usually be accompanied by a
6387 -- message (unless it appears within the right operand of a short
6388 -- circuit form whose left argument is static and decisively
6389 -- eliminates elaboration of the raise operation.
6391 -- The exception is generated with a message that contains the
6392 -- file name and line number, and then appended text. The Reason
6393 -- code shows the text to be added. The Reason code is an element
6394 -- of the type Types.RT_Exception_Code, and indicates both the
6395 -- message to be added, and the exception to be raised (which must
6396 -- match the node type). The value is stored by storing a Uint which
6397 -- is the Pos value of the enumeration element in this type.
6399 -- Gigi restriction: This expander ensures that the type of the
6400 -- Condition field is always Standard.Boolean, even if the type
6401 -- in the source is some non-standard boolean type.
6403 -- Sprint syntax: [xxx_error "msg"]
6404 -- or: [xxx_error when condition "msg"]
6406 -- N_Raise_Constraint_Error
6407 -- Sloc references related construct
6408 -- Condition (Node1) (set to Empty if no condition)
6410 -- plus fields for expression
6412 -- N_Raise_Program_Error
6413 -- Sloc references related construct
6414 -- Condition (Node1) (set to Empty if no condition)
6416 -- plus fields for expression
6418 -- N_Raise_Storage_Error
6419 -- Sloc references related construct
6420 -- Condition (Node1) (set to Empty if no condition)
6422 -- plus fields for expression
6424 -- Note: Sloc is copied from the expression generating the exception.
6425 -- In the case where a debug source file is generated, the Sloc for
6426 -- this node points to the left bracket in the Sprint file output.
6432 -- For a number of purposes, we need to construct references to objects.
6433 -- These references are subsequently treated as normal access values.
6434 -- An example is the construction of the parameter block passed to a
6435 -- task entry. The N_Reference node is provided for this purpose. It is
6436 -- similar in effect to the use of the Unrestricted_Access attribute,
6437 -- and like Unrestricted_Access can be applied to objects which would
6438 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6439 -- objects which are not aliased, and slices). In addition it can be
6440 -- applied to composite type values as well as objects, including string
6441 -- values and aggregates.
6443 -- Note: we use the Prefix field for this expression so that the
6444 -- resulting node can be treated using common code with the attribute
6445 -- nodes for the 'Access and related attributes. Logically it would make
6446 -- more sense to call it an Expression field, but then we would have to
6447 -- special case the treatment of the N_Reference node.
6449 -- Sprint syntax: prefix'reference
6452 -- Sloc is copied from the expression
6454 -- plus fields for expression
6456 -- Note: in the case where a debug source file is generated, the Sloc
6457 -- for this node points to the quote in the Sprint file output.
6459 ---------------------
6460 -- Subprogram_Info --
6461 ---------------------
6463 -- This node generates the appropriate Subprogram_Info value for a
6464 -- given procedure. See Ada.Exceptions for further details
6466 -- Sprint syntax: subprog'subprogram_info
6468 -- N_Subprogram_Info
6469 -- Sloc points to the entity for the procedure
6470 -- Identifier (Node1) identifier referencing the procedure
6471 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6473 -- Note: in the case where a debug source file is generated, the Sloc
6474 -- for this node points to the quote in the Sprint file output.
6476 --------------------------
6477 -- Unchecked Expression --
6478 --------------------------
6480 -- An unchecked expression is one that must be analyzed and resolved
6481 -- with all checks off, regardless of the current setting of scope
6484 -- Sprint syntax: `(expression)
6486 -- Note: this node is always removed from the tree (and replaced by
6487 -- its constituent expression) on completion of analysis, so it only
6488 -- appears in intermediate trees, and will never be seen by Gigi.
6490 -- N_Unchecked_Expression
6491 -- Sloc is a copy of the Sloc of the expression
6492 -- Expression (Node3)
6493 -- plus fields for expression
6495 -- Note: in the case where a debug source file is generated, the Sloc
6496 -- for this node points to the back quote in the Sprint file output.
6498 -------------------------------
6499 -- Unchecked Type Conversion --
6500 -------------------------------
6502 -- An unchecked type conversion node represents the semantic action
6503 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6504 -- It is generated as a result of actual use of Unchecked_Conversion
6505 -- and also the expander generates unchecked type conversion nodes
6506 -- directly for expansion of complex semantic actions.
6508 -- Note: an unchecked type conversion is a variable as far as the
6509 -- semantics are concerned, which is convenient for the expander.
6510 -- This does not change what Ada source programs are legal, since
6511 -- clearly a function call to an instantiation of Unchecked_Conversion
6512 -- is not a variable in any case.
6514 -- Sprint syntax: subtype-mark!(expression)
6516 -- N_Unchecked_Type_Conversion
6517 -- Sloc points to related node in source
6518 -- Subtype_Mark (Node4)
6519 -- Expression (Node3)
6520 -- Kill_Range_Check (Flag11-Sem)
6521 -- No_Truncation (Flag17-Sem)
6522 -- plus fields for expression
6524 -- Note: in the case where a debug source file is generated, the Sloc
6525 -- for this node points to the exclamation in the Sprint file output.
6527 -----------------------------------
6528 -- Validate_Unchecked_Conversion --
6529 -----------------------------------
6531 -- The front end does most of the validation of unchecked conversion,
6532 -- including checking sizes (this is done after the back end is called
6533 -- to take advantage of back-annotation of calculated sizes).
6535 -- The front end also deals with specific cases that are not allowed
6536 -- e.g. involving unconstrained array types.
6538 -- For the case of the standard gigi backend, this means that all
6539 -- checks are done in the front-end.
6541 -- However, in the case of specialized back-ends, notably the JVM
6542 -- backend for JGNAT, additional requirements and restrictions apply
6543 -- to unchecked conversion, and these are most conveniently performed
6544 -- in the specialized back-end.
6546 -- To accommodate this requirement, for such back ends, the following
6547 -- special node is generated recording an unchecked conversion that
6548 -- needs to be validated. The back end should post an appropriate
6549 -- error message if the unchecked conversion is invalid or warrants
6550 -- a special warning message.
6552 -- Source_Type and Target_Type point to the entities for the two
6553 -- types involved in the unchecked conversion instantiation that
6554 -- is to be validated.
6556 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6558 -- N_Validate_Unchecked_Conversion
6559 -- Sloc points to instantiation (location for warning message)
6560 -- Source_Type (Node1-Sem)
6561 -- Target_Type (Node2-Sem)
6563 -- Note: in the case where a debug source file is generated, the Sloc
6564 -- for this node points to the VALIDATE keyword in the file output.
6570 -- Used as the contents of the Nkind field of the dummy Empty node
6571 -- and in some other situations to indicate an uninitialized value.
6574 -- Chars (Name1) is set to No_Name
6580 -- Used as the contents of the Nkind field of the dummy Error node.
6581 -- Has an Etype field, which gets set to Any_Type later on, to help
6582 -- error recovery (Error_Posted is also set in the Error node).
6585 -- Chars (Name1) is set to Error_Name
6586 -- Etype (Node5-Sem)
6588 --------------------------
6589 -- Node Type Definition --
6590 --------------------------
6592 -- The following is the definition of the Node_Kind type. As previously
6593 -- discussed, this is separated off to allow rearrangement of the order
6594 -- to facilitiate definition of subtype ranges. The comments show the
6595 -- subtype classes which apply to each set of node kinds. The first
6596 -- entry in the comment characterizes the following list of nodes.
6601 -- N_Representation_Clause
6605 N_Enumeration_Representation_Clause,
6607 N_Record_Representation_Clause,
6609 -- N_Representation_Clause, N_Has_Chars
6611 N_Attribute_Definition_Clause,
6617 N_Pragma_Argument_Association,
6623 -- N_Entity, N_Has_Etype, N_Has_Chars
6625 N_Defining_Character_Literal,
6626 N_Defining_Identifier,
6627 N_Defining_Operator_Symbol,
6629 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6633 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6634 -- N_Has_Chars, N_Has_Entity
6639 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6640 -- N_Has_Chars, N_Has_Entity
6642 N_Character_Literal,
6644 -- N_Binary_Op, N_Op, N_Subexpr,
6645 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6652 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
6653 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6660 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6661 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6665 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6666 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
6675 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6676 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6681 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
6682 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
6688 N_Op_Shift_Right_Arithmetic,
6690 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
6691 -- N_Has_Chars, N_Has_Entity
6698 -- N_Subexpr, N_Has_Etype, N_Has_Entity
6700 N_Attribute_Reference,
6702 -- N_Subexpr, N_Has_Etype
6705 N_Conditional_Expression,
6706 N_Explicit_Dereference,
6709 N_Indexed_Component,
6714 N_Procedure_Call_Statement,
6715 N_Qualified_Expression,
6717 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
6719 N_Raise_Constraint_Error,
6720 N_Raise_Program_Error,
6721 N_Raise_Storage_Error,
6723 -- N_Subexpr, N_Has_Etype
6727 N_Extension_Aggregate,
6731 N_Selected_Component,
6736 N_Unchecked_Expression,
6737 N_Unchecked_Type_Conversion,
6741 N_Subtype_Indication,
6745 N_Component_Declaration,
6746 N_Entry_Declaration,
6747 N_Formal_Object_Declaration,
6748 N_Formal_Type_Declaration,
6749 N_Full_Type_Declaration,
6750 N_Incomplete_Type_Declaration,
6751 N_Loop_Parameter_Specification,
6752 N_Object_Declaration,
6753 N_Protected_Type_Declaration,
6754 N_Private_Extension_Declaration,
6755 N_Private_Type_Declaration,
6756 N_Subtype_Declaration,
6758 -- N_Subprogram_Specification, N_Declaration
6760 N_Function_Specification,
6761 N_Procedure_Specification,
6763 -- N_Access_To_Subprogram_Definition
6765 N_Access_Function_Definition,
6766 N_Access_Procedure_Definition,
6768 -- N_Later_Decl_Item
6770 N_Task_Type_Declaration,
6772 -- N_Body_Stub, N_Later_Decl_Item
6774 N_Package_Body_Stub,
6775 N_Protected_Body_Stub,
6776 N_Subprogram_Body_Stub,
6779 -- N_Generic_Instantiation, N_Later_Decl_Item
6780 -- N_Subprogram_Instantiation
6782 N_Function_Instantiation,
6783 N_Procedure_Instantiation,
6785 -- N_Generic_Instantiation, N_Later_Decl_Item
6787 N_Package_Instantiation,
6789 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
6794 -- N_Later_Decl_Item, N_Proper_Body
6799 -- N_Later_Decl_Item
6801 N_Implicit_Label_Declaration,
6802 N_Package_Declaration,
6803 N_Single_Task_Declaration,
6804 N_Subprogram_Declaration,
6805 N_Use_Package_Clause,
6807 -- N_Generic_Declaration, N_Later_Decl_Item
6809 N_Generic_Package_Declaration,
6810 N_Generic_Subprogram_Declaration,
6812 -- N_Array_Type_Definition
6814 N_Constrained_Array_Definition,
6815 N_Unconstrained_Array_Definition,
6817 -- N_Renaming_Declaration
6819 N_Exception_Renaming_Declaration,
6820 N_Object_Renaming_Declaration,
6821 N_Package_Renaming_Declaration,
6822 N_Subprogram_Renaming_Declaration,
6824 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
6826 N_Generic_Function_Renaming_Declaration,
6827 N_Generic_Package_Renaming_Declaration,
6828 N_Generic_Procedure_Renaming_Declaration,
6830 -- N_Statement_Other_Than_Procedure_Call
6834 N_Assignment_Statement,
6835 N_Asynchronous_Select,
6839 N_Conditional_Entry_Call,
6841 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
6843 N_Delay_Relative_Statement,
6844 N_Delay_Until_Statement,
6846 -- N_Statement_Other_Than_Procedure_Call
6848 N_Entry_Call_Statement,
6854 N_Requeue_Statement,
6859 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
6866 N_Accept_Alternative,
6867 N_Delay_Alternative,
6869 N_Entry_Body_Formal_Part,
6871 N_Terminate_Alternative,
6873 -- N_Formal_Subprogram_Declaration
6875 N_Formal_Abstract_Subprogram_Declaration,
6876 N_Formal_Concrete_Subprogram_Declaration,
6878 -- Other nodes (not part of any subtype class)
6881 N_Abstract_Subprogram_Declaration,
6882 N_Access_Definition,
6883 N_Access_To_Object_Definition,
6884 N_Case_Statement_Alternative,
6886 N_Compilation_Unit_Aux,
6887 N_Component_Association,
6888 N_Component_Definition,
6890 N_Derived_Type_Definition,
6891 N_Decimal_Fixed_Point_Definition,
6892 N_Defining_Program_Unit_Name,
6895 N_Digits_Constraint,
6896 N_Discriminant_Association,
6897 N_Discriminant_Specification,
6898 N_Enumeration_Type_Definition,
6900 N_Entry_Call_Alternative,
6901 N_Entry_Index_Specification,
6902 N_Exception_Declaration,
6903 N_Exception_Handler,
6904 N_Floating_Point_Definition,
6905 N_Formal_Decimal_Fixed_Point_Definition,
6906 N_Formal_Derived_Type_Definition,
6907 N_Formal_Discrete_Type_Definition,
6908 N_Formal_Floating_Point_Definition,
6909 N_Formal_Modular_Type_Definition,
6910 N_Formal_Ordinary_Fixed_Point_Definition,
6911 N_Formal_Package_Declaration,
6912 N_Formal_Private_Type_Definition,
6913 N_Formal_Signed_Integer_Type_Definition,
6915 N_Generic_Association,
6916 N_Handled_Sequence_Of_Statements,
6917 N_Index_Or_Discriminant_Constraint,
6920 N_Modular_Type_Definition,
6921 N_Number_Declaration,
6922 N_Ordinary_Fixed_Point_Definition,
6924 N_Package_Specification,
6925 N_Parameter_Association,
6926 N_Parameter_Specification,
6927 N_Protected_Definition,
6929 N_Real_Range_Specification,
6930 N_Record_Definition,
6931 N_Signed_Integer_Type_Definition,
6932 N_Single_Protected_Declaration,
6935 N_Triggering_Alternative,
6937 N_Validate_Unchecked_Conversion,
6944 for Node_Kind'Size use 8;
6945 -- The data structures in Atree assume this!
6947 ----------------------------
6948 -- Node Class Definitions --
6949 ----------------------------
6951 subtype N_Access_To_Subprogram_Definition is Node_Kind range
6952 N_Access_Function_Definition ..
6953 N_Access_Procedure_Definition;
6955 subtype N_Array_Type_Definition is Node_Kind range
6956 N_Constrained_Array_Definition ..
6957 N_Unconstrained_Array_Definition;
6959 subtype N_Binary_Op is Node_Kind range
6961 N_Op_Shift_Right_Arithmetic;
6963 subtype N_Body_Stub is Node_Kind range
6964 N_Package_Body_Stub ..
6967 subtype N_Declaration is Node_Kind range
6968 N_Component_Declaration ..
6969 N_Procedure_Specification;
6970 -- Note: this includes all constructs normally thought of as declarations
6971 -- except those which are separately grouped as later declarations.
6973 subtype N_Delay_Statement is Node_Kind range
6974 N_Delay_Relative_Statement ..
6975 N_Delay_Until_Statement;
6977 subtype N_Direct_Name is Node_Kind range
6979 N_Character_Literal;
6981 subtype N_Entity is Node_Kind range
6982 N_Defining_Character_Literal ..
6983 N_Defining_Operator_Symbol;
6985 subtype N_Formal_Subprogram_Declaration is Node_Kind range
6986 N_Formal_Abstract_Subprogram_Declaration ..
6987 N_Formal_Concrete_Subprogram_Declaration;
6989 subtype N_Generic_Declaration is Node_Kind range
6990 N_Generic_Package_Declaration ..
6991 N_Generic_Subprogram_Declaration;
6993 subtype N_Generic_Instantiation is Node_Kind range
6994 N_Function_Instantiation ..
6995 N_Package_Instantiation;
6997 subtype N_Generic_Renaming_Declaration is Node_Kind range
6998 N_Generic_Function_Renaming_Declaration ..
6999 N_Generic_Procedure_Renaming_Declaration;
7001 subtype N_Has_Chars is Node_Kind range
7002 N_Attribute_Definition_Clause ..
7005 subtype N_Has_Entity is Node_Kind range
7007 N_Attribute_Reference;
7008 -- Nodes that have Entity fields
7009 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7011 subtype N_Has_Etype is Node_Kind range
7013 N_Subtype_Indication;
7015 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7019 subtype N_Later_Decl_Item is Node_Kind range
7020 N_Task_Type_Declaration ..
7021 N_Generic_Subprogram_Declaration;
7022 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7023 -- includes only those items which can appear as later declarative
7024 -- items. This also includes N_Implicit_Label_Declaration which is
7025 -- not specifically in the grammar but may appear as a valid later
7026 -- declarative items. It does NOT include N_Pragma which can also
7027 -- appear among later declarative items. It does however include
7028 -- N_Protected_Body, which is a bit peculiar, but harmless since
7029 -- this cannot appear in Ada 83 mode anyway.
7031 subtype N_Op is Node_Kind range
7035 subtype N_Op_Boolean is Node_Kind range
7038 -- Binary operators which take operands of a boolean type, and yield
7039 -- a result of a boolean type.
7041 subtype N_Op_Compare is Node_Kind range
7045 subtype N_Op_Shift is Node_Kind range
7047 N_Op_Shift_Right_Arithmetic;
7049 subtype N_Proper_Body is Node_Kind range
7053 subtype N_Raise_xxx_Error is Node_Kind range
7054 N_Raise_Constraint_Error ..
7055 N_Raise_Storage_Error;
7057 subtype N_Renaming_Declaration is Node_Kind range
7058 N_Exception_Renaming_Declaration ..
7059 N_Generic_Procedure_Renaming_Declaration;
7061 subtype N_Representation_Clause is Node_Kind range
7063 N_Attribute_Definition_Clause;
7065 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7066 N_Abort_Statement ..
7068 -- Note that this includes all statement types except for the cases of the
7069 -- N_Procedure_Call_Statement which is considered to be a subexpression
7070 -- (since overloading is possible, so it needs to go through the normal
7071 -- overloading resolution for expressions).
7073 subtype N_Subprogram_Instantiation is Node_Kind range
7074 N_Function_Instantiation ..
7075 N_Procedure_Instantiation;
7077 subtype N_Has_Condition is Node_Kind range
7079 N_Terminate_Alternative;
7080 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7082 subtype N_Subexpr is Node_Kind range
7084 N_Unchecked_Type_Conversion;
7085 -- Nodes with expression fields
7087 subtype N_Subprogram_Specification is Node_Kind range
7088 N_Function_Specification ..
7089 N_Procedure_Specification;
7091 subtype N_Unary_Op is Node_Kind range
7095 subtype N_Unit_Body is Node_Kind range
7099 ---------------------------
7100 -- Node Access Functions --
7101 ---------------------------
7103 -- The following functions return the contents of the indicated field of
7104 -- the node referenced by the argument, which is a Node_Id. They provide
7105 -- logical access to fields in the node which could be accessed using the
7106 -- Atree.Unchecked_Access package, but the idea is always to use these
7107 -- higher level routines which preserve strong typing. In debug mode,
7108 -- these routines check that they are being applied to an appropriate
7109 -- node, as well as checking that the node is in range.
7111 function ABE_Is_Certain
7112 (N : Node_Id) return Boolean; -- Flag18
7114 function Abort_Present
7115 (N : Node_Id) return Boolean; -- Flag15
7117 function Abortable_Part
7118 (N : Node_Id) return Node_Id; -- Node2
7120 function Abstract_Present
7121 (N : Node_Id) return Boolean; -- Flag4
7123 function Accept_Handler_Records
7124 (N : Node_Id) return List_Id; -- List5
7126 function Accept_Statement
7127 (N : Node_Id) return Node_Id; -- Node2
7129 function Access_Definition
7130 (N : Node_Id) return Node_Id; -- Node3
7132 function Access_To_Subprogram_Definition
7133 (N : Node_Id) return Node_Id; -- Node3
7135 function Access_Types_To_Process
7136 (N : Node_Id) return Elist_Id; -- Elist2
7139 (N : Node_Id) return List_Id; -- List1
7141 function Activation_Chain_Entity
7142 (N : Node_Id) return Node_Id; -- Node3
7144 function Acts_As_Spec
7145 (N : Node_Id) return Boolean; -- Flag4
7147 function Actual_Designated_Subtype
7148 (N : Node_Id) return Node_Id; -- Node2
7150 function Aggregate_Bounds
7151 (N : Node_Id) return Node_Id; -- Node3
7153 function Aliased_Present
7154 (N : Node_Id) return Boolean; -- Flag4
7157 (N : Node_Id) return Boolean; -- Flag11
7159 function All_Present
7160 (N : Node_Id) return Boolean; -- Flag15
7162 function Alternatives
7163 (N : Node_Id) return List_Id; -- List4
7165 function Ancestor_Part
7166 (N : Node_Id) return Node_Id; -- Node3
7168 function Array_Aggregate
7169 (N : Node_Id) return Node_Id; -- Node3
7171 function Assignment_OK
7172 (N : Node_Id) return Boolean; -- Flag15
7174 function Associated_Node
7175 (N : Node_Id) return Node_Id; -- Node4
7177 function At_End_Proc
7178 (N : Node_Id) return Node_Id; -- Node1
7180 function Attribute_Name
7181 (N : Node_Id) return Name_Id; -- Name2
7183 function Aux_Decls_Node
7184 (N : Node_Id) return Node_Id; -- Node5
7186 function Backwards_OK
7187 (N : Node_Id) return Boolean; -- Flag6
7189 function Bad_Is_Detected
7190 (N : Node_Id) return Boolean; -- Flag15
7193 (N : Node_Id) return Boolean; -- Flag5
7195 function Body_Required
7196 (N : Node_Id) return Boolean; -- Flag13
7198 function Body_To_Inline
7199 (N : Node_Id) return Node_Id; -- Node3
7201 function Box_Present
7202 (N : Node_Id) return Boolean; -- Flag15
7204 function Char_Literal_Value
7205 (N : Node_Id) return Uint; -- Uint2
7208 (N : Node_Id) return Name_Id; -- Name1
7210 function Check_Address_Alignment
7211 (N : Node_Id) return Boolean; -- Flag11
7213 function Choice_Parameter
7214 (N : Node_Id) return Node_Id; -- Node2
7217 (N : Node_Id) return List_Id; -- List1
7219 function Compile_Time_Known_Aggregate
7220 (N : Node_Id) return Boolean; -- Flag18
7222 function Component_Associations
7223 (N : Node_Id) return List_Id; -- List2
7225 function Component_Clauses
7226 (N : Node_Id) return List_Id; -- List3
7228 function Component_Definition
7229 (N : Node_Id) return Node_Id; -- Node4
7231 function Component_Items
7232 (N : Node_Id) return List_Id; -- List3
7234 function Component_List
7235 (N : Node_Id) return Node_Id; -- Node1
7237 function Component_Name
7238 (N : Node_Id) return Node_Id; -- Node1
7241 (N : Node_Id) return Node_Id; -- Node1
7243 function Condition_Actions
7244 (N : Node_Id) return List_Id; -- List3
7246 function Config_Pragmas
7247 (N : Node_Id) return List_Id; -- List4
7249 function Constant_Present
7250 (N : Node_Id) return Boolean; -- Flag17
7253 (N : Node_Id) return Node_Id; -- Node3
7255 function Constraints
7256 (N : Node_Id) return List_Id; -- List1
7258 function Context_Installed
7259 (N : Node_Id) return Boolean; -- Flag13
7261 function Context_Items
7262 (N : Node_Id) return List_Id; -- List1
7264 function Controlling_Argument
7265 (N : Node_Id) return Node_Id; -- Node1
7267 function Conversion_OK
7268 (N : Node_Id) return Boolean; -- Flag14
7270 function Corresponding_Body
7271 (N : Node_Id) return Node_Id; -- Node5
7273 function Corresponding_Formal_Spec
7274 (N : Node_Id) return Node_Id; -- Node3
7276 function Corresponding_Generic_Association
7277 (N : Node_Id) return Node_Id; -- Node5
7279 function Corresponding_Integer_Value
7280 (N : Node_Id) return Uint; -- Uint4
7282 function Corresponding_Spec
7283 (N : Node_Id) return Node_Id; -- Node5
7285 function Corresponding_Stub
7286 (N : Node_Id) return Node_Id; -- Node3
7288 function Dcheck_Function
7289 (N : Node_Id) return Entity_Id; -- Node5
7291 function Debug_Statement
7292 (N : Node_Id) return Node_Id; -- Node3
7294 function Declarations
7295 (N : Node_Id) return List_Id; -- List2
7297 function Default_Expression
7298 (N : Node_Id) return Node_Id; -- Node5
7300 function Default_Name
7301 (N : Node_Id) return Node_Id; -- Node2
7303 function Defining_Identifier
7304 (N : Node_Id) return Entity_Id; -- Node1
7306 function Defining_Unit_Name
7307 (N : Node_Id) return Node_Id; -- Node1
7309 function Delay_Alternative
7310 (N : Node_Id) return Node_Id; -- Node4
7312 function Delay_Finalize_Attach
7313 (N : Node_Id) return Boolean; -- Flag14
7315 function Delay_Statement
7316 (N : Node_Id) return Node_Id; -- Node2
7318 function Delta_Expression
7319 (N : Node_Id) return Node_Id; -- Node3
7321 function Digits_Expression
7322 (N : Node_Id) return Node_Id; -- Node2
7324 function Discr_Check_Funcs_Built
7325 (N : Node_Id) return Boolean; -- Flag11
7327 function Discrete_Choices
7328 (N : Node_Id) return List_Id; -- List4
7330 function Discrete_Range
7331 (N : Node_Id) return Node_Id; -- Node4
7333 function Discrete_Subtype_Definition
7334 (N : Node_Id) return Node_Id; -- Node4
7336 function Discrete_Subtype_Definitions
7337 (N : Node_Id) return List_Id; -- List2
7339 function Discriminant_Specifications
7340 (N : Node_Id) return List_Id; -- List4
7342 function Discriminant_Type
7343 (N : Node_Id) return Node_Id; -- Node5
7345 function Do_Accessibility_Check
7346 (N : Node_Id) return Boolean; -- Flag13
7348 function Do_Discriminant_Check
7349 (N : Node_Id) return Boolean; -- Flag13
7351 function Do_Division_Check
7352 (N : Node_Id) return Boolean; -- Flag13
7354 function Do_Length_Check
7355 (N : Node_Id) return Boolean; -- Flag4
7357 function Do_Overflow_Check
7358 (N : Node_Id) return Boolean; -- Flag17
7360 function Do_Range_Check
7361 (N : Node_Id) return Boolean; -- Flag9
7363 function Do_Storage_Check
7364 (N : Node_Id) return Boolean; -- Flag17
7366 function Do_Tag_Check
7367 (N : Node_Id) return Boolean; -- Flag13
7369 function Elaborate_All_Desirable
7370 (N : Node_Id) return Boolean; -- Flag9
7372 function Elaborate_All_Present
7373 (N : Node_Id) return Boolean; -- Flag14
7375 function Elaborate_Desirable
7376 (N : Node_Id) return Boolean; -- Flag11
7378 function Elaborate_Present
7379 (N : Node_Id) return Boolean; -- Flag4
7381 function Elaboration_Boolean
7382 (N : Node_Id) return Node_Id; -- Node2
7384 function Else_Actions
7385 (N : Node_Id) return List_Id; -- List3
7387 function Else_Statements
7388 (N : Node_Id) return List_Id; -- List4
7390 function Elsif_Parts
7391 (N : Node_Id) return List_Id; -- List3
7393 function Enclosing_Variant
7394 (N : Node_Id) return Node_Id; -- Node2
7397 (N : Node_Id) return Node_Id; -- Node4
7400 (N : Node_Id) return Uint; -- Uint5
7403 (N : Node_Id) return Node_Id; -- Node4
7405 function Entity_Or_Associated_Node
7406 (N : Node_Id) return Node_Id; -- Node4
7408 function Entry_Body_Formal_Part
7409 (N : Node_Id) return Node_Id; -- Node5
7411 function Entry_Call_Alternative
7412 (N : Node_Id) return Node_Id; -- Node1
7414 function Entry_Call_Statement
7415 (N : Node_Id) return Node_Id; -- Node1
7417 function Entry_Direct_Name
7418 (N : Node_Id) return Node_Id; -- Node1
7420 function Entry_Index
7421 (N : Node_Id) return Node_Id; -- Node5
7423 function Entry_Index_Specification
7424 (N : Node_Id) return Node_Id; -- Node4
7427 (N : Node_Id) return Node_Id; -- Node5
7429 function Exception_Choices
7430 (N : Node_Id) return List_Id; -- List4
7432 function Exception_Handlers
7433 (N : Node_Id) return List_Id; -- List5
7435 function Exception_Junk
7436 (N : Node_Id) return Boolean; -- Flag7
7438 function Explicit_Actual_Parameter
7439 (N : Node_Id) return Node_Id; -- Node3
7441 function Expansion_Delayed
7442 (N : Node_Id) return Boolean; -- Flag11
7444 function Explicit_Generic_Actual_Parameter
7445 (N : Node_Id) return Node_Id; -- Node1
7448 (N : Node_Id) return Node_Id; -- Node3
7450 function Expressions
7451 (N : Node_Id) return List_Id; -- List1
7454 (N : Node_Id) return Node_Id; -- Node3
7456 function First_Inlined_Subprogram
7457 (N : Node_Id) return Entity_Id; -- Node3
7460 (N : Node_Id) return Boolean; -- Flag5
7462 function First_Named_Actual
7463 (N : Node_Id) return Node_Id; -- Node4
7465 function First_Real_Statement
7466 (N : Node_Id) return Node_Id; -- Node2
7468 function First_Subtype_Link
7469 (N : Node_Id) return Entity_Id; -- Node5
7471 function Float_Truncate
7472 (N : Node_Id) return Boolean; -- Flag11
7474 function Formal_Type_Definition
7475 (N : Node_Id) return Node_Id; -- Node3
7477 function Forwards_OK
7478 (N : Node_Id) return Boolean; -- Flag5
7480 function From_At_Mod
7481 (N : Node_Id) return Boolean; -- Flag4
7483 function From_Default
7484 (N : Node_Id) return Boolean; -- Flag6
7486 function Generic_Associations
7487 (N : Node_Id) return List_Id; -- List3
7489 function Generic_Formal_Declarations
7490 (N : Node_Id) return List_Id; -- List2
7492 function Generic_Parent
7493 (N : Node_Id) return Node_Id; -- Node5
7495 function Generic_Parent_Type
7496 (N : Node_Id) return Node_Id; -- Node4
7498 function Handled_Statement_Sequence
7499 (N : Node_Id) return Node_Id; -- Node4
7501 function Handler_List_Entry
7502 (N : Node_Id) return Node_Id; -- Node2
7504 function Has_Created_Identifier
7505 (N : Node_Id) return Boolean; -- Flag15
7507 function Has_Dynamic_Length_Check
7508 (N : Node_Id) return Boolean; -- Flag10
7510 function Has_Dynamic_Range_Check
7511 (N : Node_Id) return Boolean; -- Flag12
7513 function Has_No_Elaboration_Code
7514 (N : Node_Id) return Boolean; -- Flag17
7516 function Has_Priority_Pragma
7517 (N : Node_Id) return Boolean; -- Flag6
7519 function Has_Private_View
7520 (N : Node_Id) return Boolean; -- Flag11
7522 function Has_Storage_Size_Pragma
7523 (N : Node_Id) return Boolean; -- Flag5
7525 function Has_Task_Info_Pragma
7526 (N : Node_Id) return Boolean; -- Flag7
7528 function Has_Task_Name_Pragma
7529 (N : Node_Id) return Boolean; -- Flag8
7531 function Has_Wide_Character
7532 (N : Node_Id) return Boolean; -- Flag11
7534 function Hidden_By_Use_Clause
7535 (N : Node_Id) return Elist_Id; -- Elist4
7538 (N : Node_Id) return Node_Id; -- Node2
7541 (N : Node_Id) return Node_Id; -- Node1
7543 function Interface_List
7544 (N : Node_Id) return List_Id; -- List2
7546 function Interface_Present
7547 (N : Node_Id) return Boolean; -- Flag16
7549 function Implicit_With
7550 (N : Node_Id) return Boolean; -- Flag16
7553 (N : Node_Id) return Boolean; -- Flag15
7555 function Includes_Infinities
7556 (N : Node_Id) return Boolean; -- Flag11
7558 function Instance_Spec
7559 (N : Node_Id) return Node_Id; -- Node5
7562 (N : Node_Id) return Uint; -- Uint3
7564 function Is_Asynchronous_Call_Block
7565 (N : Node_Id) return Boolean; -- Flag7
7567 function Is_Component_Left_Opnd
7568 (N : Node_Id) return Boolean; -- Flag13
7570 function Is_Component_Right_Opnd
7571 (N : Node_Id) return Boolean; -- Flag14
7573 function Is_Controlling_Actual
7574 (N : Node_Id) return Boolean; -- Flag16
7576 function Is_In_Discriminant_Check
7577 (N : Node_Id) return Boolean; -- Flag11
7579 function Is_Machine_Number
7580 (N : Node_Id) return Boolean; -- Flag11
7582 function Is_Null_Loop
7583 (N : Node_Id) return Boolean; -- Flag16
7585 function Is_Overloaded
7586 (N : Node_Id) return Boolean; -- Flag5
7588 function Is_Power_Of_2_For_Shift
7589 (N : Node_Id) return Boolean; -- Flag13
7591 function Is_Protected_Subprogram_Body
7592 (N : Node_Id) return Boolean; -- Flag7
7594 function Is_Static_Expression
7595 (N : Node_Id) return Boolean; -- Flag6
7597 function Is_Subprogram_Descriptor
7598 (N : Node_Id) return Boolean; -- Flag16
7600 function Is_Task_Allocation_Block
7601 (N : Node_Id) return Boolean; -- Flag6
7603 function Is_Task_Master
7604 (N : Node_Id) return Boolean; -- Flag5
7606 function Iteration_Scheme
7607 (N : Node_Id) return Node_Id; -- Node2
7610 (N : Node_Id) return Entity_Id; -- Node1
7612 function Kill_Range_Check
7613 (N : Node_Id) return Boolean; -- Flag11
7615 function Label_Construct
7616 (N : Node_Id) return Node_Id; -- Node2
7619 (N : Node_Id) return Node_Id; -- Node2
7622 (N : Node_Id) return Node_Id; -- Node4
7625 (N : Node_Id) return Boolean; -- Flag6
7627 function Library_Unit
7628 (N : Node_Id) return Node_Id; -- Node4
7630 function Limited_View_Installed
7631 (N : Node_Id) return Boolean; -- Flag18
7633 function Limited_Present
7634 (N : Node_Id) return Boolean; -- Flag17
7637 (N : Node_Id) return List_Id; -- List1
7639 function Loop_Actions
7640 (N : Node_Id) return List_Id; -- List2
7642 function Loop_Parameter_Specification
7643 (N : Node_Id) return Node_Id; -- Node4
7646 (N : Node_Id) return Node_Id; -- Node1
7649 (N : Node_Id) return Node_Id; -- Node2
7652 (N : Node_Id) return Boolean; -- Flag5
7654 function Must_Be_Byte_Aligned
7655 (N : Node_Id) return Boolean; -- Flag14
7657 function Must_Not_Freeze
7658 (N : Node_Id) return Boolean; -- Flag8
7660 function Must_Not_Override
7661 (N : Node_Id) return Boolean; -- Flag15
7663 function Must_Override
7664 (N : Node_Id) return Boolean; -- Flag14
7667 (N : Node_Id) return Node_Id; -- Node2
7670 (N : Node_Id) return List_Id; -- List2
7672 function Next_Entity
7673 (N : Node_Id) return Node_Id; -- Node2
7675 function Next_Named_Actual
7676 (N : Node_Id) return Node_Id; -- Node4
7678 function Next_Rep_Item
7679 (N : Node_Id) return Node_Id; -- Node4
7681 function Next_Use_Clause
7682 (N : Node_Id) return Node_Id; -- Node3
7684 function No_Ctrl_Actions
7685 (N : Node_Id) return Boolean; -- Flag7
7687 function No_Elaboration_Check
7688 (N : Node_Id) return Boolean; -- Flag14
7690 function No_Entities_Ref_In_Spec
7691 (N : Node_Id) return Boolean; -- Flag8
7693 function No_Initialization
7694 (N : Node_Id) return Boolean; -- Flag13
7696 function No_Truncation
7697 (N : Node_Id) return Boolean; -- Flag17
7699 function Null_Present
7700 (N : Node_Id) return Boolean; -- Flag13
7702 function Null_Exclusion_Present
7703 (N : Node_Id) return Boolean; -- Flag11
7705 function Null_Record_Present
7706 (N : Node_Id) return Boolean; -- Flag17
7708 function Object_Definition
7709 (N : Node_Id) return Node_Id; -- Node4
7711 function Original_Discriminant
7712 (N : Node_Id) return Node_Id; -- Node2
7714 function Original_Entity
7715 (N : Node_Id) return Entity_Id; -- Node2
7717 function Others_Discrete_Choices
7718 (N : Node_Id) return List_Id; -- List1
7720 function Out_Present
7721 (N : Node_Id) return Boolean; -- Flag17
7723 function Parameter_Associations
7724 (N : Node_Id) return List_Id; -- List3
7726 function Parameter_List_Truncated
7727 (N : Node_Id) return Boolean; -- Flag17
7729 function Parameter_Specifications
7730 (N : Node_Id) return List_Id; -- List3
7732 function Parameter_Type
7733 (N : Node_Id) return Node_Id; -- Node2
7735 function Parent_Spec
7736 (N : Node_Id) return Node_Id; -- Node4
7739 (N : Node_Id) return Node_Id; -- Node2
7741 function Pragma_Argument_Associations
7742 (N : Node_Id) return List_Id; -- List2
7744 function Pragmas_After
7745 (N : Node_Id) return List_Id; -- List5
7747 function Pragmas_Before
7748 (N : Node_Id) return List_Id; -- List4
7751 (N : Node_Id) return Node_Id; -- Node3
7753 function Present_Expr
7754 (N : Node_Id) return Uint; -- Uint3
7757 (N : Node_Id) return Boolean; -- Flag6
7759 function Print_In_Hex
7760 (N : Node_Id) return Boolean; -- Flag13
7762 function Private_Declarations
7763 (N : Node_Id) return List_Id; -- List3
7765 function Private_Present
7766 (N : Node_Id) return Boolean; -- Flag15
7768 function Procedure_To_Call
7769 (N : Node_Id) return Node_Id; -- Node4
7771 function Proper_Body
7772 (N : Node_Id) return Node_Id; -- Node1
7774 function Protected_Definition
7775 (N : Node_Id) return Node_Id; -- Node3
7777 function Protected_Present
7778 (N : Node_Id) return Boolean; -- Flag6
7780 function Raises_Constraint_Error
7781 (N : Node_Id) return Boolean; -- Flag7
7783 function Range_Constraint
7784 (N : Node_Id) return Node_Id; -- Node4
7786 function Range_Expression
7787 (N : Node_Id) return Node_Id; -- Node4
7789 function Real_Range_Specification
7790 (N : Node_Id) return Node_Id; -- Node4
7793 (N : Node_Id) return Ureal; -- Ureal3
7796 (N : Node_Id) return Uint; -- Uint3
7798 function Record_Extension_Part
7799 (N : Node_Id) return Node_Id; -- Node3
7801 function Redundant_Use
7802 (N : Node_Id) return Boolean; -- Flag13
7804 function Result_Definition
7805 (N : Node_Id) return Node_Id; -- Node4
7807 function Return_Type
7808 (N : Node_Id) return Node_Id; -- Node2
7810 function Reverse_Present
7811 (N : Node_Id) return Boolean; -- Flag15
7814 (N : Node_Id) return Node_Id; -- Node3
7816 function Rounded_Result
7817 (N : Node_Id) return Boolean; -- Flag18
7820 (N : Node_Id) return Node_Id; -- Node3
7822 function Select_Alternatives
7823 (N : Node_Id) return List_Id; -- List1
7825 function Selector_Name
7826 (N : Node_Id) return Node_Id; -- Node2
7828 function Selector_Names
7829 (N : Node_Id) return List_Id; -- List1
7831 function Shift_Count_OK
7832 (N : Node_Id) return Boolean; -- Flag4
7834 function Source_Type
7835 (N : Node_Id) return Entity_Id; -- Node1
7837 function Specification
7838 (N : Node_Id) return Node_Id; -- Node1
7841 (N : Node_Id) return List_Id; -- List3
7843 function Static_Processing_OK
7844 (N : Node_Id) return Boolean; -- Flag4
7846 function Storage_Pool
7847 (N : Node_Id) return Node_Id; -- Node1
7850 (N : Node_Id) return String_Id; -- Str3
7852 function Subtype_Indication
7853 (N : Node_Id) return Node_Id; -- Node5
7855 function Subtype_Mark
7856 (N : Node_Id) return Node_Id; -- Node4
7858 function Subtype_Marks
7859 (N : Node_Id) return List_Id; -- List2
7861 function Synchronized_Present
7862 (N : Node_Id) return Boolean; -- Flag7
7864 function Tagged_Present
7865 (N : Node_Id) return Boolean; -- Flag15
7867 function Target_Type
7868 (N : Node_Id) return Entity_Id; -- Node2
7870 function Task_Definition
7871 (N : Node_Id) return Node_Id; -- Node3
7873 function Task_Present
7874 (N : Node_Id) return Boolean; -- Flag5
7876 function Then_Actions
7877 (N : Node_Id) return List_Id; -- List2
7879 function Then_Statements
7880 (N : Node_Id) return List_Id; -- List2
7882 function Treat_Fixed_As_Integer
7883 (N : Node_Id) return Boolean; -- Flag14
7885 function Triggering_Alternative
7886 (N : Node_Id) return Node_Id; -- Node1
7888 function Triggering_Statement
7889 (N : Node_Id) return Node_Id; -- Node1
7892 (N : Node_Id) return Elist_Id; -- Elist3
7894 function Type_Definition
7895 (N : Node_Id) return Node_Id; -- Node3
7898 (N : Node_Id) return Node_Id; -- Node2
7900 function Unknown_Discriminants_Present
7901 (N : Node_Id) return Boolean; -- Flag13
7903 function Unreferenced_In_Spec
7904 (N : Node_Id) return Boolean; -- Flag7
7906 function Variant_Part
7907 (N : Node_Id) return Node_Id; -- Node4
7910 (N : Node_Id) return List_Id; -- List1
7912 function Visible_Declarations
7913 (N : Node_Id) return List_Id; -- List2
7915 function Was_Originally_Stub
7916 (N : Node_Id) return Boolean; -- Flag13
7918 function Zero_Cost_Handling
7919 (N : Node_Id) return Boolean; -- Flag5
7921 -- End functions (note used by xsinfo utility program to end processing)
7923 ----------------------------
7924 -- Node Update Procedures --
7925 ----------------------------
7927 -- These are the corresponding node update routines, which again provide
7928 -- a high level logical access with type checking. In addition to setting
7929 -- the indicated field of the node N to the given Val, in the case of
7930 -- tree pointers (List1-4), the parent pointer of the Val node is set to
7931 -- point back to node N. This automates the setting of the parent pointer.
7933 procedure Set_ABE_Is_Certain
7934 (N : Node_Id; Val : Boolean := True); -- Flag18
7936 procedure Set_Abort_Present
7937 (N : Node_Id; Val : Boolean := True); -- Flag15
7939 procedure Set_Abortable_Part
7940 (N : Node_Id; Val : Node_Id); -- Node2
7942 procedure Set_Abstract_Present
7943 (N : Node_Id; Val : Boolean := True); -- Flag4
7945 procedure Set_Accept_Handler_Records
7946 (N : Node_Id; Val : List_Id); -- List5
7948 procedure Set_Accept_Statement
7949 (N : Node_Id; Val : Node_Id); -- Node2
7951 procedure Set_Access_Definition
7952 (N : Node_Id; Val : Node_Id); -- Node3
7954 procedure Set_Access_To_Subprogram_Definition
7955 (N : Node_Id; Val : Node_Id); -- Node3
7957 procedure Set_Access_Types_To_Process
7958 (N : Node_Id; Val : Elist_Id); -- Elist2
7960 procedure Set_Actions
7961 (N : Node_Id; Val : List_Id); -- List1
7963 procedure Set_Activation_Chain_Entity
7964 (N : Node_Id; Val : Node_Id); -- Node3
7966 procedure Set_Acts_As_Spec
7967 (N : Node_Id; Val : Boolean := True); -- Flag4
7969 procedure Set_Actual_Designated_Subtype
7970 (N : Node_Id; Val : Node_Id); -- Node2
7972 procedure Set_Aggregate_Bounds
7973 (N : Node_Id; Val : Node_Id); -- Node3
7975 procedure Set_Aliased_Present
7976 (N : Node_Id; Val : Boolean := True); -- Flag4
7978 procedure Set_All_Others
7979 (N : Node_Id; Val : Boolean := True); -- Flag11
7981 procedure Set_All_Present
7982 (N : Node_Id; Val : Boolean := True); -- Flag15
7984 procedure Set_Alternatives
7985 (N : Node_Id; Val : List_Id); -- List4
7987 procedure Set_Ancestor_Part
7988 (N : Node_Id; Val : Node_Id); -- Node3
7990 procedure Set_Array_Aggregate
7991 (N : Node_Id; Val : Node_Id); -- Node3
7993 procedure Set_Assignment_OK
7994 (N : Node_Id; Val : Boolean := True); -- Flag15
7996 procedure Set_Associated_Node
7997 (N : Node_Id; Val : Node_Id); -- Node4
7999 procedure Set_Attribute_Name
8000 (N : Node_Id; Val : Name_Id); -- Name2
8002 procedure Set_At_End_Proc
8003 (N : Node_Id; Val : Node_Id); -- Node1
8005 procedure Set_Aux_Decls_Node
8006 (N : Node_Id; Val : Node_Id); -- Node5
8008 procedure Set_Backwards_OK
8009 (N : Node_Id; Val : Boolean := True); -- Flag6
8011 procedure Set_Bad_Is_Detected
8012 (N : Node_Id; Val : Boolean := True); -- Flag15
8014 procedure Set_Body_Required
8015 (N : Node_Id; Val : Boolean := True); -- Flag13
8017 procedure Set_Body_To_Inline
8018 (N : Node_Id; Val : Node_Id); -- Node3
8020 procedure Set_Box_Present
8021 (N : Node_Id; Val : Boolean := True); -- Flag15
8023 procedure Set_By_Ref
8024 (N : Node_Id; Val : Boolean := True); -- Flag5
8026 procedure Set_Char_Literal_Value
8027 (N : Node_Id; Val : Uint); -- Uint2
8030 (N : Node_Id; Val : Name_Id); -- Name1
8032 procedure Set_Check_Address_Alignment
8033 (N : Node_Id; Val : Boolean := True); -- Flag11
8035 procedure Set_Choice_Parameter
8036 (N : Node_Id; Val : Node_Id); -- Node2
8038 procedure Set_Choices
8039 (N : Node_Id; Val : List_Id); -- List1
8041 procedure Set_Compile_Time_Known_Aggregate
8042 (N : Node_Id; Val : Boolean := True); -- Flag18
8044 procedure Set_Component_Associations
8045 (N : Node_Id; Val : List_Id); -- List2
8047 procedure Set_Component_Clauses
8048 (N : Node_Id; Val : List_Id); -- List3
8050 procedure Set_Component_Definition
8051 (N : Node_Id; Val : Node_Id); -- Node4
8053 procedure Set_Component_Items
8054 (N : Node_Id; Val : List_Id); -- List3
8056 procedure Set_Component_List
8057 (N : Node_Id; Val : Node_Id); -- Node1
8059 procedure Set_Component_Name
8060 (N : Node_Id; Val : Node_Id); -- Node1
8062 procedure Set_Condition
8063 (N : Node_Id; Val : Node_Id); -- Node1
8065 procedure Set_Condition_Actions
8066 (N : Node_Id; Val : List_Id); -- List3
8068 procedure Set_Config_Pragmas
8069 (N : Node_Id; Val : List_Id); -- List4
8071 procedure Set_Constant_Present
8072 (N : Node_Id; Val : Boolean := True); -- Flag17
8074 procedure Set_Constraint
8075 (N : Node_Id; Val : Node_Id); -- Node3
8077 procedure Set_Constraints
8078 (N : Node_Id; Val : List_Id); -- List1
8080 procedure Set_Context_Installed
8081 (N : Node_Id; Val : Boolean := True); -- Flag13
8083 procedure Set_Context_Items
8084 (N : Node_Id; Val : List_Id); -- List1
8086 procedure Set_Controlling_Argument
8087 (N : Node_Id; Val : Node_Id); -- Node1
8089 procedure Set_Conversion_OK
8090 (N : Node_Id; Val : Boolean := True); -- Flag14
8092 procedure Set_Corresponding_Body
8093 (N : Node_Id; Val : Node_Id); -- Node5
8095 procedure Set_Corresponding_Formal_Spec
8096 (N : Node_Id; Val : Node_Id); -- Node3
8098 procedure Set_Corresponding_Generic_Association
8099 (N : Node_Id; Val : Node_Id); -- Node5
8101 procedure Set_Corresponding_Integer_Value
8102 (N : Node_Id; Val : Uint); -- Uint4
8104 procedure Set_Corresponding_Spec
8105 (N : Node_Id; Val : Node_Id); -- Node5
8107 procedure Set_Corresponding_Stub
8108 (N : Node_Id; Val : Node_Id); -- Node3
8110 procedure Set_Dcheck_Function
8111 (N : Node_Id; Val : Entity_Id); -- Node5
8113 procedure Set_Debug_Statement
8114 (N : Node_Id; Val : Node_Id); -- Node3
8116 procedure Set_Declarations
8117 (N : Node_Id; Val : List_Id); -- List2
8119 procedure Set_Default_Expression
8120 (N : Node_Id; Val : Node_Id); -- Node5
8122 procedure Set_Default_Name
8123 (N : Node_Id; Val : Node_Id); -- Node2
8125 procedure Set_Defining_Identifier
8126 (N : Node_Id; Val : Entity_Id); -- Node1
8128 procedure Set_Defining_Unit_Name
8129 (N : Node_Id; Val : Node_Id); -- Node1
8131 procedure Set_Delay_Alternative
8132 (N : Node_Id; Val : Node_Id); -- Node4
8134 procedure Set_Delay_Finalize_Attach
8135 (N : Node_Id; Val : Boolean := True); -- Flag14
8137 procedure Set_Delay_Statement
8138 (N : Node_Id; Val : Node_Id); -- Node2
8140 procedure Set_Delta_Expression
8141 (N : Node_Id; Val : Node_Id); -- Node3
8143 procedure Set_Digits_Expression
8144 (N : Node_Id; Val : Node_Id); -- Node2
8146 procedure Set_Discr_Check_Funcs_Built
8147 (N : Node_Id; Val : Boolean := True); -- Flag11
8149 procedure Set_Discrete_Choices
8150 (N : Node_Id; Val : List_Id); -- List4
8152 procedure Set_Discrete_Range
8153 (N : Node_Id; Val : Node_Id); -- Node4
8155 procedure Set_Discrete_Subtype_Definition
8156 (N : Node_Id; Val : Node_Id); -- Node4
8158 procedure Set_Discrete_Subtype_Definitions
8159 (N : Node_Id; Val : List_Id); -- List2
8161 procedure Set_Discriminant_Specifications
8162 (N : Node_Id; Val : List_Id); -- List4
8164 procedure Set_Discriminant_Type
8165 (N : Node_Id; Val : Node_Id); -- Node5
8167 procedure Set_Do_Accessibility_Check
8168 (N : Node_Id; Val : Boolean := True); -- Flag13
8170 procedure Set_Do_Discriminant_Check
8171 (N : Node_Id; Val : Boolean := True); -- Flag13
8173 procedure Set_Do_Division_Check
8174 (N : Node_Id; Val : Boolean := True); -- Flag13
8176 procedure Set_Do_Length_Check
8177 (N : Node_Id; Val : Boolean := True); -- Flag4
8179 procedure Set_Do_Overflow_Check
8180 (N : Node_Id; Val : Boolean := True); -- Flag17
8182 procedure Set_Do_Range_Check
8183 (N : Node_Id; Val : Boolean := True); -- Flag9
8185 procedure Set_Do_Storage_Check
8186 (N : Node_Id; Val : Boolean := True); -- Flag17
8188 procedure Set_Do_Tag_Check
8189 (N : Node_Id; Val : Boolean := True); -- Flag13
8191 procedure Set_Elaborate_All_Desirable
8192 (N : Node_Id; Val : Boolean := True); -- Flag9
8194 procedure Set_Elaborate_All_Present
8195 (N : Node_Id; Val : Boolean := True); -- Flag14
8197 procedure Set_Elaborate_Desirable
8198 (N : Node_Id; Val : Boolean := True); -- Flag11
8200 procedure Set_Elaborate_Present
8201 (N : Node_Id; Val : Boolean := True); -- Flag4
8203 procedure Set_Elaboration_Boolean
8204 (N : Node_Id; Val : Node_Id); -- Node2
8206 procedure Set_Else_Actions
8207 (N : Node_Id; Val : List_Id); -- List3
8209 procedure Set_Else_Statements
8210 (N : Node_Id; Val : List_Id); -- List4
8212 procedure Set_Elsif_Parts
8213 (N : Node_Id; Val : List_Id); -- List3
8215 procedure Set_Enclosing_Variant
8216 (N : Node_Id; Val : Node_Id); -- Node2
8218 procedure Set_End_Label
8219 (N : Node_Id; Val : Node_Id); -- Node4
8221 procedure Set_End_Span
8222 (N : Node_Id; Val : Uint); -- Uint5
8224 procedure Set_Entity
8225 (N : Node_Id; Val : Node_Id); -- Node4
8227 procedure Set_Entry_Body_Formal_Part
8228 (N : Node_Id; Val : Node_Id); -- Node5
8230 procedure Set_Entry_Call_Alternative
8231 (N : Node_Id; Val : Node_Id); -- Node1
8233 procedure Set_Entry_Call_Statement
8234 (N : Node_Id; Val : Node_Id); -- Node1
8236 procedure Set_Entry_Direct_Name
8237 (N : Node_Id; Val : Node_Id); -- Node1
8239 procedure Set_Entry_Index
8240 (N : Node_Id; Val : Node_Id); -- Node5
8242 procedure Set_Entry_Index_Specification
8243 (N : Node_Id; Val : Node_Id); -- Node4
8246 (N : Node_Id; Val : Node_Id); -- Node5
8248 procedure Set_Exception_Choices
8249 (N : Node_Id; Val : List_Id); -- List4
8251 procedure Set_Exception_Handlers
8252 (N : Node_Id; Val : List_Id); -- List5
8254 procedure Set_Exception_Junk
8255 (N : Node_Id; Val : Boolean := True); -- Flag7
8257 procedure Set_Expansion_Delayed
8258 (N : Node_Id; Val : Boolean := True); -- Flag11
8260 procedure Set_Explicit_Actual_Parameter
8261 (N : Node_Id; Val : Node_Id); -- Node3
8263 procedure Set_Explicit_Generic_Actual_Parameter
8264 (N : Node_Id; Val : Node_Id); -- Node1
8266 procedure Set_Expression
8267 (N : Node_Id; Val : Node_Id); -- Node3
8269 procedure Set_Expressions
8270 (N : Node_Id; Val : List_Id); -- List1
8272 procedure Set_First_Bit
8273 (N : Node_Id; Val : Node_Id); -- Node3
8275 procedure Set_First_Inlined_Subprogram
8276 (N : Node_Id; Val : Entity_Id); -- Node3
8278 procedure Set_First_Name
8279 (N : Node_Id; Val : Boolean := True); -- Flag5
8281 procedure Set_First_Named_Actual
8282 (N : Node_Id; Val : Node_Id); -- Node4
8284 procedure Set_First_Real_Statement
8285 (N : Node_Id; Val : Node_Id); -- Node2
8287 procedure Set_First_Subtype_Link
8288 (N : Node_Id; Val : Entity_Id); -- Node5
8290 procedure Set_Float_Truncate
8291 (N : Node_Id; Val : Boolean := True); -- Flag11
8293 procedure Set_Formal_Type_Definition
8294 (N : Node_Id; Val : Node_Id); -- Node3
8296 procedure Set_Forwards_OK
8297 (N : Node_Id; Val : Boolean := True); -- Flag5
8299 procedure Set_From_At_Mod
8300 (N : Node_Id; Val : Boolean := True); -- Flag4
8302 procedure Set_From_Default
8303 (N : Node_Id; Val : Boolean := True); -- Flag6
8305 procedure Set_Generic_Associations
8306 (N : Node_Id; Val : List_Id); -- List3
8308 procedure Set_Generic_Formal_Declarations
8309 (N : Node_Id; Val : List_Id); -- List2
8311 procedure Set_Generic_Parent
8312 (N : Node_Id; Val : Node_Id); -- Node5
8314 procedure Set_Generic_Parent_Type
8315 (N : Node_Id; Val : Node_Id); -- Node4
8317 procedure Set_Handled_Statement_Sequence
8318 (N : Node_Id; Val : Node_Id); -- Node4
8320 procedure Set_Handler_List_Entry
8321 (N : Node_Id; Val : Node_Id); -- Node2
8323 procedure Set_Has_Created_Identifier
8324 (N : Node_Id; Val : Boolean := True); -- Flag15
8326 procedure Set_Has_Dynamic_Length_Check
8327 (N : Node_Id; Val : Boolean := True); -- Flag10
8329 procedure Set_Has_Dynamic_Range_Check
8330 (N : Node_Id; Val : Boolean := True); -- Flag12
8332 procedure Set_Has_No_Elaboration_Code
8333 (N : Node_Id; Val : Boolean := True); -- Flag17
8335 procedure Set_Has_Priority_Pragma
8336 (N : Node_Id; Val : Boolean := True); -- Flag6
8338 procedure Set_Has_Private_View
8339 (N : Node_Id; Val : Boolean := True); -- Flag11
8341 procedure Set_Has_Storage_Size_Pragma
8342 (N : Node_Id; Val : Boolean := True); -- Flag5
8344 procedure Set_Has_Task_Info_Pragma
8345 (N : Node_Id; Val : Boolean := True); -- Flag7
8347 procedure Set_Has_Task_Name_Pragma
8348 (N : Node_Id; Val : Boolean := True); -- Flag8
8350 procedure Set_Has_Wide_Character
8351 (N : Node_Id; Val : Boolean := True); -- Flag11
8353 procedure Set_Hidden_By_Use_Clause
8354 (N : Node_Id; Val : Elist_Id); -- Elist4
8356 procedure Set_High_Bound
8357 (N : Node_Id; Val : Node_Id); -- Node2
8359 procedure Set_Identifier
8360 (N : Node_Id; Val : Node_Id); -- Node1
8362 procedure Set_Interface_List
8363 (N : Node_Id; Val : List_Id); -- List2
8365 procedure Set_Interface_Present
8366 (N : Node_Id; Val : Boolean := True); -- Flag16
8368 procedure Set_Implicit_With
8369 (N : Node_Id; Val : Boolean := True); -- Flag16
8371 procedure Set_In_Present
8372 (N : Node_Id; Val : Boolean := True); -- Flag15
8374 procedure Set_Includes_Infinities
8375 (N : Node_Id; Val : Boolean := True); -- Flag11
8377 procedure Set_Instance_Spec
8378 (N : Node_Id; Val : Node_Id); -- Node5
8380 procedure Set_Intval
8381 (N : Node_Id; Val : Uint); -- Uint3
8383 procedure Set_Is_Asynchronous_Call_Block
8384 (N : Node_Id; Val : Boolean := True); -- Flag7
8386 procedure Set_Is_Component_Left_Opnd
8387 (N : Node_Id; Val : Boolean := True); -- Flag13
8389 procedure Set_Is_Component_Right_Opnd
8390 (N : Node_Id; Val : Boolean := True); -- Flag14
8392 procedure Set_Is_Controlling_Actual
8393 (N : Node_Id; Val : Boolean := True); -- Flag16
8395 procedure Set_Is_In_Discriminant_Check
8396 (N : Node_Id; Val : Boolean := True); -- Flag11
8398 procedure Set_Is_Machine_Number
8399 (N : Node_Id; Val : Boolean := True); -- Flag11
8401 procedure Set_Is_Null_Loop
8402 (N : Node_Id; Val : Boolean := True); -- Flag16
8404 procedure Set_Is_Overloaded
8405 (N : Node_Id; Val : Boolean := True); -- Flag5
8407 procedure Set_Is_Power_Of_2_For_Shift
8408 (N : Node_Id; Val : Boolean := True); -- Flag13
8410 procedure Set_Is_Protected_Subprogram_Body
8411 (N : Node_Id; Val : Boolean := True); -- Flag7
8413 procedure Set_Is_Static_Expression
8414 (N : Node_Id; Val : Boolean := True); -- Flag6
8416 procedure Set_Is_Subprogram_Descriptor
8417 (N : Node_Id; Val : Boolean := True); -- Flag16
8419 procedure Set_Is_Task_Allocation_Block
8420 (N : Node_Id; Val : Boolean := True); -- Flag6
8422 procedure Set_Is_Task_Master
8423 (N : Node_Id; Val : Boolean := True); -- Flag5
8425 procedure Set_Iteration_Scheme
8426 (N : Node_Id; Val : Node_Id); -- Node2
8429 (N : Node_Id; Val : Entity_Id); -- Node1
8431 procedure Set_Kill_Range_Check
8432 (N : Node_Id; Val : Boolean := True); -- Flag11
8434 procedure Set_Last_Bit
8435 (N : Node_Id; Val : Node_Id); -- Node4
8437 procedure Set_Last_Name
8438 (N : Node_Id; Val : Boolean := True); -- Flag6
8440 procedure Set_Library_Unit
8441 (N : Node_Id; Val : Node_Id); -- Node4
8443 procedure Set_Label_Construct
8444 (N : Node_Id; Val : Node_Id); -- Node2
8446 procedure Set_Left_Opnd
8447 (N : Node_Id; Val : Node_Id); -- Node2
8449 procedure Set_Limited_View_Installed
8450 (N : Node_Id; Val : Boolean := True); -- Flag18
8452 procedure Set_Limited_Present
8453 (N : Node_Id; Val : Boolean := True); -- Flag17
8455 procedure Set_Literals
8456 (N : Node_Id; Val : List_Id); -- List1
8458 procedure Set_Loop_Actions
8459 (N : Node_Id; Val : List_Id); -- List2
8461 procedure Set_Loop_Parameter_Specification
8462 (N : Node_Id; Val : Node_Id); -- Node4
8464 procedure Set_Low_Bound
8465 (N : Node_Id; Val : Node_Id); -- Node1
8467 procedure Set_Mod_Clause
8468 (N : Node_Id; Val : Node_Id); -- Node2
8470 procedure Set_More_Ids
8471 (N : Node_Id; Val : Boolean := True); -- Flag5
8473 procedure Set_Must_Be_Byte_Aligned
8474 (N : Node_Id; Val : Boolean := True); -- Flag14
8476 procedure Set_Must_Not_Freeze
8477 (N : Node_Id; Val : Boolean := True); -- Flag8
8479 procedure Set_Must_Not_Override
8480 (N : Node_Id; Val : Boolean := True); -- Flag15
8482 procedure Set_Must_Override
8483 (N : Node_Id; Val : Boolean := True); -- Flag14
8486 (N : Node_Id; Val : Node_Id); -- Node2
8489 (N : Node_Id; Val : List_Id); -- List2
8491 procedure Set_Next_Entity
8492 (N : Node_Id; Val : Node_Id); -- Node2
8494 procedure Set_Next_Named_Actual
8495 (N : Node_Id; Val : Node_Id); -- Node4
8497 procedure Set_Next_Rep_Item
8498 (N : Node_Id; Val : Node_Id); -- Node4
8500 procedure Set_Next_Use_Clause
8501 (N : Node_Id; Val : Node_Id); -- Node3
8503 procedure Set_No_Ctrl_Actions
8504 (N : Node_Id; Val : Boolean := True); -- Flag7
8506 procedure Set_No_Elaboration_Check
8507 (N : Node_Id; Val : Boolean := True); -- Flag14
8509 procedure Set_No_Entities_Ref_In_Spec
8510 (N : Node_Id; Val : Boolean := True); -- Flag8
8512 procedure Set_No_Initialization
8513 (N : Node_Id; Val : Boolean := True); -- Flag13
8515 procedure Set_No_Truncation
8516 (N : Node_Id; Val : Boolean := True); -- Flag17
8518 procedure Set_Null_Present
8519 (N : Node_Id; Val : Boolean := True); -- Flag13
8521 procedure Set_Null_Exclusion_Present
8522 (N : Node_Id; Val : Boolean := True); -- Flag11
8524 procedure Set_Null_Record_Present
8525 (N : Node_Id; Val : Boolean := True); -- Flag17
8527 procedure Set_Object_Definition
8528 (N : Node_Id; Val : Node_Id); -- Node4
8530 procedure Set_Original_Discriminant
8531 (N : Node_Id; Val : Node_Id); -- Node2
8533 procedure Set_Original_Entity
8534 (N : Node_Id; Val : Entity_Id); -- Node2
8536 procedure Set_Others_Discrete_Choices
8537 (N : Node_Id; Val : List_Id); -- List1
8539 procedure Set_Out_Present
8540 (N : Node_Id; Val : Boolean := True); -- Flag17
8542 procedure Set_Parameter_Associations
8543 (N : Node_Id; Val : List_Id); -- List3
8545 procedure Set_Parameter_List_Truncated
8546 (N : Node_Id; Val : Boolean := True); -- Flag17
8548 procedure Set_Parameter_Specifications
8549 (N : Node_Id; Val : List_Id); -- List3
8551 procedure Set_Parameter_Type
8552 (N : Node_Id; Val : Node_Id); -- Node2
8554 procedure Set_Parent_Spec
8555 (N : Node_Id; Val : Node_Id); -- Node4
8557 procedure Set_Position
8558 (N : Node_Id; Val : Node_Id); -- Node2
8560 procedure Set_Pragma_Argument_Associations
8561 (N : Node_Id; Val : List_Id); -- List2
8563 procedure Set_Pragmas_After
8564 (N : Node_Id; Val : List_Id); -- List5
8566 procedure Set_Pragmas_Before
8567 (N : Node_Id; Val : List_Id); -- List4
8569 procedure Set_Prefix
8570 (N : Node_Id; Val : Node_Id); -- Node3
8572 procedure Set_Present_Expr
8573 (N : Node_Id; Val : Uint); -- Uint3
8575 procedure Set_Prev_Ids
8576 (N : Node_Id; Val : Boolean := True); -- Flag6
8578 procedure Set_Print_In_Hex
8579 (N : Node_Id; Val : Boolean := True); -- Flag13
8581 procedure Set_Private_Declarations
8582 (N : Node_Id; Val : List_Id); -- List3
8584 procedure Set_Private_Present
8585 (N : Node_Id; Val : Boolean := True); -- Flag15
8587 procedure Set_Procedure_To_Call
8588 (N : Node_Id; Val : Node_Id); -- Node4
8590 procedure Set_Proper_Body
8591 (N : Node_Id; Val : Node_Id); -- Node1
8593 procedure Set_Protected_Definition
8594 (N : Node_Id; Val : Node_Id); -- Node3
8596 procedure Set_Protected_Present
8597 (N : Node_Id; Val : Boolean := True); -- Flag6
8599 procedure Set_Raises_Constraint_Error
8600 (N : Node_Id; Val : Boolean := True); -- Flag7
8602 procedure Set_Range_Constraint
8603 (N : Node_Id; Val : Node_Id); -- Node4
8605 procedure Set_Range_Expression
8606 (N : Node_Id; Val : Node_Id); -- Node4
8608 procedure Set_Real_Range_Specification
8609 (N : Node_Id; Val : Node_Id); -- Node4
8611 procedure Set_Realval
8612 (N : Node_Id; Val : Ureal); -- Ureal3
8614 procedure Set_Reason
8615 (N : Node_Id; Val : Uint); -- Uint3
8617 procedure Set_Record_Extension_Part
8618 (N : Node_Id; Val : Node_Id); -- Node3
8620 procedure Set_Redundant_Use
8621 (N : Node_Id; Val : Boolean := True); -- Flag13
8623 procedure Set_Result_Definition
8624 (N : Node_Id; Val : Node_Id); -- Node4
8626 procedure Set_Return_Type
8627 (N : Node_Id; Val : Node_Id); -- Node2
8629 procedure Set_Reverse_Present
8630 (N : Node_Id; Val : Boolean := True); -- Flag15
8632 procedure Set_Right_Opnd
8633 (N : Node_Id; Val : Node_Id); -- Node3
8635 procedure Set_Rounded_Result
8636 (N : Node_Id; Val : Boolean := True); -- Flag18
8639 (N : Node_Id; Val : Node_Id); -- Node3
8641 procedure Set_Select_Alternatives
8642 (N : Node_Id; Val : List_Id); -- List1
8644 procedure Set_Selector_Name
8645 (N : Node_Id; Val : Node_Id); -- Node2
8647 procedure Set_Selector_Names
8648 (N : Node_Id; Val : List_Id); -- List1
8650 procedure Set_Shift_Count_OK
8651 (N : Node_Id; Val : Boolean := True); -- Flag4
8653 procedure Set_Source_Type
8654 (N : Node_Id; Val : Entity_Id); -- Node1
8656 procedure Set_Specification
8657 (N : Node_Id; Val : Node_Id); -- Node1
8659 procedure Set_Statements
8660 (N : Node_Id; Val : List_Id); -- List3
8662 procedure Set_Static_Processing_OK
8663 (N : Node_Id; Val : Boolean); -- Flag4
8665 procedure Set_Storage_Pool
8666 (N : Node_Id; Val : Node_Id); -- Node1
8668 procedure Set_Strval
8669 (N : Node_Id; Val : String_Id); -- Str3
8671 procedure Set_Subtype_Indication
8672 (N : Node_Id; Val : Node_Id); -- Node5
8674 procedure Set_Subtype_Mark
8675 (N : Node_Id; Val : Node_Id); -- Node4
8677 procedure Set_Subtype_Marks
8678 (N : Node_Id; Val : List_Id); -- List2
8680 procedure Set_Synchronized_Present
8681 (N : Node_Id; Val : Boolean := True); -- Flag7
8683 procedure Set_Tagged_Present
8684 (N : Node_Id; Val : Boolean := True); -- Flag15
8686 procedure Set_Target_Type
8687 (N : Node_Id; Val : Entity_Id); -- Node2
8689 procedure Set_Task_Definition
8690 (N : Node_Id; Val : Node_Id); -- Node3
8692 procedure Set_Task_Present
8693 (N : Node_Id; Val : Boolean := True); -- Flag5
8695 procedure Set_Then_Actions
8696 (N : Node_Id; Val : List_Id); -- List2
8698 procedure Set_Then_Statements
8699 (N : Node_Id; Val : List_Id); -- List2
8701 procedure Set_Treat_Fixed_As_Integer
8702 (N : Node_Id; Val : Boolean := True); -- Flag14
8704 procedure Set_Triggering_Alternative
8705 (N : Node_Id; Val : Node_Id); -- Node1
8707 procedure Set_Triggering_Statement
8708 (N : Node_Id; Val : Node_Id); -- Node1
8710 procedure Set_TSS_Elist
8711 (N : Node_Id; Val : Elist_Id); -- Elist3
8713 procedure Set_Type_Definition
8714 (N : Node_Id; Val : Node_Id); -- Node3
8717 (N : Node_Id; Val : Node_Id); -- Node2
8719 procedure Set_Unknown_Discriminants_Present
8720 (N : Node_Id; Val : Boolean := True); -- Flag13
8722 procedure Set_Unreferenced_In_Spec
8723 (N : Node_Id; Val : Boolean := True); -- Flag7
8725 procedure Set_Variant_Part
8726 (N : Node_Id; Val : Node_Id); -- Node4
8728 procedure Set_Variants
8729 (N : Node_Id; Val : List_Id); -- List1
8731 procedure Set_Visible_Declarations
8732 (N : Node_Id; Val : List_Id); -- List2
8734 procedure Set_Was_Originally_Stub
8735 (N : Node_Id; Val : Boolean := True); -- Flag13
8737 procedure Set_Zero_Cost_Handling
8738 (N : Node_Id; Val : Boolean := True); -- Flag5
8740 -------------------------
8741 -- Iterator Procedures --
8742 -------------------------
8744 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
8746 procedure Next_Entity (N : in out Node_Id);
8747 procedure Next_Named_Actual (N : in out Node_Id);
8748 procedure Next_Rep_Item (N : in out Node_Id);
8749 procedure Next_Use_Clause (N : in out Node_Id);
8751 --------------------------------------
8752 -- Logical Access to End_Span Field --
8753 --------------------------------------
8755 function End_Location (N : Node_Id) return Source_Ptr;
8756 -- N is an N_If_Statement or N_Case_Statement node, and this
8757 -- function returns the location of the IF token in the END IF
8758 -- sequence by translating the value of the End_Span field.
8760 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
8761 -- N is an N_If_Statement or N_Case_Statement node. This procedure
8762 -- sets the End_Span field to correspond to the given value S. In
8763 -- other words, End_Span is set to the difference between S and
8764 -- Sloc (N), the starting location.
8766 --------------------
8767 -- Inline Pragmas --
8768 --------------------
8770 pragma Inline (ABE_Is_Certain);
8771 pragma Inline (Abort_Present);
8772 pragma Inline (Abortable_Part);
8773 pragma Inline (Abstract_Present);
8774 pragma Inline (Accept_Handler_Records);
8775 pragma Inline (Accept_Statement);
8776 pragma Inline (Access_Definition);
8777 pragma Inline (Access_To_Subprogram_Definition);
8778 pragma Inline (Access_Types_To_Process);
8779 pragma Inline (Actions);
8780 pragma Inline (Activation_Chain_Entity);
8781 pragma Inline (Acts_As_Spec);
8782 pragma Inline (Actual_Designated_Subtype);
8783 pragma Inline (Aggregate_Bounds);
8784 pragma Inline (Aliased_Present);
8785 pragma Inline (All_Others);
8786 pragma Inline (All_Present);
8787 pragma Inline (Alternatives);
8788 pragma Inline (Ancestor_Part);
8789 pragma Inline (Array_Aggregate);
8790 pragma Inline (Assignment_OK);
8791 pragma Inline (Associated_Node);
8792 pragma Inline (At_End_Proc);
8793 pragma Inline (Attribute_Name);
8794 pragma Inline (Aux_Decls_Node);
8795 pragma Inline (Backwards_OK);
8796 pragma Inline (Bad_Is_Detected);
8797 pragma Inline (Body_To_Inline);
8798 pragma Inline (Body_Required);
8799 pragma Inline (By_Ref);
8800 pragma Inline (Box_Present);
8801 pragma Inline (Char_Literal_Value);
8802 pragma Inline (Chars);
8803 pragma Inline (Check_Address_Alignment);
8804 pragma Inline (Choice_Parameter);
8805 pragma Inline (Choices);
8806 pragma Inline (Compile_Time_Known_Aggregate);
8807 pragma Inline (Component_Associations);
8808 pragma Inline (Component_Clauses);
8809 pragma Inline (Component_Definition);
8810 pragma Inline (Component_Items);
8811 pragma Inline (Component_List);
8812 pragma Inline (Component_Name);
8813 pragma Inline (Condition);
8814 pragma Inline (Condition_Actions);
8815 pragma Inline (Config_Pragmas);
8816 pragma Inline (Constant_Present);
8817 pragma Inline (Constraint);
8818 pragma Inline (Constraints);
8819 pragma Inline (Context_Installed);
8820 pragma Inline (Context_Items);
8821 pragma Inline (Controlling_Argument);
8822 pragma Inline (Conversion_OK);
8823 pragma Inline (Corresponding_Body);
8824 pragma Inline (Corresponding_Formal_Spec);
8825 pragma Inline (Corresponding_Generic_Association);
8826 pragma Inline (Corresponding_Integer_Value);
8827 pragma Inline (Corresponding_Spec);
8828 pragma Inline (Corresponding_Stub);
8829 pragma Inline (Dcheck_Function);
8830 pragma Inline (Debug_Statement);
8831 pragma Inline (Declarations);
8832 pragma Inline (Default_Expression);
8833 pragma Inline (Default_Name);
8834 pragma Inline (Defining_Identifier);
8835 pragma Inline (Defining_Unit_Name);
8836 pragma Inline (Delay_Alternative);
8837 pragma Inline (Delay_Finalize_Attach);
8838 pragma Inline (Delay_Statement);
8839 pragma Inline (Delta_Expression);
8840 pragma Inline (Digits_Expression);
8841 pragma Inline (Discr_Check_Funcs_Built);
8842 pragma Inline (Discrete_Choices);
8843 pragma Inline (Discrete_Range);
8844 pragma Inline (Discrete_Subtype_Definition);
8845 pragma Inline (Discrete_Subtype_Definitions);
8846 pragma Inline (Discriminant_Specifications);
8847 pragma Inline (Discriminant_Type);
8848 pragma Inline (Do_Accessibility_Check);
8849 pragma Inline (Do_Discriminant_Check);
8850 pragma Inline (Do_Length_Check);
8851 pragma Inline (Do_Division_Check);
8852 pragma Inline (Do_Overflow_Check);
8853 pragma Inline (Do_Range_Check);
8854 pragma Inline (Do_Storage_Check);
8855 pragma Inline (Do_Tag_Check);
8856 pragma Inline (Elaborate_Present);
8857 pragma Inline (Elaborate_All_Desirable);
8858 pragma Inline (Elaborate_All_Present);
8859 pragma Inline (Elaborate_Desirable);
8860 pragma Inline (Elaboration_Boolean);
8861 pragma Inline (Else_Actions);
8862 pragma Inline (Else_Statements);
8863 pragma Inline (Elsif_Parts);
8864 pragma Inline (Enclosing_Variant);
8865 pragma Inline (End_Label);
8866 pragma Inline (End_Span);
8867 pragma Inline (Entity);
8868 pragma Inline (Entity_Or_Associated_Node);
8869 pragma Inline (Entry_Body_Formal_Part);
8870 pragma Inline (Entry_Call_Alternative);
8871 pragma Inline (Entry_Call_Statement);
8872 pragma Inline (Entry_Direct_Name);
8873 pragma Inline (Entry_Index);
8874 pragma Inline (Entry_Index_Specification);
8875 pragma Inline (Etype);
8876 pragma Inline (Exception_Choices);
8877 pragma Inline (Exception_Junk);
8878 pragma Inline (Exception_Handlers);
8879 pragma Inline (Expansion_Delayed);
8880 pragma Inline (Explicit_Actual_Parameter);
8881 pragma Inline (Explicit_Generic_Actual_Parameter);
8882 pragma Inline (Expression);
8883 pragma Inline (Expressions);
8884 pragma Inline (First_Bit);
8885 pragma Inline (First_Inlined_Subprogram);
8886 pragma Inline (First_Name);
8887 pragma Inline (First_Named_Actual);
8888 pragma Inline (First_Real_Statement);
8889 pragma Inline (First_Subtype_Link);
8890 pragma Inline (Float_Truncate);
8891 pragma Inline (Formal_Type_Definition);
8892 pragma Inline (Forwards_OK);
8893 pragma Inline (From_At_Mod);
8894 pragma Inline (From_Default);
8895 pragma Inline (Generic_Associations);
8896 pragma Inline (Generic_Formal_Declarations);
8897 pragma Inline (Generic_Parent);
8898 pragma Inline (Generic_Parent_Type);
8899 pragma Inline (Handled_Statement_Sequence);
8900 pragma Inline (Handler_List_Entry);
8901 pragma Inline (Has_Created_Identifier);
8902 pragma Inline (Has_Dynamic_Length_Check);
8903 pragma Inline (Has_Dynamic_Range_Check);
8904 pragma Inline (Has_No_Elaboration_Code);
8905 pragma Inline (Has_Priority_Pragma);
8906 pragma Inline (Has_Private_View);
8907 pragma Inline (Has_Storage_Size_Pragma);
8908 pragma Inline (Has_Task_Info_Pragma);
8909 pragma Inline (Has_Task_Name_Pragma);
8910 pragma Inline (Has_Wide_Character);
8911 pragma Inline (Hidden_By_Use_Clause);
8912 pragma Inline (High_Bound);
8913 pragma Inline (Identifier);
8914 pragma Inline (Implicit_With);
8915 pragma Inline (Interface_List);
8916 pragma Inline (Interface_Present);
8917 pragma Inline (Includes_Infinities);
8918 pragma Inline (In_Present);
8919 pragma Inline (Instance_Spec);
8920 pragma Inline (Intval);
8921 pragma Inline (Is_Asynchronous_Call_Block);
8922 pragma Inline (Is_Component_Left_Opnd);
8923 pragma Inline (Is_Component_Right_Opnd);
8924 pragma Inline (Is_Controlling_Actual);
8925 pragma Inline (Is_In_Discriminant_Check);
8926 pragma Inline (Is_Machine_Number);
8927 pragma Inline (Is_Null_Loop);
8928 pragma Inline (Is_Overloaded);
8929 pragma Inline (Is_Power_Of_2_For_Shift);
8930 pragma Inline (Is_Protected_Subprogram_Body);
8931 pragma Inline (Is_Static_Expression);
8932 pragma Inline (Is_Subprogram_Descriptor);
8933 pragma Inline (Is_Task_Allocation_Block);
8934 pragma Inline (Is_Task_Master);
8935 pragma Inline (Iteration_Scheme);
8936 pragma Inline (Itype);
8937 pragma Inline (Kill_Range_Check);
8938 pragma Inline (Last_Bit);
8939 pragma Inline (Last_Name);
8940 pragma Inline (Library_Unit);
8941 pragma Inline (Label_Construct);
8942 pragma Inline (Left_Opnd);
8943 pragma Inline (Limited_View_Installed);
8944 pragma Inline (Limited_Present);
8945 pragma Inline (Literals);
8946 pragma Inline (Loop_Actions);
8947 pragma Inline (Loop_Parameter_Specification);
8948 pragma Inline (Low_Bound);
8949 pragma Inline (Mod_Clause);
8950 pragma Inline (More_Ids);
8951 pragma Inline (Must_Be_Byte_Aligned);
8952 pragma Inline (Must_Not_Freeze);
8953 pragma Inline (Must_Not_Override);
8954 pragma Inline (Must_Override);
8955 pragma Inline (Name);
8956 pragma Inline (Names);
8957 pragma Inline (Next_Entity);
8958 pragma Inline (Next_Named_Actual);
8959 pragma Inline (Next_Rep_Item);
8960 pragma Inline (Next_Use_Clause);
8961 pragma Inline (No_Ctrl_Actions);
8962 pragma Inline (No_Elaboration_Check);
8963 pragma Inline (No_Entities_Ref_In_Spec);
8964 pragma Inline (No_Initialization);
8965 pragma Inline (No_Truncation);
8966 pragma Inline (Null_Present);
8967 pragma Inline (Null_Exclusion_Present);
8968 pragma Inline (Null_Record_Present);
8969 pragma Inline (Object_Definition);
8970 pragma Inline (Original_Discriminant);
8971 pragma Inline (Original_Entity);
8972 pragma Inline (Others_Discrete_Choices);
8973 pragma Inline (Out_Present);
8974 pragma Inline (Parameter_Associations);
8975 pragma Inline (Parameter_Specifications);
8976 pragma Inline (Parameter_List_Truncated);
8977 pragma Inline (Parameter_Type);
8978 pragma Inline (Parent_Spec);
8979 pragma Inline (Position);
8980 pragma Inline (Pragma_Argument_Associations);
8981 pragma Inline (Pragmas_After);
8982 pragma Inline (Pragmas_Before);
8983 pragma Inline (Prefix);
8984 pragma Inline (Present_Expr);
8985 pragma Inline (Prev_Ids);
8986 pragma Inline (Print_In_Hex);
8987 pragma Inline (Private_Declarations);
8988 pragma Inline (Private_Present);
8989 pragma Inline (Procedure_To_Call);
8990 pragma Inline (Proper_Body);
8991 pragma Inline (Protected_Definition);
8992 pragma Inline (Protected_Present);
8993 pragma Inline (Raises_Constraint_Error);
8994 pragma Inline (Range_Constraint);
8995 pragma Inline (Range_Expression);
8996 pragma Inline (Real_Range_Specification);
8997 pragma Inline (Realval);
8998 pragma Inline (Reason);
8999 pragma Inline (Record_Extension_Part);
9000 pragma Inline (Redundant_Use);
9001 pragma Inline (Result_Definition);
9002 pragma Inline (Return_Type);
9003 pragma Inline (Reverse_Present);
9004 pragma Inline (Right_Opnd);
9005 pragma Inline (Rounded_Result);
9006 pragma Inline (Scope);
9007 pragma Inline (Select_Alternatives);
9008 pragma Inline (Selector_Name);
9009 pragma Inline (Selector_Names);
9010 pragma Inline (Shift_Count_OK);
9011 pragma Inline (Source_Type);
9012 pragma Inline (Specification);
9013 pragma Inline (Statements);
9014 pragma Inline (Static_Processing_OK);
9015 pragma Inline (Storage_Pool);
9016 pragma Inline (Strval);
9017 pragma Inline (Subtype_Indication);
9018 pragma Inline (Subtype_Mark);
9019 pragma Inline (Subtype_Marks);
9020 pragma Inline (Synchronized_Present);
9021 pragma Inline (Tagged_Present);
9022 pragma Inline (Target_Type);
9023 pragma Inline (Task_Definition);
9024 pragma Inline (Task_Present);
9025 pragma Inline (Then_Actions);
9026 pragma Inline (Then_Statements);
9027 pragma Inline (Triggering_Alternative);
9028 pragma Inline (Triggering_Statement);
9029 pragma Inline (Treat_Fixed_As_Integer);
9030 pragma Inline (TSS_Elist);
9031 pragma Inline (Type_Definition);
9032 pragma Inline (Unit);
9033 pragma Inline (Unknown_Discriminants_Present);
9034 pragma Inline (Unreferenced_In_Spec);
9035 pragma Inline (Variant_Part);
9036 pragma Inline (Variants);
9037 pragma Inline (Visible_Declarations);
9038 pragma Inline (Was_Originally_Stub);
9039 pragma Inline (Zero_Cost_Handling);
9041 pragma Inline (Set_ABE_Is_Certain);
9042 pragma Inline (Set_Abort_Present);
9043 pragma Inline (Set_Abortable_Part);
9044 pragma Inline (Set_Abstract_Present);
9045 pragma Inline (Set_Accept_Handler_Records);
9046 pragma Inline (Set_Accept_Statement);
9047 pragma Inline (Set_Access_Definition);
9048 pragma Inline (Set_Access_To_Subprogram_Definition);
9049 pragma Inline (Set_Access_Types_To_Process);
9050 pragma Inline (Set_Actions);
9051 pragma Inline (Set_Activation_Chain_Entity);
9052 pragma Inline (Set_Acts_As_Spec);
9053 pragma Inline (Set_Actual_Designated_Subtype);
9054 pragma Inline (Set_Aggregate_Bounds);
9055 pragma Inline (Set_Aliased_Present);
9056 pragma Inline (Set_All_Others);
9057 pragma Inline (Set_All_Present);
9058 pragma Inline (Set_Alternatives);
9059 pragma Inline (Set_Ancestor_Part);
9060 pragma Inline (Set_Array_Aggregate);
9061 pragma Inline (Set_Assignment_OK);
9062 pragma Inline (Set_Associated_Node);
9063 pragma Inline (Set_At_End_Proc);
9064 pragma Inline (Set_Attribute_Name);
9065 pragma Inline (Set_Aux_Decls_Node);
9066 pragma Inline (Set_Backwards_OK);
9067 pragma Inline (Set_Bad_Is_Detected);
9068 pragma Inline (Set_Body_To_Inline);
9069 pragma Inline (Set_Body_Required);
9070 pragma Inline (Set_By_Ref);
9071 pragma Inline (Set_Box_Present);
9072 pragma Inline (Set_Char_Literal_Value);
9073 pragma Inline (Set_Chars);
9074 pragma Inline (Set_Check_Address_Alignment);
9075 pragma Inline (Set_Choice_Parameter);
9076 pragma Inline (Set_Choices);
9077 pragma Inline (Set_Compile_Time_Known_Aggregate);
9078 pragma Inline (Set_Component_Associations);
9079 pragma Inline (Set_Component_Clauses);
9080 pragma Inline (Set_Component_Definition);
9081 pragma Inline (Set_Component_Items);
9082 pragma Inline (Set_Component_List);
9083 pragma Inline (Set_Component_Name);
9084 pragma Inline (Set_Condition);
9085 pragma Inline (Set_Condition_Actions);
9086 pragma Inline (Set_Config_Pragmas);
9087 pragma Inline (Set_Constant_Present);
9088 pragma Inline (Set_Constraint);
9089 pragma Inline (Set_Constraints);
9090 pragma Inline (Set_Context_Installed);
9091 pragma Inline (Set_Context_Items);
9092 pragma Inline (Set_Controlling_Argument);
9093 pragma Inline (Set_Conversion_OK);
9094 pragma Inline (Set_Corresponding_Body);
9095 pragma Inline (Set_Corresponding_Formal_Spec);
9096 pragma Inline (Set_Corresponding_Generic_Association);
9097 pragma Inline (Set_Corresponding_Integer_Value);
9098 pragma Inline (Set_Corresponding_Spec);
9099 pragma Inline (Set_Corresponding_Stub);
9100 pragma Inline (Set_Dcheck_Function);
9101 pragma Inline (Set_Debug_Statement);
9102 pragma Inline (Set_Declarations);
9103 pragma Inline (Set_Default_Expression);
9104 pragma Inline (Set_Default_Name);
9105 pragma Inline (Set_Defining_Identifier);
9106 pragma Inline (Set_Defining_Unit_Name);
9107 pragma Inline (Set_Delay_Alternative);
9108 pragma Inline (Set_Delay_Finalize_Attach);
9109 pragma Inline (Set_Delay_Statement);
9110 pragma Inline (Set_Delta_Expression);
9111 pragma Inline (Set_Digits_Expression);
9112 pragma Inline (Set_Discr_Check_Funcs_Built);
9113 pragma Inline (Set_Discrete_Choices);
9114 pragma Inline (Set_Discrete_Range);
9115 pragma Inline (Set_Discrete_Subtype_Definition);
9116 pragma Inline (Set_Discrete_Subtype_Definitions);
9117 pragma Inline (Set_Discriminant_Specifications);
9118 pragma Inline (Set_Discriminant_Type);
9119 pragma Inline (Set_Do_Accessibility_Check);
9120 pragma Inline (Set_Do_Discriminant_Check);
9121 pragma Inline (Set_Do_Length_Check);
9122 pragma Inline (Set_Do_Division_Check);
9123 pragma Inline (Set_Do_Overflow_Check);
9124 pragma Inline (Set_Do_Range_Check);
9125 pragma Inline (Set_Do_Storage_Check);
9126 pragma Inline (Set_Do_Tag_Check);
9127 pragma Inline (Set_Elaborate_Present);
9128 pragma Inline (Set_Elaborate_All_Desirable);
9129 pragma Inline (Set_Elaborate_All_Present);
9130 pragma Inline (Set_Elaborate_Desirable);
9131 pragma Inline (Set_Elaboration_Boolean);
9132 pragma Inline (Set_Else_Actions);
9133 pragma Inline (Set_Else_Statements);
9134 pragma Inline (Set_Elsif_Parts);
9135 pragma Inline (Set_Enclosing_Variant);
9136 pragma Inline (Set_End_Label);
9137 pragma Inline (Set_End_Span);
9138 pragma Inline (Set_Entity);
9139 pragma Inline (Set_Entry_Body_Formal_Part);
9140 pragma Inline (Set_Entry_Call_Alternative);
9141 pragma Inline (Set_Entry_Call_Statement);
9142 pragma Inline (Set_Entry_Direct_Name);
9143 pragma Inline (Set_Entry_Index);
9144 pragma Inline (Set_Entry_Index_Specification);
9145 pragma Inline (Set_Etype);
9146 pragma Inline (Set_Exception_Choices);
9147 pragma Inline (Set_Exception_Junk);
9148 pragma Inline (Set_Exception_Handlers);
9149 pragma Inline (Set_Expansion_Delayed);
9150 pragma Inline (Set_Explicit_Actual_Parameter);
9151 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
9152 pragma Inline (Set_Expression);
9153 pragma Inline (Set_Expressions);
9154 pragma Inline (Set_First_Bit);
9155 pragma Inline (Set_First_Inlined_Subprogram);
9156 pragma Inline (Set_First_Name);
9157 pragma Inline (Set_First_Named_Actual);
9158 pragma Inline (Set_First_Real_Statement);
9159 pragma Inline (Set_First_Subtype_Link);
9160 pragma Inline (Set_Float_Truncate);
9161 pragma Inline (Set_Formal_Type_Definition);
9162 pragma Inline (Set_Forwards_OK);
9163 pragma Inline (Set_From_At_Mod);
9164 pragma Inline (Set_From_Default);
9165 pragma Inline (Set_Generic_Associations);
9166 pragma Inline (Set_Generic_Formal_Declarations);
9167 pragma Inline (Set_Generic_Parent);
9168 pragma Inline (Set_Generic_Parent_Type);
9169 pragma Inline (Set_Handled_Statement_Sequence);
9170 pragma Inline (Set_Handler_List_Entry);
9171 pragma Inline (Set_Has_Created_Identifier);
9172 pragma Inline (Set_Has_Dynamic_Length_Check);
9173 pragma Inline (Set_Has_Dynamic_Range_Check);
9174 pragma Inline (Set_Has_No_Elaboration_Code);
9175 pragma Inline (Set_Has_Priority_Pragma);
9176 pragma Inline (Set_Has_Private_View);
9177 pragma Inline (Set_Has_Storage_Size_Pragma);
9178 pragma Inline (Set_Has_Task_Info_Pragma);
9179 pragma Inline (Set_Has_Task_Name_Pragma);
9180 pragma Inline (Set_Has_Wide_Character);
9181 pragma Inline (Set_Hidden_By_Use_Clause);
9182 pragma Inline (Set_High_Bound);
9183 pragma Inline (Set_Identifier);
9184 pragma Inline (Set_Implicit_With);
9185 pragma Inline (Set_Includes_Infinities);
9186 pragma Inline (Set_Interface_List);
9187 pragma Inline (Set_Interface_Present);
9188 pragma Inline (Set_In_Present);
9189 pragma Inline (Set_Instance_Spec);
9190 pragma Inline (Set_Intval);
9191 pragma Inline (Set_Is_Asynchronous_Call_Block);
9192 pragma Inline (Set_Is_Component_Left_Opnd);
9193 pragma Inline (Set_Is_Component_Right_Opnd);
9194 pragma Inline (Set_Is_Controlling_Actual);
9195 pragma Inline (Set_Is_In_Discriminant_Check);
9196 pragma Inline (Set_Is_Machine_Number);
9197 pragma Inline (Set_Is_Null_Loop);
9198 pragma Inline (Set_Is_Overloaded);
9199 pragma Inline (Set_Is_Power_Of_2_For_Shift);
9200 pragma Inline (Set_Is_Protected_Subprogram_Body);
9201 pragma Inline (Set_Is_Static_Expression);
9202 pragma Inline (Set_Is_Subprogram_Descriptor);
9203 pragma Inline (Set_Is_Task_Allocation_Block);
9204 pragma Inline (Set_Is_Task_Master);
9205 pragma Inline (Set_Iteration_Scheme);
9206 pragma Inline (Set_Itype);
9207 pragma Inline (Set_Kill_Range_Check);
9208 pragma Inline (Set_Last_Bit);
9209 pragma Inline (Set_Last_Name);
9210 pragma Inline (Set_Library_Unit);
9211 pragma Inline (Set_Label_Construct);
9212 pragma Inline (Set_Left_Opnd);
9213 pragma Inline (Set_Limited_View_Installed);
9214 pragma Inline (Set_Limited_Present);
9215 pragma Inline (Set_Literals);
9216 pragma Inline (Set_Loop_Actions);
9217 pragma Inline (Set_Loop_Parameter_Specification);
9218 pragma Inline (Set_Low_Bound);
9219 pragma Inline (Set_Mod_Clause);
9220 pragma Inline (Set_More_Ids);
9221 pragma Inline (Set_Must_Be_Byte_Aligned);
9222 pragma Inline (Set_Must_Not_Freeze);
9223 pragma Inline (Set_Must_Not_Override);
9224 pragma Inline (Set_Must_Override);
9225 pragma Inline (Set_Name);
9226 pragma Inline (Set_Names);
9227 pragma Inline (Set_Next_Entity);
9228 pragma Inline (Set_Next_Named_Actual);
9229 pragma Inline (Set_Next_Use_Clause);
9230 pragma Inline (Set_No_Ctrl_Actions);
9231 pragma Inline (Set_No_Elaboration_Check);
9232 pragma Inline (Set_No_Entities_Ref_In_Spec);
9233 pragma Inline (Set_No_Initialization);
9234 pragma Inline (Set_No_Truncation);
9235 pragma Inline (Set_Null_Present);
9236 pragma Inline (Set_Null_Exclusion_Present);
9237 pragma Inline (Set_Null_Record_Present);
9238 pragma Inline (Set_Object_Definition);
9239 pragma Inline (Set_Original_Discriminant);
9240 pragma Inline (Set_Original_Entity);
9241 pragma Inline (Set_Others_Discrete_Choices);
9242 pragma Inline (Set_Out_Present);
9243 pragma Inline (Set_Parameter_Associations);
9244 pragma Inline (Set_Parameter_Specifications);
9245 pragma Inline (Set_Parameter_List_Truncated);
9246 pragma Inline (Set_Parameter_Type);
9247 pragma Inline (Set_Parent_Spec);
9248 pragma Inline (Set_Position);
9249 pragma Inline (Set_Pragma_Argument_Associations);
9250 pragma Inline (Set_Pragmas_After);
9251 pragma Inline (Set_Pragmas_Before);
9252 pragma Inline (Set_Prefix);
9253 pragma Inline (Set_Present_Expr);
9254 pragma Inline (Set_Prev_Ids);
9255 pragma Inline (Set_Print_In_Hex);
9256 pragma Inline (Set_Private_Declarations);
9257 pragma Inline (Set_Private_Present);
9258 pragma Inline (Set_Procedure_To_Call);
9259 pragma Inline (Set_Proper_Body);
9260 pragma Inline (Set_Protected_Definition);
9261 pragma Inline (Set_Protected_Present);
9262 pragma Inline (Set_Raises_Constraint_Error);
9263 pragma Inline (Set_Range_Constraint);
9264 pragma Inline (Set_Range_Expression);
9265 pragma Inline (Set_Real_Range_Specification);
9266 pragma Inline (Set_Realval);
9267 pragma Inline (Set_Reason);
9268 pragma Inline (Set_Record_Extension_Part);
9269 pragma Inline (Set_Redundant_Use);
9270 pragma Inline (Set_Result_Definition);
9271 pragma Inline (Set_Return_Type);
9272 pragma Inline (Set_Reverse_Present);
9273 pragma Inline (Set_Right_Opnd);
9274 pragma Inline (Set_Rounded_Result);
9275 pragma Inline (Set_Scope);
9276 pragma Inline (Set_Select_Alternatives);
9277 pragma Inline (Set_Selector_Name);
9278 pragma Inline (Set_Selector_Names);
9279 pragma Inline (Set_Shift_Count_OK);
9280 pragma Inline (Set_Source_Type);
9281 pragma Inline (Set_Specification);
9282 pragma Inline (Set_Statements);
9283 pragma Inline (Set_Static_Processing_OK);
9284 pragma Inline (Set_Storage_Pool);
9285 pragma Inline (Set_Strval);
9286 pragma Inline (Set_Subtype_Indication);
9287 pragma Inline (Set_Subtype_Mark);
9288 pragma Inline (Set_Subtype_Marks);
9289 pragma Inline (Set_Synchronized_Present);
9290 pragma Inline (Set_Tagged_Present);
9291 pragma Inline (Set_Target_Type);
9292 pragma Inline (Set_Task_Definition);
9293 pragma Inline (Set_Task_Present);
9294 pragma Inline (Set_Then_Actions);
9295 pragma Inline (Set_Then_Statements);
9296 pragma Inline (Set_Triggering_Alternative);
9297 pragma Inline (Set_Triggering_Statement);
9298 pragma Inline (Set_Treat_Fixed_As_Integer);
9299 pragma Inline (Set_TSS_Elist);
9300 pragma Inline (Set_Type_Definition);
9301 pragma Inline (Set_Unit);
9302 pragma Inline (Set_Unknown_Discriminants_Present);
9303 pragma Inline (Set_Unreferenced_In_Spec);
9304 pragma Inline (Set_Variant_Part);
9305 pragma Inline (Set_Variants);
9306 pragma Inline (Set_Visible_Declarations);
9307 pragma Inline (Set_Was_Originally_Stub);
9308 pragma Inline (Set_Zero_Cost_Handling);