1------------------------------------------------------------------------------ 2-- -- 3-- GNAT COMPILER COMPONENTS -- 4-- -- 5-- S I N F O -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 1992-2004, Free Software Foundation, Inc. -- 10-- -- 11-- GNAT is free software; you can redistribute it and/or modify it under -- 12-- terms of the GNU General Public License as published by the Free Soft- -- 13-- ware Foundation; either version 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, 59 Temple Place - Suite 330, Boston, -- 20-- MA 02111-1307, USA. -- 21-- -- 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. -- 28-- -- 29-- GNAT was originally developed by the GNAT team at New York University. -- 30-- Extensive contributions were provided by Ada Core Technologies Inc. -- 31-- -- 32------------------------------------------------------------------------------ 33 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. 37 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. 41 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. 48 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.spt. 52 53with Types; use Types; 54with Uintp; use Uintp; 55with Urealp; use Urealp; 56 57package Sinfo is 58 59 --------------------------------- 60 -- Making Changes to This File -- 61 --------------------------------- 62 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: 66 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 74 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 77 -- expression fields. 78 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. 82 83 -- If a new tree node is added, then the following changes are made 84 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 appropraite section to the case statement in exp_util.adb 94 -- (Insert_Actions procedure) 95 -- For a subexpression, add an appropriate sections to the case 96 -- statement in sem_eval.adb 97 -- For a subexpression, add an appropriate sections to the case 98 -- statement in sem_res.adb 99 100 -- Finally, four utility programs must be run: 101 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. 106 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. 111 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. 117 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. 121 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. 125 126 -------------------------------- 127 -- Implicit Nodes in the Tree -- 128 -------------------------------- 129 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: 134 135 -- If the only possibilities for a non-terminal are one or more other 136 -- non terminals (i.e. the rule is a "skinny" rule), then usually the 137 -- corresponding node is omitted from the tree, and the target construct 138 -- appears directly. For example, a real type definition is either 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. 142 143 -- If a non-terminal corresponds to a list of some other non-terminal 144 -- (possibly with separating punctuation), then usually it is omitted 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. 148 149 -- Some additional cases of omitted nodes occur and are documented 150 -- individually. In particular, many nodes are omitted in the tree 151 -- generated for an expression. 152 153 ------------------------------------------- 154 -- Handling of Defining Identifier Lists -- 155 ------------------------------------------- 156 157 -- In several declarative forms in the syntax, lists of defining 158 -- identifiers appear (object declarations, component declarations, 159 -- number declarations etc.) 160 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 164 -- parameter case). 165 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. 175 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. 179 180 ----------------------- 181 -- Use of Node Lists -- 182 ----------------------- 183 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. 191 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. 195 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: 199 200 -- Alt := First (Alternatives (Stmt)); 201 -- while Present (Alt) loop 202 -- .. 203 -- -- processing for case statement alternative Alt 204 -- .. 205 -- Alt := Next (Alt); 206 -- end loop; 207 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. 211 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. 217 218 ------------- 219 -- Pragmas -- 220 ------------- 221 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. 225 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. 231 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. 236 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. 241 242 -- In the case of the variants list, we can either write: 243 244 -- Variant := First (Variants (N)); 245 -- while Present (Variant) loop 246 -- ... 247 -- Variant := Next (Variant); 248 -- end loop; 249 250 -- or 251 252 -- Variant := First_Non_Pragma (Variants (N)); 253 -- while Present (Variant) loop 254 -- ... 255 -- Variant := Next_Non_Pragma (Variant); 256 -- end loop; 257 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. 261 262 --------------------- 263 -- Optional Fields -- 264 --------------------- 265 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. 275 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. 282 283 ----------------------------------- 284 -- Note on Body/Spec Terminology -- 285 ----------------------------------- 286 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. 296 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. 303 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. 307 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. 312 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. 317 318 -- So, to summarize: 319 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. 324 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. 330 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. 335 336 -- This convention is followed throughout the GNAT documentation 337 -- both internal and external, and in all error message text. 338 339 ------------------------ 340 -- Internal Use Nodes -- 341 ------------------------ 342 343 -- These are Node_Kind settings used in the internal implementation 344 -- which are not logically part of the specification. 345 346 -- N_Unused_At_Start 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). 350 351 -- N_Unused_At_End 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). 357 358 ----------------------------------------- 359 -- Note on the settings of Sloc fields -- 360 ----------------------------------------- 361 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. 369 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. 373 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. 379 380 ----------------------- 381 -- Field Definitions -- 382 ----------------------- 383 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. 389 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: 394 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. 398 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. 407 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. 415 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 426 427 -- Note: see under (EXPRESSION) for further details on the use of 428 -- the Paren_Count field to record the number of parentheses levels. 429 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. 439 440 ----------------------- 441 -- Gigi Restrictions -- 442 ----------------------- 443 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. 449 450 -- Note that most of these restrictions apply only to trees generated when 451 -- code is being generated, since they involved expander actions that 452 -- destroy the tree. 453 454 ------------------------ 455 -- Common Flag Fields -- 456 ------------------------ 457 458 -- The following flag fields appear in all nodes 459 460 -- Analyzed 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. 465 466 -- Error_Posted 467 -- This flag is used to avoid multiple error messages being posted 468 -- on or referring to the same node. This flag is set if an error 469 -- message refers to a node or is posted on its source location, 470 -- and has the effect of inhibiting further messages involving 471 -- this same node. 472 473 -- Comes_From_Source 474 -- This flag is on for any nodes built by the scanner or parser from 475 -- the source program, and off for any nodes built by the analyzer or 476 -- expander. It indicates that a node comes from the original source. 477 -- This flag is defined in Atree. 478 479 -- Has_Dynamic_Length_Check and Has_Dynamic_Range_Check also appear on 480 -- all nodes. They are fully described in the next section. 481 482 ------------------------------------ 483 -- Description of Semantic Fields -- 484 ------------------------------------ 485 486 -- The meaning of the syntactic fields is generally clear from their 487 -- names without any further description, since the names are chosen 488 -- to correspond very closely to the syntax in the reference manual. 489 -- This section describes the usage of the semantic fields, which are 490 -- used to contain additional information determined during semantic 491 -- analysis. 492 493 -- ABE_Is_Certain (Flag18-Sem) 494 -- This flag is set in an instantiation node or a call node is 495 -- determined to be sure to raise an ABE. This is used to trigger 496 -- special handling of such cases, particularly in the instantiation 497 -- case where we avoid instantiating the body if this flag is set. 498 -- This flag is also present in an N_Formal_Package_Declaration_Node 499 -- since formal package declarations are treated like instantiations, 500 -- but it is always set to False in this context. 501 502 -- Accept_Handler_Records (List5-Sem) 503 -- This field is present only in an N_Accept_Alternative node. It is 504 -- used to temporarily hold the exception handler records from an 505 -- accept statement in a selective accept. These exception handlers 506 -- will eventually be placed in the Handler_Records list of the 507 -- procedure built for this accept (see Expand_N_Selective_Accept 508 -- procedure in Exp_Ch9 for further details). 509 510 -- Access_Types_To_Process (Elist2-Sem) 511 -- Present in N_Freeze_Entity nodes for Incomplete or private types. 512 -- Contains the list of access types which may require specific 513 -- treatment when the nature of the type completion is completely 514 -- known. An example of such treatement is the generation of the 515 -- associated_final_chain. 516 517 -- Actions (List1-Sem) 518 -- This field contains a sequence of actions that are associated 519 -- with the node holding the field. See the individual node types 520 -- for details of how this field is used, as well as the description 521 -- of the specific use for a particular node type. 522 523 -- Activation_Chain_Entity (Node3-Sem) 524 -- This is used in tree nodes representing task activators (blocks, 525 -- subprogram bodies, package declarations, and task bodies). It is 526 -- initially Empty, and then gets set to point to the entity for the 527 -- declared Activation_Chain variable when the first task is declared. 528 -- When tasks are declared in the corresponding declarative region 529 -- this entity is located by name (its name is always _Chain) and 530 -- the declared tasks are added to the chain. 531 532 -- Acts_As_Spec (Flag4-Sem) 533 -- A flag set in the N_Subprogram_Body node for a subprogram body 534 -- which is acting as its own spec. This flag also appears in the 535 -- compilation unit node at the library level for such a subprogram 536 -- (see further description in spec of Lib package). 537 538 -- Aggregate_Bounds (Node3-Sem) 539 -- Present in array N_Aggregate nodes. If the aggregate contains 540 -- component associations this field points to an N_Range node whose 541 -- bounds give the lowest and highest discrete choice values. If the 542 -- named aggregate contains a dynamic or null choice this field is 543 -- empty. If the aggregate contains positional elements this field 544 -- points to an N_Integer_Literal node giving the number of positional 545 -- elements. Note that if the aggregate contains positional elements 546 -- and an other choice the N_Integer_Literal only accounts for the 547 -- number of positional elements. 548 549 -- All_Others (Flag11-Sem) 550 -- Present in an N_Others_Choice node. This flag is set in the case 551 -- of an others exception where all exceptions are to be caught, even 552 -- those that are not normally handled (in particular the tasking abort 553 -- signal). This is used for translation of the at end handler into 554 -- a normal exception handler. 555 556 -- Assignment_OK (Flag15-Sem) 557 -- This flag is set in a subexpression node for an object, indicating 558 -- that the associated object can be modified, even if this would not 559 -- normally be permissible (either by direct assignment, or by being 560 -- passed as an out or in-out parameter). This is used by the expander 561 -- for a number of purposes, including initialzation of constants and 562 -- limited type objects (such as tasks), setting discriminant fields, 563 -- setting tag values, etc. N_Object_Declaration nodes also have this 564 -- flag defined. Here it is used to indicate that an initialization 565 -- expression is valid, even where it would normally not be allowed 566 -- (e.g. where the type involved is limited). 567 568 -- Associated_Node (Node4-Sem) 569 -- Present in nodes that can denote an entity: identifiers, character 570 -- literals, operator symbols, expanded names, operator nodes, and 571 -- attribute reference nodes (all these nodes have an Entity field). 572 -- This field is also present in N_Aggregate, N_Selected_Component, 573 -- and N_Extension_Aggregate nodes. This field is used in generic 574 -- processing to create links between the generic template and the 575 -- generic copy. See Sem_Ch12.Get_Associated_Node for full details. 576 -- Note that this field overlaps Entity, which is fine, since, as 577 -- explained in Sem_Ch12, the normal function of Entity is not 578 -- required at the point where the Associated_Node is set. Note 579 -- also, that in generic templates, this means that the Entity field 580 -- does not necessarily point to an Entity. Since the back end is 581 -- expected to ignore generic templates, this is harmless. 582 583 -- At_End_Proc (Node1) 584 -- This field is present in an N_Handled_Sequence_Of_Statements node. 585 -- It contains an identifier reference for the cleanup procedure to 586 -- be called. See description of this node for further details. 587 588 -- Backwards_OK (Flag6-Sem) 589 -- A flag present in the N_Assignment_Statement node. It is used only 590 -- if the type being assigned is an array type, and is set if analysis 591 -- determines that it is definitely safe to do the copy backwards, i.e. 592 -- starting at the highest addressed element. Note that if neither of 593 -- the flags Forwards_OK or Backwards_OK is set, it means that the 594 -- front end could not determine that either direction is definitely 595 -- safe, and a runtime check is required. 596 597 -- Body_To_Inline (Node3-Sem) 598 -- present in subprogram declarations. Denotes analyzed but unexpanded 599 -- body of subprogram, to be used when inlining calls. Present when the 600 -- subprogram has an Inline pragma and inlining is enabled. If the 601 -- declaration is completed by a renaming_as_body, and the renamed en- 602 -- tity is a subprogram, the Body_To_Inline is the name of that entity, 603 -- which is used directly in later calls to the original subprogram. 604 605 -- Body_Required (Flag13-Sem) 606 -- A flag that appears in the N_Compilation_Unit node indicating that 607 -- the corresponding unit requires a body. For the package case, this 608 -- indicates that a completion is required. In Ada 95, if the flag 609 -- is not set for the package case, then a body may not be present. 610 -- In Ada 83, if the flag is not set for the package case, then a 611 -- body is optional. For a subprogram declaration, the flag is set 612 -- except in the case where a pragma Import or Interface applies, 613 -- in which case no body is permitted (in Ada 83 or Ada 95). 614 615 -- By_Ref (Flag5-Sem) 616 -- A flag present in the N_Return_Statement_Node. It is set when the 617 -- returned expression is already allocated on the secondary stack 618 -- and thus the result is passed by reference rather than copied 619 -- another time. 620 621 -- Check_Address_Alignment (Flag11-Sem) 622 -- A flag present in N_Attribute_Definition clause for a 'Address 623 -- attribute definition. This flag is set if a dynamic check should 624 -- be generated at the freeze point for the entity to which this 625 -- address clause applies. The reason that we need this flag is that 626 -- we want to check for range checks being suppressed at the point 627 -- where the attribute definition clause is given, rather than 628 -- testing this at the freeze point. 629 630 -- Compile_Time_Known_Aggregate (Flag18-Sem) 631 -- Present in N_Aggregate nodes. Set for aggregates which can be 632 -- fully evaluated at compile time without raising constraint error. 633 -- Such aggregates can be passed as is to Gigi without any expansion. 634 -- See Sem_Aggr for the specific conditions under which an aggregate 635 -- has this flag set. See also the flag Static_Processing_OK. 636 637 -- Condition_Actions (List3-Sem) 638 -- This field appears in else-if nodes and in the iteration scheme 639 -- node for while loops. This field is only used during semantic 640 -- processing to temporarily hold actions inserted into the tree. 641 -- In the tree passed to gigi, the condition actions field is always 642 -- set to No_List. For details on how this field is used, see the 643 -- routine Insert_Actions in package Exp_Util, and also the expansion 644 -- routines for the relevant nodes. 645 646 -- Controlling_Argument (Node1-Sem) 647 -- This field is set in procedure and function call nodes if the call 648 -- is a dispatching call (it is Empty for a non-dispatching call). 649 -- It indicates the source of the controlling tag for the call. For 650 -- Procedure calls, the Controlling_Argument is one of the actuals. 651 -- For a function that has a dispatching result, it is an entity in 652 -- the context of the call that can provide a tag, or else it is the 653 -- tag of the root type of the class. 654 655 -- Conversion_OK (Flag14-Sem) 656 -- A flag set on type conversion nodes to indicate that the conversion 657 -- is to be considered as being valid, even though it is the case that 658 -- the conversion is not valid Ada. This is used for the Enum_Rep, 659 -- Fixed_Value and Integer_Value attributes, for internal conversions 660 -- done for fixed-point operations, and for certain conversions for 661 -- calls to initialization procedures. If Conversion_OK is set, then 662 -- Etype must be set (the analyzer assumes that Etype has been set). 663 -- For the case of fixed-point operands, it also indicates that the 664 -- conversion is to be a direct conversion of the underlying integer 665 -- result, with no regard to the small operand. 666 667 -- Corresponding_Body (Node5-Sem) 668 -- This field is set in subprogram declarations, package declarations, 669 -- entry declarations of protected types, and in generic units. It 670 -- points to the defining entity for the corresponding body (NOT the 671 -- node for the body itself). 672 673 -- Corresponding_Generic_Association (Node5-Sem) 674 -- This field is defined for object declarations and object renaming 675 -- declarations. It is set for the declarations within an instance that 676 -- map generic formals to their actuals. If set, the field points to 677 -- a generic_association which is the original parent of the expression 678 -- or name appearing in the declaration. This simplifies ASIS queries. 679 680 -- Corresponding_Integer_Value (Uint4-Sem) 681 -- This field is set in real literals of fixed-point types (it is not 682 -- used for floating-point types). It contains the integer value used 683 -- to represent the fixed-point value. It is also set on the universal 684 -- real literals used to represent bounds of fixed-point base types 685 -- and their first named subtypes. 686 687 -- Corresponding_Spec (Node5-Sem) 688 -- This field is set in subprogram, package, task, and protected body 689 -- nodes, where it points to the defining entity in the corresponding 690 -- spec. The attribute is also set in N_With_Clause nodes, where 691 -- it points to the defining entity for the with'ed spec, and in 692 -- a subprogram renaming declaration when it is a Renaming_As_Body. 693 -- The field is Empty if there is no corresponding spec, as in the 694 -- case of a subprogram body that serves as its own spec. 695 696 -- Corresponding_Stub (Node3-Sem) 697 -- This field is present in an N_Subunit node. It holds the node in 698 -- the parent unit that is the stub declaration for the subunit. it is 699 -- set when analysis of the stub forces loading of the proper body. If 700 -- expansion of the proper body creates new declarative nodes, they are 701 -- inserted at the point of the corresponding_stub. 702 703 -- Dcheck_Function (Node5-Sem) 704 -- This field is present in an N_Variant node, It references the entity 705 -- for the discriminant checking function for the variant. 706 707 -- Debug_Statement (Node3) 708 -- This field is present in an N_Pragma node. It is used only for 709 -- a Debug pragma or pragma Assert with a second parameter. The 710 -- parameter is of the form of an expression, as required by the 711 -- pragma syntax, but is actually a procedure call. To simplify 712 -- semantic processing, the parser creates a copy of the argument 713 -- rearranged into a procedure call statement and places it in the 714 -- Debug_Statement field. Note that this field is considered a 715 -- syntactic field, since it is created by the parser. 716 717 -- Default_Expression (Node5-Sem) 718 -- This field is Empty if there is no default expression. If there 719 -- is a simple default expression (one with no side effects), then 720 -- this field simply contains a copy of the Expression field (both 721 -- point to the tree for the default expression). Default_Expression 722 -- is used for conformance checking. 723 724 -- Delay_Finalize_Attach (Flag14-Sem) 725 -- This flag is present in an N_Object_Declaration node. If it is set, 726 -- then in the case of a controlled type being declared and initialized, 727 -- the normal code for attaching the result to the appropriate local 728 -- finalization list is suppressed. This is used for functions that 729 -- return controlled types without using the secondary stack, where 730 -- it is the caller who must do the attachment. 731 732 -- Discr_Check_Funcs_Built (Flag11-Sem) 733 -- This flag is present in N_Full_Type_Declaration nodes. It is set when 734 -- discriminant checking functions are constructed. The purpose is to 735 -- avoid attempting to set these functions more than once. 736 737 -- Do_Accessibility_Check (Flag13-Sem) 738 -- This flag is set on N_Parameter_Specification nodes to indicate 739 -- that an accessibility check is required for the parameter. It is 740 -- not yet decided who takes care of this check (TBD ???). 741 742 -- Do_Discriminant_Check (Flag13-Sem) 743 -- This flag is set on N_Selected_Component nodes to indicate that a 744 -- discriminant check is required using the discriminant check routine 745 -- associated with the selector. The actual check is generated by the 746 -- expander when processing selected components. 747 748 -- Do_Division_Check (Flag13-Sem) 749 -- This flag is set on a division operator (/ mod rem) to indicate 750 -- that a zero divide check is required. The actual check is dealt 751 -- with by the backend (all the front end does is to set the flag). 752 753 -- Do_Length_Check (Flag4-Sem) 754 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or, 755 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check 756 -- is required. It is not determined who deals with this flag (???). 757 758 -- Do_Overflow_Check (Flag17-Sem) 759 -- This flag is set on an operator where an overflow check is required 760 -- on the operation. The actual check is dealt with by the backend 761 -- (all the front end does is to set the flag). The other cases where 762 -- this flag is used is on a Type_Conversion node and for attribute 763 -- reference nodes. For a type conversion, it means that the conversion 764 -- is from one base type to another, and the value may not fit in the 765 -- target base type. See also the description of Do_Range_Check for 766 -- this case. The only attribute references which use this flag are 767 -- Pred and Succ, where it means that the result should be checked 768 -- for going outside the base range. 769 770 -- Do_Range_Check (Flag9-Sem) 771 -- This flag is set on an expression which appears in a context where 772 -- a range check is required. The target type is clear from the 773 -- context. The contexts in which this flag can appear are limited to 774 -- the following. 775 776 -- Right side of an assignment. In this case the target type is 777 -- taken from the left side of the assignment, which is referenced 778 -- by the Name of the N_Assignment_Statement node. 779 780 -- Subscript expressions in an indexed component. In this case the 781 -- target type is determined from the type of the array, which is 782 -- referenced by the Prefix of the N_Indexed_Component node. 783 784 -- Argument expression for a parameter, appearing either directly 785 -- in the Parameter_Associations list of a call or as the Expression 786 -- of an N_Parameter_Association node that appears in this list. In 787 -- either case, the check is against the type of the formal. Note 788 -- that the flag is relevant only in IN and IN OUT parameters, and 789 -- will be ignored for OUT parameters, where no check is required 790 -- in the call, and if a check is required on the return, it is 791 -- generated explicitly with a type conversion. 792 793 -- Initialization expression for the initial value in an object 794 -- declaration. In this case the Do_Range_Check flag is set on 795 -- the initialization expression, and the check is against the 796 -- range of the type of the object being declared. 797 798 -- The expression of a type conversion. In this case the range check 799 -- is against the target type of the conversion. See also the use of 800 -- Do_Overflow_Check on a type conversion. The distinction is that 801 -- the overflow check protects against a value that is outside the 802 -- range of the target base type, whereas a range check checks that 803 -- the resulting value (which is a value of the base type of the 804 -- target type), satisfies the range constraint of the target type. 805 806 -- Note: when a range check is required in contexts other than those 807 -- listed above (e.g. in a return statement), an additional type 808 -- conversion node is introduced to represent the required check. 809 810 -- Do_Storage_Check (Flag17-Sem) 811 -- This flag is set in an N_Allocator node to indicate that a storage 812 -- check is required for the allocation, or in an N_Subprogram_Body 813 -- node to indicate that a stack check is required in the subprogram 814 -- prolog. The N_Allocator case is handled by the routine that expands 815 -- the call to the runtime routine. The N_Subprogram_Body case is 816 -- handled by the backend, and all the semantics does is set the flag. 817 818 -- Do_Tag_Check (Flag13-Sem) 819 -- This flag is set on an N_Assignment_Statement, N_Function_Call, 820 -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt 821 -- node to indicate that the tag check can be suppressed. It is not 822 -- yet decided how this flag is used (TBD ???). 823 824 -- Elaborate_Present (Flag4-Sem) 825 -- This flag is set in the N_With_Clause node to indicate that a 826 -- pragma Elaborate pragma appears for the with'ed units. 827 828 -- Elaborate_All_Present (Flag15-Sem) 829 -- This flag is set in the N_With_Clause node to indicate that a 830 -- pragma Elaborate_All pragma appears for the with'ed units. 831 832 -- Elaboration_Boolean (Node2-Sem) 833 -- This field is present in function and procedure specification 834 -- nodes. If set, it points to the entity for a Boolean flag that 835 -- must be tested for certain calls to check for access before 836 -- elaboration. See body of Sem_Elab for further details. This 837 -- field is Empty if no elaboration boolean is required. 838 839 -- Else_Actions (List3-Sem) 840 -- This field is present in conditional expression nodes. During code 841 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert 842 -- actions at an appropriate place in the tree to get elaborated at the 843 -- right time. For conditional expressions, we have to be sure that the 844 -- actions for the Else branch are only elaborated if the condition is 845 -- False. The Else_Actions field is used as a temporary parking place 846 -- for these actions. The final tree is always rewritten to eliminate 847 -- the need for this field, so in the tree passed to Gigi, this field 848 -- is always set to No_List. 849 850 -- Enclosing_Variant (Node2-Sem) 851 -- This field is present in the N_Variant node and identifies the 852 -- Node_Id corresponding to the immediately enclosing variant when 853 -- the variant is nested, and N_Empty otherwise. Set during semantic 854 -- processing of the variant part of a record type. 855 856 -- Entity (Node4-Sem) 857 -- Appears in all direct names (identifier, character literal, 858 -- operator symbol), as well as expanded names, and attributes that 859 -- denote entities, such as 'Class. Points to the entity for the 860 -- corresponding defining occurrence. Set after name resolution. 861 -- In the case of identifiers in a WITH list, the corresponding 862 -- defining occurrence is in a separately compiled file, and this 863 -- pointer must be set using the library Load procedure. Note that 864 -- during name resolution, the value in Entity may be temporarily 865 -- incorrect (e.g. during overload resolution, Entity is initially 866 -- set to the first possible correct interpretation, and then later 867 -- modified if necessary to contain the correct value after resolution). 868 -- Note that this field overlaps Associated_Node, which is used during 869 -- generic processing (see Sem_Ch12 for details). Note also that in 870 -- generic templates, this means that the Entity field does not always 871 -- point to an Entity. Since the back end is expected to ignore 872 -- generic templates, this is harmless. 873 874 -- Entity_Or_Associated_Node (Node4-Sem) 875 -- A synonym for both Entity and Asasociated_Node. Used by convention 876 -- in the code when referencing this field in cases where it is not 877 -- known whether the field contains an Entity or an Associated_Node. 878 879 -- Etype (Node5-Sem) 880 -- Appears in all expression nodes, all direct names, and all 881 -- entities. Points to the entity for the related type. Set after 882 -- type resolution. Normally this is the actual subtype of the 883 -- expression. However, in certain contexts such as the right side 884 -- of an assignment, subscripts, arguments to calls, returned value 885 -- in a function, initial value etc. it is the desired target type. 886 -- In the event that this is different from the actual type, the 887 -- Do_Range_Check flag will be set if a range check is required. 888 -- Note: if the Is_Overloaded flag is set, then Etype points to 889 -- an essentially arbitrary choice from the possible set of types. 890 891 -- Exception_Junk (Flag11-Sem) 892 -- This flag is set in a various nodes appearing in a statement 893 -- sequence to indicate that the corresponding node is an artifact 894 -- of the generated code for exception handling, and should be 895 -- ignored when analyzing the control flow of the relevant sequence 896 -- of statements (e.g. to check that it does not end with a bad 897 -- return statement). 898 899 -- Expansion_Delayed (Flag11-Sem) 900 -- Set on aggregates and extension aggregates that need a top-down 901 -- rather than bottom up expansion. Typically aggregate expansion 902 -- happens bottom up. For nested aggregates the expansion is delayed 903 -- until the enclosing aggregate itself is expanded, e.g. in the context 904 -- of a declaration. To delay it we set this flag. This is done to 905 -- avoid creating a temporary for each level of a nested aggregates, 906 -- and also to prevent the premature generation of constraint checks. 907 -- This is also a requirement if we want to generate the proper 908 -- attachment to the internal finalization lists (for record with 909 -- controlled components). Top down expansion of aggregates is also 910 -- used for in-place array aggregate assignment or initialization. 911 -- When the full context is known, the target of the assignment or 912 -- initialization is used to generate the left-hand side of individual 913 -- assignment to each sub-component. 914 915 -- First_Inlined_Subprogram (Node3-Sem) 916 -- Present in the N_Compilation_Unit node for the main program. Points 917 -- to a chain of entities for subprograms that are to be inlined. The 918 -- Next_Inlined_Subprogram field of these entities is used as a link 919 -- pointer with Empty marking the end of the list. This field is Empty 920 -- if there are no inlined subprograms or inlining is not active. 921 922 -- First_Named_Actual (Node4-Sem) 923 -- Present in procedure call statement and function call nodes, and 924 -- also in Intrinsic nodes. Set during semantic analysis to point to 925 -- the first named parameter where parameters are ordered by declaration 926 -- order (as opposed to the actual order in the call which may be 927 -- different due to named associations). Note: this field points to the 928 -- explicit actual parameter itself, not the N_Parameter_Association 929 -- node (its parent). 930 931 -- First_Real_Statement (Node2-Sem) 932 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to 933 -- Empty. Used only when declarations are moved into the statement 934 -- part of a construct as a result of wrapping an AT END handler that 935 -- is required to cover the declarations. In this case, this field is 936 -- used to remember the location in the statements list of the first 937 -- real statement, i.e. the statement that used to be first in the 938 -- statement list before the declarations were prepended. 939 940 -- First_Subtype_Link (Node5-Sem) 941 -- Present in N_Freeze_Entity node for an anonymous base type that 942 -- is implicitly created by the declaration of a first subtype. It 943 -- points to the entity for the first subtype. 944 945 -- Float_Truncate (Flag11-Sem) 946 -- A flag present in type conversion nodes. This is used for float 947 -- to integer conversions where truncation is required rather than 948 -- rounding. Note that Gigi does not handle type conversions from real 949 -- to integer with rounding (see Expand_N_Type_Conversion). 950 951 -- Forwards_OK (Flag5-Sem) 952 -- A flag present in the N_Assignment_Statement node. It is used only 953 -- if the type being assigned is an array type, and is set if analysis 954 -- determines that it is definitely safe to do the copy forwards, i.e. 955 -- starting at the lowest addressed element. Note that if neither of 956 -- the flags Forwards_OK or Backwards_OK is set, it means that the 957 -- front end could not determine that either direction is definitely 958 -- safe, and a runtime check is required. 959 960 -- From_At_Mod (Flag4-Sem) 961 -- This flag is set on the attribute definition clause node that is 962 -- generated by a transformation of an at mod phrase in a record 963 -- representation clause. This is used to give slightly different 964 -- (Ada 83 compatible) semantics to such a clause, namely it is 965 -- used to specify a minimum acceptable alignment for the base type 966 -- and all subtypes. In Ada 95 terms, the actual alignment of the 967 -- base type and all subtypes must be a multiple of the given value, 968 -- and the representation clause is considered to be type specific 969 -- instead of subtype specific. 970 971 -- Generic_Parent (Node5-Sem) 972 -- Generic_parent is defined on declaration nodes that are instances. 973 -- The value of Generic_Parent is the generic entity from which the 974 -- instance is obtained. Generic_Parent is also defined for the renaming 975 -- declarations and object declarations created for the actuals in an 976 -- instantiation. The generic parent of such a declaration is the 977 -- corresponding generic association in the Instantiation node. 978 979 -- Generic_Parent_Type (Node4-Sem) 980 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for 981 -- the actuals of formal private and derived types. Within the instance, 982 -- the operations on the actual are those inherited from the parent. 983 -- For a formal private type, the parent type is the generic type 984 -- itself. The Generic_Parent_Type is also used in an instance to 985 -- determine whether a private operation overrides an inherited one. 986 987 -- Handler_List_Entry (Node2-Sem) 988 -- This field is present in N_Object_Declaration nodes. It is set only 989 -- for the Handler_Record entry generated for an exception in zero cost 990 -- exception handling mode. It references the corresponding item in the 991 -- handler list, and is used to delete this entry if the corresponding 992 -- handler is deleted during optimization. For further details on why 993 -- this is required, see Exp_Ch11.Remove_Handler_Entries. 994 995 -- Has_Dynamic_Length_Check (Flag10-Sem) 996 -- This flag is present on all nodes. It is set to indicate that one 997 -- of the routines in unit Checks has generated a length check action 998 -- which has been inserted at the flagged node. This is used to avoid 999 -- the generation of duplicate checks. 1000 1001 -- Has_Dynamic_Range_Check (Flag12-Sem) 1002 -- This flag is present on all nodes. It is set to indicate that one 1003 -- of the routines in unit Checks has generated a range check action 1004 -- which has been inserted at the flagged node. This is used to avoid 1005 -- the generation of duplicate checks. 1006 1007 -- Has_No_Elaboration_Code (Flag17-Sem) 1008 -- A flag that appears in the N_Compilation_Unit node to indicate 1009 -- whether or not elaboration code is present for this unit. It is 1010 -- initially set true for subprogram specs and bodies and for all 1011 -- generic units and false for non-generic package specs and bodies. 1012 -- Gigi may set the flag in the non-generic package case if it 1013 -- determines that no elaboration code is generated. Note that this 1014 -- flag is not related to the Is_Preelaborated status, there can be 1015 -- preelaborated packages that generate elaboration code, and non- 1016 -- preelaborated packages which do not generate elaboration code. 1017 1018 -- Has_Priority_Pragma (Flag6-Sem) 1019 -- A flag present in N_Subprogram_Body, N_Task_Definition and 1020 -- N_Protected_Definition nodes to flag the presence of either 1021 -- a Priority or Interrupt_Priority pragma in the declaration 1022 -- sequence (public or private in the task and protected cases) 1023 1024 -- Has_Private_View (Flag11-Sem) 1025 -- A flag present in generic nodes that have an entity, to indicate 1026 -- that the node has a private type. Used to exchange private 1027 -- and full declarations if the visibility at instantiation is 1028 -- different from the visibility at generic definition. 1029 1030 -- Has_Storage_Size_Pragma (Flag5-Sem) 1031 -- A flag present in an N_Task_Definition node to flag the presence 1032 -- of a Storage_Size pragma 1033 1034 -- Has_Task_Info_Pragma (Flag7-Sem) 1035 -- A flag present in an N_Task_Definition node to flag the presence 1036 -- of a Task_Info pragma. Used to detect duplicate pragmas. 1037 1038 -- Has_Task_Name_Pragma (Flag8-Sem) 1039 -- A flag present in N_Task_Definition nodes to flag the presence 1040 -- of a Task_Name pragma in the declaration sequence for the task. 1041 1042 -- Has_Wide_Character (Flag11-Sem) 1043 -- Present in string literals, set if any wide character (i.e. a 1044 -- character code outside the Character range) appears in the string. 1045 1046 -- Hidden_By_Use_Clause (Elist4-Sem) 1047 -- An entity list present in use clauses that appear within 1048 -- instantiations. For the resolution of local entities, entities 1049 -- introduced by these use clauses have priority over global ones, 1050 -- and outer entities must be explicitly hidden/restored on exit. 1051 1052 -- Implicit_With (Flag16-Sem) 1053 -- This flag is set in the N_With_Clause node that is implicitly 1054 -- generated for runtime units that are loaded by the expander, and 1055 -- also for package System, if it is loaded implicitly by a use of 1056 -- the 'Address or 'Tag attribute 1057 1058 -- Includes_Infinities (Flag11-Sem) 1059 -- This flag is present in N_Range nodes. It is set for the range 1060 -- of unconstrained float types defined in Standard, which include 1061 -- not only the given range of values, but also legtitimately can 1062 -- include infinite values. This flag is false for any float type 1063 -- for which an explicit range is given by the programmer, even if 1064 -- that range is identical to the range for float. 1065 1066 -- Instance_Spec (Node5-Sem) 1067 -- This field is present in generic instantiation nodes, and also in 1068 -- formal package declaration nodes (formal package declarations are 1069 -- treated in a manner very similar to package instantiations). It 1070 -- points to the node for the spec of the instance, inserted as part 1071 -- of the semantic processing for instantiations in Sem_Ch12. 1072 1073 -- Is_Asynchronous_Call_Block (Flag7-Sem) 1074 -- A flag set in a Block_Statement node to indicate that it is the 1075 -- expansion of an asynchronous entry call. Such a block needs a 1076 -- cleanup handler to assure that the call is cancelled. 1077 1078 -- Is_Component_Left_Opnd (Flag13-Sem) 1079 -- Is_Component_Right_Opnd (Flag14-Sem) 1080 -- Present in concatenation nodes, to indicate that the corresponding 1081 -- operand is of the component type of the result. Used in resolving 1082 -- concatenation nodes in instances. 1083 1084 -- Is_Controlling_Actual (Flag16-Sem) 1085 -- This flag is set on in an expression that is a controlling argument 1086 -- in a dispatching call. It is off in all other cases. See Sem_Disp 1087 -- for details of its use. 1088 1089 -- Is_In_Discriminant_Check (Flag11-Sem) 1090 -- This flag is present in a selected component, and is used to 1091 -- indicate that the reference occurs within a discriminant check. 1092 -- The significance is that optimizations based on assuming that 1093 -- the discriminant check has a correct value cannot be performed 1094 -- in this case (or the disriminant check may be optimized away!) 1095 1096 -- Is_Machine_Number (Flag11-Sem) 1097 -- This flag is set in an N_Real_Literal node to indicate that the 1098 -- value is a machine number. This avoids some unnecessary cases 1099 -- of converting real literals to machine numbers. 1100 1101 -- Is_Null_Loop (Flag16-Sem) 1102 -- This flag is set in an N_Loop_Statement node if the corresponding 1103 -- loop can be determined to be null at compile time. This is used to 1104 -- suppress any warnings that would otherwise be issued inside the 1105 -- loop since they are probably not useful. 1106 1107 -- Is_Power_Of_2_For_Shift (Flag13-Sem) 1108 -- A flag present only in N_Op_Expon nodes. It is set when the 1109 -- exponentiation is of the forma 2 ** N, where the type of N is 1110 -- an unsigned integral subtype whose size does not exceed the size 1111 -- of Standard_Integer (i.e. a type that can be safely converted to 1112 -- Natural), and the exponentiation appears as the right operand of 1113 -- an integer multiplication or an integer division where the dividend 1114 -- is unsigned. It is also required that overflow checking is off for 1115 -- both the exponentiation and the multiply/divide node. If this set 1116 -- of conditions holds, and the flag is set, then the division or 1117 -- multiplication can be (and is) converted to a shift. 1118 1119 -- Is_Overloaded (Flag5-Sem) 1120 -- A flag present in all expression nodes. Used temporarily during 1121 -- overloading determination. The setting of this flag is not 1122 -- relevant once overloading analysis is complete. 1123 1124 -- Is_Protected_Subprogram_Body (Flag7-Sem) 1125 -- A flag set in a Subprogram_Body block to indicate that it is the 1126 -- implemenation of a protected subprogram. Such a body needs a 1127 -- cleanup handler to make sure that the associated protected object 1128 -- is unlocked when the subprogram completes. 1129 1130 -- Is_Static_Expression (Flag6-Sem) 1131 -- Indicates that an expression is a static expression (RM 4.9). See 1132 -- spec of package Sem_Eval for full details on the use of this flag. 1133 1134 -- Is_Subprogram_Descriptor (Flag16-Sem) 1135 -- Present in N_Object_Declaration, and set only for the object 1136 -- declaration generated for a subprogram descriptor in fast exception 1137 -- mode. See Exp_Ch11 for details of use. 1138 1139 -- Is_Task_Allocation_Block (Flag6-Sem) 1140 -- A flag set in a Block_Statement node to indicate that it is the 1141 -- expansion of a task allocator, or the allocator of an object 1142 -- containing tasks. Such a block requires a cleanup handler to call 1143 -- Expunge_Unactivted_Tasks to complete any tasks that have been 1144 -- allocated but not activated when the allocator completes abnormally. 1145 1146 -- Is_Task_Master (Flag5-Sem) 1147 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node 1148 -- to indicate that the construct is a task master (i.e. has declared 1149 -- tasks or declares an access to a task type). 1150 1151 -- Itype (Node1-Sem) 1152 -- Used in N_Itype_Reference node to reference an itype for which it 1153 -- is important to ensure that it is defined. See description of this 1154 -- node for further details. 1155 1156 -- Kill_Range_Check (Flag11-Sem) 1157 -- Used in an N_Unchecked_Type_Conversion node to indicate that the 1158 -- result should not be subjected to range checks. This is used for 1159 -- the implementation of Normalize_Scalars. 1160 1161 -- Label_Construct (Node2-Sem) 1162 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label, 1163 -- N_Block_Statement or N_Loop_Statement node to which the label 1164 -- declaration applies. This is not currently used in the compiler 1165 -- itself, but it is useful in the implementation of ASIS queries. 1166 1167 -- Library_Unit (Node4-Sem) 1168 -- In a stub node, the Library_Unit field points to the compilation unit 1169 -- node of the corresponding subunit. 1170 -- 1171 -- In a with clause node, the Library_Unit field points to the spec 1172 -- of the with'ed unit. 1173 -- 1174 -- In a compilation unit node, the use of this field depends on 1175 -- the unit type: 1176 -- 1177 -- For a subprogram body, the Library_Unit field points to the 1178 -- compilation unit node of the corresponding spec, unless 1179 -- Acts_As_Spec is set, in which case it points to itself. 1180 -- 1181 -- For a package body, the Library_Unit field points to the 1182 -- compilation unit node of the corresponding spec. 1183 -- 1184 -- For a subprogram spec to which pragma Inline applies, the 1185 -- Library_Unit field points to the compilation unit node of 1186 -- the corresponding body, if inlining is active. 1187 -- 1188 -- For a generic declaration, the Library_Unit field points 1189 -- to the compilation unit node of the corresponding generic body. 1190 -- 1191 -- For a subunit, the Library_Unit field points to the compilation 1192 -- unit node of the parent body. 1193 -- 1194 -- Note that this field is not used to hold the parent pointer for a 1195 -- child unit (which might in any case need to use it for some other 1196 -- purpose as described above). Instead for a child unit, implicit 1197 -- with's are generated for all parents. 1198 1199 -- Loop_Actions (List2-Sem) 1200 -- A list present in Component_Association nodes in array aggregates. 1201 -- Used to collect actions that must be executed within the loop because 1202 -- they may need to be evaluated anew each time through. 1203 1204 -- Limited_View_Installed (Flag18-Sem) 1205 -- Present in With_Clauses and in package specifications. If set on a 1206 -- with_clause, it indicates that this clause has created the current 1207 -- limited view of the designated package. On a package specification, 1208 -- it indicates that the limited view has already been created because 1209 -- the package is mentioned in a limited_with_clause in the closure of 1210 -- the unit being compiled. 1211 1212 -- Must_Be_Byte_Aligned (Flag14-Sem) 1213 -- This flag is present in N_Attribute_Reference nodes. It can be set 1214 -- only for the Address and Unrestricted_Access attributes. If set it 1215 -- means that the object for which the address/access is given must be 1216 -- on a byte (more accurately a storage unit) boundary. If necessary, 1217 -- a copy of the object is to be made before taking the address (this 1218 -- copy is in the current scope on the stack frame). This is used for 1219 -- certain cases of code generated by the expander that passes 1220 -- parameters by address. 1221 -- 1222 -- The reason the copy is not made by the front end is that the back 1223 -- end has more information about type layout and may be able to (but 1224 -- is not guaranteed to) prevent making unnecessary copies. 1225 1226 -- Must_Not_Freeze (Flag8-Sem) 1227 -- A flag present in all expression nodes. Normally expressions cause 1228 -- freezing as described in the RM. If this flag is set, then this 1229 -- is inhibited. This is used by the analyzer and expander to label 1230 -- nodes that are created by semantic analysis or expansion and which 1231 -- must not cause freezing even though they normally would. This flag 1232 -- is also present in an N_Subtype_Indication node, since we also use 1233 -- these in calls to Freeze_Expression. 1234 1235 -- Next_Entity (Node2-Sem) 1236 -- Present in defining identifiers, defining character literals and 1237 -- defining operator symbols (i.e. in all entities). The entities of 1238 -- a scope are chained, and this field is used as the forward pointer 1239 -- for this list. See Einfo for further details. 1240 1241 -- Next_Named_Actual (Node4-Sem) 1242 -- Present in parameter association node. Set during semantic 1243 -- analysis to point to the next named parameter, where parameters 1244 -- are ordered by declaration order (as opposed to the actual order 1245 -- in the call, which may be different due to named associations). 1246 -- Not that this field points to the explicit actual parameter itself, 1247 -- not to the N_Parameter_Association node (its parent). 1248 1249 -- Next_Rep_Item (Node4-Sem) 1250 -- Present in pragma nodes and attribute definition nodes. Used to 1251 -- link representation items that apply to an entity. See description 1252 -- of First_Rep_Item field in Einfo for full details. 1253 1254 -- Next_Use_Clause (Node3-Sem) 1255 -- While use clauses are active during semantic processing, they 1256 -- are chained from the scope stack entry, using Next_Use_Clause 1257 -- as a link pointer, with Empty marking the end of the list. The 1258 -- head pointer is in the scope stack entry (First_Use_Clause). At 1259 -- the end of semantic processing (i.e. when Gigi sees the tree, 1260 -- the contents of this field is undefined and should not be read). 1261 1262 -- No_Ctrl_Actions (Flag7-Sem) 1263 -- Present in N_Assignment_Statement to indicate that no finalize nor 1264 -- nor adjust should take place on this assignment eventhough the rhs 1265 -- is controlled. This is used in init procs and aggregate expansions 1266 -- where the generated assignments are more initialisations than real 1267 -- assignments. 1268 1269 -- No_Elaboration_Check (Flag14-Sem) 1270 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates 1271 -- that no elaboration check is needed on the call, because it appears 1272 -- in the context of a local Suppress pragma. This is used on calls 1273 -- within task bodies, where the actual elaboration checks are applied 1274 -- after analysis, when the local scope stack is not present. 1275 1276 -- No_Entities_Ref_In_Spec (Flag8-Sem) 1277 -- Present in N_With_Clause nodes. Set if the with clause is on the 1278 -- package or subprogram spec where the main unit is the corresponding 1279 -- body, and no entities of the with'ed unit are referenced by the spec 1280 -- (an entity may still be referenced in the body, so this flag is used 1281 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for 1282 -- full details) 1283 1284 -- No_Initialization (Flag13-Sem) 1285 -- Present in N_Object_Declaration & N_Allocator to indicate 1286 -- that the object must not be initialized (by Initialize or a 1287 -- call to an init proc). This is needed for controlled aggregates. 1288 -- When the Object declaration has an expression, this flag means 1289 -- that this expression should not be taken into account (needed 1290 -- for in place initialization with aggregates) 1291 1292 -- No_Truncation (Flag17-Sem) 1293 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect 1294 -- only if the RM_Size of the source is greater than the RM_Size of the 1295 -- target for scalar operands. Normally in such a case we truncate some 1296 -- higher order bits of the source, and then sign/zero extend the result 1297 -- to form the output value. But if this flag is set, then we do not do 1298 -- any truncation, so for example, if an 8 bit input is converted to a 1299 -- 5 bit result which is in fact stored in 8 bits, then the high order 1300 -- three bits of the target result will be copied from the source. This 1301 -- is used for properly setting out of range values for use by pragmas 1302 -- Initialize_Scalars and Normalize_Scalars. 1303 1304 -- OK_For_Stream (Flag4-Sem) 1305 -- Present in N_Attribute_Definition clauses for stream attributes. If 1306 -- set, indicates that the attribute is permitted even though the type 1307 -- involved is a limited type. In the case of a protected type, the 1308 -- result is to stream all components (including discriminants) in 1309 -- lexical order. For other limited types, the effect is simply to 1310 -- use the corresponding stream routine for the full type. This flag 1311 -- is used for internally generated code, where the streaming of these 1312 -- types is required, even though not normally allowed by the language. 1313 1314 -- Original_Discriminant (Node2-Sem) 1315 -- Present in identifiers. Used in references to discriminants that 1316 -- appear in generic units. Because the names of the discriminants 1317 -- may be different in an instance, we use this field to recover the 1318 -- position of the discriminant in the original type, and replace it 1319 -- with the discriminant at the same position in the instantiated type. 1320 1321 -- Original_Entity (Node2-Sem) 1322 -- Present in numeric literals. Used to denote the named number that 1323 -- has been constant-folded into the given literal. If literal is from 1324 -- source, or the result of some other constant-folding operation, then 1325 -- Original_Entity is empty. This field is needed to handle properly 1326 -- named numbers in generic units, where the Associated_Node field 1327 -- interferes with the Entity field, making it impossible to preserve 1328 -- the original entity at the point of instantiation (ASIS problem). 1329 1330 -- Others_Discrete_Choices (List1-Sem) 1331 -- When a case statement or variant is analyzed, the semantic checks 1332 -- determine the actual list of choices that correspond to an others 1333 -- choice. This list is materialized for later use by the expander 1334 -- and the Others_Discrete_Choices field of an N_Others_Choice node 1335 -- points to this materialized list of choices, which is in standard 1336 -- format for a list of discrete choices, except that of course it 1337 -- cannot contain an N_Others_Choice entry. 1338 1339 -- Parameter_List_Truncated (Flag17-Sem) 1340 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. 1341 -- Set (for OpenVMS ports of GNAT only) if the parameter list is 1342 -- truncated as a result of a First_Optional_Parameter specification 1343 -- in an Import_Function, Import_Procedure, or Import_Valued_Procedure 1344 -- pragma. The truncation is done by the expander by removing trailing 1345 -- parameters from the argument list, in accordance with the set of 1346 -- rules allowing such parameter removal. In particular, parameters 1347 -- can be removed working from the end of the parameter list backwards 1348 -- up to and including the entry designated by First_Optional_Parameter 1349 -- in the Import pragma. Parameters can be removed if they are implicit 1350 -- and the default value is a known-at-compile-time value, including 1351 -- the use of the Null_Parameter attribute, or if explicit parameter 1352 -- values are present that match the corresponding defaults. 1353 1354 -- Parent_Spec (Node4-Sem) 1355 -- For a library unit that is a child unit spec (package or subprogram 1356 -- declaration, generic declaration or instantiation, or library level 1357 -- rename, this field points to the compilation unit node for the parent 1358 -- package specification. This field is Empty for library bodies (the 1359 -- parent spec in this case can be found from the corresponding spec). 1360 1361 -- Present_Expr (Uint3-Sem) 1362 -- Present in an N_Variant node. This has a meaningful value only after 1363 -- Gigi has back annotated the tree with representation information. 1364 -- At this point, it contains a reference to a gcc expression that 1365 -- depends on the values of one or more discriminants. Give a set of 1366 -- discriminant values, this expression evaluates to False (zero) if 1367 -- variant is not present, and True (non-zero) if it is present. See 1368 -- unit Repinfo for further details on gigi back annotation. This 1369 -- field is used during ASIS processing (data decomposition annex) 1370 -- to determine if a field is present or not. 1371 1372 -- Print_In_Hex (Flag13-Sem) 1373 -- Set on an N_Integer_Literal node to indicate that the value should 1374 -- be printed in hexadecimal in the sprint listing. Has no effect on 1375 -- legality or semantics of program, only on the displayed output. 1376 -- This is used to clarify output from the packed array cases. 1377 1378 -- Procedure_To_Call (Node4-Sem) 1379 -- Present in N_Allocator. N_Free_Statement, and N_Return_Statement 1380 -- nodes. References the entity for the declaration of the procedure 1381 -- to be called to accomplish the required operation (i.e. for the 1382 -- Allocate procedure in the case of N_Allocator and N_Return_Statement 1383 -- (for allocating the return value), and for the Deallocate procedure 1384 -- in the case of N_Free_Statement. 1385 1386 -- Raises_Constraint_Error (Flag7-Sem) 1387 -- Set on an expression whose evaluation will definitely fail a 1388 -- constraint error check. In the case of static expressions, this 1389 -- flag must be set accurately (and if it is set, the expression is 1390 -- typically illegal unless it appears as a non-elaborated branch of 1391 -- a short-circuit form). For a non-static expression, this flag may 1392 -- be set whenever an expression (e.g. an aggregate) is known to raise 1393 -- constraint error. If set, the expression definitely will raise CE 1394 -- if elaborated at runtime. If not set, the expression may or may 1395 -- not raise CE. In other words, on static expressions, the flag is 1396 -- set accurately, on non-static expressions it is set conservatively. 1397 1398 -- Redundant_Use (Flag13-Sem) 1399 -- A flag present in nodes that can appear as an operand in a use 1400 -- clause or use type clause (identifiers, expanded names, attribute 1401 -- references). Set to indicate that a use is redundant (and therefore 1402 -- need not be undone on scope exit). 1403 1404 -- Return_Type (Node2-Sem) 1405 -- Present in N_Return_Statement node. For a procedure, this is set 1406 -- to Standard_Void_Type. For a function it references the entity 1407 -- for the returned type. 1408 1409 -- Rounded_Result (Flag18-Sem) 1410 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes. 1411 -- Used in the fixed-point cases to indicate that the result must be 1412 -- rounded as a result of the use of the 'Round attribute. Also used 1413 -- for integer N_Op_Divide nodes to indicate that the result should 1414 -- be rounded to the nearest integer (breaking ties away from zero), 1415 -- rather than truncated towards zero as usual. These rounded integer 1416 -- operations are the result of expansion of rounded fixed-point 1417 -- divide, conersion and multiplication operations. 1418 1419 -- Scope (Node3-Sem) 1420 -- Present in defining identifiers, defining character literals and 1421 -- defining operator symbols (i.e. in all entities). The entities of 1422 -- a scope all use this field to reference the corresponding scope 1423 -- entity. See Einfo for further details. 1424 1425 -- Shift_Count_OK (Flag4-Sem) 1426 -- A flag present in shift nodes to indicate that the shift count is 1427 -- known to be in range, i.e. is in the range from zero to word length 1428 -- minus one. If this flag is not set, then the shift count may be 1429 -- outside this range, i.e. larger than the word length, and the code 1430 -- must ensure that such shift counts give the appropriate result. 1431 1432 -- Source_Type (Node1-Sem) 1433 -- Used in an N_Validate_Unchecked_Conversion node to point to the 1434 -- source type entity for the unchecked conversion instantiation 1435 -- which gigi must do size validation for. 1436 1437 -- Static_Processing_OK (Flag4-Sem) 1438 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate 1439 -- flag is set, the full value of the aggregate can be determined at 1440 -- compile time and the aggregate can be passed as is to the back-end. 1441 -- In this event it is irrelevant whether this flag is set or not. 1442 -- However, if the Compile_Time_Known_Aggregate flag is not set but 1443 -- Static_Processing_OK is set, the aggregate can (but need not) be 1444 -- converted into a compile time known aggregate by the expander. 1445 -- See Sem_Aggr for the specific conditions under which an aggregate 1446 -- has its Static_Processing_OK flag set. 1447 1448 -- Storage_Pool (Node1-Sem) 1449 -- Present in N_Allocator, N_Free_Statement and N_Return_Statement 1450 -- nodes. References the entity for the storage pool to be used for 1451 -- the allocate or free call or for the allocation of the returned 1452 -- value from a function. Empty indicates that the global default 1453 -- default pool is to be used. Note that in the case of a return 1454 -- statement, this field is set only if the function returns a 1455 -- value of a type whose size is not known at compile time on the 1456 -- secondary stack. It is never set on targets for which the target 1457 -- parameter Targparm.Functions_Return_By_DSP_On_Target is True. 1458 1459 -- Target_Type (Node2-Sem) 1460 -- Used in an N_Validate_Unchecked_Conversion node to point to the 1461 -- target type entity for the unchecked conversion instantiation 1462 -- which gigi must do size validation for. 1463 1464 -- Task_Body_Procedure (Node2-Sem) 1465 -- Present in task type declaration nodes. Points to the entity for 1466 -- the task body procedure (as further described in Exp_Ch9, task 1467 -- bodies are expanded into procedures). A convenient function to 1468 -- retrieve this field is Sem_Util.Get_Task_Body_Procedure. 1469 1470 -- Then_Actions (List3-Sem) 1471 -- This field is present in conditional expression nodes. During code 1472 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert 1473 -- actions at an appropriate place in the tree to get elaborated at the 1474 -- right time. For conditional expressions, we have to be sure that the 1475 -- actions for the Then branch are only elaborated if the condition is 1476 -- True. The Then_Actions field is used as a temporary parking place 1477 -- for these actions. The final tree is always rewritten to eliminate 1478 -- the need for this field, so in the tree passed to Gigi, this field 1479 -- is always set to No_List. 1480 1481 -- Treat_Fixed_As_Integer (Flag14-Sem) 1482 -- This flag appears in operator nodes for divide, multiply, mod and 1483 -- rem on fixed-point operands. It indicates that the operands are 1484 -- to be treated as integer values, ignoring small values. This flag 1485 -- is only set as a result of expansion of fixed-point operations. 1486 -- Typically a fixed-point multplication in the source generates 1487 -- subsidiary multiplication and division operations that work with 1488 -- the underlying integer values and have this flag set. Note that 1489 -- this flag is not needed on other arithmetic operations (add, neg, 1490 -- subtract etc) since in these cases it is always the case that fixed 1491 -- is treated as integer. The Etype field MUST be set if this flag 1492 -- is set. The analyzer knows to leave such nodes alone, and whoever 1493 -- makes them must set the correct Etype value. 1494 1495 -- TSS_Elist (Elist3-Sem) 1496 -- Present in N_Freeze_Entity nodes. Holds an element list containing 1497 -- entries for each TSS (type support subprogram) associated with the 1498 -- frozen type. The elements of the list are the entities for the 1499 -- subprograms (see package Exp_TSS for further details). Set to 1500 -- No_Elist if there are no type support subprograms for the type 1501 -- or if the freeze node is not for a type. 1502 1503 -- Unreferenced_In_Spec (Flag7-Sem) 1504 -- Present in N_With_Clause nodes. Set if the with clause is on the 1505 -- package or subprogram spec where the main unit is the corresponding 1506 -- body, and is not referenced by the spec (it may still be referenced 1507 -- by the body, so this flag is used to generate the proper message 1508 -- (see Sem_Util.Check_Unused_Withs for details) 1509 1510 -- Was_Originally_Stub (Flag13-Sem) 1511 -- This flag is set in the node for a proper body that replaces a 1512 -- stub. During the analysis procedure, stubs in some situations 1513 -- get rewritten by the corresponding bodies, and we set this flag 1514 -- to remember that this happened. Note that it is not good enough 1515 -- to rely on the use of Original_Tree here because of the case of 1516 -- nested instantiations where the substituted node can be copied. 1517 1518 -- Zero_Cost_Handling (Flag5-Sem) 1519 -- This flag is set in all handled sequence of statement and exception 1520 -- handler nodes if eceptions are to be handled using the zero-cost 1521 -- mechanism (see Ada.Exceptions and System.Exceptions in files 1522 -- a-except.ads/adb and s-except.ads for full details). What gigi 1523 -- needs to do for such a handler is simply to put the code in the 1524 -- handler somewhere. The front end has generated all necessary labels. 1525 1526 -------------------------------------------------- 1527 -- Note on Use of End_Label and End_Span Fields -- 1528 -------------------------------------------------- 1529 1530 -- Several constructs have end lines: 1531 1532 -- Loop Statement end loop [loop_IDENTIFIER]; 1533 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER] 1534 -- Task Definition end [task_IDENTIFIER] 1535 -- Protected Definition end [protected_IDENTIFIER] 1536 -- Protected Body end [protected_IDENTIFIER] 1537 1538 -- Block Statement end [block_IDENTIFIER]; 1539 -- Subprogram Body end [DESIGNATOR]; 1540 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER]; 1541 -- Task Body end [task_IDENTIFIER]; 1542 -- Accept Statement end [entry_IDENTIFIER]]; 1543 -- Entry Body end [entry_IDENTIFIER]; 1544 1545 -- If Statement end if; 1546 -- Case Statement end case; 1547 1548 -- Record Definition end record; 1549 -- Enumeration Definition ); 1550 1551 -- The End_Label and End_Span fields are used to mark the locations 1552 -- of these lines, and also keep track of the label in the case where 1553 -- a label is present. 1554 1555 -- For the first group above, the End_Label field of the corresponding 1556 -- node is used to point to the label identifier. In the case where 1557 -- there is no label in the source, the parser supplies a dummy 1558 -- identifier (with Comes_From_Source set to False), and the Sloc 1559 -- of this dummy identifier marks the location of the token following 1560 -- the END token. 1561 1562 -- For the second group, the use of End_Label is similar, but the 1563 -- End_Label is found in the N_Handled_Sequence_Of_Statements node. 1564 -- This is done simply because in some cases there is no room in 1565 -- the parent node. 1566 1567 -- For the third group, there is never any label, and instead of 1568 -- using End_Label, we use the End_Span field which gives the 1569 -- location of the token following END, relative to the starting 1570 -- Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node) 1571 -- to get the Sloc of the IF or CASE following the End_Label. 1572 1573 -- The record definition case is handled specially, we treat it 1574 -- as though it required an optional label which is never present, 1575 -- and so the parser always builds a dummy identifier with Comes 1576 -- From Source set False. The reason we do this, rather than using 1577 -- End_Span in this case, is that we want to generate a cross-ref 1578 -- entry for the end of a record, since it represents a scope for 1579 -- name declaration purposes. 1580 1581 -- The enumeration definition case is handled in an exactly similar 1582 -- manner, building a dummy identifier to get a cross-reference. 1583 1584 -- Note: the reason we store the difference as a Uint, instead of 1585 -- storing the Source_Ptr value directly, is that Source_Ptr values 1586 -- cannot be distinguished from other types of values, and we count 1587 -- on all general use fields being self describing. To make things 1588 -- easier for clients, note that we provide function End_Location, 1589 -- and procedure Set_End_Location to allow access to the logical 1590 -- value (which is the Source_Ptr value for the end token). 1591 1592 --------------------- 1593 -- Syntactic Nodes -- 1594 --------------------- 1595 1596 --------------------- 1597 -- 2.3 Identifier -- 1598 --------------------- 1599 1600 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT} 1601 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT 1602 1603 -- An IDENTIFIER shall not be a reserved word 1604 1605 -- In the Ada grammar identifiers are the bottom level tokens which 1606 -- have very few semantics. Actual program identifiers are direct 1607 -- names. If we were being 100% honest with the grammar, then we would 1608 -- have a node called N_Direct_Name which would point to an identifier. 1609 -- However, that's too many extra nodes, so we just use the N_Identifier 1610 -- node directly as a direct name, and it contains the expression fields 1611 -- and Entity field that correspond to its use as a direct name. In 1612 -- those few cases where identifiers appear in contexts where they are 1613 -- not direct names (pragmas, pragma argument associations, attribute 1614 -- references and attribute definition clauses), the Chars field of the 1615 -- node contains the Name_Id for the identifier name. 1616 1617 -- Note: in GNAT, a reserved word can be treated as an identifier 1618 -- in two cases. First, an incorrect use of a reserved word as an 1619 -- identifier is diagnosed and then treated as a normal identifier. 1620 -- Second, an attribute designator of the form of a reserved word 1621 -- (access, delta, digits, range) is treated as an identifier. 1622 1623 -- Note: The set of letters that is permitted in an identifier depends 1624 -- on the character set in use. See package Csets for full details. 1625 1626 -- N_Identifier 1627 -- Sloc points to identifier 1628 -- Chars (Name1) contains the Name_Id for the identifier 1629 -- Entity (Node4-Sem) 1630 -- Associated_Node (Node4-Sem) 1631 -- Original_Discriminant (Node2-Sem) 1632 -- Redundant_Use (Flag13-Sem) 1633 -- Has_Private_View (Flag11-Sem) (set in generic units) 1634 -- plus fields for expression 1635 1636 -------------------------- 1637 -- 2.4 Numeric Literal -- 1638 -------------------------- 1639 1640 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL 1641 1642 ---------------------------- 1643 -- 2.4.1 Decimal Literal -- 1644 ---------------------------- 1645 1646 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT] 1647 1648 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT} 1649 1650 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL 1651 1652 -- Decimal literals appear in the tree as either integer literal nodes 1653 -- or real literal nodes, depending on whether a period is present. 1654 1655 -- Note: literal nodes appear as a result of direct use of literals 1656 -- in the source program, and also as the result of evaluating 1657 -- expressions at compile time. In the latter case, it is possible 1658 -- to construct real literals that have no syntactic representation 1659 -- using the standard literal format. Such literals are listed by 1660 -- Sprint using the notation [numerator / denominator]. 1661 1662 -- N_Integer_Literal 1663 -- Sloc points to literal 1664 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that 1665 -- has been constant-folded into its literal value. 1666 -- Intval (Uint3) contains integer value of literal 1667 -- plus fields for expression 1668 -- Print_In_Hex (Flag13-Sem) 1669 1670 -- N_Real_Literal 1671 -- Sloc points to literal 1672 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that 1673 -- has been constant-folded into its literal value. 1674 -- Realval (Ureal3) contains real value of literal 1675 -- Corresponding_Integer_Value (Uint4-Sem) 1676 -- Is_Machine_Number (Flag11-Sem) 1677 -- plus fields for expression 1678 1679 -------------------------- 1680 -- 2.4.2 Based Literal -- 1681 -------------------------- 1682 1683 -- BASED_LITERAL ::= 1684 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT] 1685 1686 -- BASE ::= NUMERAL 1687 1688 -- BASED_NUMERAL ::= 1689 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT} 1690 1691 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F 1692 1693 -- Based literals appear in the tree as either integer literal nodes 1694 -- or real literal nodes, depending on whether a period is present. 1695 1696 ---------------------------- 1697 -- 2.5 Character Literal -- 1698 ---------------------------- 1699 1700 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER ' 1701 1702 -- N_Character_Literal 1703 -- Sloc points to literal 1704 -- Chars (Name1) contains the Name_Id for the identifier 1705 -- Char_Literal_Value (Char_Code2) contains the literal value 1706 -- Entity (Node4-Sem) 1707 -- Associated_Node (Node4-Sem) 1708 -- Has_Private_View (Flag11-Sem) set in generic units. 1709 -- plus fields for expression 1710 1711 -- Note: the Entity field will be missing (and set to Empty) for 1712 -- character literals whose type is Standard.Wide_Character or 1713 -- Standard.Character or a type derived from one of these two. 1714 -- In this case the character literal stands for its own coding. 1715 -- The reason we take this irregular short cut is to avoid the 1716 -- need to build lots of junk defining character literal nodes. 1717 1718 ------------------------- 1719 -- 2.6 String Literal -- 1720 ------------------------- 1721 1722 -- STRING LITERAL ::= "{STRING_ELEMENT}" 1723 1724 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a 1725 -- single GRAPHIC_CHARACTER other than a quotation mark. 1726 1727 -- N_String_Literal 1728 -- Sloc points to literal 1729 -- Strval (Str3) contains Id of string value 1730 -- Has_Wide_Character (Flag11-Sem) 1731 -- plus fields for expression 1732 1733 ------------------ 1734 -- 2.7 Comment -- 1735 ------------------ 1736 1737 -- A COMMENT starts with two adjacent hyphens and extends up to the 1738 -- end of the line. A COMMENT may appear on any line of a program. 1739 1740 -- Comments are skipped by the scanner and do not appear in the tree. 1741 -- It is possible to reconstruct the position of comments with respect 1742 -- to the elements of the tree by using the source position (Sloc) 1743 -- pointers that appear in every tree node. 1744 1745 ----------------- 1746 -- 2.8 Pragma -- 1747 ----------------- 1748 1749 -- PRAGMA ::= pragma IDENTIFIER 1750 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})]; 1751 1752 -- Note that a pragma may appear in the tree anywhere a declaration 1753 -- or a statement may appear, as well as in some other situations 1754 -- which are explicitly documented. 1755 1756 -- N_Pragma 1757 -- Sloc points to PRAGMA 1758 -- Chars (Name1) identifier name from pragma identifier 1759 -- Pragma_Argument_Associations (List2) (set to No_List if none) 1760 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert) 1761 -- Next_Rep_Item (Node4-Sem) 1762 1763 -------------------------------------- 1764 -- 2.8 Pragma Argument Association -- 1765 -------------------------------------- 1766 1767 -- PRAGMA_ARGUMENT_ASSOCIATION ::= 1768 -- [pragma_argument_IDENTIFIER =>] NAME 1769 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION 1770 1771 -- N_Pragma_Argument_Association 1772 -- Sloc points to first token in association 1773 -- Chars (Name1) (set to No_Name if no pragma argument identifier) 1774 -- Expression (Node3) 1775 1776 ------------------------ 1777 -- 2.9 Reserved Word -- 1778 ------------------------ 1779 1780 -- Reserved words are parsed by the scanner, and returned as the 1781 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package) 1782 1783 ---------------------------- 1784 -- 3.1 Basic Declaration -- 1785 ---------------------------- 1786 1787 -- BASIC_DECLARATION ::= 1788 -- TYPE_DECLARATION | SUBTYPE_DECLARATION 1789 -- | OBJECT_DECLARATION | NUMBER_DECLARATION 1790 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION 1791 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION 1792 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION 1793 -- | GENERIC_INSTANTIATION 1794 1795 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION 1796 -- see further description in section on semantic nodes. 1797 1798 -- Also, in the tree that is constructed, a pragma may appear 1799 -- anywhere that a declaration may appear. 1800 1801 ------------------------------ 1802 -- 3.1 Defining Identifier -- 1803 ------------------------------ 1804 1805 -- DEFINING_IDENTIFIER ::= IDENTIFIER 1806 1807 -- A defining identifier is an entity, which has additional fields 1808 -- depending on the setting of the Ekind field. These additional 1809 -- fields are defined (and access subprograms declared) in package 1810 -- Einfo. 1811 1812 -- Note: N_Defining_Identifier is an extended node whose fields are 1813 -- deliberate layed out to match the layout of fields in an ordinary 1814 -- N_Identifier node allowing for easy alteration of an identifier 1815 -- node into a defining identifier node. For details, see procedure 1816 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier. 1817 1818 -- N_Defining_Identifier 1819 -- Sloc points to identifier 1820 -- Chars (Name1) contains the Name_Id for the identifier 1821 -- Next_Entity (Node2-Sem) 1822 -- Scope (Node3-Sem) 1823 -- Etype (Node5-Sem) 1824 1825 ----------------------------- 1826 -- 3.2.1 Type Declaration -- 1827 ----------------------------- 1828 1829 -- TYPE_DECLARATION ::= 1830 -- FULL_TYPE_DECLARATION 1831 -- | INCOMPLETE_TYPE_DECLARATION 1832 -- | PRIVATE_TYPE_DECLARATION 1833 -- | PRIVATE_EXTENSION_DECLARATION 1834 1835 ---------------------------------- 1836 -- 3.2.1 Full Type Declaration -- 1837 ---------------------------------- 1838 1839 -- FULL_TYPE_DECLARATION ::= 1840 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART] 1841 -- is TYPE_DEFINITION; 1842 -- | TASK_TYPE_DECLARATION 1843 -- | PROTECTED_TYPE_DECLARATION 1844 1845 -- The full type declaration node is used only for the first case. The 1846 -- second case (concurrent type declaration), is represented directly 1847 -- by a task type declaration or a protected type declaration. 1848 1849 -- N_Full_Type_Declaration 1850 -- Sloc points to TYPE 1851 -- Defining_Identifier (Node1) 1852 -- Discriminant_Specifications (List4) (set to No_List if none) 1853 -- Type_Definition (Node3) 1854 -- Discr_Check_Funcs_Built (Flag11-Sem) 1855 1856 ---------------------------- 1857 -- 3.2.1 Type Definition -- 1858 ---------------------------- 1859 1860 -- TYPE_DEFINITION ::= 1861 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION 1862 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION 1863 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION 1864 -- | DERIVED_TYPE_DEFINITION 1865 1866 -------------------------------- 1867 -- 3.2.2 Subtype Declaration -- 1868 -------------------------------- 1869 1870 -- SUBTYPE_DECLARATION ::= 1871 -- subtype DEFINING_IDENTIFIER is SUBTYPE_INDICATION; 1872 1873 -- The subtype indication field is set to Empty for subtypes 1874 -- declared in package Standard (Positive, Natural). 1875 1876 -- N_Subtype_Declaration 1877 -- Sloc points to SUBTYPE 1878 -- Defining_Identifier (Node1) 1879 -- Subtype_Indication (Node5) 1880 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type). 1881 -- Exception_Junk (Flag11-Sem) 1882 1883 ------------------------------- 1884 -- 3.2.2 Subtype Indication -- 1885 ------------------------------- 1886 1887 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT] 1888 1889 -- Note: if no constraint is present, the subtype indication appears 1890 -- directly in the tree as a subtype mark. The N_Subtype_Indication 1891 -- node is used only if a constraint is present. 1892 1893 -- Note: the reason that this node has expression fields is that a 1894 -- subtype indication can appear as an operand of a membership test. 1895 1896 -- N_Subtype_Indication 1897 -- Sloc points to first token of subtype mark 1898 -- Subtype_Mark (Node4) 1899 -- Constraint (Node3) 1900 -- Etype (Node5-Sem) 1901 -- Must_Not_Freeze (Flag8-Sem) 1902 1903 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The 1904 -- reason for this redundancy is so that in a list of array index types, 1905 -- the Etype can be uniformly accessed to determine the subscript type. 1906 -- This means that no Itype is constructed for the actual subtype that 1907 -- is created by the subtype indication. If such an Itype is required, 1908 -- it is constructed in the context in which the indication appears. 1909 1910 ------------------------- 1911 -- 3.2.2 Subtype Mark -- 1912 ------------------------- 1913 1914 -- SUBTYPE_MARK ::= subtype_NAME 1915 1916 ----------------------- 1917 -- 3.2.2 Constraint -- 1918 ----------------------- 1919 1920 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT 1921 1922 ------------------------------ 1923 -- 3.2.2 Scalar Constraint -- 1924 ------------------------------ 1925 1926 -- SCALAR_CONSTRAINT ::= 1927 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT 1928 1929 --------------------------------- 1930 -- 3.2.2 Composite Constraint -- 1931 --------------------------------- 1932 1933 -- COMPOSITE_CONSTRAINT ::= 1934 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT 1935 1936 ------------------------------- 1937 -- 3.3.1 Object Declaration -- 1938 ------------------------------- 1939 1940 -- OBJECT_DECLARATION ::= 1941 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant] 1942 -- SUBTYPE_INDICATION [:= EXPRESSION]; 1943 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant] 1944 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]; 1945 -- | SINGLE_TASK_DECLARATION 1946 -- | SINGLE_PROTECTED_DECLARATION 1947 1948 -- Note: aliased is not permitted in Ada 83 mode 1949 1950 -- The N_Object_Declaration node is only for the first two cases. 1951 -- Single task declaration is handled by P_Task (9.1) 1952 -- Single protected declaration is handled by P_protected (9.5) 1953 1954 -- Although the syntax allows multiple identifiers in the list, the 1955 -- semantics is as though successive declarations were given with 1956 -- identical type definition and expression components. To simplify 1957 -- semantic processing, the parser represents a multiple declaration 1958 -- case as a sequence of single declarations, using the More_Ids and 1959 -- Prev_Ids flags to preserve the original source form as described 1960 -- in the section on "Handling of Defining Identifier Lists". 1961 1962 -- Note: if a range check is required for the initialization 1963 -- expression then the Do_Range_Check flag is set in the Expression, 1964 -- with the check being done against the type given by the object 1965 -- definition, which is also the Etype of the defining identifier. 1966 1967 -- Note: the contents of the Expression field must be ignored (i.e. 1968 -- treated as though it were Empty) if No_Initialization is set True. 1969 1970 -- Note: the back end places some restrictions on the form of the 1971 -- Expression field. If the object being declared is Atomic, then 1972 -- the Expression may not have the form of an aggregate (since this 1973 -- might cause the back end to generate separate assignments). It 1974 -- also cannot be a reference to an object marked as a true constant 1975 -- (Is_True_Constant flag set), where the object is itself initalized 1976 -- with an aggregate. If necessary the front end must generate an 1977 -- extra temporary (with Is_True_Constant set False), and initialize 1978 -- this temporary as required (the temporary itself is not atomic). 1979 1980 -- N_Object_Declaration 1981 -- Sloc points to first identifier 1982 -- Defining_Identifier (Node1) 1983 -- Aliased_Present (Flag4) set if ALIASED appears 1984 -- Constant_Present (Flag17) set if CONSTANT appears 1985 -- Object_Definition (Node4) subtype indication/array type definition 1986 -- Expression (Node3) (set to Empty if not present) 1987 -- Handler_List_Entry (Node2-Sem) 1988 -- Corresponding_Generic_Association (Node5-Sem) 1989 -- More_Ids (Flag5) (set to False if no more identifiers in list) 1990 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 1991 -- No_Initialization (Flag13-Sem) 1992 -- Assignment_OK (Flag15-Sem) 1993 -- Exception_Junk (Flag11-Sem) 1994 -- Delay_Finalize_Attach (Flag14-Sem) 1995 -- Is_Subprogram_Descriptor (Flag16-Sem) 1996 1997 ------------------------------------- 1998 -- 3.3.1 Defining Identifier List -- 1999 ------------------------------------- 2000 2001 -- DEFINING_IDENTIFIER_LIST ::= 2002 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER} 2003 2004 ------------------------------- 2005 -- 3.3.2 Number Declaration -- 2006 ------------------------------- 2007 2008 -- NUMBER_DECLARATION ::= 2009 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION; 2010 2011 -- Although the syntax allows multiple identifiers in the list, the 2012 -- semantics is as though successive declarations were given with 2013 -- identical expressions. To simplify semantic processing, the parser 2014 -- represents a multiple declaration case as a sequence of single 2015 -- declarations, using the More_Ids and Prev_Ids flags to preserve 2016 -- the original source form as described in the section on "Handling 2017 -- of Defining Identifier Lists". 2018 2019 -- N_Number_Declaration 2020 -- Sloc points to first identifier 2021 -- Defining_Identifier (Node1) 2022 -- Expression (Node3) 2023 -- More_Ids (Flag5) (set to False if no more identifiers in list) 2024 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 2025 2026 ---------------------------------- 2027 -- 3.4 Derived Type Definition -- 2028 ---------------------------------- 2029 2030 -- DERIVED_TYPE_DEFINITION ::= 2031 -- [abstract] new parent_SUBTYPE_INDICATION [RECORD_EXTENSION_PART] 2032 2033 -- Note: ABSTRACT, record extension part not permitted in Ada 83 mode 2034 2035 -- Note: a record extension part is required if ABSTRACT is present 2036 2037 -- N_Derived_Type_Definition 2038 -- Sloc points to NEW 2039 -- Abstract_Present (Flag4) 2040 -- Subtype_Indication (Node5) 2041 -- Record_Extension_Part (Node3) (set to Empty if not present) 2042 2043 --------------------------- 2044 -- 3.5 Range Constraint -- 2045 --------------------------- 2046 2047 -- RANGE_CONSTRAINT ::= range RANGE 2048 2049 -- N_Range_Constraint 2050 -- Sloc points to RANGE 2051 -- Range_Expression (Node4) 2052 2053 ---------------- 2054 -- 3.5 Range -- 2055 ---------------- 2056 2057 -- RANGE ::= 2058 -- RANGE_ATTRIBUTE_REFERENCE 2059 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION 2060 2061 -- Note: the case of a range given as a range attribute reference 2062 -- appears directly in the tree as an attribute reference. 2063 2064 -- Note: the field name for a reference to a range is Range_Expression 2065 -- rather than Range, because range is a reserved keyword in Ada! 2066 2067 -- Note: the reason that this node has expression fields is that a 2068 -- range can appear as an operand of a membership test. The Etype 2069 -- field is the type of the range (we do NOT construct an implicit 2070 -- subtype to represent the range exactly). 2071 2072 -- N_Range 2073 -- Sloc points to .. 2074 -- Low_Bound (Node1) 2075 -- High_Bound (Node2) 2076 -- Includes_Infinities (Flag11) 2077 -- plus fields for expression 2078 2079 -- Note: if the range appears in a context, such as a subtype 2080 -- declaration, where range checks are required on one or both of 2081 -- the expression fields, then type conversion nodes are inserted 2082 -- to represent the required checks. 2083 2084 ---------------------------------------- 2085 -- 3.5.1 Enumeration Type Definition -- 2086 ---------------------------------------- 2087 2088 -- ENUMERATION_TYPE_DEFINITION ::= 2089 -- (ENUMERATION_LITERAL_SPECIFICATION 2090 -- {, ENUMERATION_LITERAL_SPECIFICATION}) 2091 2092 -- Note: the Literals field in the node described below is null for 2093 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for 2094 -- which special processing handles these types as special cases. 2095 2096 -- N_Enumeration_Type_Definition 2097 -- Sloc points to left parenthesis 2098 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER) 2099 -- End_Label (Node4) (set to Empty if internally generated record) 2100 2101 ---------------------------------------------- 2102 -- 3.5.1 Enumeration Literal Specification -- 2103 ---------------------------------------------- 2104 2105 -- ENUMERATION_LITERAL_SPECIFICATION ::= 2106 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL 2107 2108 --------------------------------------- 2109 -- 3.5.1 Defining Character Literal -- 2110 --------------------------------------- 2111 2112 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL 2113 2114 -- A defining character literal is an entity, which has additional 2115 -- fields depending on the setting of the Ekind field. These 2116 -- additional fields are defined (and access subprograms declared) 2117 -- in package Einfo. 2118 2119 -- Note: N_Defining_Character_Literal is an extended node whose fields 2120 -- are deliberate layed out to match the layout of fields in an ordinary 2121 -- N_Character_Literal node allowing for easy alteration of a character 2122 -- literal node into a defining character literal node. For details, see 2123 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal. 2124 2125 -- N_Defining_Character_Literal 2126 -- Sloc points to literal 2127 -- Chars (Name1) contains the Name_Id for the identifier 2128 -- Next_Entity (Node2-Sem) 2129 -- Scope (Node3-Sem) 2130 -- Etype (Node5-Sem) 2131 2132 ------------------------------------ 2133 -- 3.5.4 Integer Type Definition -- 2134 ------------------------------------ 2135 2136 -- Note: there is an error in this rule in the latest version of the 2137 -- grammar, so we have retained the old rule pending clarification. 2138 2139 -- INTEGER_TYPE_DEFINITION ::= 2140 -- SIGNED_INTEGER_TYPE_DEFINITION 2141 -- MODULAR_TYPE_DEFINITION 2142 2143 ------------------------------------------- 2144 -- 3.5.4 Signed Integer Type Definition -- 2145 ------------------------------------------- 2146 2147 -- SIGNED_INTEGER_TYPE_DEFINITION ::= 2148 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION 2149 2150 -- Note: the Low_Bound and High_Bound fields are set to Empty for 2151 -- integer types defined in package Standard. 2152 2153 -- N_Signed_Integer_Type_Definition 2154 -- Sloc points to RANGE 2155 -- Low_Bound (Node1) 2156 -- High_Bound (Node2) 2157 2158 ----------------------------------------- 2159 -- 3.5.4 Unsigned Range Specification -- 2160 ----------------------------------------- 2161 2162 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION 2163 2164 -- N_Modular_Type_Definition 2165 -- Sloc points to MOD 2166 -- Expression (Node3) 2167 2168 --------------------------------- 2169 -- 3.5.6 Real Type Definition -- 2170 --------------------------------- 2171 2172 -- REAL_TYPE_DEFINITION ::= 2173 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION 2174 2175 -------------------------------------- 2176 -- 3.5.7 Floating Point Definition -- 2177 -------------------------------------- 2178 2179 -- FLOATING_POINT_DEFINITION ::= 2180 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION] 2181 2182 -- Note: The Digits_Expression and Real_Range_Specifications fields 2183 -- are set to Empty for floating-point types declared in Standard. 2184 2185 -- N_Floating_Point_Definition 2186 -- Sloc points to DIGITS 2187 -- Digits_Expression (Node2) 2188 -- Real_Range_Specification (Node4) (set to Empty if not present) 2189 2190 ------------------------------------- 2191 -- 3.5.7 Real Range Specification -- 2192 ------------------------------------- 2193 2194 -- REAL_RANGE_SPECIFICATION ::= 2195 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION 2196 2197 -- N_Real_Range_Specification 2198 -- Sloc points to RANGE 2199 -- Low_Bound (Node1) 2200 -- High_Bound (Node2) 2201 2202 ----------------------------------- 2203 -- 3.5.9 Fixed Point Definition -- 2204 ----------------------------------- 2205 2206 -- FIXED_POINT_DEFINITION ::= 2207 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION 2208 2209 -------------------------------------------- 2210 -- 3.5.9 Ordinary Fixed Point Definition -- 2211 -------------------------------------------- 2212 2213 -- ORDINARY_FIXED_POINT_DEFINITION ::= 2214 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION 2215 2216 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION 2217 2218 -- Note: the Delta_Expression and Real_Range_Specification fields 2219 -- are set to Empty for fixed point types declared in Standard. 2220 2221 -- N_Ordinary_Fixed_Point_Definition 2222 -- Sloc points to DELTA 2223 -- Delta_Expression (Node3) 2224 -- Real_Range_Specification (Node4) 2225 2226 ------------------------------------------- 2227 -- 3.5.9 Decimal Fixed Point Definition -- 2228 ------------------------------------------- 2229 2230 -- DECIMAL_FIXED_POINT_DEFINITION ::= 2231 -- delta static_EXPRESSION 2232 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION] 2233 2234 -- Note: decimal types are not permitted in Ada 83 mode 2235 2236 -- N_Decimal_Fixed_Point_Definition 2237 -- Sloc points to DELTA 2238 -- Delta_Expression (Node3) 2239 -- Digits_Expression (Node2) 2240 -- Real_Range_Specification (Node4) (set to Empty if not present) 2241 2242 ------------------------------ 2243 -- 3.5.9 Digits Constraint -- 2244 ------------------------------ 2245 2246 -- DIGITS_CONSTRAINT ::= 2247 -- digits static_EXPRESSION [RANGE_CONSTRAINT] 2248 2249 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION 2250 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent 2251 2252 -- N_Digits_Constraint 2253 -- Sloc points to DIGITS 2254 -- Digits_Expression (Node2) 2255 -- Range_Constraint (Node4) (set to Empty if not present) 2256 2257 -------------------------------- 2258 -- 3.6 Array Type Definition -- 2259 -------------------------------- 2260 2261 -- ARRAY_TYPE_DEFINITION ::= 2262 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION 2263 2264 ----------------------------------------- 2265 -- 3.6 Unconstrained Array Definition -- 2266 ----------------------------------------- 2267 2268 -- UNCONSTRAINED_ARRAY_DEFINITION ::= 2269 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of 2270 -- COMPONENT_DEFINITION 2271 2272 -- Note: dimensionality of array is indicated by number of entries in 2273 -- the Subtype_Marks list, which has one entry for each dimension. 2274 2275 -- N_Unconstrained_Array_Definition 2276 -- Sloc points to ARRAY 2277 -- Subtype_Marks (List2) 2278 -- Component_Definition (Node4) 2279 2280 ----------------------------------- 2281 -- 3.6 Index Subtype Definition -- 2282 ----------------------------------- 2283 2284 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <> 2285 2286 -- There is no explicit node in the tree for an index subtype 2287 -- definition since the N_Unconstrained_Array_Definition node 2288 -- incorporates the type marks which appear in this context. 2289 2290 --------------------------------------- 2291 -- 3.6 Constrained Array Definition -- 2292 --------------------------------------- 2293 2294 -- CONSTRAINED_ARRAY_DEFINITION ::= 2295 -- array (DISCRETE_SUBTYPE_DEFINITION 2296 -- {, DISCRETE_SUBTYPE_DEFINITION}) 2297 -- of COMPONENT_DEFINITION 2298 2299 -- Note: dimensionality of array is indicated by number of entries 2300 -- in the Discrete_Subtype_Definitions list, which has one entry 2301 -- for each dimension. 2302 2303 -- N_Constrained_Array_Definition 2304 -- Sloc points to ARRAY 2305 -- Discrete_Subtype_Definitions (List2) 2306 -- Component_Definition (Node4) 2307 2308 -------------------------------------- 2309 -- 3.6 Discrete Subtype Definition -- 2310 -------------------------------------- 2311 2312 -- DISCRETE_SUBTYPE_DEFINITION ::= 2313 -- discrete_SUBTYPE_INDICATION | RANGE 2314 2315 ------------------------------- 2316 -- 3.6 Component Definition -- 2317 ------------------------------- 2318 2319 -- COMPONENT_DEFINITION ::= [aliased] SUBTYPE_INDICATION 2320 2321 -- Note: although the syntax does not permit a component definition to 2322 -- be an anonymous array (and the parser will diagnose such an attempt 2323 -- with an appropriate message), it is possible for anonymous arrays 2324 -- to appear as component definitions. The semantics and back end handle 2325 -- this case properly, and the expander in fact generates such cases. 2326 2327 -- N_Component_Definition 2328 -- Sloc points to ALIASED or to first token of subtype mark 2329 -- Aliased_Present (Flag4) 2330 -- Subtype_Indication (Node5) 2331 2332 ----------------------------- 2333 -- 3.6.1 Index Constraint -- 2334 ----------------------------- 2335 2336 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE}) 2337 2338 -- It is not in general possible to distinguish between discriminant 2339 -- constraints and index constraints at parse time, since a simple 2340 -- name could be either the subtype mark of a discrete range, or an 2341 -- expression in a discriminant association with no name. Either 2342 -- entry appears simply as the name, and the semantic parse must 2343 -- distinguish between the two cases. Thus we use a common tree 2344 -- node format for both of these constraint types. 2345 2346 -- See Discriminant_Constraint for format of node 2347 2348 --------------------------- 2349 -- 3.6.1 Discrete Range -- 2350 --------------------------- 2351 2352 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE 2353 2354 ---------------------------- 2355 -- 3.7 Discriminant Part -- 2356 ---------------------------- 2357 2358 -- DISCRIMINANT_PART ::= 2359 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART 2360 2361 ------------------------------------ 2362 -- 3.7 Unknown Discriminant Part -- 2363 ------------------------------------ 2364 2365 -- UNKNOWN_DISCRIMINANT_PART ::= (<>) 2366 2367 -- Note: unknown discriminant parts are not permitted in Ada 83 mode 2368 2369 -- There is no explicit node in the tree for an unknown discriminant 2370 -- part. Instead the Unknown_Discriminants_Present flag is set in the 2371 -- parent node. 2372 2373 ---------------------------------- 2374 -- 3.7 Known Discriminant Part -- 2375 ---------------------------------- 2376 2377 -- KNOWN_DISCRIMINANT_PART ::= 2378 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION}) 2379 2380 ------------------------------------- 2381 -- 3.7 Discriminant Specification -- 2382 ------------------------------------- 2383 2384 -- DISCRIMINANT_SPECIFICATION ::= 2385 -- DEFINING_IDENTIFIER_LIST : SUBTYPE_MARK 2386 -- [:= DEFAULT_EXPRESSION] 2387 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION 2388 -- [:= DEFAULT_EXPRESSION] 2389 2390 -- Although the syntax allows multiple identifiers in the list, the 2391 -- semantics is as though successive specifications were given with 2392 -- identical type definition and expression components. To simplify 2393 -- semantic processing, the parser represents a multiple declaration 2394 -- case as a sequence of single specifications, using the More_Ids and 2395 -- Prev_Ids flags to preserve the original source form as described 2396 -- in the section on "Handling of Defining Identifier Lists". 2397 2398 -- N_Discriminant_Specification 2399 -- Sloc points to first identifier 2400 -- Defining_Identifier (Node1) 2401 -- Discriminant_Type (Node5) subtype mark or 2402 -- access parameter definition 2403 -- Expression (Node3) (set to Empty if no default expression) 2404 -- More_Ids (Flag5) (set to False if no more identifiers in list) 2405 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 2406 2407 ----------------------------- 2408 -- 3.7 Default Expression -- 2409 ----------------------------- 2410 2411 -- DEFAULT_EXPRESSION ::= EXPRESSION 2412 2413 ------------------------------------ 2414 -- 3.7.1 Discriminant Constraint -- 2415 ------------------------------------ 2416 2417 -- DISCRIMINANT_CONSTRAINT ::= 2418 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION}) 2419 2420 -- It is not in general possible to distinguish between discriminant 2421 -- constraints and index constraints at parse time, since a simple 2422 -- name could be either the subtype mark of a discrete range, or an 2423 -- expression in a discriminant association with no name. Either 2424 -- entry appears simply as the name, and the semantic parse must 2425 -- distinguish between the two cases. Thus we use a common tree 2426 -- node format for both of these constraint types. 2427 2428 -- N_Index_Or_Discriminant_Constraint 2429 -- Sloc points to left paren 2430 -- Constraints (List1) points to list of discrete ranges or 2431 -- discriminant associations 2432 2433 ------------------------------------- 2434 -- 3.7.1 Discriminant Association -- 2435 ------------------------------------- 2436 2437 -- DISCRIMINANT_ASSOCIATION ::= 2438 -- [discriminant_SELECTOR_NAME 2439 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION 2440 2441 -- Note: a discriminant association that has no selector name list 2442 -- appears directly as an expression in the tree. 2443 2444 -- N_Discriminant_Association 2445 -- Sloc points to first token of discriminant association 2446 -- Selector_Names (List1) (always non-empty, since if no selector 2447 -- names are present, this node is not used, see comment above) 2448 -- Expression (Node3) 2449 2450 --------------------------------- 2451 -- 3.8 Record Type Definition -- 2452 --------------------------------- 2453 2454 -- RECORD_TYPE_DEFINITION ::= 2455 -- [[abstract] tagged] [limited] RECORD_DEFINITION 2456 2457 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode 2458 2459 -- There is no explicit node in the tree for a record type definition. 2460 -- Instead the flags for Tagged_Present and Limited_Present appear in 2461 -- the N_Record_Definition node for a record definition appearing in 2462 -- the context of a record type definition. 2463 2464 ---------------------------- 2465 -- 3.8 Record Definition -- 2466 ---------------------------- 2467 2468 -- RECORD_DEFINITION ::= 2469 -- record 2470 -- COMPONENT_LIST 2471 -- end record 2472 -- | null record 2473 2474 -- Note: the Abstract_Present, Tagged_Present and Limited_Present 2475 -- flags appear only for a record definition appearing in a record 2476 -- type definition. 2477 2478 -- Note: the NULL RECORD case is not permitted in Ada 83 2479 2480 -- N_Record_Definition 2481 -- Sloc points to RECORD or NULL 2482 -- End_Label (Node4) (set to Empty if internally generated record) 2483 -- Abstract_Present (Flag4) 2484 -- Tagged_Present (Flag15) 2485 -- Limited_Present (Flag17) 2486 -- Component_List (Node1) empty in null record case 2487 -- Null_Present (Flag13) set in null record case 2488 2489 ------------------------- 2490 -- 3.8 Component List -- 2491 ------------------------- 2492 2493 -- COMPONENT_LIST ::= 2494 -- COMPONENT_ITEM {COMPONENT_ITEM} 2495 -- | {COMPONENT_ITEM} VARIANT_PART 2496 -- | null; 2497 2498 -- N_Component_List 2499 -- Sloc points to first token of component list 2500 -- Component_Items (List3) 2501 -- Variant_Part (Node4) (set to Empty if no variant part) 2502 -- Null_Present (Flag13) 2503 2504 ------------------------- 2505 -- 3.8 Component Item -- 2506 ------------------------- 2507 2508 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE 2509 2510 -- Note: A component item can also be a pragma, and in the tree 2511 -- that is obtained after semantic processing, a component item 2512 -- can be an N_Null node resulting from a non-recognized pragma. 2513 2514 -------------------------------- 2515 -- 3.8 Component Declaration -- 2516 -------------------------------- 2517 2518 -- COMPONENT_DECLARATION ::= 2519 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION 2520 -- [:= DEFAULT_EXPRESSION] 2521 2522 -- Note: although the syntax does not permit a component definition to 2523 -- be an anonymous array (and the parser will diagnose such an attempt 2524 -- with an appropriate message), it is possible for anonymous arrays 2525 -- to appear as component definitions. The semantics and back end handle 2526 -- this case properly, and the expander in fact generates such cases. 2527 2528 -- Although the syntax allows multiple identifiers in the list, the 2529 -- semantics is as though successive declarations were given with the 2530 -- same component definition and expression components. To simplify 2531 -- semantic processing, the parser represents a multiple declaration 2532 -- case as a sequence of single declarations, using the More_Ids and 2533 -- Prev_Ids flags to preserve the original source form as described 2534 -- in the section on "Handling of Defining Identifier Lists". 2535 2536 -- N_Component_Declaration 2537 -- Sloc points to first identifier 2538 -- Defining_Identifier (Node1) 2539 -- Component_Definition (Node4) 2540 -- Expression (Node3) (set to Empty if no default expression) 2541 -- More_Ids (Flag5) (set to False if no more identifiers in list) 2542 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 2543 2544 ------------------------- 2545 -- 3.8.1 Variant Part -- 2546 ------------------------- 2547 2548 -- VARIANT_PART ::= 2549 -- case discriminant_DIRECT_NAME is 2550 -- VARIANT 2551 -- {VARIANT} 2552 -- end case; 2553 2554 -- Note: the variants list can contain pragmas as well as variants. 2555 -- In a properly formed program there is at least one variant. 2556 2557 -- N_Variant_Part 2558 -- Sloc points to CASE 2559 -- Name (Node2) 2560 -- Variants (List1) 2561 2562 -------------------- 2563 -- 3.8.1 Variant -- 2564 -------------------- 2565 2566 -- VARIANT ::= 2567 -- when DISCRETE_CHOICE_LIST => 2568 -- COMPONENT_LIST 2569 2570 -- N_Variant 2571 -- Sloc points to WHEN 2572 -- Discrete_Choices (List4) 2573 -- Component_List (Node1) 2574 -- Enclosing_Variant (Node2-Sem) 2575 -- Present_Expr (Uint3-Sem) 2576 -- Dcheck_Function (Node5-Sem) 2577 2578 --------------------------------- 2579 -- 3.8.1 Discrete Choice List -- 2580 --------------------------------- 2581 2582 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE} 2583 2584 ---------------------------- 2585 -- 3.8.1 Discrete Choice -- 2586 ---------------------------- 2587 2588 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others 2589 2590 -- Note: in Ada 83 mode, the expression must be a simple expression 2591 2592 -- The only choice that appears explicitly is the OTHERS choice, as 2593 -- defined here. Other cases of discrete choice (expression and 2594 -- discrete range) appear directly. This production is also used 2595 -- for the OTHERS possibility of an exception choice. 2596 2597 -- Note: in accordance with the syntax, the parser does not check that 2598 -- OTHERS appears at the end on its own in a choice list context. This 2599 -- is a semantic check. 2600 2601 -- N_Others_Choice 2602 -- Sloc points to OTHERS 2603 -- Others_Discrete_Choices (List1-Sem) 2604 -- All_Others (Flag11-Sem) 2605 2606 ---------------------------------- 2607 -- 3.9.1 Record Extension Part -- 2608 ---------------------------------- 2609 2610 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION 2611 2612 -- Note: record extension parts are not permitted in Ada 83 mode 2613 2614 ---------------------------------- 2615 -- 3.10 Access Type Definition -- 2616 ---------------------------------- 2617 2618 -- ACCESS_TYPE_DEFINITION ::= 2619 -- ACCESS_TO_OBJECT_DEFINITION 2620 -- | ACCESS_TO_SUBPROGRAM_DEFINITION 2621 2622 --------------------------------------- 2623 -- 3.10 Access To Object Definition -- 2624 --------------------------------------- 2625 2626 -- ACCESS_TO_OBJECT_DEFINITION ::= 2627 -- access [GENERAL_ACCESS_MODIFIER] SUBTYPE_INDICATION 2628 2629 -- N_Access_To_Object_Definition 2630 -- Sloc points to ACCESS 2631 -- All_Present (Flag15) 2632 -- Subtype_Indication (Node5) 2633 -- Constant_Present (Flag17) 2634 2635 ----------------------------------- 2636 -- 3.10 General Access Modifier -- 2637 ----------------------------------- 2638 2639 -- GENERAL_ACCESS_MODIFIER ::= all | constant 2640 2641 -- Note: general access modifiers are not permitted in Ada 83 mode 2642 2643 -- There is no explicit node in the tree for general access modifier. 2644 -- Instead the All_Present or Constant_Present flags are set in the 2645 -- parent node. 2646 2647 ------------------------------------------- 2648 -- 3.10 Access To Subprogram Definition -- 2649 ------------------------------------------- 2650 2651 -- ACCESS_TO_SUBPROGRAM_DEFINITION 2652 -- access [protected] procedure PARAMETER_PROFILE 2653 -- | access [protected] function PARAMETER_AND_RESULT_PROFILE 2654 2655 -- Note: access to subprograms are not permitted in Ada 83 mode 2656 2657 -- N_Access_Function_Definition 2658 -- Sloc points to ACCESS 2659 -- Protected_Present (Flag15) 2660 -- Parameter_Specifications (List3) (set to No_List if no formal part) 2661 -- Subtype_Mark (Node4) result subtype 2662 2663 -- N_Access_Procedure_Definition 2664 -- Sloc points to ACCESS 2665 -- Protected_Present (Flag15) 2666 -- Parameter_Specifications (List3) (set to No_List if no formal part) 2667 2668 ----------------------------- 2669 -- 3.10 Access Definition -- 2670 ----------------------------- 2671 2672 -- ACCESS_DEFINITION ::= access SUBTYPE_MARK 2673 2674 -- N_Access_Definition 2675 -- Sloc points to ACCESS 2676 -- Subtype_Mark (Node4) 2677 2678 ----------------------------------------- 2679 -- 3.10.1 Incomplete Type Declaration -- 2680 ----------------------------------------- 2681 2682 -- INCOMPLETE_TYPE_DECLARATION ::= 2683 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]; 2684 2685 -- N_Incomplete_Type_Declaration 2686 -- Sloc points to TYPE 2687 -- Defining_Identifier (Node1) 2688 -- Discriminant_Specifications (List4) (set to No_List if no 2689 -- discriminant part, or if the discriminant part is an 2690 -- unknown discriminant part) 2691 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant 2692 2693 ---------------------------- 2694 -- 3.11 Declarative Part -- 2695 ---------------------------- 2696 2697 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM} 2698 2699 -- Note: although the parser enforces the syntactic requirement that 2700 -- a declarative part can contain only declarations, the semantic 2701 -- processing may add statements to the list of actions in a 2702 -- declarative part, so the code generator should be prepared 2703 -- to accept a statement in this position. 2704 2705 ---------------------------- 2706 -- 3.11 Declarative Item -- 2707 ---------------------------- 2708 2709 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY 2710 2711 ---------------------------------- 2712 -- 3.11 Basic Declarative Item -- 2713 ---------------------------------- 2714 2715 -- BASIC_DECLARATIVE_ITEM ::= 2716 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE 2717 2718 ---------------- 2719 -- 3.11 Body -- 2720 ---------------- 2721 2722 -- BODY ::= PROPER_BODY | BODY_STUB 2723 2724 ----------------------- 2725 -- 3.11 Proper Body -- 2726 ----------------------- 2727 2728 -- PROPER_BODY ::= 2729 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY 2730 2731 --------------- 2732 -- 4.1 Name -- 2733 --------------- 2734 2735 -- NAME ::= 2736 -- DIRECT_NAME | EXPLICIT_DEREFERENCE 2737 -- | INDEXED_COMPONENT | SLICE 2738 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE 2739 -- | TYPE_CONVERSION | FUNCTION_CALL 2740 -- | CHARACTER_LITERAL 2741 2742 ---------------------- 2743 -- 4.1 Direct Name -- 2744 ---------------------- 2745 2746 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL 2747 2748 ----------------- 2749 -- 4.1 Prefix -- 2750 ----------------- 2751 2752 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE 2753 2754 ------------------------------- 2755 -- 4.1 Explicit Dereference -- 2756 ------------------------------- 2757 2758 -- EXPLICIT_DEREFERENCE ::= NAME . all 2759 2760 -- N_Explicit_Dereference 2761 -- Sloc points to ALL 2762 -- Prefix (Node3) 2763 -- plus fields for expression 2764 2765 ------------------------------- 2766 -- 4.1 Implicit Dereference -- 2767 ------------------------------- 2768 2769 -- IMPLICIT_DEREFERENCE ::= NAME 2770 2771 ------------------------------ 2772 -- 4.1.1 Indexed Component -- 2773 ------------------------------ 2774 2775 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION}) 2776 2777 -- Note: the parser may generate this node in some situations where it 2778 -- should be a function call. The semantic pass must correct this 2779 -- misidentification (which is inevitable at the parser level). 2780 2781 -- N_Indexed_Component 2782 -- Sloc contains a copy of the Sloc value of the Prefix 2783 -- Prefix (Node3) 2784 -- Expressions (List1) 2785 -- plus fields for expression 2786 2787 -- Note: if any of the subscripts requires a range check, then the 2788 -- Do_Range_Check flag is set on the corresponding expression, with 2789 -- the index type being determined from the type of the Prefix, which 2790 -- references the array being indexed. 2791 2792 -- Note: in a fully analyzed and expanded indexed component node, and 2793 -- hence in any such node that gigi sees, if the prefix is an access 2794 -- type, then an explicit dereference operation has been inserted. 2795 2796 ------------------ 2797 -- 4.1.2 Slice -- 2798 ------------------ 2799 2800 -- SLICE ::= PREFIX (DISCRETE_RANGE) 2801 2802 -- Note: an implicit subtype is created to describe the resulting 2803 -- type, so that the bounds of this type are the bounds of the slice. 2804 2805 -- N_Slice 2806 -- Sloc points to first token of prefix 2807 -- Prefix (Node3) 2808 -- Discrete_Range (Node4) 2809 -- plus fields for expression 2810 2811 ------------------------------- 2812 -- 4.1.3 Selected Component -- 2813 ------------------------------- 2814 2815 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME 2816 2817 -- Note: selected components that are semantically expanded names get 2818 -- changed during semantic processing into the separate N_Expanded_Name 2819 -- node. See description of this node in the section on semantic nodes. 2820 2821 -- N_Selected_Component 2822 -- Sloc points to period 2823 -- Prefix (Node3) 2824 -- Selector_Name (Node2) 2825 -- Associated_Node (Node4-Sem) 2826 -- Do_Discriminant_Check (Flag13-Sem) 2827 -- Is_In_Discriminant_Check (Flag11-Sem) 2828 -- plus fields for expression 2829 2830 -------------------------- 2831 -- 4.1.3 Selector Name -- 2832 -------------------------- 2833 2834 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL 2835 2836 -------------------------------- 2837 -- 4.1.4 Attribute Reference -- 2838 -------------------------------- 2839 2840 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR 2841 2842 -- Note: the syntax is quite ambiguous at this point. Consider: 2843 2844 -- A'Length (X) X is part of the attribute designator 2845 -- A'Pos (X) X is an explicit actual parameter of function A'Pos 2846 -- A'Class (X) X is the expression of a type conversion 2847 2848 -- It would be possible for the parser to distinguish these cases 2849 -- by looking at the attribute identifier. However, that would mean 2850 -- more work in introducing new implementation defined attributes, 2851 -- and also it would mean that special processing for attributes 2852 -- would be scattered around, instead of being centralized in the 2853 -- semantic routine that handles an N_Attribute_Reference node. 2854 -- Consequently, the parser in all the above cases stores the 2855 -- expression (X in these examples) as a single element list in 2856 -- in the Expressions field of the N_Attribute_Reference node. 2857 2858 -- Similarly, for attributes like Max which take two arguments, 2859 -- we store the two arguments as a two element list in the 2860 -- Expressions field. Of course it is clear at parse time that 2861 -- this case is really a function call with an attribute as the 2862 -- prefix, but it turns out to be convenient to handle the two 2863 -- argument case in a similar manner to the one argument case, 2864 -- and indeed in general the parser will accept any number of 2865 -- expressions in this position and store them as a list in the 2866 -- attribute reference node. This allows for future addition of 2867 -- attributes that take more than two arguments. 2868 2869 -- Note: named associates are not permitted in function calls where 2870 -- the function is an attribute (see RM 6.4(3)) so it is legitimate 2871 -- to skip the normal subprogram argument processing. 2872 2873 -- Note: for the attributes whose designators are technically keywords, 2874 -- i.e. digits, access, delta, range, the Attribute_Name field contains 2875 -- the corresponding name, even though no identifier is involved. 2876 2877 -- The flag OK_For_Stream is used in generated code to indicate that 2878 -- a stream attribute is permissible for a limited type, and results 2879 -- in the use of the stream attribute for the underlying full type, 2880 -- or in the case of a protected type, the components (including any 2881 -- disriminants) are merely streamed in order. 2882 2883 -- See Exp_Attr for a complete description of which attributes are 2884 -- passed onto Gigi, and which are handled entirely by the front end. 2885 2886 -- Gigi restriction: For the Pos attribute, the prefix cannot be 2887 -- a non-standard enumeration type or a nonzero/zero semantics 2888 -- boolean type, so the value is simply the stored representation. 2889 2890 -- Note: In generated code, the Address and Unrestricted_Access 2891 -- attributes can be applied to any expression, and the meaning is 2892 -- to create an object containing the value (the object is in the 2893 -- current stack frame), and pass the address of this value. If the 2894 -- Must_Be_Byte_Aligned flag is set, then the object whose address 2895 -- is taken must be on a byte (storage unit) boundary, and if it is 2896 -- not (or may not be), then the generated code must create a copy 2897 -- that is byte aligned, and pass the address of this copy. 2898 2899 -- N_Attribute_Reference 2900 -- Sloc points to apostrophe 2901 -- Prefix (Node3) 2902 -- Attribute_Name (Name2) identifier name from attribute designator 2903 -- Expressions (List1) (set to No_List if no associated expressions) 2904 -- Entity (Node4-Sem) used if the attribute yields a type 2905 -- Associated_Node (Node4-Sem) 2906 -- Do_Overflow_Check (Flag17-Sem) 2907 -- Redundant_Use (Flag13-Sem) 2908 -- OK_For_Stream (Flag4-Sem) 2909 -- Must_Be_Byte_Aligned (Flag14) 2910 -- plus fields for expression 2911 2912 --------------------------------- 2913 -- 4.1.4 Attribute Designator -- 2914 --------------------------------- 2915 2916 -- ATTRIBUTE_DESIGNATOR ::= 2917 -- IDENTIFIER [(static_EXPRESSION)] 2918 -- | access | delta | digits 2919 2920 -- There is no explicit node in the tree for an attribute designator. 2921 -- Instead the Attribute_Name and Expressions fields of the parent 2922 -- node (N_Attribute_Reference node) hold the information. 2923 2924 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute 2925 -- designator, then they are treated as identifiers internally 2926 -- rather than the keywords of the same name. 2927 2928 -------------------------------------- 2929 -- 4.1.4 Range Attribute Reference -- 2930 -------------------------------------- 2931 2932 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR 2933 2934 -- A range attribute reference is represented in the tree using the 2935 -- normal N_Attribute_Reference node. 2936 2937 --------------------------------------- 2938 -- 4.1.4 Range Attribute Designator -- 2939 --------------------------------------- 2940 2941 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)] 2942 2943 -- A range attribute designator is represented in the tree using the 2944 -- normal N_Attribute_Reference node. 2945 2946 -------------------- 2947 -- 4.3 Aggregate -- 2948 -------------------- 2949 2950 -- AGGREGATE ::= 2951 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE 2952 2953 ----------------------------- 2954 -- 4.3.1 Record Aggregate -- 2955 ----------------------------- 2956 2957 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST) 2958 2959 -- N_Aggregate 2960 -- Sloc points to left parenthesis 2961 -- Expressions (List1) (set to No_List if none or null record case) 2962 -- Component_Associations (List2) (set to No_List if none) 2963 -- Null_Record_Present (Flag17) 2964 -- Aggregate_Bounds (Node3-Sem) 2965 -- Associated_Node (Node4-Sem) 2966 -- Static_Processing_OK (Flag4-Sem) 2967 -- Compile_Time_Known_Aggregate (Flag18-Sem) 2968 -- Expansion_Delayed (Flag11-Sem) 2969 -- plus fields for expression 2970 2971 -- Note: this structure is used for both record and array aggregates 2972 -- since the two cases are not separable by the parser. The parser 2973 -- makes no attempt to enforce consistency here, so it is up to the 2974 -- semantic phase to make sure that the aggregate is consistent (i.e. 2975 -- that it is not a "half-and-half" case that mixes record and array 2976 -- syntax. In particular, for a record aggregate, the expressions 2977 -- field will be set if there are positional associations. 2978 2979 -- Note: gigi/gcc can handle array aggregates correctly providing that 2980 -- they are entirely positional, and the array subtype involved has a 2981 -- known at compile time length and is not bit packed, or a convention 2982 -- Fortran array with more than one dimension. If these conditions 2983 -- are not met, then the front end must translate the aggregate into 2984 -- an appropriate set of assignments into a temporary. 2985 2986 -- Note: for the record aggregate case, gigi/gcc can handle all cases 2987 -- of record aggregates, including those for packed, and rep-claused 2988 -- records, and also variant records, providing that there are no 2989 -- variable length fields whose size is not known at runtime, and 2990 -- providing that the aggregate is presented in fully named form. 2991 2992 ---------------------------------------------- 2993 -- 4.3.1 Record Component Association List -- 2994 ---------------------------------------------- 2995 2996 -- RECORD_COMPONENT_ASSOCIATION_LIST ::= 2997 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION} 2998 -- | null record 2999 3000 -- There is no explicit node in the tree for a record component 3001 -- association list. Instead the Null_Record_Present flag is set in 3002 -- the parent node for the NULL RECORD case. 3003 3004 ------------------------------------------------------ 3005 -- 4.3.1 Record Component Association (also 4.3.3) -- 3006 ------------------------------------------------------ 3007 3008 -- RECORD_COMPONENT_ASSOCIATION ::= 3009 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION 3010 3011 -- N_Component_Association 3012 -- Sloc points to first selector name 3013 -- Choices (List1) 3014 -- Loop_Actions (List2-Sem) 3015 -- Expression (Node3) 3016 -- Box_Present (Flag15) 3017 3018 -- Note: this structure is used for both record component associations 3019 -- and array component associations, since the two cases aren't always 3020 -- separable by the parser. The choices list may represent either a 3021 -- list of selector names in the record aggregate case, or a list of 3022 -- discrete choices in the array aggregate case or an N_Others_Choice 3023 -- node (which appears as a singleton list). Box_Present gives support 3024 -- to Ada0Y (AI-287). 3025 3026 ------------------------------------ 3027 -- 4.3.1 Commponent Choice List -- 3028 ------------------------------------ 3029 3030 -- COMPONENT_CHOICE_LIST ::= 3031 -- component_SELECTOR_NAME {| component_SELECTOR_NAME} 3032 -- | others 3033 3034 -- The entries of a component choice list appear in the Choices list 3035 -- of the associated N_Component_Association, as either selector 3036 -- names, or as an N_Others_Choice node. 3037 3038 -------------------------------- 3039 -- 4.3.2 Extension Aggregate -- 3040 -------------------------------- 3041 3042 -- EXTENSION_AGGREGATE ::= 3043 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST) 3044 3045 -- Note: extension aggregates are not permitted in Ada 83 mode 3046 3047 -- N_Extension_Aggregate 3048 -- Sloc points to left parenthesis 3049 -- Ancestor_Part (Node3) 3050 -- Associated_Node (Node4-Sem) 3051 -- Expressions (List1) (set to No_List if none or null record case) 3052 -- Component_Associations (List2) (set to No_List if none) 3053 -- Null_Record_Present (Flag17) 3054 -- Expansion_Delayed (Flag11-Sem) 3055 -- plus fields for expression 3056 3057 -------------------------- 3058 -- 4.3.2 Ancestor Part -- 3059 -------------------------- 3060 3061 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK 3062 3063 ---------------------------- 3064 -- 4.3.3 Array Aggregate -- 3065 ---------------------------- 3066 3067 -- ARRAY_AGGREGATE ::= 3068 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE 3069 3070 --------------------------------------- 3071 -- 4.3.3 Positional Array Aggregate -- 3072 --------------------------------------- 3073 3074 -- POSITIONAL_ARRAY_AGGREGATE ::= 3075 -- (EXPRESSION, EXPRESSION {, EXPRESSION}) 3076 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION) 3077 3078 -- See Record_Aggregate (4.3.1) for node structure 3079 3080 ---------------------------------- 3081 -- 4.3.3 Named Array Aggregate -- 3082 ---------------------------------- 3083 3084 -- NAMED_ARRAY_AGGREGATE ::= 3085 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION}) 3086 3087 -- See Record_Aggregate (4.3.1) for node structure 3088 3089 ---------------------------------------- 3090 -- 4.3.3 Array Component Association -- 3091 ---------------------------------------- 3092 3093 -- ARRAY_COMPONENT_ASSOCIATION ::= 3094 -- DISCRETE_CHOICE_LIST => EXPRESSION 3095 3096 -- See Record_Component_Association (4.3.1) for node structure 3097 3098 -------------------------------------------------- 3099 -- 4.4 Expression/Relation/Term/Factor/Primary -- 3100 -------------------------------------------------- 3101 3102 -- EXPRESSION ::= 3103 -- RELATION {and RELATION} | RELATION {and then RELATION} 3104 -- | RELATION {or RELATION} | RELATION {or else RELATION} 3105 -- | RELATION {xor RELATION} 3106 3107 -- RELATION ::= 3108 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION] 3109 -- | SIMPLE_EXPRESSION [not] in RANGE 3110 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK 3111 3112 -- SIMPLE_EXPRESSION ::= 3113 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM} 3114 3115 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR} 3116 3117 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY 3118 3119 -- No nodes are generated for any of these constructs. Instead, the 3120 -- node for the operator appears directly. When we refer to an 3121 -- expression in this description, we mean any of the possible 3122 -- consistuent components of an expression (e.g. identifier is 3123 -- an example of an expression). 3124 3125 ------------------ 3126 -- 4.4 Primary -- 3127 ------------------ 3128 3129 -- PRIMARY ::= 3130 -- NUMERIC_LITERAL | null 3131 -- | STRING_LITERAL | AGGREGATE 3132 -- | NAME | QUALIFIED_EXPRESSION 3133 -- | ALLOCATOR | (EXPRESSION) 3134 3135 -- Usually there is no explicit node in the tree for primary. Instead 3136 -- the constituent (e.g. AGGREGATE) appears directly. There are two 3137 -- exceptions. First, there is an explicit node for a null primary. 3138 3139 -- N_Null 3140 -- Sloc points to NULL 3141 -- plus fields for expression 3142 3143 -- Second, the case of (EXPRESSION) is handled specially. Ada requires 3144 -- that the parser keep track of which subexpressions are enclosed 3145 -- in parentheses, and how many levels of parentheses are used. This 3146 -- information is required for optimization purposes, and also for 3147 -- some semantic checks (e.g. (((1))) in a procedure spec does not 3148 -- conform with ((((1)))) in the body). 3149 3150 -- The parentheses are recorded by keeping a Paren_Count field in every 3151 -- subexpression node (it is actually present in all nodes, but only 3152 -- used in subexpression nodes). This count records the number of 3153 -- levels of parentheses. If the number of levels in the source exceeds 3154 -- the maximum accomodated by this count, then the count is simply left 3155 -- at the maximum value. This means that there are some pathalogical 3156 -- cases of failure to detect conformance failures (e.g. an expression 3157 -- with 500 levels of parens will conform with one with 501 levels), 3158 -- but we do not need to lose sleep over this. 3159 3160 -- Historical note: in versions of GNAT prior to 1.75, there was a node 3161 -- type N_Parenthesized_Expression used to accurately record unlimited 3162 -- numbers of levels of parentheses. However, it turned out to be a 3163 -- real nuisance to have to take into account the possible presence of 3164 -- this node during semantic analysis, since basically parentheses have 3165 -- zero relevance to semantic analysis. 3166 3167 -- Note: the level of parentheses always present in things like 3168 -- aggregates does not count, only the parentheses in the primary 3169 -- (EXPRESSION) affect the setting of the Paren_Count field. 3170 3171 -- 2nd Note: the contents of the Expression field must be ignored (i.e. 3172 -- treated as though it were Empty) if No_Initialization is set True. 3173 3174 -------------------------------------- 3175 -- 4.5 Short Circuit Control Forms -- 3176 -------------------------------------- 3177 3178 -- EXPRESSION ::= 3179 -- RELATION {and then RELATION} | RELATION {or else RELATION} 3180 3181 -- Gigi restriction: For both these control forms, the operand and 3182 -- result types are always Standard.Boolean. The expander inserts the 3183 -- required conversion operations where needed to ensure this is the 3184 -- case. 3185 3186 -- N_And_Then 3187 -- Sloc points to AND of AND THEN 3188 -- Left_Opnd (Node2) 3189 -- Right_Opnd (Node3) 3190 -- Actions (List1-Sem) 3191 -- plus fields for expression 3192 3193 -- N_Or_Else 3194 -- Sloc points to OR of OR ELSE 3195 -- Left_Opnd (Node2) 3196 -- Right_Opnd (Node3) 3197 -- Actions (List1-Sem) 3198 -- plus fields for expression 3199 3200 -- Note: The Actions field is used to hold actions associated with 3201 -- the right hand operand. These have to be treated specially since 3202 -- they are not unconditionally executed. See Insert_Actions for a 3203 -- more detailed description of how these actions are handled. 3204 3205 --------------------------- 3206 -- 4.5 Membership Tests -- 3207 --------------------------- 3208 3209 -- RELATION ::= 3210 -- SIMPLE_EXPRESSION [not] in RANGE 3211 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK 3212 3213 -- Note: although the grammar above allows only a range or a 3214 -- subtype mark, the parser in fact will accept any simple 3215 -- expression in place of a subtype mark. This means that the 3216 -- semantic analyzer must be prepared to deal with, and diagnose 3217 -- a simple expression other than a name for the right operand. 3218 -- This simplifies error recovery in the parser. 3219 3220 -- N_In 3221 -- Sloc points to IN 3222 -- Left_Opnd (Node2) 3223 -- Right_Opnd (Node3) 3224 -- plus fields for expression 3225 3226 -- N_Not_In 3227 -- Sloc points to NOT of NOT IN 3228 -- Left_Opnd (Node2) 3229 -- Right_Opnd (Node3) 3230 -- plus fields for expression 3231 3232 -------------------- 3233 -- 4.5 Operators -- 3234 -------------------- 3235 3236 -- LOGICAL_OPERATOR ::= and | or | xor 3237 3238 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >= 3239 3240 -- BINARY_ADDING_OPERATOR ::= + | - | & 3241 3242 -- UNARY_ADDING_OPERATOR ::= + | - 3243 3244 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem 3245 3246 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not 3247 3248 -- Sprint syntax if Treat_Fixed_As_Integer is set: 3249 3250 -- x #* y 3251 -- x #/ y 3252 -- x #mod y 3253 -- x #rem y 3254 3255 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi 3256 -- will only be given nodes with the Treat_Fixed_As_Integer flag set. 3257 -- All handling of smalls for multiplication and division is handled 3258 -- by the front end (mod and rem result only from expansion). Gigi 3259 -- thus never needs to worry about small values (for other operators 3260 -- operating on fixed-point, e.g. addition, the small value does not 3261 -- have any semantic effect anyway, these are always integer operations. 3262 3263 -- Gigi restriction: For all operators taking Boolean operands, the 3264 -- type is always Standard.Boolean. The expander inserts the required 3265 -- conversion operations where needed to ensure this is the case. 3266 3267 -- N_Op_And 3268 -- Sloc points to AND 3269 -- Do_Length_Check (Flag4-Sem) 3270 -- plus fields for binary operator 3271 -- plus fields for expression 3272 3273 -- N_Op_Or 3274 -- Sloc points to OR 3275 -- Do_Length_Check (Flag4-Sem) 3276 -- plus fields for binary operator 3277 -- plus fields for expression 3278 3279 -- N_Op_Xor 3280 -- Sloc points to XOR 3281 -- Do_Length_Check (Flag4-Sem) 3282 -- plus fields for binary operator 3283 -- plus fields for expression 3284 3285 -- N_Op_Eq 3286 -- Sloc points to = 3287 -- plus fields for binary operator 3288 -- plus fields for expression 3289 3290 -- N_Op_Ne 3291 -- Sloc points to /= 3292 -- plus fields for binary operator 3293 -- plus fields for expression 3294 3295 -- N_Op_Lt 3296 -- Sloc points to < 3297 -- plus fields for binary operator 3298 -- plus fields for expression 3299 3300 -- N_Op_Le 3301 -- Sloc points to <= 3302 -- plus fields for binary operator 3303 -- plus fields for expression 3304 3305 -- N_Op_Gt 3306 -- Sloc points to > 3307 -- plus fields for binary operator 3308 -- plus fields for expression 3309 3310 -- N_Op_Ge 3311 -- Sloc points to >= 3312 -- plus fields for binary operator 3313 -- plus fields for expression 3314 3315 -- N_Op_Add 3316 -- Sloc points to + (binary) 3317 -- plus fields for binary operator 3318 -- plus fields for expression 3319 3320 -- N_Op_Subtract 3321 -- Sloc points to - (binary) 3322 -- plus fields for binary operator 3323 -- plus fields for expression 3324 3325 -- N_Op_Concat 3326 -- Sloc points to & 3327 -- Is_Component_Left_Opnd (Flag13-Sem) 3328 -- Is_Component_Right_Opnd (Flag14-Sem) 3329 -- plus fields for binary operator 3330 -- plus fields for expression 3331 3332 -- N_Op_Multiply 3333 -- Sloc points to * 3334 -- Treat_Fixed_As_Integer (Flag14-Sem) 3335 -- Rounded_Result (Flag18-Sem) 3336 -- plus fields for binary operator 3337 -- plus fields for expression 3338 3339 -- N_Op_Divide 3340 -- Sloc points to / 3341 -- Treat_Fixed_As_Integer (Flag14-Sem) 3342 -- Do_Division_Check (Flag13-Sem) 3343 -- Rounded_Result (Flag18-Sem) 3344 -- plus fields for binary operator 3345 -- plus fields for expression 3346 3347 -- N_Op_Mod 3348 -- Sloc points to MOD 3349 -- Treat_Fixed_As_Integer (Flag14-Sem) 3350 -- Do_Division_Check (Flag13-Sem) 3351 -- plus fields for binary operator 3352 -- plus fields for expression 3353 3354 -- N_Op_Rem 3355 -- Sloc points to REM 3356 -- Treat_Fixed_As_Integer (Flag14-Sem) 3357 -- Do_Division_Check (Flag13-Sem) 3358 -- plus fields for binary operator 3359 -- plus fields for expression 3360 3361 -- N_Op_Expon 3362 -- Is_Power_Of_2_For_Shift (Flag13-Sem) 3363 -- Sloc points to ** 3364 -- plus fields for binary operator 3365 -- plus fields for expression 3366 3367 -- N_Op_Plus 3368 -- Sloc points to + (unary) 3369 -- plus fields for unary operator 3370 -- plus fields for expression 3371 3372 -- N_Op_Minus 3373 -- Sloc points to - (unary) 3374 -- plus fields for unary operator 3375 -- plus fields for expression 3376 3377 -- N_Op_Abs 3378 -- Sloc points to ABS 3379 -- plus fields for unary operator 3380 -- plus fields for expression 3381 3382 -- N_Op_Not 3383 -- Sloc points to NOT 3384 -- plus fields for unary operator 3385 -- plus fields for expression 3386 3387 -- See also shift operators in section B.2 3388 3389 -- Note on fixed-point operations passed to Gigi: For adding operators, 3390 -- the semantics is to treat these simply as integer operations, with 3391 -- the small values being ignored (the bounds are already stored in 3392 -- units of small, so that constraint checking works as usual). For the 3393 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed 3394 -- point operands if the Treat_Fixed_As_Integer flag is set and will 3395 -- thus treat these nodes in identical manner, ignoring small values. 3396 3397 -------------------------- 3398 -- 4.6 Type Conversion -- 3399 -------------------------- 3400 3401 -- TYPE_CONVERSION ::= 3402 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME) 3403 3404 -- In the (NAME) case, the name is stored as the expression 3405 3406 -- Note: the parser never generates a type conversion node, since it 3407 -- looks like an indexed component which is generated by preference. 3408 -- The semantic pass must correct this misidentification. 3409 3410 -- Gigi handles conversions that involve no change in the root type, 3411 -- and also all conversions from integer to floating-point types. 3412 -- Conversions from floating-point to integer are only handled in 3413 -- the case where Float_Truncate flag set. Other conversions from 3414 -- floating-point to integer (involving rounding) and all conversions 3415 -- involving fixed-point types are handled by the expander. 3416 3417 -- Sprint syntax if Float_Truncate set: X^(Y) 3418 -- Sprint syntax if Conversion_OK set X?(Y) 3419 -- Sprint syntax if both flags set X?^(Y) 3420 3421 -- Note: If either the operand or result type is fixed-point, Gigi will 3422 -- only see a type conversion node with Conversion_OK set. The front end 3423 -- takes care of all handling of small's for fixed-point conversions. 3424 3425 -- N_Type_Conversion 3426 -- Sloc points to first token of subtype mark 3427 -- Subtype_Mark (Node4) 3428 -- Expression (Node3) 3429 -- Do_Tag_Check (Flag13-Sem) 3430 -- Do_Length_Check (Flag4-Sem) 3431 -- Do_Overflow_Check (Flag17-Sem) 3432 -- Float_Truncate (Flag11-Sem) 3433 -- Rounded_Result (Flag18-Sem) 3434 -- Conversion_OK (Flag14-Sem) 3435 -- plus fields for expression 3436 3437 -- Note: if a range check is required, then the Do_Range_Check flag 3438 -- is set in the Expression with the check being done against the 3439 -- target type range (after the base type conversion, if any). 3440 3441 ------------------------------- 3442 -- 4.7 Qualified Expression -- 3443 ------------------------------- 3444 3445 -- QUALIFIED_EXPRESSION ::= 3446 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE 3447 3448 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose 3449 -- the expression, so the Expression field of this node always points 3450 -- to a parenthesized expression in this case (i.e. Paren_Count will 3451 -- always be non-zero for the referenced expression if it is not an 3452 -- aggregate). 3453 3454 -- N_Qualified_Expression 3455 -- Sloc points to apostrophe 3456 -- Subtype_Mark (Node4) 3457 -- Expression (Node3) expression or aggregate 3458 -- plus fields for expression 3459 3460 -------------------- 3461 -- 4.8 Allocator -- 3462 -------------------- 3463 3464 -- ALLOCATOR ::= 3465 -- new SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION 3466 3467 -- Sprint syntax (when storage pool present) 3468 -- new xxx (storage_pool = pool) 3469 3470 -- N_Allocator 3471 -- Sloc points to NEW 3472 -- Expression (Node3) subtype indication or qualified expression 3473 -- Storage_Pool (Node1-Sem) 3474 -- Procedure_To_Call (Node4-Sem) 3475 -- No_Initialization (Flag13-Sem) 3476 -- Do_Storage_Check (Flag17-Sem) 3477 -- plus fields for expression 3478 3479 --------------------------------- 3480 -- 5.1 Sequence Of Statements -- 3481 --------------------------------- 3482 3483 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT} 3484 3485 -- Note: Although the parser will not accept a declaration as a 3486 -- statement, the semantic analyzer may insert declarations (e.g. 3487 -- declarations of implicit types needed for execution of other 3488 -- statements) into a sequence of statements, so the code genmerator 3489 -- should be prepared to accept a declaration where a statement is 3490 -- expected. Note also that pragmas can appear as statements. 3491 3492 -------------------- 3493 -- 5.1 Statement -- 3494 -------------------- 3495 3496 -- STATEMENT ::= 3497 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT 3498 3499 -- There is no explicit node in the tree for a statement. Instead, the 3500 -- individual statement appears directly. Labels are treated as a 3501 -- kind of statement, i.e. they are linked into a statement list at 3502 -- the point they appear, so the labeled statement appears following 3503 -- the label or labels in the statement list. 3504 3505 --------------------------- 3506 -- 5.1 Simple Statement -- 3507 --------------------------- 3508 3509 -- SIMPLE_STATEMENT ::= NULL_STATEMENT 3510 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT 3511 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT 3512 -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT 3513 -- | REQUEUE_STATEMENT | DELAY_STATEMENT 3514 -- | ABORT_STATEMENT | RAISE_STATEMENT 3515 -- | CODE_STATEMENT 3516 3517 ----------------------------- 3518 -- 5.1 Compound Statement -- 3519 ----------------------------- 3520 3521 -- COMPOUND_STATEMENT ::= 3522 -- IF_STATEMENT | CASE_STATEMENT 3523 -- | LOOP_STATEMENT | BLOCK_STATEMENT 3524 -- | ACCEPT_STATEMENT | SELECT_STATEMENT 3525 3526 ------------------------- 3527 -- 5.1 Null Statement -- 3528 ------------------------- 3529 3530 -- NULL_STATEMENT ::= null; 3531 3532 -- N_Null_Statement 3533 -- Sloc points to NULL 3534 3535 ---------------- 3536 -- 5.1 Label -- 3537 ---------------- 3538 3539 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>> 3540 3541 -- Note that the occurrence of a label is not a defining identifier, 3542 -- but rather a referencing occurrence. The defining occurrence is 3543 -- in the implicit label declaration which occurs in the innermost 3544 -- enclosing block. 3545 3546 -- N_Label 3547 -- Sloc points to << 3548 -- Identifier (Node1) direct name of statement identifier 3549 -- Exception_Junk (Flag11-Sem) 3550 3551 ------------------------------- 3552 -- 5.1 Statement Identifier -- 3553 ------------------------------- 3554 3555 -- STATEMENT_INDENTIFIER ::= DIRECT_NAME 3556 3557 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier 3558 -- (not an OPERATOR_SYMBOL) 3559 3560 ------------------------------- 3561 -- 5.2 Assignment Statement -- 3562 ------------------------------- 3563 3564 -- ASSIGNMENT_STATEMENT ::= 3565 -- variable_NAME := EXPRESSION; 3566 3567 -- N_Assignment_Statement 3568 -- Sloc points to := 3569 -- Name (Node2) 3570 -- Expression (Node3) 3571 -- Do_Tag_Check (Flag13-Sem) 3572 -- Do_Length_Check (Flag4-Sem) 3573 -- Forwards_OK (Flag5-Sem) 3574 -- Backwards_OK (Flag6-Sem) 3575 -- No_Ctrl_Actions (Flag7-Sem) 3576 3577 -- Note: if a range check is required, then the Do_Range_Check flag 3578 -- is set in the Expression (right hand side), with the check being 3579 -- done against the type of the Name (left hand side). 3580 3581 -- Note: the back end places some restrictions on the form of the 3582 -- Expression field. If the object being assigned to is Atomic, then 3583 -- the Expression may not have the form of an aggregate (since this 3584 -- might cause the back end to generate separate assignments). It 3585 -- also cannot be a reference to an object marked as a true constant 3586 -- (Is_True_Constant flag set), where the object is itself initalized 3587 -- with an aggregate. If necessary the front end must generate an 3588 -- extra temporary (with Is_True_Constant set False), and initialize 3589 -- this temporary as required (the temporary itself is not atomic). 3590 3591 ----------------------- 3592 -- 5.3 If Statement -- 3593 ----------------------- 3594 3595 -- IF_STATEMENT ::= 3596 -- if CONDITION then 3597 -- SEQUENCE_OF_STATEMENTS 3598 -- {elsif CONDITION then 3599 -- SEQUENCE_OF_STATEMENTS} 3600 -- [else 3601 -- SEQUENCE_OF_STATEMENTS] 3602 -- end if; 3603 3604 -- Gigi restriction: This expander ensures that the type of the 3605 -- Condition fields is always Standard.Boolean, even if the type 3606 -- in the source is some non-standard boolean type. 3607 3608 -- N_If_Statement 3609 -- Sloc points to IF 3610 -- Condition (Node1) 3611 -- Then_Statements (List2) 3612 -- Elsif_Parts (List3) (set to No_List if none present) 3613 -- Else_Statements (List4) (set to No_List if no else part present) 3614 -- End_Span (Uint5) (set to No_Uint if expander generated) 3615 3616 -- N_Elsif_Part 3617 -- Sloc points to ELSIF 3618 -- Condition (Node1) 3619 -- Then_Statements (List2) 3620 -- Condition_Actions (List3-Sem) 3621 3622 -------------------- 3623 -- 5.3 Condition -- 3624 -------------------- 3625 3626 -- CONDITION ::= boolean_EXPRESSION 3627 3628 ------------------------- 3629 -- 5.4 Case Statement -- 3630 ------------------------- 3631 3632 -- CASE_STATEMENT ::= 3633 -- case EXPRESSION is 3634 -- CASE_STATEMENT_ALTERNATIVE 3635 -- {CASE_STATEMENT_ALTERNATIVE} 3636 -- end case; 3637 3638 -- Note: the Alternatives can contain pragmas. These only occur at 3639 -- the start of the list, since any pragmas occurring after the first 3640 -- alternative are absorbed into the corresponding statement sequence. 3641 3642 -- N_Case_Statement 3643 -- Sloc points to CASE 3644 -- Expression (Node3) 3645 -- Alternatives (List4) 3646 -- End_Span (Uint5) (set to No_Uint if expander generated) 3647 3648 ------------------------------------- 3649 -- 5.4 Case Statement Alternative -- 3650 ------------------------------------- 3651 3652 -- CASE_STATEMENT_ALTERNATIVE ::= 3653 -- when DISCRETE_CHOICE_LIST => 3654 -- SEQUENCE_OF_STATEMENTS 3655 3656 -- N_Case_Statement_Alternative 3657 -- Sloc points to WHEN 3658 -- Discrete_Choices (List4) 3659 -- Statements (List3) 3660 3661 ------------------------- 3662 -- 5.5 Loop Statement -- 3663 ------------------------- 3664 3665 -- LOOP_STATEMENT ::= 3666 -- [loop_STATEMENT_IDENTIFIER :] 3667 -- [ITERATION_SCHEME] loop 3668 -- SEQUENCE_OF_STATEMENTS 3669 -- end loop [loop_IDENTIFIER]; 3670 3671 -- Note: The occurrence of a loop label is not a defining identifier 3672 -- but rather a referencing occurrence. The defining occurrence is in 3673 -- the implicit label declaration which occurs in the innermost 3674 -- enclosing block. 3675 3676 -- Note: there is always a loop statement identifier present in 3677 -- the tree, even if none was given in the source. In the case where 3678 -- no loop identifier is given in the source, the parser creates 3679 -- a name of the form _Loop_n, where n is a decimal integer (the 3680 -- two underlines ensure that the loop names created in this manner 3681 -- do not conflict with any user defined identifiers), and the flag 3682 -- Has_Created_Identifier is set to True. The only exception to the 3683 -- rule that all loop statement nodes have identifiers occurs for 3684 -- loops constructed by the expander, and the semantic analyzer will 3685 -- create and supply dummy loop identifiers in these cases. 3686 3687 -- N_Loop_Statement 3688 -- Sloc points to LOOP 3689 -- Identifier (Node1) loop identifier (set to Empty if no identifier) 3690 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme) 3691 -- Statements (List3) 3692 -- End_Label (Node4) 3693 -- Has_Created_Identifier (Flag15) 3694 -- Is_Null_Loop (Flag16) 3695 3696 -------------------------- 3697 -- 5.5 Iteration Scheme -- 3698 -------------------------- 3699 3700 -- ITERATION_SCHEME ::= 3701 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION 3702 3703 -- Gigi restriction: This expander ensures that the type of the 3704 -- Condition field is always Standard.Boolean, even if the type 3705 -- in the source is some non-standard boolean type. 3706 3707 -- N_Iteration_Scheme 3708 -- Sloc points to WHILE or FOR 3709 -- Condition (Node1) (set to Empty if FOR case) 3710 -- Condition_Actions (List3-Sem) 3711 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case) 3712 3713 --------------------------------------- 3714 -- 5.5 Loop parameter specification -- 3715 --------------------------------------- 3716 3717 -- LOOP_PARAMETER_SPECIFICATION ::= 3718 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION 3719 3720 -- N_Loop_Parameter_Specification 3721 -- Sloc points to first identifier 3722 -- Defining_Identifier (Node1) 3723 -- Reverse_Present (Flag15) 3724 -- Discrete_Subtype_Definition (Node4) 3725 3726 -------------------------- 3727 -- 5.6 Block Statement -- 3728 -------------------------- 3729 3730 -- BLOCK_STATEMENT ::= 3731 -- [block_STATEMENT_IDENTIFIER:] 3732 -- [declare 3733 -- DECLARATIVE_PART] 3734 -- begin 3735 -- HANDLED_SEQUENCE_OF_STATEMENTS 3736 -- end [block_IDENTIFIER]; 3737 3738 -- Note that the occurrence of a block identifier is not a defining 3739 -- identifier, but rather a referencing occurrence. The defining 3740 -- occurrence is in the implicit label declaration which occurs in 3741 -- the innermost enclosing block. 3742 3743 -- Note: there is always a block statement identifier present in 3744 -- the tree, even if none was given in the source. In the case where 3745 -- no block identifier is given in the source, the parser creates 3746 -- a name of the form _Block_n, where n is a decimal integer (the 3747 -- two underlines ensure that the block names created in this manner 3748 -- do not conflict with any user defined identifiers), and the flag 3749 -- Has_Created_Identifier is set to True. The only exception to the 3750 -- rule that all loop statement nodes have identifiers occurs for 3751 -- blocks constructed by the expander, and the semantic analyzer 3752 -- creates and supplies dummy names for the blocks). 3753 3754 -- N_Block_Statement 3755 -- Sloc points to DECLARE or BEGIN 3756 -- Identifier (Node1) block direct name (set to Empty if not present) 3757 -- Declarations (List2) (set to No_List if no DECLARE part) 3758 -- Handled_Statement_Sequence (Node4) 3759 -- Is_Task_Master (Flag5-Sem) 3760 -- Activation_Chain_Entity (Node3-Sem) 3761 -- Has_Created_Identifier (Flag15) 3762 -- Is_Task_Allocation_Block (Flag6) 3763 -- Is_Asynchronous_Call_Block (Flag7) 3764 3765 ------------------------- 3766 -- 5.7 Exit Statement -- 3767 ------------------------- 3768 3769 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION]; 3770 3771 -- Gigi restriction: This expander ensures that the type of the 3772 -- Condition field is always Standard.Boolean, even if the type 3773 -- in the source is some non-standard boolean type. 3774 3775 -- N_Exit_Statement 3776 -- Sloc points to EXIT 3777 -- Name (Node2) (set to Empty if no loop name present) 3778 -- Condition (Node1) (set to Empty if no when part present) 3779 3780 ------------------------- 3781 -- 5.9 Goto Statement -- 3782 ------------------------- 3783 3784 -- GOTO_STATEMENT ::= goto label_NAME; 3785 3786 -- N_Goto_Statement 3787 -- Sloc points to GOTO 3788 -- Name (Node2) 3789 -- Exception_Junk (Flag11-Sem) 3790 3791 --------------------------------- 3792 -- 6.1 Subprogram Declaration -- 3793 --------------------------------- 3794 3795 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION; 3796 3797 -- N_Subprogram_Declaration 3798 -- Sloc points to FUNCTION or PROCEDURE 3799 -- Specification (Node1) 3800 -- Body_To_Inline (Node3-Sem) 3801 -- Corresponding_Body (Node5-Sem) 3802 -- Parent_Spec (Node4-Sem) 3803 3804 ------------------------------------------ 3805 -- 6.1 Abstract Subprogram Declaration -- 3806 ------------------------------------------ 3807 3808 -- ABSTRACT_SUBPROGRAM_DECLARATION ::= 3809 -- SUBPROGRAM_SPECIFICATION is abstract; 3810 3811 -- N_Abstract_Subprogram_Declaration 3812 -- Sloc points to ABSTRACT 3813 -- Specification (Node1) 3814 3815 ----------------------------------- 3816 -- 6.1 Subprogram Specification -- 3817 ----------------------------------- 3818 3819 -- SUBPROGRAM_SPECIFICATION ::= 3820 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE 3821 -- | function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE 3822 3823 -- Note: there are no separate nodes for the profiles, instead the 3824 -- information appears directly in the following nodes. 3825 3826 -- N_Function_Specification 3827 -- Sloc points to FUNCTION 3828 -- Defining_Unit_Name (Node1) (the designator) 3829 -- Elaboration_Boolean (Node2-Sem) 3830 -- Parameter_Specifications (List3) (set to No_List if no formal part) 3831 -- Subtype_Mark (Node4) for return type 3832 -- Generic_Parent (Node5-Sem) 3833 3834 -- N_Procedure_Specification 3835 -- Sloc points to PROCEDURE 3836 -- Defining_Unit_Name (Node1) 3837 -- Elaboration_Boolean (Node2-Sem) 3838 -- Parameter_Specifications (List3) (set to No_List if no formal part) 3839 -- Generic_Parent (Node5-Sem) 3840 3841 --------------------- 3842 -- 6.1 Designator -- 3843 --------------------- 3844 3845 -- DESIGNATOR ::= 3846 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL 3847 3848 -- Designators that are simply identifiers or operator symbols appear 3849 -- directly in the tree in this form. The following node is used only 3850 -- in the case where the designator has a parent unit name component. 3851 3852 -- N_Designator 3853 -- Sloc points to period 3854 -- Name (Node2) holds the parent unit name. Note that this is always 3855 -- non-Empty, since this node is only used for the case where a 3856 -- parent library unit package name is present. 3857 -- Identifier (Node1) 3858 3859 -- Note that the identifier can also be an operator symbol here. 3860 3861 ------------------------------ 3862 -- 6.1 Defining Designator -- 3863 ------------------------------ 3864 3865 -- DEFINING_DESIGNATOR ::= 3866 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL 3867 3868 ------------------------------------- 3869 -- 6.1 Defining Program Unit Name -- 3870 ------------------------------------- 3871 3872 -- DEFINING_PROGRAM_UNIT_NAME ::= 3873 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER 3874 3875 -- The parent unit name is present only in the case of a child unit 3876 -- name (permissible only for Ada 95 for a library level unit, i.e. 3877 -- a unit at scope level one). If no such name is present, the defining 3878 -- program unit name is represented simply as the defining identifier. 3879 -- In the child unit case, the following node is used to represent the 3880 -- child unit name. 3881 3882 -- N_Defining_Program_Unit_Name 3883 -- Sloc points to period 3884 -- Name (Node2) holds the parent unit name. Note that this is always 3885 -- non-Empty, since this node is only used for the case where a 3886 -- parent unit name is present. 3887 -- Defining_Identifier (Node1) 3888 3889 -------------------------- 3890 -- 6.1 Operator Symbol -- 3891 -------------------------- 3892 3893 -- OPERATOR_SYMBOL ::= STRING_LITERAL 3894 3895 -- Note: the fields of the N_Operator_Symbol node are laid out to 3896 -- match the corresponding fields of an N_Character_Literal node. This 3897 -- allows easy conversion of the operator symbol node into a character 3898 -- literal node in the case where a string constant of the form of an 3899 -- operator symbol is scanned out as such, but turns out semantically 3900 -- to be a string literal that is not an operator. For details see 3901 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal. 3902 3903 -- N_Operator_Symbol 3904 -- Sloc points to literal 3905 -- Chars (Name1) contains the Name_Id for the operator symbol 3906 -- Strval (Str3) Id of string value. This is used if the operator 3907 -- symbol turns out to be a normal string after all. 3908 -- Entity (Node4-Sem) 3909 -- Associated_Node (Node4-Sem) 3910 -- Has_Private_View (Flag11-Sem) set in generic units. 3911 -- Etype (Node5-Sem) 3912 3913 -- Note: the Strval field may be set to No_String for generated 3914 -- operator symbols that are known not to be string literals 3915 -- semantically. 3916 3917 ----------------------------------- 3918 -- 6.1 Defining Operator Symbol -- 3919 ----------------------------------- 3920 3921 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL 3922 3923 -- A defining operator symbol is an entity, which has additional 3924 -- fields depending on the setting of the Ekind field. These 3925 -- additional fields are defined (and access subprograms declared) 3926 -- in package Einfo. 3927 3928 -- Note: N_Defining_Operator_Symbol is an extended node whose fields 3929 -- are deliberately layed out to match the layout of fields in an 3930 -- ordinary N_Operator_Symbol node allowing for easy alteration of 3931 -- an operator symbol node into a defining operator symbol node. 3932 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol 3933 -- for further details. 3934 3935 -- N_Defining_Operator_Symbol 3936 -- Sloc points to literal 3937 -- Chars (Name1) contains the Name_Id for the operator symbol 3938 -- Next_Entity (Node2-Sem) 3939 -- Scope (Node3-Sem) 3940 -- Etype (Node5-Sem) 3941 3942 ---------------------------- 3943 -- 6.1 Parameter Profile -- 3944 ---------------------------- 3945 3946 -- PARAMETER_PROFILE ::= [FORMAL_PART] 3947 3948 --------------------------------------- 3949 -- 6.1 Parameter and Result Profile -- 3950 --------------------------------------- 3951 3952 -- PARAMETER_AND_RESULT_PROFILE ::= [FORMAL_PART] return SUBTYPE_MARK 3953 3954 -- There is no explicit node in the tree for a parameter and result 3955 -- profile. Instead the information appears directly in the parent. 3956 3957 ---------------------- 3958 -- 6.1 Formal part -- 3959 ---------------------- 3960 3961 -- FORMAL_PART ::= 3962 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION}) 3963 3964 ---------------------------------- 3965 -- 6.1 Parameter specification -- 3966 ---------------------------------- 3967 3968 -- PARAMETER_SPECIFICATION ::= 3969 -- DEFINING_IDENTIFIER_LIST : MODE SUBTYPE_MARK 3970 -- [:= DEFAULT_EXPRESSION] 3971 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION 3972 -- [:= DEFAULT_EXPRESSION] 3973 3974 -- Although the syntax allows multiple identifiers in the list, the 3975 -- semantics is as though successive specifications were given with 3976 -- identical type definition and expression components. To simplify 3977 -- semantic processing, the parser represents a multiple declaration 3978 -- case as a sequence of single Specifications, using the More_Ids and 3979 -- Prev_Ids flags to preserve the original source form as described 3980 -- in the section on "Handling of Defining Identifier Lists". 3981 3982 -- N_Parameter_Specification 3983 -- Sloc points to first identifier 3984 -- Defining_Identifier (Node1) 3985 -- In_Present (Flag15) 3986 -- Out_Present (Flag17) 3987 -- Parameter_Type (Node2) subtype mark or access definition 3988 -- Expression (Node3) (set to Empty if no default expression present) 3989 -- Do_Accessibility_Check (Flag13-Sem) 3990 -- More_Ids (Flag5) (set to False if no more identifiers in list) 3991 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 3992 -- Default_Expression (Node5-Sem) 3993 3994 --------------- 3995 -- 6.1 Mode -- 3996 --------------- 3997 3998 -- MODE ::= [in] | in out | out 3999 4000 -- There is no explicit node in the tree for the Mode. Instead the 4001 -- In_Present and Out_Present flags are set in the parent node to 4002 -- record the presence of keywords specifying the mode. 4003 4004 -------------------------- 4005 -- 6.3 Subprogram Body -- 4006 -------------------------- 4007 4008 -- SUBPROGRAM_BODY ::= 4009 -- SUBPROGRAM_SPECIFICATION is 4010 -- DECLARATIVE_PART 4011 -- begin 4012 -- HANDLED_SEQUENCE_OF_STATEMENTS 4013 -- end [DESIGNATOR]; 4014 4015 -- N_Subprogram_Body 4016 -- Sloc points to FUNCTION or PROCEDURE 4017 -- Specification (Node1) 4018 -- Declarations (List2) 4019 -- Handled_Statement_Sequence (Node4) 4020 -- Activation_Chain_Entity (Node3-Sem) 4021 -- Corresponding_Spec (Node5-Sem) 4022 -- Acts_As_Spec (Flag4-Sem) 4023 -- Bad_Is_Detected (Flag15) used only by parser 4024 -- Do_Storage_Check (Flag17-Sem) 4025 -- Has_Priority_Pragma (Flag6-Sem) 4026 -- Is_Protected_Subprogram_Body (Flag7-Sem) 4027 -- Is_Task_Master (Flag5-Sem) 4028 -- Was_Originally_Stub (Flag13-Sem) 4029 4030 ----------------------------------- 4031 -- 6.4 Procedure Call Statement -- 4032 ----------------------------------- 4033 4034 -- PROCEDURE_CALL_STATEMENT ::= 4035 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART; 4036 4037 -- Note: the reason that a procedure call has expression fields is 4038 -- that it semantically resembles an expression, e.g. overloading is 4039 -- allowed and a type is concocted for semantic processing purposes. 4040 -- Certain of these fields, such as Parens are not relevant, but it 4041 -- is easier to just supply all of them together! 4042 4043 -- N_Procedure_Call_Statement 4044 -- Sloc points to first token of name or prefix 4045 -- Name (Node2) stores name or prefix 4046 -- Parameter_Associations (List3) (set to No_List if no 4047 -- actual parameter part) 4048 -- First_Named_Actual (Node4-Sem) 4049 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching) 4050 -- Do_Tag_Check (Flag13-Sem) 4051 -- No_Elaboration_Check (Flag14-Sem) 4052 -- Parameter_List_Truncated (Flag17-Sem) 4053 -- ABE_Is_Certain (Flag18-Sem) 4054 -- plus fields for expression 4055 4056 -- If any IN parameter requires a range check, then the corresponding 4057 -- argument expression has the Do_Range_Check flag set, and the range 4058 -- check is done against the formal type. Note that this argument 4059 -- expression may appear directly in the Parameter_Associations list, 4060 -- or may be a descendent of an N_Parameter_Association node that 4061 -- appears in this list. 4062 4063 ------------------------ 4064 -- 6.4 Function Call -- 4065 ------------------------ 4066 4067 -- FUNCTION_CALL ::= 4068 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART 4069 4070 -- Note: the parser may generate an indexed component node or simply 4071 -- a name node instead of a function call node. The semantic pass must 4072 -- correct this misidentification. 4073 4074 -- N_Function_Call 4075 -- Sloc points to first token of name or prefix 4076 -- Name (Node2) stores name or prefix 4077 -- Parameter_Associations (List3) (set to No_List if no 4078 -- actual parameter part) 4079 -- First_Named_Actual (Node4-Sem) 4080 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching) 4081 -- Do_Tag_Check (Flag13-Sem) 4082 -- No_Elaboration_Check (Flag14-Sem) 4083 -- Parameter_List_Truncated (Flag17-Sem) 4084 -- ABE_Is_Certain (Flag18-Sem) 4085 -- plus fields for expression 4086 4087 -------------------------------- 4088 -- 6.4 Actual Parameter Part -- 4089 -------------------------------- 4090 4091 -- ACTUAL_PARAMETER_PART ::= 4092 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION}) 4093 4094 -------------------------------- 4095 -- 6.4 Parameter Association -- 4096 -------------------------------- 4097 4098 -- PARAMETER_ASSOCIATION ::= 4099 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER 4100 4101 -- Note: the N_Parameter_Association node is built only if a formal 4102 -- parameter selector name is present, otherwise the parameter 4103 -- association appears in the tree simply as the node for the 4104 -- explicit actual parameter. 4105 4106 -- N_Parameter_Association 4107 -- Sloc points to formal parameter 4108 -- Selector_Name (Node2) (always non-Empty, since this node is 4109 -- only used if a formal parameter selector name is present) 4110 -- Explicit_Actual_Parameter (Node3) 4111 -- Next_Named_Actual (Node4-Sem) 4112 4113 --------------------------- 4114 -- 6.4 Actual Parameter -- 4115 --------------------------- 4116 4117 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME 4118 4119 --------------------------- 4120 -- 6.5 Return Statement -- 4121 --------------------------- 4122 4123 -- RETURN_STATEMENT ::= return [EXPRESSION]; 4124 4125 -- N_Return_Statement 4126 -- Sloc points to RETURN 4127 -- Expression (Node3) (set to Empty if no expression present) 4128 -- Storage_Pool (Node1-Sem) 4129 -- Procedure_To_Call (Node4-Sem) 4130 -- Do_Tag_Check (Flag13-Sem) 4131 -- Return_Type (Node2-Sem) 4132 -- By_Ref (Flag5-Sem) 4133 4134 -- Note: if a range check is required, then Do_Range_Check is set 4135 -- on the Expression. The range check is against Return_Type. 4136 4137 ------------------------------ 4138 -- 7.1 Package Declaration -- 4139 ------------------------------ 4140 4141 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION; 4142 4143 -- Note: the activation chain entity for a package spec is used for 4144 -- all tasks declared in the package spec, or in the package body. 4145 4146 -- N_Package_Declaration 4147 -- Sloc points to PACKAGE 4148 -- Specification (Node1) 4149 -- Corresponding_Body (Node5-Sem) 4150 -- Parent_Spec (Node4-Sem) 4151 -- Activation_Chain_Entity (Node3-Sem) 4152 4153 -------------------------------- 4154 -- 7.1 Package Specification -- 4155 -------------------------------- 4156 4157 -- PACKAGE_SPECIFICATION ::= 4158 -- package DEFINING_PROGRAM_UNIT_NAME is 4159 -- {BASIC_DECLARATIVE_ITEM} 4160 -- [private 4161 -- {BASIC_DECLARATIVE_ITEM}] 4162 -- end [[PARENT_UNIT_NAME .] IDENTIFIER] 4163 4164 -- N_Package_Specification 4165 -- Sloc points to PACKAGE 4166 -- Defining_Unit_Name (Node1) 4167 -- Visible_Declarations (List2) 4168 -- Private_Declarations (List3) (set to No_List if no private 4169 -- part present) 4170 -- End_Label (Node4) 4171 -- Generic_Parent (Node5-Sem) 4172 -- Limited_View_Installed (Flag18-Sem) 4173 4174 ----------------------- 4175 -- 7.1 Package Body -- 4176 ----------------------- 4177 4178 -- PACKAGE_BODY ::= 4179 -- package body DEFINING_PROGRAM_UNIT_NAME is 4180 -- DECLARATIVE_PART 4181 -- [begin 4182 -- HANDLED_SEQUENCE_OF_STATEMENTS] 4183 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]; 4184 4185 -- N_Package_Body 4186 -- Sloc points to PACKAGE 4187 -- Defining_Unit_Name (Node1) 4188 -- Declarations (List2) 4189 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present) 4190 -- Corresponding_Spec (Node5-Sem) 4191 -- Was_Originally_Stub (Flag13-Sem) 4192 4193 -- Note: if a source level package does not contain a handled sequence 4194 -- of statements, then the parser supplies a dummy one with a null 4195 -- sequence of statements. Comes_From_Source will be False in this 4196 -- constructed sequence. The reason we need this is for the End_Label 4197 -- field in the HSS. 4198 4199 ----------------------------------- 4200 -- 7.4 Private Type Declaration -- 4201 ----------------------------------- 4202 4203 -- PRIVATE_TYPE_DECLARATION ::= 4204 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] 4205 -- is [[abstract] tagged] [limited] private; 4206 4207 -- Note: TAGGED is not permitted in Ada 83 mode 4208 4209 -- N_Private_Type_Declaration 4210 -- Sloc points to TYPE 4211 -- Defining_Identifier (Node1) 4212 -- Discriminant_Specifications (List4) (set to No_List if no 4213 -- discriminant part) 4214 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant 4215 -- Abstract_Present (Flag4) 4216 -- Tagged_Present (Flag15) 4217 -- Limited_Present (Flag17) 4218 4219 ---------------------------------------- 4220 -- 7.4 Private Extension Declaration -- 4221 ---------------------------------------- 4222 4223 -- PRIVATE_EXTENSION_DECLARATION ::= 4224 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is 4225 -- [abstract] new ancestor_SUBTYPE_INDICATION with private; 4226 4227 -- Note: private extension declarations are not allowed in Ada 83 mode 4228 4229 -- N_Private_Extension_Declaration 4230 -- Sloc points to TYPE 4231 -- Defining_Identifier (Node1) 4232 -- Discriminant_Specifications (List4) (set to No_List if no 4233 -- discriminant part) 4234 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant 4235 -- Abstract_Present (Flag4) 4236 -- Subtype_Indication (Node5) 4237 4238 --------------------- 4239 -- 8.4 Use Clause -- 4240 --------------------- 4241 4242 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE 4243 4244 ----------------------------- 4245 -- 8.4 Use Package Clause -- 4246 ----------------------------- 4247 4248 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME}; 4249 4250 -- N_Use_Package_Clause 4251 -- Sloc points to USE 4252 -- Names (List2) 4253 -- Next_Use_Clause (Node3-Sem) 4254 -- Hidden_By_Use_Clause (Elist4-Sem) 4255 4256 -------------------------- 4257 -- 8.4 Use Type Clause -- 4258 -------------------------- 4259 4260 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK}; 4261 4262 -- Note: use type clause is not permitted in Ada 83 mode 4263 4264 -- N_Use_Type_Clause 4265 -- Sloc points to USE 4266 -- Subtype_Marks (List2) 4267 -- Next_Use_Clause (Node3-Sem) 4268 -- Hidden_By_Use_Clause (Elist4-Sem) 4269 4270 ------------------------------- 4271 -- 8.5 Renaming Declaration -- 4272 ------------------------------- 4273 4274 -- RENAMING_DECLARATION ::= 4275 -- OBJECT_RENAMING_DECLARATION 4276 -- | EXCEPTION_RENAMING_DECLARATION 4277 -- | PACKAGE_RENAMING_DECLARATION 4278 -- | SUBPROGRAM_RENAMING_DECLARATION 4279 -- | GENERIC_RENAMING_DECLARATION 4280 4281 -------------------------------------- 4282 -- 8.5 Object Renaming Declaration -- 4283 -------------------------------------- 4284 4285 -- OBJECT_RENAMING_DECLARATION ::= 4286 -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME; 4287 4288 -- N_Object_Renaming_Declaration 4289 -- Sloc points to first identifier 4290 -- Defining_Identifier (Node1) 4291 -- Subtype_Mark (Node4) 4292 -- Name (Node2) 4293 -- Corresponding_Generic_Association (Node5-Sem) 4294 4295 ----------------------------------------- 4296 -- 8.5 Exception Renaming Declaration -- 4297 ----------------------------------------- 4298 4299 -- EXCEPTION_RENAMING_DECLARATION ::= 4300 -- DEFINING_IDENTIFIER : exception renames exception_NAME; 4301 4302 -- N_Exception_Renaming_Declaration 4303 -- Sloc points to first identifier 4304 -- Defining_Identifier (Node1) 4305 -- Name (Node2) 4306 4307 --------------------------------------- 4308 -- 8.5 Package Renaming Declaration -- 4309 --------------------------------------- 4310 4311 -- PACKAGE_RENAMING_DECLARATION ::= 4312 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME; 4313 4314 -- N_Package_Renaming_Declaration 4315 -- Sloc points to PACKAGE 4316 -- Defining_Unit_Name (Node1) 4317 -- Name (Node2) 4318 -- Parent_Spec (Node4-Sem) 4319 4320 ------------------------------------------ 4321 -- 8.5 Subprogram Renaming Declaration -- 4322 ------------------------------------------ 4323 4324 -- SUBPROGRAM_RENAMING_DECLARATION ::= 4325 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME; 4326 4327 -- N_Subprogram_Renaming_Declaration 4328 -- Sloc points to RENAMES 4329 -- Specification (Node1) 4330 -- Name (Node2) 4331 -- Parent_Spec (Node4-Sem) 4332 -- Corresponding_Spec (Node5-Sem) 4333 4334 ----------------------------------------- 4335 -- 8.5.5 Generic Renaming Declaration -- 4336 ----------------------------------------- 4337 4338 -- GENERIC_RENAMING_DECLARATION ::= 4339 -- generic package DEFINING_PROGRAM_UNIT_NAME 4340 -- renames generic_package_NAME 4341 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME 4342 -- renames generic_procedure_NAME 4343 -- | generic function DEFINING_PROGRAM_UNIT_NAME 4344 -- renames generic_function_NAME 4345 4346 -- N_Generic_Package_Renaming_Declaration 4347 -- Sloc points to GENERIC 4348 -- Defining_Unit_Name (Node1) 4349 -- Name (Node2) 4350 -- Parent_Spec (Node4-Sem) 4351 4352 -- N_Generic_Procedure_Renaming_Declaration 4353 -- Sloc points to GENERIC 4354 -- Defining_Unit_Name (Node1) 4355 -- Name (Node2) 4356 -- Parent_Spec (Node4-Sem) 4357 4358 -- N_Generic_Function_Renaming_Declaration 4359 -- Sloc points to GENERIC 4360 -- Defining_Unit_Name (Node1) 4361 -- Name (Node2) 4362 -- Parent_Spec (Node4-Sem) 4363 4364 -------------------------------- 4365 -- 9.1 Task Type Declaration -- 4366 -------------------------------- 4367 4368 -- TASK_TYPE_DECLARATION ::= 4369 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART] 4370 -- [is TASK_DEFINITITION]; 4371 4372 -- N_Task_Type_Declaration 4373 -- Sloc points to TASK 4374 -- Defining_Identifier (Node1) 4375 -- Task_Body_Procedure (Node2-Sem) 4376 -- Discriminant_Specifications (List4) (set to No_List if no 4377 -- discriminant part) 4378 -- Task_Definition (Node3) (set to Empty if not present) 4379 -- Corresponding_Body (Node5-Sem) 4380 4381 ---------------------------------- 4382 -- 9.1 Single Task Declaration -- 4383 ---------------------------------- 4384 4385 -- SINGLE_TASK_DECLARATION ::= 4386 -- task DEFINING_IDENTIFIER [is TASK_DEFINITION]; 4387 4388 -- N_Single_Task_Declaration 4389 -- Sloc points to TASK 4390 -- Defining_Identifier (Node1) 4391 -- Task_Definition (Node3) (set to Empty if not present) 4392 4393 -------------------------- 4394 -- 9.1 Task Definition -- 4395 -------------------------- 4396 4397 -- TASK_DEFINITION ::= 4398 -- {TASK_ITEM} 4399 -- [private 4400 -- {TASK_ITEM}] 4401 -- end [task_IDENTIFIER] 4402 4403 -- Note: as a result of semantic analysis, the list of task items can 4404 -- include implicit type declarations resulting from entry families. 4405 4406 -- N_Task_Definition 4407 -- Sloc points to first token of task definition 4408 -- Visible_Declarations (List2) 4409 -- Private_Declarations (List3) (set to No_List if no private part) 4410 -- End_Label (Node4) 4411 -- Has_Priority_Pragma (Flag6-Sem) 4412 -- Has_Storage_Size_Pragma (Flag5-Sem) 4413 -- Has_Task_Info_Pragma (Flag7-Sem) 4414 -- Has_Task_Name_Pragma (Flag8-Sem) 4415 4416 -------------------- 4417 -- 9.1 Task Item -- 4418 -------------------- 4419 4420 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE 4421 4422 -------------------- 4423 -- 9.1 Task Body -- 4424 -------------------- 4425 4426 -- TASK_BODY ::= 4427 -- task body task_DEFINING_IDENTIFIER is 4428 -- DECLARATIVE_PART 4429 -- begin 4430 -- HANDLED_SEQUENCE_OF_STATEMENTS 4431 -- end [task_IDENTIFIER]; 4432 4433 -- Gigi restriction: This node never appears. 4434 4435 -- N_Task_Body 4436 -- Sloc points to TASK 4437 -- Defining_Identifier (Node1) 4438 -- Declarations (List2) 4439 -- Handled_Statement_Sequence (Node4) 4440 -- Is_Task_Master (Flag5-Sem) 4441 -- Activation_Chain_Entity (Node3-Sem) 4442 -- Corresponding_Spec (Node5-Sem) 4443 -- Was_Originally_Stub (Flag13-Sem) 4444 4445 ------------------------------------- 4446 -- 9.4 Protected Type Declaration -- 4447 ------------------------------------- 4448 4449 -- PROTECTED_TYPE_DECLARATION ::= 4450 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART] 4451 -- is PROTECTED_DEFINITION; 4452 4453 -- Note: protected type declarations are not permitted in Ada 83 mode 4454 4455 -- N_Protected_Type_Declaration 4456 -- Sloc points to PROTECTED 4457 -- Defining_Identifier (Node1) 4458 -- Discriminant_Specifications (List4) (set to No_List if no 4459 -- discriminant part) 4460 -- Protected_Definition (Node3) 4461 -- Corresponding_Body (Node5-Sem) 4462 4463 --------------------------------------- 4464 -- 9.4 Single Protected Declaration -- 4465 --------------------------------------- 4466 4467 -- SINGLE_PROTECTED_DECLARATION ::= 4468 -- protected DEFINING_IDENTIFIER is PROTECTED_DEFINITION; 4469 4470 -- Note: single protected declarations are not allowed in Ada 83 mode 4471 4472 -- N_Single_Protected_Declaration 4473 -- Sloc points to PROTECTED 4474 -- Defining_Identifier (Node1) 4475 -- Protected_Definition (Node3) 4476 4477 ------------------------------- 4478 -- 9.4 Protected Definition -- 4479 ------------------------------- 4480 4481 -- PROTECTED_DEFINITION ::= 4482 -- {PROTECTED_OPERATION_DECLARATION} 4483 -- [private 4484 -- {PROTECTED_ELEMENT_DECLARATION}] 4485 -- end [protected_IDENTIFIER] 4486 4487 -- N_Protected_Definition 4488 -- Sloc points to first token of protected definition 4489 -- Visible_Declarations (List2) 4490 -- Private_Declarations (List3) (set to No_List if no private part) 4491 -- End_Label (Node4) 4492 -- Has_Priority_Pragma (Flag6-Sem) 4493 4494 ------------------------------------------ 4495 -- 9.4 Protected Operation Declaration -- 4496 ------------------------------------------ 4497 4498 -- PROTECTED_OPERATION_DECLARATION ::= 4499 -- SUBPROGRAM_DECLARATION 4500 -- | ENTRY_DECLARATION 4501 -- | REPRESENTATION_CLAUSE 4502 4503 ---------------------------------------- 4504 -- 9.4 Protected Element Declaration -- 4505 ---------------------------------------- 4506 4507 -- PROTECTED_ELEMENT_DECLARATION ::= 4508 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION 4509 4510 ------------------------- 4511 -- 9.4 Protected Body -- 4512 ------------------------- 4513 4514 -- PROTECTED_BODY ::= 4515 -- protected body DEFINING_IDENTIFIER is 4516 -- {PROTECTED_OPERATION_ITEM} 4517 -- end [protected_IDENTIFIER]; 4518 4519 -- Note: protected bodies are not allowed in Ada 83 mode 4520 4521 -- Gigi restriction: This node never appears. 4522 4523 -- N_Protected_Body 4524 -- Sloc points to PROTECTED 4525 -- Defining_Identifier (Node1) 4526 -- Declarations (List2) protected operation items (and pragmas) 4527 -- End_Label (Node4) 4528 -- Corresponding_Spec (Node5-Sem) 4529 -- Was_Originally_Stub (Flag13-Sem) 4530 4531 ----------------------------------- 4532 -- 9.4 Protected Operation Item -- 4533 ----------------------------------- 4534 4535 -- PROTECTED_OPERATION_ITEM ::= 4536 -- SUBPROGRAM_DECLARATION 4537 -- | SUBPROGRAM_BODY 4538 -- | ENTRY_BODY 4539 -- | REPRESENTATION_CLAUSE 4540 4541 ------------------------------ 4542 -- 9.5.2 Entry Declaration -- 4543 ------------------------------ 4544 4545 -- ENTRY_DECLARATION ::= 4546 -- entry DEFINING_IDENTIFIER 4547 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE; 4548 4549 -- N_Entry_Declaration 4550 -- Sloc points to ENTRY 4551 -- Defining_Identifier (Node1) 4552 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present) 4553 -- Parameter_Specifications (List3) (set to No_List if no formal part) 4554 -- Corresponding_Body (Node5-Sem) 4555 4556 ----------------------------- 4557 -- 9.5.2 Accept statement -- 4558 ----------------------------- 4559 4560 -- ACCEPT_STATEMENT ::= 4561 -- accept entry_DIRECT_NAME 4562 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do 4563 -- HANDLED_SEQUENCE_OF_STATEMENTS 4564 -- end [entry_IDENTIFIER]]; 4565 4566 -- Gigi restriction: This node never appears. 4567 4568 -- Note: there are no explicit declarations allowed in an accept 4569 -- statement. However, the implicit declarations for any statement 4570 -- identifiers (labels and block/loop identifiers) are declarations 4571 -- that belong logically to the accept statement, and that is why 4572 -- there is a Declarations field in this node. 4573 4574 -- N_Accept_Statement 4575 -- Sloc points to ACCEPT 4576 -- Entry_Direct_Name (Node1) 4577 -- Entry_Index (Node5) (set to Empty if not present) 4578 -- Parameter_Specifications (List3) (set to No_List if no formal part) 4579 -- Handled_Statement_Sequence (Node4) 4580 -- Declarations (List2) (set to No_List if no declarations) 4581 4582 ------------------------ 4583 -- 9.5.2 Entry Index -- 4584 ------------------------ 4585 4586 -- ENTRY_INDEX ::= EXPRESSION 4587 4588 ----------------------- 4589 -- 9.5.2 Entry Body -- 4590 ----------------------- 4591 4592 -- ENTRY_BODY ::= 4593 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is 4594 -- DECLARATIVE_PART 4595 -- begin 4596 -- HANDLED_SEQUENCE_OF_STATEMENTS 4597 -- end [entry_IDENTIFIER]; 4598 4599 -- ENTRY_BARRIER ::= when CONDITION 4600 4601 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for 4602 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting 4603 -- too full (it would otherwise have too many fields) 4604 4605 -- Gigi restriction: This node never appears. 4606 4607 -- N_Entry_Body 4608 -- Sloc points to ENTRY 4609 -- Defining_Identifier (Node1) 4610 -- Entry_Body_Formal_Part (Node5) 4611 -- Declarations (List2) 4612 -- Handled_Statement_Sequence (Node4) 4613 -- Activation_Chain_Entity (Node3-Sem) 4614 4615 ----------------------------------- 4616 -- 9.5.2 Entry Body Formal Part -- 4617 ----------------------------------- 4618 4619 -- ENTRY_BODY_FORMAL_PART ::= 4620 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE 4621 4622 -- Note that an entry body formal part node is present even if it is 4623 -- empty. This reflects the grammar, in which it is the components of 4624 -- the entry body formal part that are optional, not the entry body 4625 -- formal part itself. Also this means that the barrier condition 4626 -- always has somewhere to be stored. 4627 4628 -- Gigi restriction: This node never appears. 4629 4630 -- N_Entry_Body_Formal_Part 4631 -- Sloc points to first token 4632 -- Entry_Index_Specification (Node4) (set to Empty if not present) 4633 -- Parameter_Specifications (List3) (set to No_List if no formal part) 4634 -- Condition (Node1) from entry barrier of entry body 4635 4636 -------------------------- 4637 -- 9.5.2 Entry Barrier -- 4638 -------------------------- 4639 4640 -- ENTRY_BARRIER ::= when CONDITION 4641 4642 -------------------------------------- 4643 -- 9.5.2 Entry Index Specification -- 4644 -------------------------------------- 4645 4646 -- ENTRY_INDEX_SPECIFICATION ::= 4647 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION 4648 4649 -- Gigi restriction: This node never appears. 4650 4651 -- N_Entry_Index_Specification 4652 -- Sloc points to FOR 4653 -- Defining_Identifier (Node1) 4654 -- Discrete_Subtype_Definition (Node4) 4655 4656 --------------------------------- 4657 -- 9.5.3 Entry Call Statement -- 4658 --------------------------------- 4659 4660 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART]; 4661 4662 -- The parser may generate a procedure call for this construct. The 4663 -- semantic pass must correct this misidentification where needed. 4664 4665 -- Gigi restriction: This node never appears. 4666 4667 -- N_Entry_Call_Statement 4668 -- Sloc points to first token of name 4669 -- Name (Node2) 4670 -- Parameter_Associations (List3) (set to No_List if no 4671 -- actual parameter part) 4672 -- First_Named_Actual (Node4-Sem) 4673 4674 ------------------------------ 4675 -- 9.5.4 Requeue Statement -- 4676 ------------------------------ 4677 4678 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort]; 4679 4680 -- Note: requeue statements are not permitted in Ada 83 mode 4681 4682 -- Gigi restriction: This node never appears. 4683 4684 -- N_Requeue_Statement 4685 -- Sloc points to REQUEUE 4686 -- Name (Node2) 4687 -- Abort_Present (Flag15) 4688 4689 -------------------------- 4690 -- 9.6 Delay Statement -- 4691 -------------------------- 4692 4693 -- DELAY_STATEMENT ::= 4694 -- DELAY_UNTIL_STATEMENT 4695 -- | DELAY_RELATIVE_STATEMENT 4696 4697 -------------------------------- 4698 -- 9.6 Delay Until Statement -- 4699 -------------------------------- 4700 4701 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION; 4702 4703 -- Note: delay until statements are not permitted in Ada 83 mode 4704 4705 -- Gigi restriction: This node never appears. 4706 4707 -- N_Delay_Until_Statement 4708 -- Sloc points to DELAY 4709 -- Expression (Node3) 4710 4711 ----------------------------------- 4712 -- 9.6 Delay Relative Statement -- 4713 ----------------------------------- 4714 4715 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION; 4716 4717 -- Gigi restriction: This node never appears. 4718 4719 -- N_Delay_Relative_Statement 4720 -- Sloc points to DELAY 4721 -- Expression (Node3) 4722 4723 --------------------------- 4724 -- 9.7 Select Statement -- 4725 --------------------------- 4726 4727 -- SELECT_STATEMENT ::= 4728 -- SELECTIVE_ACCEPT 4729 -- | TIMED_ENTRY_CALL 4730 -- | CONDITIONAL_ENTRY_CALL 4731 -- | ASYNCHRONOUS_SELECT 4732 4733 ----------------------------- 4734 -- 9.7.1 Selective Accept -- 4735 ----------------------------- 4736 4737 -- SELECTIVE_ACCEPT ::= 4738 -- select 4739 -- [GUARD] 4740 -- SELECT_ALTERNATIVE 4741 -- {or 4742 -- [GUARD] 4743 -- SELECT_ALTERNATIVE} 4744 -- [else 4745 -- SEQUENCE_OF_STATEMENTS] 4746 -- end select; 4747 4748 -- Gigi restriction: This node never appears. 4749 4750 -- Note: the guard expression, if present, appears in the node for 4751 -- the select alternative. 4752 4753 -- N_Selective_Accept 4754 -- Sloc points to SELECT 4755 -- Select_Alternatives (List1) 4756 -- Else_Statements (List4) (set to No_List if no else part) 4757 4758 ------------------ 4759 -- 9.7.1 Guard -- 4760 ------------------ 4761 4762 -- GUARD ::= when CONDITION => 4763 4764 -- As noted above, the CONDITION that is part of a GUARD is included 4765 -- in the node for the select alernative for convenience. 4766 4767 ------------------------------- 4768 -- 9.7.1 Select Alternative -- 4769 ------------------------------- 4770 4771 -- SELECT_ALTERNATIVE ::= 4772 -- ACCEPT_ALTERNATIVE 4773 -- | DELAY_ALTERNATIVE 4774 -- | TERMINATE_ALTERNATIVE 4775 4776 ------------------------------- 4777 -- 9.7.1 Accept Alternative -- 4778 ------------------------------- 4779 4780 -- ACCEPT_ALTERNATIVE ::= 4781 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS] 4782 4783 -- Gigi restriction: This node never appears. 4784 4785 -- N_Accept_Alternative 4786 -- Sloc points to ACCEPT 4787 -- Accept_Statement (Node2) 4788 -- Condition (Node1) from the guard (set to Empty if no guard present) 4789 -- Statements (List3) (set to Empty_List if no statements) 4790 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none) 4791 -- Accept_Handler_Records (List5-Sem) 4792 4793 ------------------------------ 4794 -- 9.7.1 Delay Alternative -- 4795 ------------------------------ 4796 4797 -- DELAY_ALTERNATIVE ::= 4798 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS] 4799 4800 -- Gigi restriction: This node never appears. 4801 4802 -- N_Delay_Alternative 4803 -- Sloc points to DELAY 4804 -- Delay_Statement (Node2) 4805 -- Condition (Node1) from the guard (set to Empty if no guard present) 4806 -- Statements (List3) (set to Empty_List if no statements) 4807 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none) 4808 4809 ---------------------------------- 4810 -- 9.7.1 Terminate Alternative -- 4811 ---------------------------------- 4812 4813 -- TERMINATE_ALTERNATIVE ::= terminate; 4814 4815 -- Gigi restriction: This node never appears. 4816 4817 -- N_Terminate_Alternative 4818 -- Sloc points to TERMINATE 4819 -- Condition (Node1) from the guard (set to Empty if no guard present) 4820 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none) 4821 -- Pragmas_After (List5) pragmas after alt (set to No_List if none) 4822 4823 ----------------------------- 4824 -- 9.7.2 Timed Entry Call -- 4825 ----------------------------- 4826 4827 -- TIMED_ENTRY_CALL ::= 4828 -- select 4829 -- ENTRY_CALL_ALTERNATIVE 4830 -- or 4831 -- DELAY_ALTERNATIVE 4832 -- end select; 4833 4834 -- Gigi restriction: This node never appears. 4835 4836 -- N_Timed_Entry_Call 4837 -- Sloc points to SELECT 4838 -- Entry_Call_Alternative (Node1) 4839 -- Delay_Alternative (Node4) 4840 4841 ----------------------------------- 4842 -- 9.7.2 Entry Call Alternative -- 4843 ----------------------------------- 4844 4845 -- ENTRY_CALL_ALTERNATIVE ::= 4846 -- ENTRY_CALL_STATEMENT [SEQUENCE_OF_STATEMENTS] 4847 4848 -- Gigi restriction: This node never appears. 4849 4850 -- N_Entry_Call_Alternative 4851 -- Sloc points to first token of entry call statement 4852 -- Entry_Call_Statement (Node1) 4853 -- Statements (List3) (set to Empty_List if no statements) 4854 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none) 4855 4856 ----------------------------------- 4857 -- 9.7.3 Conditional Entry Call -- 4858 ----------------------------------- 4859 4860 -- CONDITIONAL_ENTRY_CALL ::= 4861 -- select 4862 -- ENTRY_CALL_ALTERNATIVE 4863 -- else 4864 -- SEQUENCE_OF_STATEMENTS 4865 -- end select; 4866 4867 -- Gigi restriction: This node never appears. 4868 4869 -- N_Conditional_Entry_Call 4870 -- Sloc points to SELECT 4871 -- Entry_Call_Alternative (Node1) 4872 -- Else_Statements (List4) 4873 4874 -------------------------------- 4875 -- 9.7.4 Asynchronous Select -- 4876 -------------------------------- 4877 4878 -- ASYNCHRONOUS_SELECT ::= 4879 -- select 4880 -- TRIGGERING_ALTERNATIVE 4881 -- then abort 4882 -- ABORTABLE_PART 4883 -- end select; 4884 4885 -- Note: asynchronous select is not permitted in Ada 83 mode 4886 4887 -- Gigi restriction: This node never appears. 4888 4889 -- N_Asynchronous_Select 4890 -- Sloc points to SELECT 4891 -- Triggering_Alternative (Node1) 4892 -- Abortable_Part (Node2) 4893 4894 ----------------------------------- 4895 -- 9.7.4 Triggering Alternative -- 4896 ----------------------------------- 4897 4898 -- TRIGGERING_ALTERNATIVE ::= 4899 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS] 4900 4901 -- Gigi restriction: This node never appears. 4902 4903 -- N_Triggering_Alternative 4904 -- Sloc points to first token of triggering statement 4905 -- Triggering_Statement (Node1) 4906 -- Statements (List3) (set to Empty_List if no statements) 4907 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none) 4908 4909 --------------------------------- 4910 -- 9.7.4 Triggering Statement -- 4911 --------------------------------- 4912 4913 -- TRIGGERING_STATEMENT ::= ENTRY_CALL_STATEMENT | DELAY_STATEMENT 4914 4915 --------------------------- 4916 -- 9.7.4 Abortable Part -- 4917 --------------------------- 4918 4919 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS 4920 4921 -- Gigi restriction: This node never appears. 4922 4923 -- N_Abortable_Part 4924 -- Sloc points to ABORT 4925 -- Statements (List3) 4926 4927 -------------------------- 4928 -- 9.8 Abort Statement -- 4929 -------------------------- 4930 4931 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME}; 4932 4933 -- Gigi restriction: This node never appears. 4934 4935 -- N_Abort_Statement 4936 -- Sloc points to ABORT 4937 -- Names (List2) 4938 4939 ------------------------- 4940 -- 10.1.1 Compilation -- 4941 ------------------------- 4942 4943 -- COMPILATION ::= {COMPILATION_UNIT} 4944 4945 -- There is no explicit node in the tree for a compilation, since in 4946 -- general the compiler is processing only a single compilation unit 4947 -- at a time. It is possible to parse multiple units in syntax check 4948 -- only mode, but they the trees are discarded in any case. 4949 4950 ------------------------------ 4951 -- 10.1.1 Compilation Unit -- 4952 ------------------------------ 4953 4954 -- COMPILATION_UNIT ::= 4955 -- CONTEXT_CLAUSE LIBRARY_ITEM 4956 -- | CONTEXT_CLAUSE SUBUNIT 4957 4958 -- The N_Compilation_Unit node itself respresents the above syntax. 4959 -- However, there are two additional items not reflected in the above 4960 -- syntax. First we have the global declarations that are added by the 4961 -- code generator. These are outer level declarations (so they cannot 4962 -- be represented as being inside the units). An example is the wrapper 4963 -- subprograms that are created to do ABE checking. As always a list of 4964 -- declarations can contain actions as well (i.e. statements), and such 4965 -- statements are executed as part of the elaboration of the unit. Note 4966 -- that all such declarations are elaborated before the library unit. 4967 4968 -- Similarly, certain actions need to be elaborated at the completion 4969 -- of elaboration of the library unit (notably the statement that sets 4970 -- the Boolean flag indicating that elaboration is complete). 4971 4972 -- The third item not reflected in the syntax is pragmas that appear 4973 -- after the compilation unit. As always pragmas are a problem since 4974 -- they are not part of the formal syntax, but can be stuck into the 4975 -- source following a set of ad hoc rules, and we have to find an ad 4976 -- hoc way of sticking them into the tree. For pragmas that appear 4977 -- before the library unit, we just consider them to be part of the 4978 -- context clause, and pragmas can appear in the Context_Items list 4979 -- of the compilation unit. However, pragmas can also appear after 4980 -- the library item. 4981 4982 -- To deal with all these problems, we create an auxiliary node for 4983 -- a compilation unit, referenced from the N_Compilation_Unit node 4984 -- that contains these three items. 4985 4986 -- N_Compilation_Unit 4987 -- Sloc points to first token of defining unit name 4988 -- Library_Unit (Node4-Sem) corresponding/parent spec/body 4989 -- Context_Items (List1) context items and pragmas preceding unit 4990 -- Private_Present (Flag15) set if library unit has private keyword 4991 -- Unit (Node2) library item or subunit 4992 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node 4993 -- Has_No_Elaboration_Code (Flag17-Sem) 4994 -- Body_Required (Flag13-Sem) set for spec if body is required 4995 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec 4996 -- First_Inlined_Subprogram (Node3-Sem) 4997 4998 -- N_Compilation_Unit_Aux 4999 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node 5000 -- Declarations (List2) (set to No_List if no global declarations) 5001 -- Actions (List1) (set to No_List if no actions) 5002 -- Pragmas_After (List5) pragmas after unit (set to No_List if none) 5003 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none) 5004 5005 -------------------------- 5006 -- 10.1.1 Library Item -- 5007 -------------------------- 5008 5009 -- LIBRARY_ITEM ::= 5010 -- [private] LIBRARY_UNIT_DECLARATION 5011 -- | LIBRARY_UNIT_BODY 5012 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION 5013 5014 -- Note: PRIVATE is not allowed in Ada 83 mode 5015 5016 -- There is no explicit node in the tree for library item, instead 5017 -- the declaration or body, and the flag for private if present, 5018 -- appear in the N_Compilation_Unit clause. 5019 5020 ---------------------------------------- 5021 -- 10.1.1 Library Unit Declararation -- 5022 ---------------------------------------- 5023 5024 -- LIBRARY_UNIT_DECLARATION ::= 5025 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION 5026 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION 5027 5028 ------------------------------------------------- 5029 -- 10.1.1 Library Unit Renaming Declararation -- 5030 ------------------------------------------------- 5031 5032 -- LIBRARY_UNIT_RENAMING_DECLARATION ::= 5033 -- PACKAGE_RENAMING_DECLARATION 5034 -- | GENERIC_RENAMING_DECLARATION 5035 -- | SUBPROGRAM_RENAMING_DECLARATION 5036 5037 ------------------------------- 5038 -- 10.1.1 Library unit body -- 5039 ------------------------------- 5040 5041 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY 5042 5043 ------------------------------ 5044 -- 10.1.1 Parent Unit Name -- 5045 ------------------------------ 5046 5047 -- PARENT_UNIT_NAME ::= NAME 5048 5049 ---------------------------- 5050 -- 10.1.2 Context clause -- 5051 ---------------------------- 5052 5053 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM} 5054 5055 -- The context clause can include pragmas, and any pragmas that appear 5056 -- before the context clause proper (i.e. all configuration pragmas, 5057 -- also appear at the front of this list). 5058 5059 -------------------------- 5060 -- 10.1.2 Context_Item -- 5061 -------------------------- 5062 5063 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE 5064 5065 ------------------------- 5066 -- 10.1.2 With clause -- 5067 ------------------------- 5068 5069 -- WITH_CLAUSE ::= 5070 -- with library_unit_NAME {,library_unit_NAME}; 5071 5072 -- A separate With clause is built for each name, so that we have 5073 -- a Corresponding_Spec field for each with'ed spec. The flags 5074 -- First_Name and Last_Name are used to reconstruct the exact 5075 -- source form. When a list of names appears in one with clause, 5076 -- the first name in the list has First_Name set, and the last 5077 -- has Last_Name set. If the with clause has only one name, then 5078 -- both of the flags First_Name and Last_Name are set in this name. 5079 5080 -- Note: in the case of implicit with's that are installed by the 5081 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically 5082 -- set to Standard_Location, but it is incorrect to test the Sloc 5083 -- to find out if a with clause is implicit, test the flag instead. 5084 5085 -- N_With_Clause 5086 -- Sloc points to first token of library unit name 5087 -- Name (Node2) 5088 -- Library_Unit (Node4-Sem) 5089 -- Corresponding_Spec (Node5-Sem) 5090 -- First_Name (Flag5) (set to True if first name or only one name) 5091 -- Last_Name (Flag6) (set to True if last name or only one name) 5092 -- Context_Installed (Flag13-Sem) 5093 -- Elaborate_Present (Flag4-Sem) 5094 -- Elaborate_All_Present (Flag15-Sem) 5095 -- Implicit_With (Flag16-Sem) 5096 -- Limited_Present (Flag17) set if LIMITED is present 5097 -- Limited_View_Installed (Flag18-Sem) 5098 -- Unreferenced_In_Spec (Flag7-Sem) 5099 -- No_Entities_Ref_In_Spec (Flag8-Sem) 5100 5101 -- Note: Limited_Present and Limited_View_Installed give support to 5102 -- Ada0Y (AI-50217). 5103 5104 ---------------------- 5105 -- With_Type clause -- 5106 ---------------------- 5107 5108 -- This is a GNAT extension, used to implement mutually recursive 5109 -- types declared in different packages. 5110 5111 -- WITH_TYPE_CLAUSE ::= 5112 -- with type type_NAME is access | with type type_NAME is tagged 5113 5114 -- N_With_Type_Clause 5115 -- Sloc points to first token of type name 5116 -- Name (Node2) 5117 -- Tagged_Present (Flag15) 5118 5119 --------------------- 5120 -- 10.2 Body stub -- 5121 --------------------- 5122 5123 -- BODY_STUB ::= 5124 -- SUBPROGRAM_BODY_STUB 5125 -- | PACKAGE_BODY_STUB 5126 -- | TASK_BODY_STUB 5127 -- | PROTECTED_BODY_STUB 5128 5129 ---------------------------------- 5130 -- 10.1.3 Subprogram Body Stub -- 5131 ---------------------------------- 5132 5133 -- SUBPROGRAM_BODY_STUB ::= 5134 -- SUBPROGRAM_SPECIFICATION is separate; 5135 5136 -- N_Subprogram_Body_Stub 5137 -- Sloc points to FUNCTION or PROCEDURE 5138 -- Specification (Node1) 5139 -- Library_Unit (Node4-Sem) points to the subunit 5140 -- Corresponding_Body (Node5-Sem) 5141 5142 ------------------------------- 5143 -- 10.1.3 Package Body Stub -- 5144 ------------------------------- 5145 5146 -- PACKAGE_BODY_STUB ::= 5147 -- package body DEFINING_IDENTIFIER is separate; 5148 5149 -- N_Package_Body_Stub 5150 -- Sloc points to PACKAGE 5151 -- Defining_Identifier (Node1) 5152 -- Library_Unit (Node4-Sem) points to the subunit 5153 -- Corresponding_Body (Node5-Sem) 5154 5155 ---------------------------- 5156 -- 10.1.3 Task Body Stub -- 5157 ---------------------------- 5158 5159 -- TASK_BODY_STUB ::= 5160 -- task body DEFINING_IDENTIFIER is separate; 5161 5162 -- N_Task_Body_Stub 5163 -- Sloc points to TASK 5164 -- Defining_Identifier (Node1) 5165 -- Library_Unit (Node4-Sem) points to the subunit 5166 -- Corresponding_Body (Node5-Sem) 5167 5168 --------------------------------- 5169 -- 10.1.3 Protected Body Stub -- 5170 --------------------------------- 5171 5172 -- PROTECTED_BODY_STUB ::= 5173 -- protected body DEFINING_IDENTIFIER is separate; 5174 5175 -- Note: protected body stubs are not allowed in Ada 83 mode 5176 5177 -- N_Protected_Body_Stub 5178 -- Sloc points to PROTECTED 5179 -- Defining_Identifier (Node1) 5180 -- Library_Unit (Node4-Sem) points to the subunit 5181 -- Corresponding_Body (Node5-Sem) 5182 5183 --------------------- 5184 -- 10.1.3 Subunit -- 5185 --------------------- 5186 5187 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY 5188 5189 -- N_Subunit 5190 -- Sloc points to SEPARATE 5191 -- Name (Node2) is the name of the parent unit 5192 -- Proper_Body (Node1) is the subunit body 5193 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit. 5194 5195 --------------------------------- 5196 -- 11.1 Exception Declaration -- 5197 --------------------------------- 5198 5199 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception; 5200 5201 -- For consistency with object declarations etc, the parser converts 5202 -- the case of multiple identifiers being declared to a series of 5203 -- declarations in which the expression is copied, using the More_Ids 5204 -- and Prev_Ids flags to remember the souce form as described in the 5205 -- section on "Handling of Defining Identifier Lists". 5206 5207 -- N_Exception_Declaration 5208 -- Sloc points to EXCEPTION 5209 -- Defining_Identifier (Node1) 5210 -- Expression (Node3-Sem) 5211 -- More_Ids (Flag5) (set to False if no more identifiers in list) 5212 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 5213 5214 ------------------------------------------ 5215 -- 11.2 Handled Sequence Of Statements -- 5216 ------------------------------------------ 5217 5218 -- HANDLED_SEQUENCE_OF_STATEMENTS ::= 5219 -- SEQUENCE_OF_STATEMENTS 5220 -- [exception 5221 -- EXCEPTION_HANDLER 5222 -- {EXCEPTION_HANDLER}] 5223 -- [at end 5224 -- cleanup_procedure_call (param, param, param, ...);] 5225 5226 -- The AT END phrase is a GNAT extension to provide for cleanups. It is 5227 -- used only internally currently, but is considered to be syntactic. 5228 -- At the moment, the only cleanup action allowed is a single call to 5229 -- a parameterless procedure, and the Identifier field of the node is 5230 -- the procedure to be called. Also there is a current restriction 5231 -- that exception handles and a cleanup cannot be present in the same 5232 -- frame, so at least one of Exception_Handlers or the Identifier must 5233 -- be missing. 5234 5235 -- Actually, more accurately, this restriction applies to the original 5236 -- source program. In the expanded tree, if the At_End_Proc field is 5237 -- present, then there will also be an exception handler of the form: 5238 5239 -- when all others => 5240 -- cleanup; 5241 -- raise; 5242 5243 -- where cleanup is the procedure to be generated. The reason we do 5244 -- this is so that the front end can handle the necessary entries in 5245 -- the exception tables, and other exception handler actions required 5246 -- as part of the normal handling for exception handlers. 5247 5248 -- The AT END cleanup handler protects only the sequence of statements 5249 -- (not the associated declarations of the parent), just like exception 5250 -- handlers. The big difference is that the cleanup procedure is called 5251 -- on either a normal or an abnormal exit from the statement sequence. 5252 5253 -- Note: the list of Exception_Handlers can contain pragmas as well 5254 -- as actual handlers. In practice these pragmas can only occur at 5255 -- the start of the list, since any pragmas occurring later on will 5256 -- be included in the statement list of the corresponding handler. 5257 5258 -- Note: although in the Ada syntax, the sequence of statements in 5259 -- a handled sequence of statements can only contain statements, we 5260 -- allow free mixing of declarations and statements in the resulting 5261 -- expanded tree. This is for example used to deal with the case of 5262 -- a cleanup procedure that must handle declarations as well as the 5263 -- statements of a block. 5264 5265 -- N_Handled_Sequence_Of_Statements 5266 -- Sloc points to first token of first statement 5267 -- Statements (List3) 5268 -- End_Label (Node4) (set to Empty if expander generated) 5269 -- Exception_Handlers (List5) (set to No_List if none present) 5270 -- At_End_Proc (Node1) (set to Empty if no clean up procedure) 5271 -- First_Real_Statement (Node2-Sem) 5272 -- Zero_Cost_Handling (Flag5-Sem) 5273 5274 -- Note: the parent always contains a Declarations field which contains 5275 -- declarations associated with the handled sequence of statements. This 5276 -- is true even in the case of an accept statement (see description of 5277 -- the N_Accept_Statement node). 5278 5279 -- End_Label refers to the containing construct. 5280 5281 ----------------------------- 5282 -- 11.2 Exception Handler -- 5283 ----------------------------- 5284 5285 -- EXCEPTION_HANDLER ::= 5286 -- when [CHOICE_PARAMETER_SPECIFICATION :] 5287 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} => 5288 -- SEQUENCE_OF_STATEMENTS 5289 5290 -- Note: choice parameter specification is not allowed in Ada 83 mode 5291 5292 -- N_Exception_Handler 5293 -- Sloc points to WHEN 5294 -- Choice_Parameter (Node2) (set to Empty if not present) 5295 -- Exception_Choices (List4) 5296 -- Statements (List3) 5297 -- Zero_Cost_Handling (Flag5-Sem) 5298 5299 ------------------------------------------ 5300 -- 11.2 Choice parameter specification -- 5301 ------------------------------------------ 5302 5303 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER 5304 5305 ---------------------------- 5306 -- 11.2 Exception Choice -- 5307 ---------------------------- 5308 5309 -- EXCEPTION_CHOICE ::= exception_NAME | others 5310 5311 -- Except in the case of OTHERS, no explicit node appears in the tree 5312 -- for exception choice. Instead the exception name appears directly. 5313 -- An OTHERS choice is represented by a N_Others_Choice node (see 5314 -- section 3.8.1. 5315 5316 -- Note: for the exception choice created for an at end handler, the 5317 -- exception choice is an N_Others_Choice node with All_Others set. 5318 5319 --------------------------- 5320 -- 11.3 Raise Statement -- 5321 --------------------------- 5322 5323 -- RAISE_STATEMENT ::= raise [exception_NAME]; 5324 5325 -- N_Raise_Statement 5326 -- Sloc points to RAISE 5327 -- Name (Node2) (set to Empty if no exception name present) 5328 5329 ------------------------------- 5330 -- 12.1 Generic Declaration -- 5331 ------------------------------- 5332 5333 -- GENERIC_DECLARATION ::= 5334 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION 5335 5336 ------------------------------------------ 5337 -- 12.1 Generic Subprogram Declaration -- 5338 ------------------------------------------ 5339 5340 -- GENERIC_SUBPROGRAM_DECLARATION ::= 5341 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION; 5342 5343 -- Note: Generic_Formal_Declarations can include pragmas 5344 5345 -- N_Generic_Subprogram_Declaration 5346 -- Sloc points to GENERIC 5347 -- Specification (Node1) subprogram specification 5348 -- Corresponding_Body (Node5-Sem) 5349 -- Generic_Formal_Declarations (List2) from generic formal part 5350 -- Parent_Spec (Node4-Sem) 5351 5352 --------------------------------------- 5353 -- 12.1 Generic Package Declaration -- 5354 --------------------------------------- 5355 5356 -- GENERIC_PACKAGE_DECLARATION ::= 5357 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION; 5358 5359 -- Note: when we do generics right, the Activation_Chain_Entity entry 5360 -- for this node can be removed (since the expander won't see generic 5361 -- units any more)???. 5362 5363 -- Note: Generic_Formal_Declarations can include pragmas 5364 5365 -- N_Generic_Package_Declaration 5366 -- Sloc points to GENERIC 5367 -- Specification (Node1) package specification 5368 -- Corresponding_Body (Node5-Sem) 5369 -- Generic_Formal_Declarations (List2) from generic formal part 5370 -- Parent_Spec (Node4-Sem) 5371 -- Activation_Chain_Entity (Node3-Sem) 5372 5373 ------------------------------- 5374 -- 12.1 Generic Formal Part -- 5375 ------------------------------- 5376 5377 -- GENERIC_FORMAL_PART ::= 5378 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE} 5379 5380 ------------------------------------------------ 5381 -- 12.1 Generic Formal Parameter Declaration -- 5382 ------------------------------------------------ 5383 5384 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::= 5385 -- FORMAL_OBJECT_DECLARATION 5386 -- | FORMAL_TYPE_DECLARATION 5387 -- | FORMAL_SUBPROGRAM_DECLARATION 5388 -- | FORMAL_PACKAGE_DECLARATION 5389 5390 --------------------------------- 5391 -- 12.3 Generic Instantiation -- 5392 --------------------------------- 5393 5394 -- GENERIC_INSTANTIATION ::= 5395 -- package DEFINING_PROGRAM_UNIT_NAME is 5396 -- new generic_package_NAME [GENERIC_ACTUAL_PART]; 5397 -- | procedure DEFINING_PROGRAM_UNIT_NAME is 5398 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]; 5399 -- | function DEFINING_DESIGNATOR is 5400 -- new generic_function_NAME [GENERIC_ACTUAL_PART]; 5401 5402 -- N_Package_Instantiation 5403 -- Sloc points to PACKAGE 5404 -- Defining_Unit_Name (Node1) 5405 -- Name (Node2) 5406 -- Generic_Associations (List3) (set to No_List if no 5407 -- generic actual part) 5408 -- Parent_Spec (Node4-Sem) 5409 -- Instance_Spec (Node5-Sem) 5410 -- ABE_Is_Certain (Flag18-Sem) 5411 5412 -- N_Procedure_Instantiation 5413 -- Sloc points to PROCEDURE 5414 -- Defining_Unit_Name (Node1) 5415 -- Name (Node2) 5416 -- Parent_Spec (Node4-Sem) 5417 -- Generic_Associations (List3) (set to No_List if no 5418 -- generic actual part) 5419 -- Instance_Spec (Node5-Sem) 5420 -- ABE_Is_Certain (Flag18-Sem) 5421 5422 -- N_Function_Instantiation 5423 -- Sloc points to FUNCTION 5424 -- Defining_Unit_Name (Node1) 5425 -- Name (Node2) 5426 -- Generic_Associations (List3) (set to No_List if no 5427 -- generic actual part) 5428 -- Parent_Spec (Node4-Sem) 5429 -- Instance_Spec (Node5-Sem) 5430 -- ABE_Is_Certain (Flag18-Sem) 5431 5432 ------------------------------ 5433 -- 12.3 Generic Actual Part -- 5434 ------------------------------ 5435 5436 -- GENERIC_ACTUAL_PART ::= 5437 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION}) 5438 5439 ------------------------------- 5440 -- 12.3 Generic Association -- 5441 ------------------------------- 5442 5443 -- GENERIC_ASSOCIATION ::= 5444 -- [generic_formal_parameter_SELECTOR_NAME =>] 5445 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER 5446 5447 -- Note: unlike the procedure call case, a generic association node 5448 -- is generated for every association, even if no formal is present. 5449 -- In this case the parser will leave the Selector_Name field set 5450 -- to Empty, to be filled in later by the semantic pass. 5451 5452 -- N_Generic_Association 5453 -- Sloc points to first token of generic association 5454 -- Selector_Name (Node2) (set to Empty if no formal 5455 -- parameter selector name) 5456 -- Explicit_Generic_Actual_Parameter (Node1) 5457 5458 --------------------------------------------- 5459 -- 12.3 Explicit Generic Actual Parameter -- 5460 --------------------------------------------- 5461 5462 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::= 5463 -- EXPRESSION | variable_NAME | subprogram_NAME 5464 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME 5465 5466 ------------------------------------- 5467 -- 12.4 Formal Object Declaration -- 5468 ------------------------------------- 5469 5470 -- FORMAL_OBJECT_DECLARATION ::= 5471 -- DEFINING_IDENTIFIER_LIST : 5472 -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION]; 5473 5474 -- Although the syntax allows multiple identifiers in the list, the 5475 -- semantics is as though successive declarations were given with 5476 -- identical type definition and expression components. To simplify 5477 -- semantic processing, the parser represents a multiple declaration 5478 -- case as a sequence of single declarations, using the More_Ids and 5479 -- Prev_Ids flags to preserve the original source form as described 5480 -- in the section on "Handling of Defining Identifier Lists". 5481 5482 -- N_Formal_Object_Declaration 5483 -- Sloc points to first identifier 5484 -- Defining_Identifier (Node1) 5485 -- In_Present (Flag15) 5486 -- Out_Present (Flag17) 5487 -- Subtype_Mark (Node4) 5488 -- Expression (Node3) (set to Empty if no default expression) 5489 -- More_Ids (Flag5) (set to False if no more identifiers in list) 5490 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) 5491 5492 ----------------------------------- 5493 -- 12.5 Formal Type Declaration -- 5494 ----------------------------------- 5495 5496 -- FORMAL_TYPE_DECLARATION ::= 5497 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] 5498 -- is FORMAL_TYPE_DEFINITION; 5499 5500 -- N_Formal_Type_Declaration 5501 -- Sloc points to TYPE 5502 -- Defining_Identifier (Node1) 5503 -- Formal_Type_Definition (Node3) 5504 -- Discriminant_Specifications (List4) (set to No_List if no 5505 -- discriminant part) 5506 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant 5507 5508 ---------------------------------- 5509 -- 12.5 Formal type definition -- 5510 ---------------------------------- 5511 5512 -- FORMAL_TYPE_DEFINITION ::= 5513 -- FORMAL_PRIVATE_TYPE_DEFINITION 5514 -- | FORMAL_DERIVED_TYPE_DEFINITION 5515 -- | FORMAL_DISCRETE_TYPE_DEFINITION 5516 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION 5517 -- | FORMAL_MODULAR_TYPE_DEFINITION 5518 -- | FORMAL_FLOATING_POINT_DEFINITION 5519 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION 5520 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION 5521 -- | FORMAL_ARRAY_TYPE_DEFINITION 5522 -- | FORMAL_ACCESS_TYPE_DEFINITION 5523 5524 --------------------------------------------- 5525 -- 12.5.1 Formal Private Type Definition -- 5526 --------------------------------------------- 5527 5528 -- FORMAL_PRIVATE_TYPE_DEFINITION ::= 5529 -- [[abstract] tagged] [limited] private 5530 5531 -- Note: TAGGED is not allowed in Ada 83 mode 5532 5533 -- N_Formal_Private_Type_Definition 5534 -- Sloc points to PRIVATE 5535 -- Abstract_Present (Flag4) 5536 -- Tagged_Present (Flag15) 5537 -- Limited_Present (Flag17) 5538 5539 -------------------------------------------- 5540 -- 12.5.1 Formal Derived Type Definition -- 5541 -------------------------------------------- 5542 5543 -- FORMAL_DERIVED_TYPE_DEFINITION ::= 5544 -- [abstract] new SUBTYPE_MARK [with private] 5545 5546 -- Note: this construct is not allowed in Ada 83 mode 5547 5548 -- N_Formal_Derived_Type_Definition 5549 -- Sloc points to NEW 5550 -- Subtype_Mark (Node4) 5551 -- Private_Present (Flag15) 5552 -- Abstract_Present (Flag4) 5553 5554 --------------------------------------------- 5555 -- 12.5.2 Formal Discrete Type Definition -- 5556 --------------------------------------------- 5557 5558 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>) 5559 5560 -- N_Formal_Discrete_Type_Definition 5561 -- Sloc points to ( 5562 5563 --------------------------------------------------- 5564 -- 12.5.2 Formal Signed Integer Type Definition -- 5565 --------------------------------------------------- 5566 5567 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <> 5568 5569 -- N_Formal_Signed_Integer_Type_Definition 5570 -- Sloc points to RANGE 5571 5572 -------------------------------------------- 5573 -- 12.5.2 Formal Modular Type Definition -- 5574 -------------------------------------------- 5575 5576 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <> 5577 5578 -- N_Formal_Modular_Type_Definition 5579 -- Sloc points to MOD 5580 5581 ---------------------------------------------- 5582 -- 12.5.2 Formal Floating Point Definition -- 5583 ---------------------------------------------- 5584 5585 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <> 5586 5587 -- N_Formal_Floating_Point_Definition 5588 -- Sloc points to DIGITS 5589 5590 ---------------------------------------------------- 5591 -- 12.5.2 Formal Ordinary Fixed Point Definition -- 5592 ---------------------------------------------------- 5593 5594 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <> 5595 5596 -- N_Formal_Ordinary_Fixed_Point_Definition 5597 -- Sloc points to DELTA 5598 5599 --------------------------------------------------- 5600 -- 12.5.2 Formal Decimal Fixed Point Definition -- 5601 --------------------------------------------------- 5602 5603 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <> 5604 5605 -- Note: formal decimal fixed point definition not allowed in Ada 83 5606 5607 -- N_Formal_Decimal_Fixed_Point_Definition 5608 -- Sloc points to DELTA 5609 5610 ------------------------------------------ 5611 -- 12.5.3 Formal Array Type Definition -- 5612 ------------------------------------------ 5613 5614 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION 5615 5616 ------------------------------------------- 5617 -- 12.5.4 Formal Access Type Definition -- 5618 ------------------------------------------- 5619 5620 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION 5621 5622 ----------------------------------------- 5623 -- 12.6 Formal Subprogram Declaration -- 5624 ----------------------------------------- 5625 5626 -- FORMAL_SUBPROGRAM_DECLARATION ::= 5627 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]; 5628 5629 -- N_Formal_Subprogram_Declaration 5630 -- Sloc points to WITH 5631 -- Specification (Node1) 5632 -- Default_Name (Node2) (set to Empty if no subprogram default) 5633 -- Box_Present (Flag15) 5634 5635 -- Note: if no subprogram default is present, then Name is set 5636 -- to Empty, and Box_Present is False. 5637 5638 ------------------------------ 5639 -- 12.6 Subprogram Default -- 5640 ------------------------------ 5641 5642 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <> 5643 5644 -- There is no separate node in the tree for a subprogram default. 5645 -- Instead the parent (N_Formal_Subprogram_Declaration) node contains 5646 -- the default name or box indication, as needed. 5647 5648 ------------------------ 5649 -- 12.6 Default Name -- 5650 ------------------------ 5651 5652 -- DEFAULT_NAME ::= NAME 5653 5654 -------------------------------------- 5655 -- 12.7 Formal Package Declaration -- 5656 -------------------------------------- 5657 5658 -- FORMAL_PACKAGE_DECLARATION ::= 5659 -- with package DEFINING_IDENTIFIER 5660 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART; 5661 5662 -- Note: formal package declarations not allowed in Ada 83 mode 5663 5664 -- N_Formal_Package_Declaration 5665 -- Sloc points to WITH 5666 -- Defining_Identifier (Node1) 5667 -- Name (Node2) 5668 -- Generic_Associations (List3) (set to No_List if (<>) case or 5669 -- empty generic actual part) 5670 -- Box_Present (Flag15) 5671 -- Instance_Spec (Node5-Sem) 5672 -- ABE_Is_Certain (Flag18-Sem) 5673 5674 -------------------------------------- 5675 -- 12.7 Formal Package Actual Part -- 5676 -------------------------------------- 5677 5678 -- FORMAL_PACKAGE_ACTUAL_PART ::= 5679 -- (<>) | [GENERIC_ACTUAL_PART] 5680 5681 -- There is no explicit node in the tree for a formal package 5682 -- actual part. Instead the information appears in the parent node 5683 -- (i.e. the formal package declaration node itself). 5684 5685 --------------------------------- 5686 -- 13.1 Representation clause -- 5687 --------------------------------- 5688 5689 -- REPRESENTATION_CLAUSE ::= 5690 -- ATTRIBUTE_DEFINITION_CLAUSE 5691 -- | ENUMERATION_REPRESENTATION_CLAUSE 5692 -- | RECORD_REPRESENTATION_CLAUSE 5693 -- | AT_CLAUSE 5694 5695 ---------------------- 5696 -- 13.1 Local Name -- 5697 ---------------------- 5698 5699 -- LOCAL_NAME := 5700 -- DIRECT_NAME 5701 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR 5702 -- | library_unit_NAME 5703 5704 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree 5705 -- as an attribute reference, which has essentially the same form. 5706 5707 --------------------------------------- 5708 -- 13.3 Attribute definition clause -- 5709 --------------------------------------- 5710 5711 -- ATTRIBUTE_DEFINITION_CLAUSE ::= 5712 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION; 5713 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME; 5714 5715 -- In Ada 83, the expression must be a simple expression and the 5716 -- local name must be a direct name. 5717 5718 -- Note: the only attribute definition clause that is processed by 5719 -- gigi is an address clause. For all other cases, the information 5720 -- is extracted by the front end and either results in setting entity 5721 -- information, e.g. Esize for the Size clause, or in appropriate 5722 -- expansion actions (e.g. in the case of Storage_Size). 5723 5724 -- For an address clause, Gigi constructs the appropriate addressing 5725 -- code. It also ensures that no aliasing optimizations are made 5726 -- for the object for which the address clause appears. 5727 5728 -- Note: for an address clause used to achieve an overlay: 5729 5730 -- A : Integer; 5731 -- B : Integer; 5732 -- for B'Address use A'Address; 5733 5734 -- the above rule means that Gigi will ensure that no optimizations 5735 -- will be made for B that would violate the implementation advice 5736 -- of RM 13.3(19). However, this advice applies only to B and not 5737 -- to A, which seems unfortunate. The GNAT front end will mark the 5738 -- object A as volatile to also prevent unwanted optimization 5739 -- assumptions based on no aliasing being made for B. 5740 5741 -- N_Attribute_Definition_Clause 5742 -- Sloc points to FOR 5743 -- Name (Node2) the local name 5744 -- Chars (Name1) the identifier name from the attribute designator 5745 -- Expression (Node3) the expression or name 5746 -- Next_Rep_Item (Node4-Sem) 5747 -- From_At_Mod (Flag4-Sem) 5748 -- Check_Address_Alignment (Flag11-Sem) 5749 5750 --------------------------------------------- 5751 -- 13.4 Enumeration representation clause -- 5752 --------------------------------------------- 5753 5754 -- ENUMERATION_REPRESENTATION_CLAUSE ::= 5755 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE; 5756 5757 -- In Ada 83, the name must be a direct name 5758 5759 -- N_Enumeration_Representation_Clause 5760 -- Sloc points to FOR 5761 -- Identifier (Node1) direct name 5762 -- Array_Aggregate (Node3) 5763 -- Next_Rep_Item (Node4-Sem) 5764 5765 --------------------------------- 5766 -- 13.4 Enumeration aggregate -- 5767 --------------------------------- 5768 5769 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE 5770 5771 ------------------------------------------ 5772 -- 13.5.1 Record representation clause -- 5773 ------------------------------------------ 5774 5775 -- RECORD_REPRESENTATION_CLAUSE ::= 5776 -- for first_subtype_LOCAL_NAME use 5777 -- record [MOD_CLAUSE] 5778 -- {COMPONENT_CLAUSE} 5779 -- end record; 5780 5781 -- Gigi restriction: Mod_Clause is always Empty (if present it is 5782 -- replaced by a corresponding Alignment attribute definition clause). 5783 5784 -- Note: Component_Clauses can include pragmas 5785 5786 -- N_Record_Representation_Clause 5787 -- Sloc points to FOR 5788 -- Identifier (Node1) direct name 5789 -- Mod_Clause (Node2) (set to Empty if no mod clause present) 5790 -- Component_Clauses (List3) 5791 -- Next_Rep_Item (Node4-Sem) 5792 5793 ------------------------------ 5794 -- 13.5.1 Component clause -- 5795 ------------------------------ 5796 5797 -- COMPONENT_CLAUSE ::= 5798 -- component_LOCAL_NAME at POSITION 5799 -- range FIRST_BIT .. LAST_BIT; 5800 5801 -- N_Component_Clause 5802 -- Sloc points to AT 5803 -- Component_Name (Node1) points to Name or Attribute_Reference 5804 -- Position (Node2) 5805 -- First_Bit (Node3) 5806 -- Last_Bit (Node4) 5807 5808 ---------------------- 5809 -- 13.5.1 Position -- 5810 ---------------------- 5811 5812 -- POSITION ::= static_EXPRESSION 5813 5814 ----------------------- 5815 -- 13.5.1 First_Bit -- 5816 ----------------------- 5817 5818 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION 5819 5820 ---------------------- 5821 -- 13.5.1 Last_Bit -- 5822 ---------------------- 5823 5824 -- LAST_BIT ::= static_SIMPLE_EXPRESSION 5825 5826 -------------------------- 5827 -- 13.8 Code statement -- 5828 -------------------------- 5829 5830 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION; 5831 5832 -- Note: in GNAT, the qualified expression has the form 5833 5834 -- Asm_Insn'(Asm (...)); 5835 5836 -- or 5837 5838 -- Asm_Insn'(Asm_Volatile (...)) 5839 5840 -- See package System.Machine_Code in file s-maccod.ads for details 5841 -- on the allowed parameters to Asm[_Volatile]. There are two ways 5842 -- this node can arise, as a code statement, in which case the 5843 -- expression is the qualified expression, or as a result of the 5844 -- expansion of an intrinsic call to the Asm or Asm_Input procedure. 5845 5846 -- N_Code_Statement 5847 -- Sloc points to first token of the expression 5848 -- Expression (Node3) 5849 5850 -- Note: package Exp_Code contains an abstract functional interface 5851 -- for use by Gigi in accessing the data from N_Code_Statement nodes. 5852 5853 ------------------------ 5854 -- 13.12 Restriction -- 5855 ------------------------ 5856 5857 -- RESTRICTION ::= 5858 -- restriction_IDENTIFIER 5859 -- | restriction_parameter_IDENTIFIER => EXPRESSION 5860 5861 -- There is no explicit node for restrictions. Instead the restriction 5862 -- appears in normal pragma syntax as a pragma argument association, 5863 -- which has the same syntactic form. 5864 5865 -------------------------- 5866 -- B.2 Shift Operators -- 5867 -------------------------- 5868 5869 -- Calls to the intrinsic shift functions are converted to one of 5870 -- the following shift nodes, which have the form of normal binary 5871 -- operator names. Note that for a given shift operation, one node 5872 -- covers all possible types, as for normal operators. 5873 5874 -- Note: it is perfectly permissible for the expander to generate 5875 -- shift operation nodes directly, in which case they will be analyzed 5876 -- and parsed in the usual manner. 5877 5878 -- Sprint syntax: shift-function-name!(expr, count) 5879 5880 -- Note: the Left_Opnd field holds the first argument (the value to 5881 -- be shifted). The Right_Opnd field holds the second argument (the 5882 -- shift count). The Chars field is the name of the intrinsic function. 5883 5884 -- N_Op_Rotate_Left 5885 -- Sloc points to the function name 5886 -- plus fields for binary operator 5887 -- plus fields for expression 5888 -- Shift_Count_OK (Flag4-Sem) 5889 5890 -- N_Op_Rotate_Right 5891 -- Sloc points to the function name 5892 -- plus fields for binary operator 5893 -- plus fields for expression 5894 -- Shift_Count_OK (Flag4-Sem) 5895 5896 -- N_Op_Shift_Left 5897 -- Sloc points to the function name 5898 -- plus fields for binary operator 5899 -- plus fields for expression 5900 -- Shift_Count_OK (Flag4-Sem) 5901 5902 -- N_Op_Shift_Right_Arithmetic 5903 -- Sloc points to the function name 5904 -- plus fields for binary operator 5905 -- plus fields for expression 5906 -- Shift_Count_OK (Flag4-Sem) 5907 5908 -- N_Op_Shift_Right 5909 -- Sloc points to the function name 5910 -- plus fields for binary operator 5911 -- plus fields for expression 5912 -- Shift_Count_OK (Flag4-Sem) 5913 5914 -------------------------- 5915 -- Obsolescent Features -- 5916 -------------------------- 5917 5918 -- The syntax descriptions and tree nodes for obsolescent features are 5919 -- grouped together, corresponding to their location in appendix I in 5920 -- the RM. However, parsing and semantic analysis for these constructs 5921 -- is located in an appropriate chapter (see individual notes). 5922 5923 --------------------------- 5924 -- J.3 Delta Constraint -- 5925 --------------------------- 5926 5927 -- Note: the parse routine for this construct is located in section 5928 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is 5929 -- where delta constraint logically belongs. 5930 5931 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT] 5932 5933 -- N_Delta_Constraint 5934 -- Sloc points to DELTA 5935 -- Delta_Expression (Node3) 5936 -- Range_Constraint (Node4) (set to Empty if not present) 5937 5938 -------------------- 5939 -- J.7 At Clause -- 5940 -------------------- 5941 5942 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION; 5943 5944 -- Note: the parse routine for this construct is located in Par-Ch13, 5945 -- and the semantic analysis is in Sem_Ch13, where at clause logically 5946 -- belongs if it were not obsolescent. 5947 5948 -- Note: in Ada 83 the expression must be a simple expression 5949 5950 -- Gigi restriction: This node never appears, it is rewritten as an 5951 -- address attribute definition clause. 5952 5953 -- N_At_Clause 5954 -- Sloc points to FOR 5955 -- Identifier (Node1) 5956 -- Expression (Node3) 5957 5958 --------------------- 5959 -- J.8 Mod clause -- 5960 --------------------- 5961 5962 -- MOD_CLAUSE ::= at mod static_EXPRESSION; 5963 5964 -- Note: the parse routine for this construct is located in Par-Ch13, 5965 -- and the semantic analysis is in Sem_Ch13, where mod clause logically 5966 -- belongs if it were not obsolescent. 5967 5968 -- Note: in Ada 83, the expression must be a simple expression 5969 5970 -- Gigi restriction: this node never appears. It is replaced 5971 -- by a corresponding Alignment attribute definition clause. 5972 5973 -- Note: pragmas can appear before and after the MOD_CLAUSE since 5974 -- its name has "clause" in it. This is rather strange, but is quite 5975 -- definitely specified. The pragmas before are collected in the 5976 -- Pragmas_Before field of the mod clause node itself, and pragmas 5977 -- after are simply swallowed up in the list of component clauses. 5978 5979 -- N_Mod_Clause 5980 -- Sloc points to AT 5981 -- Expression (Node3) 5982 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none) 5983 5984 -------------------- 5985 -- Semantic Nodes -- 5986 -------------------- 5987 5988 -- These semantic nodes are used to hold additional semantic information. 5989 -- They are inserted into the tree as a result of semantic processing. 5990 -- Although there are no legitimate source syntax constructions that 5991 -- correspond directly to these nodes, we need a source syntax for the 5992 -- reconstructed tree printed by Sprint, and the node descriptions here 5993 -- show this syntax. 5994 5995 ---------------------------- 5996 -- Conditional Expression -- 5997 ---------------------------- 5998 5999 -- This node is used to represent an expression corresponding to the 6000 -- C construct (condition ? then-expression : else_expression), where 6001 -- Expressions is a three element list, whose first expression is the 6002 -- condition, and whose second and third expressions are the then and 6003 -- else expressions respectively. 6004 6005 -- Note: the Then_Actions and Else_Actions fields are always set to 6006 -- No_List in the tree passed to Gigi. These fields are used only 6007 -- for temporary processing purposes in the expander. 6008 6009 -- Sprint syntax: (if expr then expr else expr) 6010 6011 -- N_Conditional_Expression 6012 -- Sloc points to related node 6013 -- Expressions (List1) 6014 -- Then_Actions (List2-Sem) 6015 -- Else_Actions (List3-Sem) 6016 -- plus fields for expression 6017 6018 -- Note: in the case where a debug source file is generated, the Sloc 6019 -- for this node points to the IF keyword in the Sprint file output. 6020 6021 ------------------- 6022 -- Expanded_Name -- 6023 ------------------- 6024 6025 -- The N_Expanded_Name node is used to represent a selected component 6026 -- name that has been resolved to an expanded name. The semantic phase 6027 -- replaces N_Selected_Component nodes that represent names by the use 6028 -- of this node, leaving the N_Selected_Component node used only when 6029 -- the prefix is a record or protected type. 6030 6031 -- The fields of the N_Expanded_Name node are layed out identically 6032 -- to those of the N_Selected_Component node, allowing conversion of 6033 -- an expanded name node to a selected component node to be done 6034 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name. 6035 6036 -- There is no special sprint syntax for an expanded name. 6037 6038 -- N_Expanded_Name 6039 -- Sloc points to the period 6040 -- Chars (Name1) copy of Chars field of selector name 6041 -- Prefix (Node3) 6042 -- Selector_Name (Node2) 6043 -- Entity (Node4-Sem) 6044 -- Associated_Node (Node4-Sem) 6045 -- Redundant_Use (Flag13-Sem) 6046 -- Has_Private_View (Flag11-Sem) set in generic units. 6047 -- plus fields for expression 6048 6049 -------------------- 6050 -- Free Statement -- 6051 -------------------- 6052 6053 -- The N_Free_Statement node is generated as a result of a call to an 6054 -- instantiation of Unchecked_Deallocation. The instantiation of this 6055 -- generic is handled specially and generates this node directly. 6056 6057 -- Sprint syntax: free expression 6058 6059 -- N_Free_Statement 6060 -- Sloc is copied from the unchecked deallocation call 6061 -- Expression (Node3) argument to unchecked deallocation call 6062 -- Storage_Pool (Node1-Sem) 6063 -- Procedure_To_Call (Node4-Sem) 6064 6065 -- Note: in the case where a debug source file is generated, the Sloc 6066 -- for this node points to the FREE keyword in the Sprint file output. 6067 6068 ------------------- 6069 -- Freeze Entity -- 6070 ------------------- 6071 6072 -- This node marks the point in a declarative part at which an entity 6073 -- declared therein becomes frozen. The expander places initialization 6074 -- procedures for types at those points. Gigi uses the freezing point 6075 -- to elaborate entities that may depend on previous private types. 6076 6077 -- See the section in Einfo "Delayed Freezing and Elaboration" for 6078 -- a full description of the use of this node. 6079 6080 -- The Entity field points back to the entity for the type (whose 6081 -- Freeze_Node field points back to this freeze node). 6082 6083 -- The Actions field contains a list of declarations and statements 6084 -- generated by the expander which are associated with the freeze 6085 -- node, and are elaborated as though the freeze node were replaced 6086 -- by this sequence of actions. 6087 6088 -- Note: the Sloc field in the freeze node references a construct 6089 -- associated with the freezing point. This is used for posting 6090 -- messages in some error/warning situations, e.g. the case where 6091 -- a primitive operation of a tagged type is declared too late. 6092 6093 -- Sprint syntax: freeze entity-name [ 6094 -- freeze actions 6095 -- ] 6096 6097 -- N_Freeze_Entity 6098 -- Sloc points near freeze point (see above special note) 6099 -- Entity (Node4-Sem) 6100 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none) 6101 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's) 6102 -- Actions (List1) (set to No_List if no freeze actions) 6103 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link) 6104 6105 -- The Actions field holds actions associated with the freeze. These 6106 -- actions are elaborated at the point where the type is frozen. 6107 6108 -- Note: in the case where a debug source file is generated, the Sloc 6109 -- for this node points to the FREEZE keyword in the Sprint file output. 6110 6111 -------------------------------- 6112 -- Implicit Label Declaration -- 6113 -------------------------------- 6114 6115 -- An implicit label declaration is created for every occurrence of a 6116 -- label on a statement or a label on a block or loop. It is chained 6117 -- in the declarations of the innermost enclosing block as specified 6118 -- in RM section 5.1 (3). 6119 6120 -- The Defining_Identifier is the actual identifier for the 6121 -- statement identifier. Note that the occurrence of the label 6122 -- is a reference, NOT the defining occurrence. The defining 6123 -- occurrence occurs at the head of the innermost enclosing 6124 -- block, and is represented by this node. 6125 6126 -- Note: from the grammar, this might better be called an implicit 6127 -- statement identifier declaration, but the term we choose seems 6128 -- friendlier, since at least informally statement identifiers are 6129 -- called labels in both cases (i.e. when used in labels, and when 6130 -- used as the identifiers of blocks and loops). 6131 6132 -- Note: although this is logically a semantic node, since it does 6133 -- not correspond directly to a source syntax construction, these 6134 -- nodes are actually created by the parser in a post pass done just 6135 -- after parsing is complete, before semantic analysis is started (see 6136 -- the Par.Labl subunit in file par-labl.adb). 6137 6138 -- Sprint syntax: labelname : label; 6139 6140 -- N_Implicit_Label_Declaration 6141 -- Sloc points to the << of the label 6142 -- Defining_Identifier (Node1) 6143 -- Label_Construct (Node2-Sem) 6144 6145 -- Note: in the case where a debug source file is generated, the Sloc 6146 -- for this node points to the label name in the generated declaration. 6147 6148 --------------------- 6149 -- Itype_Reference -- 6150 --------------------- 6151 6152 -- This node is used to create a reference to an Itype. The only 6153 -- purpose is to make sure that the Itype is defined if this is the 6154 -- first reference. 6155 6156 -- A typical use of this node is when an Itype is to be referenced in 6157 -- two branches of an if statement. In this case it is important that 6158 -- the first use of the Itype not be inside the conditional, since 6159 -- then it might not be defined if the wrong branch of the if is 6160 -- taken in the case where the definition generates elaboration code. 6161 6162 -- The Itype field points to the referenced Itype 6163 6164 -- sprint syntax: reference itype-name 6165 6166 -- N_Itype_Reference 6167 -- Sloc points to the node generating the reference 6168 -- Itype (Node1-Sem) 6169 6170 -- Note: in the case where a debug source file is generated, the Sloc 6171 -- for this node points to the REFERENCE keyword in the file output. 6172 6173 --------------------- 6174 -- Raise_xxx_Error -- 6175 --------------------- 6176 6177 -- One of these nodes is created during semantic analysis to replace 6178 -- a node for an expression that is determined to definitely raise 6179 -- the corresponding exception. 6180 6181 -- The N_Raise_xxx_Error node may also stand alone in place 6182 -- of a declaration or statement, in which case it simply causes 6183 -- the exception to be raised (i.e. it is equivalent to a raise 6184 -- statement that raises the corresponding exception). This use 6185 -- is distinguished by the fact that the Etype in this case is 6186 -- Standard_Void_Type, In the subexprssion case, the Etype is the 6187 -- same as the type of the subexpression which it replaces. 6188 6189 -- If Condition is empty, then the raise is unconditional. If the 6190 -- Condition field is non-empty, it is a boolean expression which 6191 -- is first evaluated, and the exception is raised only if the 6192 -- value of the expression is True. In the unconditional case, the 6193 -- creation of this node is usually accompanied by a warning message 6194 -- error. The creation of this node will usually be accompanied by a 6195 -- message (unless it appears within the right operand of a short 6196 -- circuit form whose left argument is static and decisively 6197 -- eliminates elaboration of the raise operation. 6198 6199 -- The exception is generated with a message that contains the 6200 -- file name and line number, and then appended text. The Reason 6201 -- code shows the text to be added. The Reason code is an element 6202 -- of the type Types.RT_Exception_Code, and indicates both the 6203 -- message to be added, and the exception to be raised (which must 6204 -- match the node type). The value is stored by storing a Uint which 6205 -- is the Pos value of the enumeration element in this type. 6206 6207 -- Gigi restriction: This expander ensures that the type of the 6208 -- Condition field is always Standard.Boolean, even if the type 6209 -- in the source is some non-standard boolean type. 6210 6211 -- Sprint syntax: [xxx_error "msg"] 6212 -- or: [xxx_error when condition "msg"] 6213 6214 -- N_Raise_Constraint_Error 6215 -- Sloc references related construct 6216 -- Condition (Node1) (set to Empty if no condition) 6217 -- Reason (Uint3) 6218 -- plus fields for expression 6219 6220 -- N_Raise_Program_Error 6221 -- Sloc references related construct 6222 -- Condition (Node1) (set to Empty if no condition) 6223 -- Reason (Uint3) 6224 -- plus fields for expression 6225 6226 -- N_Raise_Storage_Error 6227 -- Sloc references related construct 6228 -- Condition (Node1) (set to Empty if no condition) 6229 -- Reason (Uint3) 6230 -- plus fields for expression 6231 6232 -- Note: Sloc is copied from the expression generating the exception. 6233 -- In the case where a debug source file is generated, the Sloc for 6234 -- this node points to the left bracket in the Sprint file output. 6235 6236 --------------- 6237 -- Reference -- 6238 --------------- 6239 6240 -- For a number of purposes, we need to construct references to objects. 6241 -- These references are subsequently treated as normal access values. 6242 -- An example is the construction of the parameter block passed to a 6243 -- task entry. The N_Reference node is provided for this purpose. It is 6244 -- similar in effect to the use of the Unrestricted_Access attribute, 6245 -- and like Unrestricted_Access can be applied to objects which would 6246 -- not be valid prefixes for the Unchecked_Access attribute (e.g. 6247 -- objects which are not aliased, and slices). In addition it can be 6248 -- applied to composite type values as well as objects, including string 6249 -- values and aggregates. 6250 6251 -- Note: we use the Prefix field for this expression so that the 6252 -- resulting node can be treated using common code with the attribute 6253 -- nodes for the 'Access and related attributes. Logically it would make 6254 -- more sense to call it an Expression field, but then we would have to 6255 -- special case the treatment of the N_Reference node. 6256 6257 -- Sprint syntax: prefix'reference 6258 6259 -- N_Reference 6260 -- Sloc is copied from the expression 6261 -- Prefix (Node3) 6262 -- plus fields for expression 6263 6264 -- Note: in the case where a debug source file is generated, the Sloc 6265 -- for this node points to the quote in the Sprint file output. 6266 6267 --------------------- 6268 -- Subprogram_Info -- 6269 --------------------- 6270 6271 -- This node generates the appropriate Subprogram_Info value for a 6272 -- given procedure. See Ada.Exceptions for further details 6273 6274 -- Sprint syntax: subprog'subprogram_info 6275 6276 -- N_Subprogram_Info 6277 -- Sloc points to the entity for the procedure 6278 -- Identifier (Node1) identifier referencing the procedure 6279 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc 6280 6281 -- Note: in the case where a debug source file is generated, the Sloc 6282 -- for this node points to the quote in the Sprint file output. 6283 6284 -------------------------- 6285 -- Unchecked Expression -- 6286 -------------------------- 6287 6288 -- An unchecked expression is one that must be analyzed and resolved 6289 -- with all checks off, regardless of the current setting of scope 6290 -- suppress flags. 6291 6292 -- Sprint syntax: `(expression). 6293 6294 -- Note: this node is always removed from the tree (and replaced by 6295 -- its constituent expression) on completion of analysis, so it only 6296 -- appears in intermediate trees, and will never be seen by Gigi. 6297 6298 -- N_Unchecked_Expression 6299 -- Sloc is a copy of the Sloc of the expression 6300 -- Expression (Node3) 6301 -- plus fields for expression 6302 6303 -- Note: in the case where a debug source file is generated, the Sloc 6304 -- for this node points to the back quote in the Sprint file output. 6305 6306 ------------------------------- 6307 -- Unchecked Type Conversion -- 6308 ------------------------------- 6309 6310 -- An unchecked type conversion node represents the semantic action 6311 -- corresponding to a call to an instantiation of Unchecked_Conversion. 6312 -- It is generated as a result of actual use of Unchecked_Conversion 6313 -- and also the expander generates unchecked type conversion nodes 6314 -- directly for expansion of complex semantic actions. 6315 6316 -- Note: an unchecked type conversion is a variable as far as the 6317 -- semantics are concerned, which is convenient for the expander. 6318 -- This does not change what Ada source programs are legal, since 6319 -- clearly a function call to an instantiation of Unchecked_Conversion 6320 -- is not a variable in any case. 6321 6322 -- Sprint syntax: subtype-mark!(expression). 6323 6324 -- N_Unchecked_Type_Conversion 6325 -- Sloc points to related node in source 6326 -- Subtype_Mark (Node4) 6327 -- Expression (Node3) 6328 -- Kill_Range_Check (Flag11-Sem) 6329 -- No_Truncation (Flag17-Sem) 6330 -- plus fields for expression 6331 6332 -- Note: in the case where a debug source file is generated, the Sloc 6333 -- for this node points to the exclamation in the Sprint file output. 6334 6335 ----------------------------------- 6336 -- Validate_Unchecked_Conversion -- 6337 ----------------------------------- 6338 6339 -- The front end does most of the validation of unchecked conversion, 6340 -- including checking sizes (this is done after the back end is called 6341 -- to take advantage of back-annotation of calculated sizes). 6342 6343 -- The front end also deals with specific cases that are not allowed 6344 -- e.g. involving unconstrained array types. 6345 6346 -- For the case of the standard gigi backend, this means that all 6347 -- checks are done in the front-end. 6348 6349 -- However, in the case of specialized back-ends, notably the JVM 6350 -- backend for JGNAT, additional requirements and restrictions apply 6351 -- to unchecked conversion, and these are most conveniently performed 6352 -- in the specialized back-end. 6353 6354 -- To accommodate this requirement, for such back ends, the following 6355 -- special node is generated recording an unchecked conversion that 6356 -- needs to be validated. The back end should post an appropriate 6357 -- error message if the unchecked conversion is invalid or warrants 6358 -- a special warning message. 6359 6360 -- Source_Type and Target_Type point to the entities for the two 6361 -- types involved in the unchecked conversion instantiation that 6362 -- is to be validated. 6363 6364 -- Sprint syntax: validate Unchecked_Conversion (source, target); 6365 6366 -- N_Validate_Unchecked_Conversion 6367 -- Sloc points to instantiation (location for warning message) 6368 -- Source_Type (Node1-Sem) 6369 -- Target_Type (Node2-Sem) 6370 6371 -- Note: in the case where a debug source file is generated, the Sloc 6372 -- for this node points to the VALIDATE keyword in the file output. 6373 6374 ----------- 6375 -- Empty -- 6376 ----------- 6377 6378 -- Used as the contents of the Nkind field of the dummy Empty node 6379 -- and in some other situations to indicate an uninitialized value. 6380 6381 -- N_Empty 6382 -- Chars (Name1) is set to No_Name 6383 6384 ----------- 6385 -- Error -- 6386 ----------- 6387 6388 -- Used as the contents of the Nkind field of the dummy Error node. 6389 -- Has an Etype field, which gets set to Any_Type later on, to help 6390 -- error recovery (Error_Posted is also set in the Error node). 6391 6392 -- N_Error 6393 -- Chars (Name1) is set to Error_Name 6394 -- Etype (Node5-Sem) 6395 6396 -------------------------- 6397 -- Node Type Definition -- 6398 -------------------------- 6399 6400 -- The following is the definition of the Node_Kind type. As previously 6401 -- discussed, this is separated off to allow rearrangement of the order 6402 -- to facilitiate definition of subtype ranges. The comments show the 6403 -- subtype classes which apply to each set of node kinds. The first 6404 -- entry in the comment characterizes the following list of nodes. 6405 6406 type Node_Kind is ( 6407 N_Unused_At_Start, 6408 6409 -- N_Representation_Clause 6410 N_At_Clause, 6411 N_Component_Clause, 6412 N_Enumeration_Representation_Clause, 6413 N_Mod_Clause, 6414 N_Record_Representation_Clause, 6415 6416 -- N_Representation_Clause, N_Has_Chars 6417 N_Attribute_Definition_Clause, 6418 6419 -- N_Has_Chars 6420 N_Empty, 6421 N_Pragma, 6422 N_Pragma_Argument_Association, 6423 6424 -- N_Has_Etype 6425 N_Error, 6426 6427 -- N_Entity, N_Has_Etype, N_Has_Chars 6428 N_Defining_Character_Literal, 6429 N_Defining_Identifier, 6430 N_Defining_Operator_Symbol, 6431 6432 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity 6433 N_Expanded_Name, 6434 6435 -- N_Direct_Name, N_Subexpr, N_Has_Etype, 6436 -- N_Has_Chars, N_Has_Entity 6437 N_Identifier, 6438 N_Operator_Symbol, 6439 6440 -- N_Direct_Name, N_Subexpr, N_Has_Etype, 6441 -- N_Has_Chars, N_Has_Entity 6442 N_Character_Literal, 6443 6444 -- N_Binary_Op, N_Op, N_Subexpr, 6445 -- N_Has_Etype, N_Has_Chars, N_Has_Entity 6446 N_Op_Add, 6447 N_Op_Concat, 6448 N_Op_Expon, 6449 N_Op_Subtract, 6450 6451 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer 6452 -- N_Has_Etype, N_Has_Chars, N_Has_Entity 6453 6454 N_Op_Divide, 6455 N_Op_Mod, 6456 N_Op_Multiply, 6457 N_Op_Rem, 6458 6459 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype 6460 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean 6461 N_Op_And, 6462 6463 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype 6464 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, 6465 -- N_Op_Compare 6466 N_Op_Eq, 6467 N_Op_Ge, 6468 N_Op_Gt, 6469 N_Op_Le, 6470 N_Op_Lt, 6471 N_Op_Ne, 6472 6473 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype 6474 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean 6475 N_Op_Or, 6476 N_Op_Xor, 6477 6478 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype, 6479 -- N_Op_Shift, N_Has_Chars, N_Has_Entity 6480 N_Op_Rotate_Left, 6481 N_Op_Rotate_Right, 6482 N_Op_Shift_Left, 6483 N_Op_Shift_Right, 6484 N_Op_Shift_Right_Arithmetic, 6485 6486 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype, 6487 -- N_Has_Chars, N_Has_Entity 6488 N_Op_Abs, 6489 N_Op_Minus, 6490 N_Op_Not, 6491 N_Op_Plus, 6492 6493 -- N_Subexpr, N_Has_Etype, N_Has_Entity 6494 N_Attribute_Reference, 6495 6496 -- N_Subexpr, N_Has_Etype 6497 N_And_Then, 6498 N_Conditional_Expression, 6499 N_Explicit_Dereference, 6500 N_Function_Call, 6501 N_In, 6502 N_Indexed_Component, 6503 N_Integer_Literal, 6504 N_Not_In, 6505 N_Null, 6506 N_Or_Else, 6507 N_Procedure_Call_Statement, 6508 N_Qualified_Expression, 6509 6510 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype 6511 6512 N_Raise_Constraint_Error, 6513 N_Raise_Program_Error, 6514 N_Raise_Storage_Error, 6515 6516 -- N_Subexpr, N_Has_Etype 6517 6518 N_Aggregate, 6519 N_Allocator, 6520 N_Extension_Aggregate, 6521 N_Range, 6522 N_Real_Literal, 6523 N_Reference, 6524 N_Selected_Component, 6525 N_Slice, 6526 N_String_Literal, 6527 N_Subprogram_Info, 6528 N_Type_Conversion, 6529 N_Unchecked_Expression, 6530 N_Unchecked_Type_Conversion, 6531 6532 -- N_Has_Etype 6533 N_Subtype_Indication, 6534 6535 -- N_Declaration 6536 N_Component_Declaration, 6537 N_Entry_Declaration, 6538 N_Formal_Object_Declaration, 6539 N_Formal_Type_Declaration, 6540 N_Full_Type_Declaration, 6541 N_Incomplete_Type_Declaration, 6542 N_Loop_Parameter_Specification, 6543 N_Object_Declaration, 6544 N_Protected_Type_Declaration, 6545 N_Private_Extension_Declaration, 6546 N_Private_Type_Declaration, 6547 N_Subtype_Declaration, 6548 6549 -- N_Subprogram_Specification, N_Declaration 6550 N_Function_Specification, 6551 N_Procedure_Specification, 6552 6553 -- (nothing special) 6554 N_Entry_Index_Specification, 6555 N_Freeze_Entity, 6556 6557 -- N_Access_To_Subprogram_Definition 6558 N_Access_Function_Definition, 6559 N_Access_Procedure_Definition, 6560 6561 -- N_Later_Decl_Item, 6562 N_Task_Type_Declaration, 6563 6564 -- N_Body_Stub, N_Later_Decl_Item 6565 N_Package_Body_Stub, 6566 N_Protected_Body_Stub, 6567 N_Subprogram_Body_Stub, 6568 N_Task_Body_Stub, 6569 6570 -- N_Generic_Instantiation, N_Later_Decl_Item 6571 N_Function_Instantiation, 6572 N_Package_Instantiation, 6573 N_Procedure_Instantiation, 6574 6575 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body 6576 N_Package_Body, 6577 N_Subprogram_Body, 6578 6579 -- N_Later_Decl_Item, N_Proper_Body 6580 N_Protected_Body, 6581 N_Task_Body, 6582 6583 -- N_Later_Decl_Item 6584 N_Implicit_Label_Declaration, 6585 N_Package_Declaration, 6586 N_Single_Task_Declaration, 6587 N_Subprogram_Declaration, 6588 N_Use_Package_Clause, 6589 6590 -- N_Generic_Declaration, N_Later_Decl_Item 6591 N_Generic_Package_Declaration, 6592 N_Generic_Subprogram_Declaration, 6593 6594 -- N_Array_Type_Definition 6595 N_Constrained_Array_Definition, 6596 N_Unconstrained_Array_Definition, 6597 6598 -- N_Renaming_Declaration 6599 N_Exception_Renaming_Declaration, 6600 N_Object_Renaming_Declaration, 6601 N_Package_Renaming_Declaration, 6602 N_Subprogram_Renaming_Declaration, 6603 6604 -- N_Generic_Renaming_Declarations, N_Renaming_Declaration 6605 N_Generic_Function_Renaming_Declaration, 6606 N_Generic_Package_Renaming_Declaration, 6607 N_Generic_Procedure_Renaming_Declaration, 6608 6609 -- N_Statement_Other_Than_Procedure_Call 6610 N_Abort_Statement, 6611 N_Accept_Statement, 6612 N_Assignment_Statement, 6613 N_Asynchronous_Select, 6614 N_Block_Statement, 6615 N_Case_Statement, 6616 N_Code_Statement, 6617 N_Conditional_Entry_Call, 6618 N_Delay_Relative_Statement, 6619 N_Delay_Until_Statement, 6620 N_Entry_Call_Statement, 6621 N_Free_Statement, 6622 N_Goto_Statement, 6623 N_Loop_Statement, 6624 N_Null_Statement, 6625 N_Raise_Statement, 6626 N_Requeue_Statement, 6627 N_Return_Statement, 6628 N_Selective_Accept, 6629 N_Timed_Entry_Call, 6630 6631 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition 6632 N_Exit_Statement, 6633 N_If_Statement, 6634 6635 -- N_Has_Condition 6636 N_Accept_Alternative, 6637 N_Delay_Alternative, 6638 N_Elsif_Part, 6639 N_Entry_Body_Formal_Part, 6640 N_Iteration_Scheme, 6641 N_Terminate_Alternative, 6642 6643 -- Other nodes (not part of any subtype class) 6644 N_Abortable_Part, 6645 N_Abstract_Subprogram_Declaration, 6646 N_Access_Definition, 6647 N_Access_To_Object_Definition, 6648 N_Case_Statement_Alternative, 6649 N_Compilation_Unit, 6650 N_Compilation_Unit_Aux, 6651 N_Component_Association, 6652 N_Component_Definition, 6653 N_Component_List, 6654 N_Derived_Type_Definition, 6655 N_Decimal_Fixed_Point_Definition, 6656 N_Defining_Program_Unit_Name, 6657 N_Delta_Constraint, 6658 N_Designator, 6659 N_Digits_Constraint, 6660 N_Discriminant_Association, 6661 N_Discriminant_Specification, 6662 N_Enumeration_Type_Definition, 6663 N_Entry_Body, 6664 N_Entry_Call_Alternative, 6665 N_Exception_Declaration, 6666 N_Exception_Handler, 6667 N_Floating_Point_Definition, 6668 N_Formal_Decimal_Fixed_Point_Definition, 6669 N_Formal_Derived_Type_Definition, 6670 N_Formal_Discrete_Type_Definition, 6671 N_Formal_Floating_Point_Definition, 6672 N_Formal_Modular_Type_Definition, 6673 N_Formal_Ordinary_Fixed_Point_Definition, 6674 N_Formal_Package_Declaration, 6675 N_Formal_Private_Type_Definition, 6676 N_Formal_Signed_Integer_Type_Definition, 6677 N_Formal_Subprogram_Declaration, 6678 N_Generic_Association, 6679 N_Handled_Sequence_Of_Statements, 6680 N_Index_Or_Discriminant_Constraint, 6681 N_Itype_Reference, 6682 N_Label, 6683 N_Modular_Type_Definition, 6684 N_Number_Declaration, 6685 N_Ordinary_Fixed_Point_Definition, 6686 N_Others_Choice, 6687 N_Package_Specification, 6688 N_Parameter_Association, 6689 N_Parameter_Specification, 6690 N_Protected_Definition, 6691 N_Range_Constraint, 6692 N_Real_Range_Specification, 6693 N_Record_Definition, 6694 N_Signed_Integer_Type_Definition, 6695 N_Single_Protected_Declaration, 6696 N_Subunit, 6697 N_Task_Definition, 6698 N_Triggering_Alternative, 6699 N_Use_Type_Clause, 6700 N_Validate_Unchecked_Conversion, 6701 N_Variant, 6702 N_Variant_Part, 6703 N_With_Clause, 6704 N_With_Type_Clause, 6705 N_Unused_At_End); 6706 6707 for Node_Kind'Size use 8; 6708 -- The data structures in Atree assume this! 6709 6710 ---------------------------- 6711 -- Node Class Definitions -- 6712 ---------------------------- 6713 6714 subtype N_Access_To_Subprogram_Definition is Node_Kind range 6715 N_Access_Function_Definition .. 6716 N_Access_Procedure_Definition; 6717 6718 subtype N_Array_Type_Definition is Node_Kind range 6719 N_Constrained_Array_Definition .. 6720 N_Unconstrained_Array_Definition; 6721 6722 subtype N_Binary_Op is Node_Kind range 6723 N_Op_Add .. 6724 N_Op_Shift_Right_Arithmetic; 6725 6726 subtype N_Body_Stub is Node_Kind range 6727 N_Package_Body_Stub .. 6728 N_Task_Body_Stub; 6729 6730 subtype N_Declaration is Node_Kind range 6731 N_Component_Declaration .. 6732 N_Procedure_Specification; 6733 -- Note: this includes all constructs normally thought of as declarations 6734 -- except those which are separately grouped as later declarations. 6735 6736 subtype N_Direct_Name is Node_Kind range 6737 N_Identifier .. 6738 N_Character_Literal; 6739 6740 subtype N_Entity is Node_Kind range 6741 N_Defining_Character_Literal .. 6742 N_Defining_Operator_Symbol; 6743 6744 subtype N_Generic_Declaration is Node_Kind range 6745 N_Generic_Package_Declaration .. 6746 N_Generic_Subprogram_Declaration; 6747 6748 subtype N_Generic_Instantiation is Node_Kind range 6749 N_Function_Instantiation .. 6750 N_Procedure_Instantiation; 6751 6752 subtype N_Generic_Renaming_Declaration is Node_Kind range 6753 N_Generic_Function_Renaming_Declaration .. 6754 N_Generic_Procedure_Renaming_Declaration; 6755 6756 subtype N_Has_Chars is Node_Kind range 6757 N_Attribute_Definition_Clause .. 6758 N_Op_Plus; 6759 6760 subtype N_Has_Entity is Node_Kind range 6761 N_Expanded_Name .. 6762 N_Attribute_Reference; 6763 -- Nodes that have Entity fields 6764 -- Warning: DOES NOT INCLUDE N_Freeze_Entity! 6765 6766 subtype N_Has_Etype is Node_Kind range 6767 N_Error .. 6768 N_Subtype_Indication; 6769 6770 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range 6771 N_Op_Divide .. 6772 N_Op_Rem; 6773 6774 subtype N_Later_Decl_Item is Node_Kind range 6775 N_Task_Type_Declaration .. 6776 N_Generic_Subprogram_Declaration; 6777 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and 6778 -- includes only those items which can appear as later declarative 6779 -- items. This also includes N_Implicit_Label_Declaration which is 6780 -- not specifically in the grammar but may appear as a valid later 6781 -- declarative items. It does NOT include N_Pragma which can also 6782 -- appear among later declarative items. It does however include 6783 -- N_Protected_Body, which is a bit peculiar, but harmless since 6784 -- this cannot appear in Ada 83 mode anyway. 6785 6786 subtype N_Op is Node_Kind range 6787 N_Op_Add .. 6788 N_Op_Plus; 6789 6790 subtype N_Op_Boolean is Node_Kind range 6791 N_Op_And .. 6792 N_Op_Xor; 6793 -- Binary operators which take operands of a boolean type, and yield 6794 -- a result of a boolean type. 6795 6796 subtype N_Op_Compare is Node_Kind range 6797 N_Op_Eq .. 6798 N_Op_Ne; 6799 6800 subtype N_Op_Shift is Node_Kind range 6801 N_Op_Rotate_Left .. 6802 N_Op_Shift_Right_Arithmetic; 6803 6804 subtype N_Proper_Body is Node_Kind range 6805 N_Package_Body .. 6806 N_Task_Body; 6807 6808 subtype N_Raise_xxx_Error is Node_Kind range 6809 N_Raise_Constraint_Error .. 6810 N_Raise_Storage_Error; 6811 6812 subtype N_Renaming_Declaration is Node_Kind range 6813 N_Exception_Renaming_Declaration .. 6814 N_Generic_Procedure_Renaming_Declaration; 6815 6816 subtype N_Representation_Clause is Node_Kind range 6817 N_At_Clause .. 6818 N_Attribute_Definition_Clause; 6819 6820 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range 6821 N_Abort_Statement .. 6822 N_If_Statement; 6823 -- Note that this includes all statement types except for the cases of the 6824 -- N_Procedure_Call_Statement which is considered to be a subexpression 6825 -- (since overloading is possible, so it needs to go through the normal 6826 -- overloading resolution for expressions). 6827 6828 subtype N_Has_Condition is Node_Kind range 6829 N_Exit_Statement .. 6830 N_Terminate_Alternative; 6831 -- Nodes with condition fields (does not include N_Raise_xxx_Error) 6832 6833 subtype N_Subexpr is Node_Kind range 6834 N_Expanded_Name .. 6835 N_Unchecked_Type_Conversion; 6836 -- Nodes with expression fields 6837 6838 subtype N_Subprogram_Specification is Node_Kind range 6839 N_Function_Specification .. 6840 N_Procedure_Specification; 6841 6842 subtype N_Unary_Op is Node_Kind range 6843 N_Op_Abs .. 6844 N_Op_Plus; 6845 6846 subtype N_Unit_Body is Node_Kind range 6847 N_Package_Body .. 6848 N_Subprogram_Body; 6849 6850 --------------------------- 6851 -- Node Access Functions -- 6852 --------------------------- 6853 6854 -- The following functions return the contents of the indicated field of 6855 -- the node referenced by the argument, which is a Node_Id. They provide 6856 -- logical access to fields in the node which could be accessed using the 6857 -- Atree.Unchecked_Access package, but the idea is always to use these 6858 -- higher level routines which preserve strong typing. In debug mode, 6859 -- these routines check that they are being applied to an appropriate 6860 -- node, as well as checking that the node is in range. 6861 6862 function ABE_Is_Certain 6863 (N : Node_Id) return Boolean; -- Flag18 6864 6865 function Abort_Present 6866 (N : Node_Id) return Boolean; -- Flag15 6867 6868 function Abortable_Part 6869 (N : Node_Id) return Node_Id; -- Node2 6870 6871 function Abstract_Present 6872 (N : Node_Id) return Boolean; -- Flag4 6873 6874 function Accept_Handler_Records 6875 (N : Node_Id) return List_Id; -- List5 6876 6877 function Accept_Statement 6878 (N : Node_Id) return Node_Id; -- Node2 6879 6880 function Access_Types_To_Process 6881 (N : Node_Id) return Elist_Id; -- Elist2 6882 6883 function Actions 6884 (N : Node_Id) return List_Id; -- List1 6885 6886 function Activation_Chain_Entity 6887 (N : Node_Id) return Node_Id; -- Node3 6888 6889 function Acts_As_Spec 6890 (N : Node_Id) return Boolean; -- Flag4 6891 6892 function Aggregate_Bounds 6893 (N : Node_Id) return Node_Id; -- Node3 6894 6895 function Aliased_Present 6896 (N : Node_Id) return Boolean; -- Flag4 6897 6898 function All_Others 6899 (N : Node_Id) return Boolean; -- Flag11 6900 6901 function All_Present 6902 (N : Node_Id) return Boolean; -- Flag15 6903 6904 function Alternatives 6905 (N : Node_Id) return List_Id; -- List4 6906 6907 function Ancestor_Part 6908 (N : Node_Id) return Node_Id; -- Node3 6909 6910 function Array_Aggregate 6911 (N : Node_Id) return Node_Id; -- Node3 6912 6913 function Assignment_OK 6914 (N : Node_Id) return Boolean; -- Flag15 6915 6916 function Associated_Node 6917 (N : Node_Id) return Node_Id; -- Node4 6918 6919 function At_End_Proc 6920 (N : Node_Id) return Node_Id; -- Node1 6921 6922 function Attribute_Name 6923 (N : Node_Id) return Name_Id; -- Name2 6924 6925 function Aux_Decls_Node 6926 (N : Node_Id) return Node_Id; -- Node5 6927 6928 function Backwards_OK 6929 (N : Node_Id) return Boolean; -- Flag6 6930 6931 function Bad_Is_Detected 6932 (N : Node_Id) return Boolean; -- Flag15 6933 6934 function By_Ref 6935 (N : Node_Id) return Boolean; -- Flag5 6936 6937 function Body_Required 6938 (N : Node_Id) return Boolean; -- Flag13 6939 6940 function Body_To_Inline 6941 (N : Node_Id) return Node_Id; -- Node3 6942 6943 function Box_Present 6944 (N : Node_Id) return Boolean; -- Flag15 6945 6946 function Char_Literal_Value 6947 (N : Node_Id) return Char_Code; -- Char_Code2 6948 6949 function Chars 6950 (N : Node_Id) return Name_Id; -- Name1 6951 6952 function Check_Address_Alignment 6953 (N : Node_Id) return Boolean; -- Flag11 6954 6955 function Choice_Parameter 6956 (N : Node_Id) return Node_Id; -- Node2 6957 6958 function Choices 6959 (N : Node_Id) return List_Id; -- List1 6960 6961 function Compile_Time_Known_Aggregate 6962 (N : Node_Id) return Boolean; -- Flag18 6963 6964 function Component_Associations 6965 (N : Node_Id) return List_Id; -- List2 6966 6967 function Component_Clauses 6968 (N : Node_Id) return List_Id; -- List3 6969 6970 function Component_Definition 6971 (N : Node_Id) return Node_Id; -- Node4 6972 6973 function Component_Items 6974 (N : Node_Id) return List_Id; -- List3 6975 6976 function Component_List 6977 (N : Node_Id) return Node_Id; -- Node1 6978 6979 function Component_Name 6980 (N : Node_Id) return Node_Id; -- Node1 6981 6982 function Condition 6983 (N : Node_Id) return Node_Id; -- Node1 6984 6985 function Condition_Actions 6986 (N : Node_Id) return List_Id; -- List3 6987 6988 function Config_Pragmas 6989 (N : Node_Id) return List_Id; -- List4 6990 6991 function Constant_Present 6992 (N : Node_Id) return Boolean; -- Flag17 6993 6994 function Constraint 6995 (N : Node_Id) return Node_Id; -- Node3 6996 6997 function Constraints 6998 (N : Node_Id) return List_Id; -- List1 6999 7000 function Context_Installed 7001 (N : Node_Id) return Boolean; -- Flag13 7002 7003 function Context_Items 7004 (N : Node_Id) return List_Id; -- List1 7005 7006 function Controlling_Argument 7007 (N : Node_Id) return Node_Id; -- Node1 7008 7009 function Conversion_OK 7010 (N : Node_Id) return Boolean; -- Flag14 7011 7012 function Corresponding_Body 7013 (N : Node_Id) return Node_Id; -- Node5 7014 7015 function Corresponding_Generic_Association 7016 (N : Node_Id) return Node_Id; -- Node5 7017 7018 function Corresponding_Integer_Value 7019 (N : Node_Id) return Uint; -- Uint4 7020 7021 function Corresponding_Spec 7022 (N : Node_Id) return Node_Id; -- Node5 7023 7024 function Corresponding_Stub 7025 (N : Node_Id) return Node_Id; -- Node3 7026 7027 function Dcheck_Function 7028 (N : Node_Id) return Entity_Id; -- Node5 7029 7030 function Debug_Statement 7031 (N : Node_Id) return Node_Id; -- Node3 7032 7033 function Declarations 7034 (N : Node_Id) return List_Id; -- List2 7035 7036 function Default_Expression 7037 (N : Node_Id) return Node_Id; -- Node5 7038 7039 function Default_Name 7040 (N : Node_Id) return Node_Id; -- Node2 7041 7042 function Defining_Identifier 7043 (N : Node_Id) return Entity_Id; -- Node1 7044 7045 function Defining_Unit_Name 7046 (N : Node_Id) return Node_Id; -- Node1 7047 7048 function Delay_Alternative 7049 (N : Node_Id) return Node_Id; -- Node4 7050 7051 function Delay_Finalize_Attach 7052 (N : Node_Id) return Boolean; -- Flag14 7053 7054 function Delay_Statement 7055 (N : Node_Id) return Node_Id; -- Node2 7056 7057 function Delta_Expression 7058 (N : Node_Id) return Node_Id; -- Node3 7059 7060 function Digits_Expression 7061 (N : Node_Id) return Node_Id; -- Node2 7062 7063 function Discr_Check_Funcs_Built 7064 (N : Node_Id) return Boolean; -- Flag11 7065 7066 function Discrete_Choices 7067 (N : Node_Id) return List_Id; -- List4 7068 7069 function Discrete_Range 7070 (N : Node_Id) return Node_Id; -- Node4 7071 7072 function Discrete_Subtype_Definition 7073 (N : Node_Id) return Node_Id; -- Node4 7074 7075 function Discrete_Subtype_Definitions 7076 (N : Node_Id) return List_Id; -- List2 7077 7078 function Discriminant_Specifications 7079 (N : Node_Id) return List_Id; -- List4 7080 7081 function Discriminant_Type 7082 (N : Node_Id) return Node_Id; -- Node5 7083 7084 function Do_Accessibility_Check 7085 (N : Node_Id) return Boolean; -- Flag13 7086 7087 function Do_Discriminant_Check 7088 (N : Node_Id) return Boolean; -- Flag13 7089 7090 function Do_Division_Check 7091 (N : Node_Id) return Boolean; -- Flag13 7092 7093 function Do_Length_Check 7094 (N : Node_Id) return Boolean; -- Flag4 7095 7096 function Do_Overflow_Check 7097 (N : Node_Id) return Boolean; -- Flag17 7098 7099 function Do_Range_Check 7100 (N : Node_Id) return Boolean; -- Flag9 7101 7102 function Do_Storage_Check 7103 (N : Node_Id) return Boolean; -- Flag17 7104 7105 function Do_Tag_Check 7106 (N : Node_Id) return Boolean; -- Flag13 7107 7108 function Elaborate_All_Present 7109 (N : Node_Id) return Boolean; -- Flag15 7110 7111 function Elaborate_Present 7112 (N : Node_Id) return Boolean; -- Flag4 7113 7114 function Elaboration_Boolean 7115 (N : Node_Id) return Node_Id; -- Node2 7116 7117 function Else_Actions 7118 (N : Node_Id) return List_Id; -- List3 7119 7120 function Else_Statements 7121 (N : Node_Id) return List_Id; -- List4 7122 7123 function Elsif_Parts 7124 (N : Node_Id) return List_Id; -- List3 7125 7126 function Enclosing_Variant 7127 (N : Node_Id) return Node_Id; -- Node2 7128 7129 function End_Label 7130 (N : Node_Id) return Node_Id; -- Node4 7131 7132 function End_Span 7133 (N : Node_Id) return Uint; -- Uint5 7134 7135 function Entity 7136 (N : Node_Id) return Node_Id; -- Node4 7137 7138 function Entity_Or_Associated_Node 7139 (N : Node_Id) return Node_Id; -- Node4 7140 7141 function Entry_Body_Formal_Part 7142 (N : Node_Id) return Node_Id; -- Node5 7143 7144 function Entry_Call_Alternative 7145 (N : Node_Id) return Node_Id; -- Node1 7146 7147 function Entry_Call_Statement 7148 (N : Node_Id) return Node_Id; -- Node1 7149 7150 function Entry_Direct_Name 7151 (N : Node_Id) return Node_Id; -- Node1 7152 7153 function Entry_Index 7154 (N : Node_Id) return Node_Id; -- Node5 7155 7156 function Entry_Index_Specification 7157 (N : Node_Id) return Node_Id; -- Node4 7158 7159 function Etype 7160 (N : Node_Id) return Node_Id; -- Node5 7161 7162 function Exception_Choices 7163 (N : Node_Id) return List_Id; -- List4 7164 7165 function Exception_Handlers 7166 (N : Node_Id) return List_Id; -- List5 7167 7168 function Exception_Junk 7169 (N : Node_Id) return Boolean; -- Flag11 7170 7171 function Explicit_Actual_Parameter 7172 (N : Node_Id) return Node_Id; -- Node3 7173 7174 function Expansion_Delayed 7175 (N : Node_Id) return Boolean; -- Flag11 7176 7177 function Explicit_Generic_Actual_Parameter 7178 (N : Node_Id) return Node_Id; -- Node1 7179 7180 function Expression 7181 (N : Node_Id) return Node_Id; -- Node3 7182 7183 function Expressions 7184 (N : Node_Id) return List_Id; -- List1 7185 7186 function First_Bit 7187 (N : Node_Id) return Node_Id; -- Node3 7188 7189 function First_Inlined_Subprogram 7190 (N : Node_Id) return Entity_Id; -- Node3 7191 7192 function First_Name 7193 (N : Node_Id) return Boolean; -- Flag5 7194 7195 function First_Named_Actual 7196 (N : Node_Id) return Node_Id; -- Node4 7197 7198 function First_Real_Statement 7199 (N : Node_Id) return Node_Id; -- Node2 7200 7201 function First_Subtype_Link 7202 (N : Node_Id) return Entity_Id; -- Node5 7203 7204 function Float_Truncate 7205 (N : Node_Id) return Boolean; -- Flag11 7206 7207 function Formal_Type_Definition 7208 (N : Node_Id) return Node_Id; -- Node3 7209 7210 function Forwards_OK 7211 (N : Node_Id) return Boolean; -- Flag5 7212 7213 function From_At_Mod 7214 (N : Node_Id) return Boolean; -- Flag4 7215 7216 function Generic_Associations 7217 (N : Node_Id) return List_Id; -- List3 7218 7219 function Generic_Formal_Declarations 7220 (N : Node_Id) return List_Id; -- List2 7221 7222 function Generic_Parent 7223 (N : Node_Id) return Node_Id; -- Node5 7224 7225 function Generic_Parent_Type 7226 (N : Node_Id) return Node_Id; -- Node4 7227 7228 function Handled_Statement_Sequence 7229 (N : Node_Id) return Node_Id; -- Node4 7230 7231 function Handler_List_Entry 7232 (N : Node_Id) return Node_Id; -- Node2 7233 7234 function Has_Created_Identifier 7235 (N : Node_Id) return Boolean; -- Flag15 7236 7237 function Has_Dynamic_Length_Check 7238 (N : Node_Id) return Boolean; -- Flag10 7239 7240 function Has_Dynamic_Range_Check 7241 (N : Node_Id) return Boolean; -- Flag12 7242 7243 function Has_No_Elaboration_Code 7244 (N : Node_Id) return Boolean; -- Flag17 7245 7246 function Has_Priority_Pragma 7247 (N : Node_Id) return Boolean; -- Flag6 7248 7249 function Has_Private_View 7250 (N : Node_Id) return Boolean; -- Flag11 7251 7252 function Has_Storage_Size_Pragma 7253 (N : Node_Id) return Boolean; -- Flag5 7254 7255 function Has_Task_Info_Pragma 7256 (N : Node_Id) return Boolean; -- Flag7 7257 7258 function Has_Task_Name_Pragma 7259 (N : Node_Id) return Boolean; -- Flag8 7260 7261 function Has_Wide_Character 7262 (N : Node_Id) return Boolean; -- Flag11 7263 7264 function Hidden_By_Use_Clause 7265 (N : Node_Id) return Elist_Id; -- Elist4 7266 7267 function High_Bound 7268 (N : Node_Id) return Node_Id; -- Node2 7269 7270 function Identifier 7271 (N : Node_Id) return Node_Id; -- Node1 7272 7273 function Implicit_With 7274 (N : Node_Id) return Boolean; -- Flag16 7275 7276 function In_Present 7277 (N : Node_Id) return Boolean; -- Flag15 7278 7279 function Includes_Infinities 7280 (N : Node_Id) return Boolean; -- Flag11 7281 7282 function Instance_Spec 7283 (N : Node_Id) return Node_Id; -- Node5 7284 7285 function Intval 7286 (N : Node_Id) return Uint; -- Uint3 7287 7288 function Is_Asynchronous_Call_Block 7289 (N : Node_Id) return Boolean; -- Flag7 7290 7291 function Is_Component_Left_Opnd 7292 (N : Node_Id) return Boolean; -- Flag13 7293 7294 function Is_Component_Right_Opnd 7295 (N : Node_Id) return Boolean; -- Flag14 7296 7297 function Is_Controlling_Actual 7298 (N : Node_Id) return Boolean; -- Flag16 7299 7300 function Is_In_Discriminant_Check 7301 (N : Node_Id) return Boolean; -- Flag11 7302 7303 function Is_Machine_Number 7304 (N : Node_Id) return Boolean; -- Flag11 7305 7306 function Is_Null_Loop 7307 (N : Node_Id) return Boolean; -- Flag16 7308 7309 function Is_Overloaded 7310 (N : Node_Id) return Boolean; -- Flag5 7311 7312 function Is_Power_Of_2_For_Shift 7313 (N : Node_Id) return Boolean; -- Flag13 7314 7315 function Is_Protected_Subprogram_Body 7316 (N : Node_Id) return Boolean; -- Flag7 7317 7318 function Is_Static_Expression 7319 (N : Node_Id) return Boolean; -- Flag6 7320 7321 function Is_Subprogram_Descriptor 7322 (N : Node_Id) return Boolean; -- Flag16 7323 7324 function Is_Task_Allocation_Block 7325 (N : Node_Id) return Boolean; -- Flag6 7326 7327 function Is_Task_Master 7328 (N : Node_Id) return Boolean; -- Flag5 7329 7330 function Iteration_Scheme 7331 (N : Node_Id) return Node_Id; -- Node2 7332 7333 function Itype 7334 (N : Node_Id) return Entity_Id; -- Node1 7335 7336 function Kill_Range_Check 7337 (N : Node_Id) return Boolean; -- Flag11 7338 7339 function Label_Construct 7340 (N : Node_Id) return Node_Id; -- Node2 7341 7342 function Left_Opnd 7343 (N : Node_Id) return Node_Id; -- Node2 7344 7345 function Last_Bit 7346 (N : Node_Id) return Node_Id; -- Node4 7347 7348 function Last_Name 7349 (N : Node_Id) return Boolean; -- Flag6 7350 7351 function Library_Unit 7352 (N : Node_Id) return Node_Id; -- Node4 7353 7354 function Limited_View_Installed 7355 (N : Node_Id) return Boolean; -- Flag18 7356 7357 function Limited_Present 7358 (N : Node_Id) return Boolean; -- Flag17 7359 7360 function Literals 7361 (N : Node_Id) return List_Id; -- List1 7362 7363 function Loop_Actions 7364 (N : Node_Id) return List_Id; -- List2 7365 7366 function Loop_Parameter_Specification 7367 (N : Node_Id) return Node_Id; -- Node4 7368 7369 function Low_Bound 7370 (N : Node_Id) return Node_Id; -- Node1 7371 7372 function Mod_Clause 7373 (N : Node_Id) return Node_Id; -- Node2 7374 7375 function More_Ids 7376 (N : Node_Id) return Boolean; -- Flag5 7377 7378 function Must_Be_Byte_Aligned 7379 (N : Node_Id) return Boolean; -- Flag14 7380 7381 function Must_Not_Freeze 7382 (N : Node_Id) return Boolean; -- Flag8 7383 7384 function Name 7385 (N : Node_Id) return Node_Id; -- Node2 7386 7387 function Names 7388 (N : Node_Id) return List_Id; -- List2 7389 7390 function Next_Entity 7391 (N : Node_Id) return Node_Id; -- Node2 7392 7393 function Next_Named_Actual 7394 (N : Node_Id) return Node_Id; -- Node4 7395 7396 function Next_Rep_Item 7397 (N : Node_Id) return Node_Id; -- Node4 7398 7399 function Next_Use_Clause 7400 (N : Node_Id) return Node_Id; -- Node3 7401 7402 function No_Ctrl_Actions 7403 (N : Node_Id) return Boolean; -- Flag7 7404 7405 function No_Elaboration_Check 7406 (N : Node_Id) return Boolean; -- Flag14 7407 7408 function No_Entities_Ref_In_Spec 7409 (N : Node_Id) return Boolean; -- Flag8 7410 7411 function No_Initialization 7412 (N : Node_Id) return Boolean; -- Flag13 7413 7414 function No_Truncation 7415 (N : Node_Id) return Boolean; -- Flag17 7416 7417 function Null_Present 7418 (N : Node_Id) return Boolean; -- Flag13 7419 7420 function Null_Record_Present 7421 (N : Node_Id) return Boolean; -- Flag17 7422 7423 function Object_Definition 7424 (N : Node_Id) return Node_Id; -- Node4 7425 7426 function OK_For_Stream 7427 (N : Node_Id) return Boolean; -- Flag4 7428 7429 function Original_Discriminant 7430 (N : Node_Id) return Node_Id; -- Node2 7431 7432 function Original_Entity 7433 (N : Node_Id) return Entity_Id; -- Node2 7434 7435 function Others_Discrete_Choices 7436 (N : Node_Id) return List_Id; -- List1 7437 7438 function Out_Present 7439 (N : Node_Id) return Boolean; -- Flag17 7440 7441 function Parameter_Associations 7442 (N : Node_Id) return List_Id; -- List3 7443 7444 function Parameter_List_Truncated 7445 (N : Node_Id) return Boolean; -- Flag17 7446 7447 function Parameter_Specifications 7448 (N : Node_Id) return List_Id; -- List3 7449 7450 function Parameter_Type 7451 (N : Node_Id) return Node_Id; -- Node2 7452 7453 function Parent_Spec 7454 (N : Node_Id) return Node_Id; -- Node4 7455 7456 function Position 7457 (N : Node_Id) return Node_Id; -- Node2 7458 7459 function Pragma_Argument_Associations 7460 (N : Node_Id) return List_Id; -- List2 7461 7462 function Pragmas_After 7463 (N : Node_Id) return List_Id; -- List5 7464 7465 function Pragmas_Before 7466 (N : Node_Id) return List_Id; -- List4 7467 7468 function Prefix 7469 (N : Node_Id) return Node_Id; -- Node3 7470 7471 function Present_Expr 7472 (N : Node_Id) return Uint; -- Uint3 7473 7474 function Prev_Ids 7475 (N : Node_Id) return Boolean; -- Flag6 7476 7477 function Print_In_Hex 7478 (N : Node_Id) return Boolean; -- Flag13 7479 7480 function Private_Declarations 7481 (N : Node_Id) return List_Id; -- List3 7482 7483 function Private_Present 7484 (N : Node_Id) return Boolean; -- Flag15 7485 7486 function Procedure_To_Call 7487 (N : Node_Id) return Node_Id; -- Node4 7488 7489 function Proper_Body 7490 (N : Node_Id) return Node_Id; -- Node1 7491 7492 function Protected_Definition 7493 (N : Node_Id) return Node_Id; -- Node3 7494 7495 function Protected_Present 7496 (N : Node_Id) return Boolean; -- Flag15 7497 7498 function Raises_Constraint_Error 7499 (N : Node_Id) return Boolean; -- Flag7 7500 7501 function Range_Constraint 7502 (N : Node_Id) return Node_Id; -- Node4 7503 7504 function Range_Expression 7505 (N : Node_Id) return Node_Id; -- Node4 7506 7507 function Real_Range_Specification 7508 (N : Node_Id) return Node_Id; -- Node4 7509 7510 function Realval 7511 (N : Node_Id) return Ureal; -- Ureal3 7512 7513 function Reason 7514 (N : Node_Id) return Uint; -- Uint3 7515 7516 function Record_Extension_Part 7517 (N : Node_Id) return Node_Id; -- Node3 7518 7519 function Redundant_Use 7520 (N : Node_Id) return Boolean; -- Flag13 7521 7522 function Return_Type 7523 (N : Node_Id) return Node_Id; -- Node2 7524 7525 function Reverse_Present 7526 (N : Node_Id) return Boolean; -- Flag15 7527 7528 function Right_Opnd 7529 (N : Node_Id) return Node_Id; -- Node3 7530 7531 function Rounded_Result 7532 (N : Node_Id) return Boolean; -- Flag18 7533 7534 function Scope 7535 (N : Node_Id) return Node_Id; -- Node3 7536 7537 function Select_Alternatives 7538 (N : Node_Id) return List_Id; -- List1 7539 7540 function Selector_Name 7541 (N : Node_Id) return Node_Id; -- Node2 7542 7543 function Selector_Names 7544 (N : Node_Id) return List_Id; -- List1 7545 7546 function Shift_Count_OK 7547 (N : Node_Id) return Boolean; -- Flag4 7548 7549 function Source_Type 7550 (N : Node_Id) return Entity_Id; -- Node1 7551 7552 function Specification 7553 (N : Node_Id) return Node_Id; -- Node1 7554 7555 function Statements 7556 (N : Node_Id) return List_Id; -- List3 7557 7558 function Static_Processing_OK 7559 (N : Node_Id) return Boolean; -- Flag4 7560 7561 function Storage_Pool 7562 (N : Node_Id) return Node_Id; -- Node1 7563 7564 function Strval 7565 (N : Node_Id) return String_Id; -- Str3 7566 7567 function Subtype_Indication 7568 (N : Node_Id) return Node_Id; -- Node5 7569 7570 function Subtype_Mark 7571 (N : Node_Id) return Node_Id; -- Node4 7572 7573 function Subtype_Marks 7574 (N : Node_Id) return List_Id; -- List2 7575 7576 function Tagged_Present 7577 (N : Node_Id) return Boolean; -- Flag15 7578 7579 function Target_Type 7580 (N : Node_Id) return Entity_Id; -- Node2 7581 7582 function Task_Body_Procedure 7583 (N : Node_Id) return Entity_Id; -- Node2 7584 7585 function Task_Definition 7586 (N : Node_Id) return Node_Id; -- Node3 7587 7588 function Then_Actions 7589 (N : Node_Id) return List_Id; -- List2 7590 7591 function Then_Statements 7592 (N : Node_Id) return List_Id; -- List2 7593 7594 function Treat_Fixed_As_Integer 7595 (N : Node_Id) return Boolean; -- Flag14 7596 7597 function Triggering_Alternative 7598 (N : Node_Id) return Node_Id; -- Node1 7599 7600 function Triggering_Statement 7601 (N : Node_Id) return Node_Id; -- Node1 7602 7603 function TSS_Elist 7604 (N : Node_Id) return Elist_Id; -- Elist3 7605 7606 function Type_Definition 7607 (N : Node_Id) return Node_Id; -- Node3 7608 7609 function Unit 7610 (N : Node_Id) return Node_Id; -- Node2 7611 7612 function Unknown_Discriminants_Present 7613 (N : Node_Id) return Boolean; -- Flag13 7614 7615 function Unreferenced_In_Spec 7616 (N : Node_Id) return Boolean; -- Flag7 7617 7618 function Variant_Part 7619 (N : Node_Id) return Node_Id; -- Node4 7620 7621 function Variants 7622 (N : Node_Id) return List_Id; -- List1 7623 7624 function Visible_Declarations 7625 (N : Node_Id) return List_Id; -- List2 7626 7627 function Was_Originally_Stub 7628 (N : Node_Id) return Boolean; -- Flag13 7629 7630 function Zero_Cost_Handling 7631 (N : Node_Id) return Boolean; -- Flag5 7632 7633 -- End functions (note used by xsinfo utility program to end processing) 7634 7635 ---------------------------- 7636 -- Node Update Procedures -- 7637 ---------------------------- 7638 7639 -- These are the corresponding node update routines, which again provide 7640 -- a high level logical access with type checking. In addition to setting 7641 -- the indicated field of the node N to the given Val, in the case of 7642 -- tree pointers (List1-4), the parent pointer of the Val node is set to 7643 -- point back to node N. This automates the setting of the parent pointer. 7644 7645 procedure Set_ABE_Is_Certain 7646 (N : Node_Id; Val : Boolean := True); -- Flag18 7647 7648 procedure Set_Abort_Present 7649 (N : Node_Id; Val : Boolean := True); -- Flag15 7650 7651 procedure Set_Abortable_Part 7652 (N : Node_Id; Val : Node_Id); -- Node2 7653 7654 procedure Set_Abstract_Present 7655 (N : Node_Id; Val : Boolean := True); -- Flag4 7656 7657 procedure Set_Accept_Handler_Records 7658 (N : Node_Id; Val : List_Id); -- List5 7659 7660 procedure Set_Accept_Statement 7661 (N : Node_Id; Val : Node_Id); -- Node2 7662 7663 procedure Set_Access_Types_To_Process 7664 (N : Node_Id; Val : Elist_Id); -- Elist2 7665 7666 procedure Set_Actions 7667 (N : Node_Id; Val : List_Id); -- List1 7668 7669 procedure Set_Activation_Chain_Entity 7670 (N : Node_Id; Val : Node_Id); -- Node3 7671 7672 procedure Set_Acts_As_Spec 7673 (N : Node_Id; Val : Boolean := True); -- Flag4 7674 7675 procedure Set_Aggregate_Bounds 7676 (N : Node_Id; Val : Node_Id); -- Node3 7677 7678 procedure Set_Aliased_Present 7679 (N : Node_Id; Val : Boolean := True); -- Flag4 7680 7681 procedure Set_All_Others 7682 (N : Node_Id; Val : Boolean := True); -- Flag11 7683 7684 procedure Set_All_Present 7685 (N : Node_Id; Val : Boolean := True); -- Flag15 7686 7687 procedure Set_Alternatives 7688 (N : Node_Id; Val : List_Id); -- List4 7689 7690 procedure Set_Ancestor_Part 7691 (N : Node_Id; Val : Node_Id); -- Node3 7692 7693 procedure Set_Array_Aggregate 7694 (N : Node_Id; Val : Node_Id); -- Node3 7695 7696 procedure Set_Assignment_OK 7697 (N : Node_Id; Val : Boolean := True); -- Flag15 7698 7699 procedure Set_Associated_Node 7700 (N : Node_Id; Val : Node_Id); -- Node4 7701 7702 procedure Set_Attribute_Name 7703 (N : Node_Id; Val : Name_Id); -- Name2 7704 7705 procedure Set_At_End_Proc 7706 (N : Node_Id; Val : Node_Id); -- Node1 7707 7708 procedure Set_Aux_Decls_Node 7709 (N : Node_Id; Val : Node_Id); -- Node5 7710 7711 procedure Set_Backwards_OK 7712 (N : Node_Id; Val : Boolean := True); -- Flag6 7713 7714 procedure Set_Bad_Is_Detected 7715 (N : Node_Id; Val : Boolean := True); -- Flag15 7716 7717 procedure Set_Body_Required 7718 (N : Node_Id; Val : Boolean := True); -- Flag13 7719 7720 procedure Set_Body_To_Inline 7721 (N : Node_Id; Val : Node_Id); -- Node3 7722 7723 procedure Set_Box_Present 7724 (N : Node_Id; Val : Boolean := True); -- Flag15 7725 7726 procedure Set_By_Ref 7727 (N : Node_Id; Val : Boolean := True); -- Flag5 7728 7729 procedure Set_Char_Literal_Value 7730 (N : Node_Id; Val : Char_Code); -- Char_Code2 7731 7732 procedure Set_Chars 7733 (N : Node_Id; Val : Name_Id); -- Name1 7734 7735 procedure Set_Check_Address_Alignment 7736 (N : Node_Id; Val : Boolean := True); -- Flag11 7737 7738 procedure Set_Choice_Parameter 7739 (N : Node_Id; Val : Node_Id); -- Node2 7740 7741 procedure Set_Choices 7742 (N : Node_Id; Val : List_Id); -- List1 7743 7744 procedure Set_Compile_Time_Known_Aggregate 7745 (N : Node_Id; Val : Boolean := True); -- Flag18 7746 7747 procedure Set_Component_Associations 7748 (N : Node_Id; Val : List_Id); -- List2 7749 7750 procedure Set_Component_Clauses 7751 (N : Node_Id; Val : List_Id); -- List3 7752 7753 procedure Set_Component_Definition 7754 (N : Node_Id; Val : Node_Id); -- Node4 7755 7756 procedure Set_Component_Items 7757 (N : Node_Id; Val : List_Id); -- List3 7758 7759 procedure Set_Component_List 7760 (N : Node_Id; Val : Node_Id); -- Node1 7761 7762 procedure Set_Component_Name 7763 (N : Node_Id; Val : Node_Id); -- Node1 7764 7765 procedure Set_Condition 7766 (N : Node_Id; Val : Node_Id); -- Node1 7767 7768 procedure Set_Condition_Actions 7769 (N : Node_Id; Val : List_Id); -- List3 7770 7771 procedure Set_Config_Pragmas 7772 (N : Node_Id; Val : List_Id); -- List4 7773 7774 procedure Set_Constant_Present 7775 (N : Node_Id; Val : Boolean := True); -- Flag17 7776 7777 procedure Set_Constraint 7778 (N : Node_Id; Val : Node_Id); -- Node3 7779 7780 procedure Set_Constraints 7781 (N : Node_Id; Val : List_Id); -- List1 7782 7783 procedure Set_Context_Installed 7784 (N : Node_Id; Val : Boolean := True); -- Flag13 7785 7786 procedure Set_Context_Items 7787 (N : Node_Id; Val : List_Id); -- List1 7788 7789 procedure Set_Controlling_Argument 7790 (N : Node_Id; Val : Node_Id); -- Node1 7791 7792 procedure Set_Conversion_OK 7793 (N : Node_Id; Val : Boolean := True); -- Flag14 7794 7795 procedure Set_Corresponding_Body 7796 (N : Node_Id; Val : Node_Id); -- Node5 7797 7798 procedure Set_Corresponding_Generic_Association 7799 (N : Node_Id; Val : Node_Id); -- Node5 7800 7801 procedure Set_Corresponding_Integer_Value 7802 (N : Node_Id; Val : Uint); -- Uint4 7803 7804 procedure Set_Corresponding_Spec 7805 (N : Node_Id; Val : Node_Id); -- Node5 7806 7807 procedure Set_Corresponding_Stub 7808 (N : Node_Id; Val : Node_Id); -- Node3 7809 7810 procedure Set_Dcheck_Function 7811 (N : Node_Id; Val : Entity_Id); -- Node5 7812 7813 procedure Set_Debug_Statement 7814 (N : Node_Id; Val : Node_Id); -- Node3 7815 7816 procedure Set_Declarations 7817 (N : Node_Id; Val : List_Id); -- List2 7818 7819 procedure Set_Default_Expression 7820 (N : Node_Id; Val : Node_Id); -- Node5 7821 7822 procedure Set_Default_Name 7823 (N : Node_Id; Val : Node_Id); -- Node2 7824 7825 procedure Set_Defining_Identifier 7826 (N : Node_Id; Val : Entity_Id); -- Node1 7827 7828 procedure Set_Defining_Unit_Name 7829 (N : Node_Id; Val : Node_Id); -- Node1 7830 7831 procedure Set_Delay_Alternative 7832 (N : Node_Id; Val : Node_Id); -- Node4 7833 7834 procedure Set_Delay_Finalize_Attach 7835 (N : Node_Id; Val : Boolean := True); -- Flag14 7836 7837 procedure Set_Delay_Statement 7838 (N : Node_Id; Val : Node_Id); -- Node2 7839 7840 procedure Set_Delta_Expression 7841 (N : Node_Id; Val : Node_Id); -- Node3 7842 7843 procedure Set_Digits_Expression 7844 (N : Node_Id; Val : Node_Id); -- Node2 7845 7846 procedure Set_Discr_Check_Funcs_Built 7847 (N : Node_Id; Val : Boolean := True); -- Flag11 7848 7849 procedure Set_Discrete_Choices 7850 (N : Node_Id; Val : List_Id); -- List4 7851 7852 procedure Set_Discrete_Range 7853 (N : Node_Id; Val : Node_Id); -- Node4 7854 7855 procedure Set_Discrete_Subtype_Definition 7856 (N : Node_Id; Val : Node_Id); -- Node4 7857 7858 procedure Set_Discrete_Subtype_Definitions 7859 (N : Node_Id; Val : List_Id); -- List2 7860 7861 procedure Set_Discriminant_Specifications 7862 (N : Node_Id; Val : List_Id); -- List4 7863 7864 procedure Set_Discriminant_Type 7865 (N : Node_Id; Val : Node_Id); -- Node5 7866 7867 procedure Set_Do_Accessibility_Check 7868 (N : Node_Id; Val : Boolean := True); -- Flag13 7869 7870 procedure Set_Do_Discriminant_Check 7871 (N : Node_Id; Val : Boolean := True); -- Flag13 7872 7873 procedure Set_Do_Division_Check 7874 (N : Node_Id; Val : Boolean := True); -- Flag13 7875 7876 procedure Set_Do_Length_Check 7877 (N : Node_Id; Val : Boolean := True); -- Flag4 7878 7879 procedure Set_Do_Overflow_Check 7880 (N : Node_Id; Val : Boolean := True); -- Flag17 7881 7882 procedure Set_Do_Range_Check 7883 (N : Node_Id; Val : Boolean := True); -- Flag9 7884 7885 procedure Set_Do_Storage_Check 7886 (N : Node_Id; Val : Boolean := True); -- Flag17 7887 7888 procedure Set_Do_Tag_Check 7889 (N : Node_Id; Val : Boolean := True); -- Flag13 7890 7891 procedure Set_Elaborate_All_Present 7892 (N : Node_Id; Val : Boolean := True); -- Flag15 7893 7894 procedure Set_Elaborate_Present 7895 (N : Node_Id; Val : Boolean := True); -- Flag4 7896 7897 procedure Set_Elaboration_Boolean 7898 (N : Node_Id; Val : Node_Id); -- Node2 7899 7900 procedure Set_Else_Actions 7901 (N : Node_Id; Val : List_Id); -- List3 7902 7903 procedure Set_Else_Statements 7904 (N : Node_Id; Val : List_Id); -- List4 7905 7906 procedure Set_Elsif_Parts 7907 (N : Node_Id; Val : List_Id); -- List3 7908 7909 procedure Set_Enclosing_Variant 7910 (N : Node_Id; Val : Node_Id); -- Node2 7911 7912 procedure Set_End_Label 7913 (N : Node_Id; Val : Node_Id); -- Node4 7914 7915 procedure Set_End_Span 7916 (N : Node_Id; Val : Uint); -- Uint5 7917 7918 procedure Set_Entity 7919 (N : Node_Id; Val : Node_Id); -- Node4 7920 7921 procedure Set_Entry_Body_Formal_Part 7922 (N : Node_Id; Val : Node_Id); -- Node5 7923 7924 procedure Set_Entry_Call_Alternative 7925 (N : Node_Id; Val : Node_Id); -- Node1 7926 7927 procedure Set_Entry_Call_Statement 7928 (N : Node_Id; Val : Node_Id); -- Node1 7929 7930 procedure Set_Entry_Direct_Name 7931 (N : Node_Id; Val : Node_Id); -- Node1 7932 7933 procedure Set_Entry_Index 7934 (N : Node_Id; Val : Node_Id); -- Node5 7935 7936 procedure Set_Entry_Index_Specification 7937 (N : Node_Id; Val : Node_Id); -- Node4 7938 7939 procedure Set_Etype 7940 (N : Node_Id; Val : Node_Id); -- Node5 7941 7942 procedure Set_Exception_Choices 7943 (N : Node_Id; Val : List_Id); -- List4 7944 7945 procedure Set_Exception_Handlers 7946 (N : Node_Id; Val : List_Id); -- List5 7947 7948 procedure Set_Exception_Junk 7949 (N : Node_Id; Val : Boolean := True); -- Flag11 7950 7951 procedure Set_Expansion_Delayed 7952 (N : Node_Id; Val : Boolean := True); -- Flag11 7953 7954 procedure Set_Explicit_Actual_Parameter 7955 (N : Node_Id; Val : Node_Id); -- Node3 7956 7957 procedure Set_Explicit_Generic_Actual_Parameter 7958 (N : Node_Id; Val : Node_Id); -- Node1 7959 7960 procedure Set_Expression 7961 (N : Node_Id; Val : Node_Id); -- Node3 7962 7963 procedure Set_Expressions 7964 (N : Node_Id; Val : List_Id); -- List1 7965 7966 procedure Set_First_Bit 7967 (N : Node_Id; Val : Node_Id); -- Node3 7968 7969 procedure Set_First_Inlined_Subprogram 7970 (N : Node_Id; Val : Entity_Id); -- Node3 7971 7972 procedure Set_First_Name 7973 (N : Node_Id; Val : Boolean := True); -- Flag5 7974 7975 procedure Set_First_Named_Actual 7976 (N : Node_Id; Val : Node_Id); -- Node4 7977 7978 procedure Set_First_Real_Statement 7979 (N : Node_Id; Val : Node_Id); -- Node2 7980 7981 procedure Set_First_Subtype_Link 7982 (N : Node_Id; Val : Entity_Id); -- Node5 7983 7984 procedure Set_Float_Truncate 7985 (N : Node_Id; Val : Boolean := True); -- Flag11 7986 7987 procedure Set_Formal_Type_Definition 7988 (N : Node_Id; Val : Node_Id); -- Node3 7989 7990 procedure Set_Forwards_OK 7991 (N : Node_Id; Val : Boolean := True); -- Flag5 7992 7993 procedure Set_From_At_Mod 7994 (N : Node_Id; Val : Boolean := True); -- Flag4 7995 7996 procedure Set_Generic_Associations 7997 (N : Node_Id; Val : List_Id); -- List3 7998 7999 procedure Set_Generic_Formal_Declarations 8000 (N : Node_Id; Val : List_Id); -- List2 8001 8002 procedure Set_Generic_Parent 8003 (N : Node_Id; Val : Node_Id); -- Node5 8004 8005 procedure Set_Generic_Parent_Type 8006 (N : Node_Id; Val : Node_Id); -- Node4 8007 8008 procedure Set_Handled_Statement_Sequence 8009 (N : Node_Id; Val : Node_Id); -- Node4 8010 8011 procedure Set_Handler_List_Entry 8012 (N : Node_Id; Val : Node_Id); -- Node2 8013 8014 procedure Set_Has_Created_Identifier 8015 (N : Node_Id; Val : Boolean := True); -- Flag15 8016 8017 procedure Set_Has_Dynamic_Length_Check 8018 (N : Node_Id; Val : Boolean := True); -- Flag10 8019 8020 procedure Set_Has_Dynamic_Range_Check 8021 (N : Node_Id; Val : Boolean := True); -- Flag12 8022 8023 procedure Set_Has_No_Elaboration_Code 8024 (N : Node_Id; Val : Boolean := True); -- Flag17 8025 8026 procedure Set_Has_Priority_Pragma 8027 (N : Node_Id; Val : Boolean := True); -- Flag6 8028 8029 procedure Set_Has_Private_View 8030 (N : Node_Id; Val : Boolean := True); -- Flag11 8031 8032 procedure Set_Has_Storage_Size_Pragma 8033 (N : Node_Id; Val : Boolean := True); -- Flag5 8034 8035 procedure Set_Has_Task_Info_Pragma 8036 (N : Node_Id; Val : Boolean := True); -- Flag7 8037 8038 procedure Set_Has_Task_Name_Pragma 8039 (N : Node_Id; Val : Boolean := True); -- Flag8 8040 8041 procedure Set_Has_Wide_Character 8042 (N : Node_Id; Val : Boolean := True); -- Flag11 8043 8044 procedure Set_Hidden_By_Use_Clause 8045 (N : Node_Id; Val : Elist_Id); -- Elist4 8046 8047 procedure Set_High_Bound 8048 (N : Node_Id; Val : Node_Id); -- Node2 8049 8050 procedure Set_Identifier 8051 (N : Node_Id; Val : Node_Id); -- Node1 8052 8053 procedure Set_Implicit_With 8054 (N : Node_Id; Val : Boolean := True); -- Flag16 8055 8056 procedure Set_In_Present 8057 (N : Node_Id; Val : Boolean := True); -- Flag15 8058 8059 procedure Set_Includes_Infinities 8060 (N : Node_Id; Val : Boolean := True); -- Flag11 8061 8062 procedure Set_Instance_Spec 8063 (N : Node_Id; Val : Node_Id); -- Node5 8064 8065 procedure Set_Intval 8066 (N : Node_Id; Val : Uint); -- Uint3 8067 8068 procedure Set_Is_Asynchronous_Call_Block 8069 (N : Node_Id; Val : Boolean := True); -- Flag7 8070 8071 procedure Set_Is_Component_Left_Opnd 8072 (N : Node_Id; Val : Boolean := True); -- Flag13 8073 8074 procedure Set_Is_Component_Right_Opnd 8075 (N : Node_Id; Val : Boolean := True); -- Flag14 8076 8077 procedure Set_Is_Controlling_Actual 8078 (N : Node_Id; Val : Boolean := True); -- Flag16 8079 8080 procedure Set_Is_In_Discriminant_Check 8081 (N : Node_Id; Val : Boolean := True); -- Flag11 8082 8083 procedure Set_Is_Machine_Number 8084 (N : Node_Id; Val : Boolean := True); -- Flag11 8085 8086 procedure Set_Is_Null_Loop 8087 (N : Node_Id; Val : Boolean := True); -- Flag16 8088 8089 procedure Set_Is_Overloaded 8090 (N : Node_Id; Val : Boolean := True); -- Flag5 8091 8092 procedure Set_Is_Power_Of_2_For_Shift 8093 (N : Node_Id; Val : Boolean := True); -- Flag13 8094 8095 procedure Set_Is_Protected_Subprogram_Body 8096 (N : Node_Id; Val : Boolean := True); -- Flag7 8097 8098 procedure Set_Is_Static_Expression 8099 (N : Node_Id; Val : Boolean := True); -- Flag6 8100 8101 procedure Set_Is_Subprogram_Descriptor 8102 (N : Node_Id; Val : Boolean := True); -- Flag16 8103 8104 procedure Set_Is_Task_Allocation_Block 8105 (N : Node_Id; Val : Boolean := True); -- Flag6 8106 8107 procedure Set_Is_Task_Master 8108 (N : Node_Id; Val : Boolean := True); -- Flag5 8109 8110 procedure Set_Iteration_Scheme 8111 (N : Node_Id; Val : Node_Id); -- Node2 8112 8113 procedure Set_Itype 8114 (N : Node_Id; Val : Entity_Id); -- Node1 8115 8116 procedure Set_Kill_Range_Check 8117 (N : Node_Id; Val : Boolean := True); -- Flag11 8118 8119 procedure Set_Last_Bit 8120 (N : Node_Id; Val : Node_Id); -- Node4 8121 8122 procedure Set_Last_Name 8123 (N : Node_Id; Val : Boolean := True); -- Flag6 8124 8125 procedure Set_Library_Unit 8126 (N : Node_Id; Val : Node_Id); -- Node4 8127 8128 procedure Set_Label_Construct 8129 (N : Node_Id; Val : Node_Id); -- Node2 8130 8131 procedure Set_Left_Opnd 8132 (N : Node_Id; Val : Node_Id); -- Node2 8133 8134 procedure Set_Limited_View_Installed 8135 (N : Node_Id; Val : Boolean := True); -- Flag18 8136 8137 procedure Set_Limited_Present 8138 (N : Node_Id; Val : Boolean := True); -- Flag17 8139 8140 procedure Set_Literals 8141 (N : Node_Id; Val : List_Id); -- List1 8142 8143 procedure Set_Loop_Actions 8144 (N : Node_Id; Val : List_Id); -- List2 8145 8146 procedure Set_Loop_Parameter_Specification 8147 (N : Node_Id; Val : Node_Id); -- Node4 8148 8149 procedure Set_Low_Bound 8150 (N : Node_Id; Val : Node_Id); -- Node1 8151 8152 procedure Set_Mod_Clause 8153 (N : Node_Id; Val : Node_Id); -- Node2 8154 8155 procedure Set_More_Ids 8156 (N : Node_Id; Val : Boolean := True); -- Flag5 8157 8158 procedure Set_Must_Be_Byte_Aligned 8159 (N : Node_Id; Val : Boolean := True); -- Flag14 8160 8161 procedure Set_Must_Not_Freeze 8162 (N : Node_Id; Val : Boolean := True); -- Flag8 8163 8164 procedure Set_Name 8165 (N : Node_Id; Val : Node_Id); -- Node2 8166 8167 procedure Set_Names 8168 (N : Node_Id; Val : List_Id); -- List2 8169 8170 procedure Set_Next_Entity 8171 (N : Node_Id; Val : Node_Id); -- Node2 8172 8173 procedure Set_Next_Named_Actual 8174 (N : Node_Id; Val : Node_Id); -- Node4 8175 8176 procedure Set_Next_Rep_Item 8177 (N : Node_Id; Val : Node_Id); -- Node4 8178 8179 procedure Set_Next_Use_Clause 8180 (N : Node_Id; Val : Node_Id); -- Node3 8181 8182 procedure Set_No_Ctrl_Actions 8183 (N : Node_Id; Val : Boolean := True); -- Flag7 8184 8185 procedure Set_No_Elaboration_Check 8186 (N : Node_Id; Val : Boolean := True); -- Flag14 8187 8188 procedure Set_No_Entities_Ref_In_Spec 8189 (N : Node_Id; Val : Boolean := True); -- Flag8 8190 8191 procedure Set_No_Initialization 8192 (N : Node_Id; Val : Boolean := True); -- Flag13 8193 8194 procedure Set_No_Truncation 8195 (N : Node_Id; Val : Boolean := True); -- Flag17 8196 8197 procedure Set_Null_Present 8198 (N : Node_Id; Val : Boolean := True); -- Flag13 8199 8200 procedure Set_Null_Record_Present 8201 (N : Node_Id; Val : Boolean := True); -- Flag17 8202 8203 procedure Set_Object_Definition 8204 (N : Node_Id; Val : Node_Id); -- Node4 8205 8206 procedure Set_OK_For_Stream 8207 (N : Node_Id; Val : Boolean := True); -- Flag4 8208 8209 procedure Set_Original_Discriminant 8210 (N : Node_Id; Val : Node_Id); -- Node2 8211 8212 procedure Set_Original_Entity 8213 (N : Node_Id; Val : Entity_Id); -- Node2 8214 8215 procedure Set_Others_Discrete_Choices 8216 (N : Node_Id; Val : List_Id); -- List1 8217 8218 procedure Set_Out_Present 8219 (N : Node_Id; Val : Boolean := True); -- Flag17 8220 8221 procedure Set_Parameter_Associations 8222 (N : Node_Id; Val : List_Id); -- List3 8223 8224 procedure Set_Parameter_List_Truncated 8225 (N : Node_Id; Val : Boolean := True); -- Flag17 8226 8227 procedure Set_Parameter_Specifications 8228 (N : Node_Id; Val : List_Id); -- List3 8229 8230 procedure Set_Parameter_Type 8231 (N : Node_Id; Val : Node_Id); -- Node2 8232 8233 procedure Set_Parent_Spec 8234 (N : Node_Id; Val : Node_Id); -- Node4 8235 8236 procedure Set_Position 8237 (N : Node_Id; Val : Node_Id); -- Node2 8238 8239 procedure Set_Pragma_Argument_Associations 8240 (N : Node_Id; Val : List_Id); -- List2 8241 8242 procedure Set_Pragmas_After 8243 (N : Node_Id; Val : List_Id); -- List5 8244 8245 procedure Set_Pragmas_Before 8246 (N : Node_Id; Val : List_Id); -- List4 8247 8248 procedure Set_Prefix 8249 (N : Node_Id; Val : Node_Id); -- Node3 8250 8251 procedure Set_Present_Expr 8252 (N : Node_Id; Val : Uint); -- Uint3 8253 8254 procedure Set_Prev_Ids 8255 (N : Node_Id; Val : Boolean := True); -- Flag6 8256 8257 procedure Set_Print_In_Hex 8258 (N : Node_Id; Val : Boolean := True); -- Flag13 8259 8260 procedure Set_Private_Declarations 8261 (N : Node_Id; Val : List_Id); -- List3 8262 8263 procedure Set_Private_Present 8264 (N : Node_Id; Val : Boolean := True); -- Flag15 8265 8266 procedure Set_Procedure_To_Call 8267 (N : Node_Id; Val : Node_Id); -- Node4 8268 8269 procedure Set_Proper_Body 8270 (N : Node_Id; Val : Node_Id); -- Node1 8271 8272 procedure Set_Protected_Definition 8273 (N : Node_Id; Val : Node_Id); -- Node3 8274 8275 procedure Set_Protected_Present 8276 (N : Node_Id; Val : Boolean := True); -- Flag15 8277 8278 procedure Set_Raises_Constraint_Error 8279 (N : Node_Id; Val : Boolean := True); -- Flag7 8280 8281 procedure Set_Range_Constraint 8282 (N : Node_Id; Val : Node_Id); -- Node4 8283 8284 procedure Set_Range_Expression 8285 (N : Node_Id; Val : Node_Id); -- Node4 8286 8287 procedure Set_Real_Range_Specification 8288 (N : Node_Id; Val : Node_Id); -- Node4 8289 8290 procedure Set_Realval 8291 (N : Node_Id; Val : Ureal); -- Ureal3 8292 8293 procedure Set_Reason 8294 (N : Node_Id; Val : Uint); -- Uint3 8295 8296 procedure Set_Record_Extension_Part 8297 (N : Node_Id; Val : Node_Id); -- Node3 8298 8299 procedure Set_Redundant_Use 8300 (N : Node_Id; Val : Boolean := True); -- Flag13 8301 8302 procedure Set_Return_Type 8303 (N : Node_Id; Val : Node_Id); -- Node2 8304 8305 procedure Set_Reverse_Present 8306 (N : Node_Id; Val : Boolean := True); -- Flag15 8307 8308 procedure Set_Right_Opnd 8309 (N : Node_Id; Val : Node_Id); -- Node3 8310 8311 procedure Set_Rounded_Result 8312 (N : Node_Id; Val : Boolean := True); -- Flag18 8313 8314 procedure Set_Scope 8315 (N : Node_Id; Val : Node_Id); -- Node3 8316 8317 procedure Set_Select_Alternatives 8318 (N : Node_Id; Val : List_Id); -- List1 8319 8320 procedure Set_Selector_Name 8321 (N : Node_Id; Val : Node_Id); -- Node2 8322 8323 procedure Set_Selector_Names 8324 (N : Node_Id; Val : List_Id); -- List1 8325 8326 procedure Set_Shift_Count_OK 8327 (N : Node_Id; Val : Boolean := True); -- Flag4 8328 8329 procedure Set_Source_Type 8330 (N : Node_Id; Val : Entity_Id); -- Node1 8331 8332 procedure Set_Specification 8333 (N : Node_Id; Val : Node_Id); -- Node1 8334 8335 procedure Set_Statements 8336 (N : Node_Id; Val : List_Id); -- List3 8337 8338 procedure Set_Static_Processing_OK 8339 (N : Node_Id; Val : Boolean); -- Flag4 8340 8341 procedure Set_Storage_Pool 8342 (N : Node_Id; Val : Node_Id); -- Node1 8343 8344 procedure Set_Strval 8345 (N : Node_Id; Val : String_Id); -- Str3 8346 8347 procedure Set_Subtype_Indication 8348 (N : Node_Id; Val : Node_Id); -- Node5 8349 8350 procedure Set_Subtype_Mark 8351 (N : Node_Id; Val : Node_Id); -- Node4 8352 8353 procedure Set_Subtype_Marks 8354 (N : Node_Id; Val : List_Id); -- List2 8355 8356 procedure Set_Tagged_Present 8357 (N : Node_Id; Val : Boolean := True); -- Flag15 8358 8359 procedure Set_Target_Type 8360 (N : Node_Id; Val : Entity_Id); -- Node2 8361 8362 procedure Set_Task_Body_Procedure 8363 (N : Node_Id; Val : Entity_Id); -- Node2 8364 8365 procedure Set_Task_Definition 8366 (N : Node_Id; Val : Node_Id); -- Node3 8367 8368 procedure Set_Then_Actions 8369 (N : Node_Id; Val : List_Id); -- List2 8370 8371 procedure Set_Then_Statements 8372 (N : Node_Id; Val : List_Id); -- List2 8373 8374 procedure Set_Treat_Fixed_As_Integer 8375 (N : Node_Id; Val : Boolean := True); -- Flag14 8376 8377 procedure Set_Triggering_Alternative 8378 (N : Node_Id; Val : Node_Id); -- Node1 8379 8380 procedure Set_Triggering_Statement 8381 (N : Node_Id; Val : Node_Id); -- Node1 8382 8383 procedure Set_TSS_Elist 8384 (N : Node_Id; Val : Elist_Id); -- Elist3 8385 8386 procedure Set_Type_Definition 8387 (N : Node_Id; Val : Node_Id); -- Node3 8388 8389 procedure Set_Unit 8390 (N : Node_Id; Val : Node_Id); -- Node2 8391 8392 procedure Set_Unknown_Discriminants_Present 8393 (N : Node_Id; Val : Boolean := True); -- Flag13 8394 8395 procedure Set_Unreferenced_In_Spec 8396 (N : Node_Id; Val : Boolean := True); -- Flag7 8397 8398 procedure Set_Variant_Part 8399 (N : Node_Id; Val : Node_Id); -- Node4 8400 8401 procedure Set_Variants 8402 (N : Node_Id; Val : List_Id); -- List1 8403 8404 procedure Set_Visible_Declarations 8405 (N : Node_Id; Val : List_Id); -- List2 8406 8407 procedure Set_Was_Originally_Stub 8408 (N : Node_Id; Val : Boolean := True); -- Flag13 8409 8410 procedure Set_Zero_Cost_Handling 8411 (N : Node_Id; Val : Boolean := True); -- Flag5 8412 8413 ------------------------- 8414 -- Iterator Procedures -- 8415 ------------------------- 8416 8417 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N) 8418 8419 procedure Next_Entity (N : in out Node_Id); 8420 procedure Next_Named_Actual (N : in out Node_Id); 8421 procedure Next_Rep_Item (N : in out Node_Id); 8422 procedure Next_Use_Clause (N : in out Node_Id); 8423 8424 -------------------------------------- 8425 -- Logical Access to End_Span Field -- 8426 -------------------------------------- 8427 8428 function End_Location (N : Node_Id) return Source_Ptr; 8429 -- N is an N_If_Statement or N_Case_Statement node, and this 8430 -- function returns the location of the IF token in the END IF 8431 -- sequence by translating the value of the End_Span field. 8432 8433 procedure Set_End_Location (N : Node_Id; S : Source_Ptr); 8434 -- N is an N_If_Statement or N_Case_Statement node. This procedure 8435 -- sets the End_Span field to correspond to the given value S. In 8436 -- other words, End_Span is set to the difference between S and 8437 -- Sloc (N), the starting location. 8438 8439 -------------------- 8440 -- Inline Pragmas -- 8441 -------------------- 8442 8443 pragma Inline (ABE_Is_Certain); 8444 pragma Inline (Abort_Present); 8445 pragma Inline (Abortable_Part); 8446 pragma Inline (Abstract_Present); 8447 pragma Inline (Accept_Handler_Records); 8448 pragma Inline (Accept_Statement); 8449 pragma Inline (Access_Types_To_Process); 8450 pragma Inline (Actions); 8451 pragma Inline (Activation_Chain_Entity); 8452 pragma Inline (Acts_As_Spec); 8453 pragma Inline (Aggregate_Bounds); 8454 pragma Inline (Aliased_Present); 8455 pragma Inline (All_Others); 8456 pragma Inline (All_Present); 8457 pragma Inline (Alternatives); 8458 pragma Inline (Ancestor_Part); 8459 pragma Inline (Array_Aggregate); 8460 pragma Inline (Assignment_OK); 8461 pragma Inline (Associated_Node); 8462 pragma Inline (At_End_Proc); 8463 pragma Inline (Attribute_Name); 8464 pragma Inline (Aux_Decls_Node); 8465 pragma Inline (Backwards_OK); 8466 pragma Inline (Bad_Is_Detected); 8467 pragma Inline (Body_To_Inline); 8468 pragma Inline (Body_Required); 8469 pragma Inline (By_Ref); 8470 pragma Inline (Box_Present); 8471 pragma Inline (Char_Literal_Value); 8472 pragma Inline (Chars); 8473 pragma Inline (Check_Address_Alignment); 8474 pragma Inline (Choice_Parameter); 8475 pragma Inline (Choices); 8476 pragma Inline (Compile_Time_Known_Aggregate); 8477 pragma Inline (Component_Associations); 8478 pragma Inline (Component_Clauses); 8479 pragma Inline (Component_Definition); 8480 pragma Inline (Component_Items); 8481 pragma Inline (Component_List); 8482 pragma Inline (Component_Name); 8483 pragma Inline (Condition); 8484 pragma Inline (Condition_Actions); 8485 pragma Inline (Config_Pragmas); 8486 pragma Inline (Constant_Present); 8487 pragma Inline (Constraint); 8488 pragma Inline (Constraints); 8489 pragma Inline (Context_Installed); 8490 pragma Inline (Context_Items); 8491 pragma Inline (Controlling_Argument); 8492 pragma Inline (Conversion_OK); 8493 pragma Inline (Corresponding_Body); 8494 pragma Inline (Corresponding_Generic_Association); 8495 pragma Inline (Corresponding_Integer_Value); 8496 pragma Inline (Corresponding_Spec); 8497 pragma Inline (Corresponding_Stub); 8498 pragma Inline (Dcheck_Function); 8499 pragma Inline (Debug_Statement); 8500 pragma Inline (Declarations); 8501 pragma Inline (Default_Expression); 8502 pragma Inline (Default_Name); 8503 pragma Inline (Defining_Identifier); 8504 pragma Inline (Defining_Unit_Name); 8505 pragma Inline (Delay_Alternative); 8506 pragma Inline (Delay_Finalize_Attach); 8507 pragma Inline (Delay_Statement); 8508 pragma Inline (Delta_Expression); 8509 pragma Inline (Digits_Expression); 8510 pragma Inline (Discr_Check_Funcs_Built); 8511 pragma Inline (Discrete_Choices); 8512 pragma Inline (Discrete_Range); 8513 pragma Inline (Discrete_Subtype_Definition); 8514 pragma Inline (Discrete_Subtype_Definitions); 8515 pragma Inline (Discriminant_Specifications); 8516 pragma Inline (Discriminant_Type); 8517 pragma Inline (Do_Accessibility_Check); 8518 pragma Inline (Do_Discriminant_Check); 8519 pragma Inline (Do_Length_Check); 8520 pragma Inline (Do_Division_Check); 8521 pragma Inline (Do_Overflow_Check); 8522 pragma Inline (Do_Range_Check); 8523 pragma Inline (Do_Storage_Check); 8524 pragma Inline (Do_Tag_Check); 8525 pragma Inline (Elaborate_Present); 8526 pragma Inline (Elaborate_All_Present); 8527 pragma Inline (Elaboration_Boolean); 8528 pragma Inline (Else_Actions); 8529 pragma Inline (Else_Statements); 8530 pragma Inline (Elsif_Parts); 8531 pragma Inline (Enclosing_Variant); 8532 pragma Inline (End_Label); 8533 pragma Inline (End_Span); 8534 pragma Inline (Entity); 8535 pragma Inline (Entity_Or_Associated_Node); 8536 pragma Inline (Entry_Body_Formal_Part); 8537 pragma Inline (Entry_Call_Alternative); 8538 pragma Inline (Entry_Call_Statement); 8539 pragma Inline (Entry_Direct_Name); 8540 pragma Inline (Entry_Index); 8541 pragma Inline (Entry_Index_Specification); 8542 pragma Inline (Etype); 8543 pragma Inline (Exception_Choices); 8544 pragma Inline (Exception_Junk); 8545 pragma Inline (Exception_Handlers); 8546 pragma Inline (Expansion_Delayed); 8547 pragma Inline (Explicit_Actual_Parameter); 8548 pragma Inline (Explicit_Generic_Actual_Parameter); 8549 pragma Inline (Expression); 8550 pragma Inline (Expressions); 8551 pragma Inline (First_Bit); 8552 pragma Inline (First_Inlined_Subprogram); 8553 pragma Inline (First_Name); 8554 pragma Inline (First_Named_Actual); 8555 pragma Inline (First_Real_Statement); 8556 pragma Inline (First_Subtype_Link); 8557 pragma Inline (Float_Truncate); 8558 pragma Inline (Formal_Type_Definition); 8559 pragma Inline (Forwards_OK); 8560 pragma Inline (From_At_Mod); 8561 pragma Inline (Generic_Associations); 8562 pragma Inline (Generic_Formal_Declarations); 8563 pragma Inline (Generic_Parent); 8564 pragma Inline (Generic_Parent_Type); 8565 pragma Inline (Handled_Statement_Sequence); 8566 pragma Inline (Handler_List_Entry); 8567 pragma Inline (Has_Created_Identifier); 8568 pragma Inline (Has_Dynamic_Length_Check); 8569 pragma Inline (Has_Dynamic_Range_Check); 8570 pragma Inline (Has_No_Elaboration_Code); 8571 pragma Inline (Has_Priority_Pragma); 8572 pragma Inline (Has_Private_View); 8573 pragma Inline (Has_Storage_Size_Pragma); 8574 pragma Inline (Has_Task_Info_Pragma); 8575 pragma Inline (Has_Task_Name_Pragma); 8576 pragma Inline (Has_Wide_Character); 8577 pragma Inline (Hidden_By_Use_Clause); 8578 pragma Inline (High_Bound); 8579 pragma Inline (Identifier); 8580 pragma Inline (Implicit_With); 8581 pragma Inline (Includes_Infinities); 8582 pragma Inline (In_Present); 8583 pragma Inline (Instance_Spec); 8584 pragma Inline (Intval); 8585 pragma Inline (Is_Asynchronous_Call_Block); 8586 pragma Inline (Is_Component_Left_Opnd); 8587 pragma Inline (Is_Component_Right_Opnd); 8588 pragma Inline (Is_Controlling_Actual); 8589 pragma Inline (Is_In_Discriminant_Check); 8590 pragma Inline (Is_Machine_Number); 8591 pragma Inline (Is_Null_Loop); 8592 pragma Inline (Is_Overloaded); 8593 pragma Inline (Is_Power_Of_2_For_Shift); 8594 pragma Inline (Is_Protected_Subprogram_Body); 8595 pragma Inline (Is_Static_Expression); 8596 pragma Inline (Is_Subprogram_Descriptor); 8597 pragma Inline (Is_Task_Allocation_Block); 8598 pragma Inline (Is_Task_Master); 8599 pragma Inline (Iteration_Scheme); 8600 pragma Inline (Itype); 8601 pragma Inline (Kill_Range_Check); 8602 pragma Inline (Last_Bit); 8603 pragma Inline (Last_Name); 8604 pragma Inline (Library_Unit); 8605 pragma Inline (Label_Construct); 8606 pragma Inline (Left_Opnd); 8607 pragma Inline (Limited_View_Installed); 8608 pragma Inline (Limited_Present); 8609 pragma Inline (Literals); 8610 pragma Inline (Loop_Actions); 8611 pragma Inline (Loop_Parameter_Specification); 8612 pragma Inline (Low_Bound); 8613 pragma Inline (Mod_Clause); 8614 pragma Inline (More_Ids); 8615 pragma Inline (Must_Be_Byte_Aligned); 8616 pragma Inline (Must_Not_Freeze); 8617 pragma Inline (Name); 8618 pragma Inline (Names); 8619 pragma Inline (Next_Entity); 8620 pragma Inline (Next_Named_Actual); 8621 pragma Inline (Next_Rep_Item); 8622 pragma Inline (Next_Use_Clause); 8623 pragma Inline (No_Ctrl_Actions); 8624 pragma Inline (No_Elaboration_Check); 8625 pragma Inline (No_Entities_Ref_In_Spec); 8626 pragma Inline (No_Initialization); 8627 pragma Inline (No_Truncation); 8628 pragma Inline (Null_Present); 8629 pragma Inline (Null_Record_Present); 8630 pragma Inline (Object_Definition); 8631 pragma Inline (OK_For_Stream); 8632 pragma Inline (Original_Discriminant); 8633 pragma Inline (Original_Entity); 8634 pragma Inline (Others_Discrete_Choices); 8635 pragma Inline (Out_Present); 8636 pragma Inline (Parameter_Associations); 8637 pragma Inline (Parameter_Specifications); 8638 pragma Inline (Parameter_List_Truncated); 8639 pragma Inline (Parameter_Type); 8640 pragma Inline (Parent_Spec); 8641 pragma Inline (Position); 8642 pragma Inline (Pragma_Argument_Associations); 8643 pragma Inline (Pragmas_After); 8644 pragma Inline (Pragmas_Before); 8645 pragma Inline (Prefix); 8646 pragma Inline (Present_Expr); 8647 pragma Inline (Prev_Ids); 8648 pragma Inline (Print_In_Hex); 8649 pragma Inline (Private_Declarations); 8650 pragma Inline (Private_Present); 8651 pragma Inline (Procedure_To_Call); 8652 pragma Inline (Proper_Body); 8653 pragma Inline (Protected_Definition); 8654 pragma Inline (Protected_Present); 8655 pragma Inline (Raises_Constraint_Error); 8656 pragma Inline (Range_Constraint); 8657 pragma Inline (Range_Expression); 8658 pragma Inline (Real_Range_Specification); 8659 pragma Inline (Realval); 8660 pragma Inline (Reason); 8661 pragma Inline (Record_Extension_Part); 8662 pragma Inline (Redundant_Use); 8663 pragma Inline (Return_Type); 8664 pragma Inline (Reverse_Present); 8665 pragma Inline (Right_Opnd); 8666 pragma Inline (Rounded_Result); 8667 pragma Inline (Scope); 8668 pragma Inline (Select_Alternatives); 8669 pragma Inline (Selector_Name); 8670 pragma Inline (Selector_Names); 8671 pragma Inline (Shift_Count_OK); 8672 pragma Inline (Source_Type); 8673 pragma Inline (Specification); 8674 pragma Inline (Statements); 8675 pragma Inline (Static_Processing_OK); 8676 pragma Inline (Storage_Pool); 8677 pragma Inline (Strval); 8678 pragma Inline (Subtype_Indication); 8679 pragma Inline (Subtype_Mark); 8680 pragma Inline (Subtype_Marks); 8681 pragma Inline (Tagged_Present); 8682 pragma Inline (Target_Type); 8683 pragma Inline (Task_Body_Procedure); 8684 pragma Inline (Task_Definition); 8685 pragma Inline (Then_Actions); 8686 pragma Inline (Then_Statements); 8687 pragma Inline (Triggering_Alternative); 8688 pragma Inline (Triggering_Statement); 8689 pragma Inline (Treat_Fixed_As_Integer); 8690 pragma Inline (TSS_Elist); 8691 pragma Inline (Type_Definition); 8692 pragma Inline (Unit); 8693 pragma Inline (Unknown_Discriminants_Present); 8694 pragma Inline (Unreferenced_In_Spec); 8695 pragma Inline (Variant_Part); 8696 pragma Inline (Variants); 8697 pragma Inline (Visible_Declarations); 8698 pragma Inline (Was_Originally_Stub); 8699 pragma Inline (Zero_Cost_Handling); 8700 8701 pragma Inline (Set_ABE_Is_Certain); 8702 pragma Inline (Set_Abort_Present); 8703 pragma Inline (Set_Abortable_Part); 8704 pragma Inline (Set_Abstract_Present); 8705 pragma Inline (Set_Accept_Handler_Records); 8706 pragma Inline (Set_Accept_Statement); 8707 pragma Inline (Set_Access_Types_To_Process); 8708 pragma Inline (Set_Actions); 8709 pragma Inline (Set_Activation_Chain_Entity); 8710 pragma Inline (Set_Acts_As_Spec); 8711 pragma Inline (Set_Aggregate_Bounds); 8712 pragma Inline (Set_Aliased_Present); 8713 pragma Inline (Set_All_Others); 8714 pragma Inline (Set_All_Present); 8715 pragma Inline (Set_Alternatives); 8716 pragma Inline (Set_Ancestor_Part); 8717 pragma Inline (Set_Array_Aggregate); 8718 pragma Inline (Set_Assignment_OK); 8719 pragma Inline (Set_Associated_Node); 8720 pragma Inline (Set_At_End_Proc); 8721 pragma Inline (Set_Attribute_Name); 8722 pragma Inline (Set_Aux_Decls_Node); 8723 pragma Inline (Set_Backwards_OK); 8724 pragma Inline (Set_Bad_Is_Detected); 8725 pragma Inline (Set_Body_To_Inline); 8726 pragma Inline (Set_Body_Required); 8727 pragma Inline (Set_By_Ref); 8728 pragma Inline (Set_Box_Present); 8729 pragma Inline (Set_Char_Literal_Value); 8730 pragma Inline (Set_Chars); 8731 pragma Inline (Set_Check_Address_Alignment); 8732 pragma Inline (Set_Choice_Parameter); 8733 pragma Inline (Set_Choices); 8734 pragma Inline (Set_Compile_Time_Known_Aggregate); 8735 pragma Inline (Set_Component_Associations); 8736 pragma Inline (Set_Component_Clauses); 8737 pragma Inline (Set_Component_Definition); 8738 pragma Inline (Set_Component_Items); 8739 pragma Inline (Set_Component_List); 8740 pragma Inline (Set_Component_Name); 8741 pragma Inline (Set_Condition); 8742 pragma Inline (Set_Condition_Actions); 8743 pragma Inline (Set_Config_Pragmas); 8744 pragma Inline (Set_Constant_Present); 8745 pragma Inline (Set_Constraint); 8746 pragma Inline (Set_Constraints); 8747 pragma Inline (Set_Context_Installed); 8748 pragma Inline (Set_Context_Items); 8749 pragma Inline (Set_Controlling_Argument); 8750 pragma Inline (Set_Conversion_OK); 8751 pragma Inline (Set_Corresponding_Body); 8752 pragma Inline (Set_Corresponding_Generic_Association); 8753 pragma Inline (Set_Corresponding_Integer_Value); 8754 pragma Inline (Set_Corresponding_Spec); 8755 pragma Inline (Set_Corresponding_Stub); 8756 pragma Inline (Set_Dcheck_Function); 8757 pragma Inline (Set_Debug_Statement); 8758 pragma Inline (Set_Declarations); 8759 pragma Inline (Set_Default_Expression); 8760 pragma Inline (Set_Default_Name); 8761 pragma Inline (Set_Defining_Identifier); 8762 pragma Inline (Set_Defining_Unit_Name); 8763 pragma Inline (Set_Delay_Alternative); 8764 pragma Inline (Set_Delay_Finalize_Attach); 8765 pragma Inline (Set_Delay_Statement); 8766 pragma Inline (Set_Delta_Expression); 8767 pragma Inline (Set_Digits_Expression); 8768 pragma Inline (Set_Discr_Check_Funcs_Built); 8769 pragma Inline (Set_Discrete_Choices); 8770 pragma Inline (Set_Discrete_Range); 8771 pragma Inline (Set_Discrete_Subtype_Definition); 8772 pragma Inline (Set_Discrete_Subtype_Definitions); 8773 pragma Inline (Set_Discriminant_Specifications); 8774 pragma Inline (Set_Discriminant_Type); 8775 pragma Inline (Set_Do_Accessibility_Check); 8776 pragma Inline (Set_Do_Discriminant_Check); 8777 pragma Inline (Set_Do_Length_Check); 8778 pragma Inline (Set_Do_Division_Check); 8779 pragma Inline (Set_Do_Overflow_Check); 8780 pragma Inline (Set_Do_Range_Check); 8781 pragma Inline (Set_Do_Storage_Check); 8782 pragma Inline (Set_Do_Tag_Check); 8783 pragma Inline (Set_Elaborate_Present); 8784 pragma Inline (Set_Elaborate_All_Present); 8785 pragma Inline (Set_Elaboration_Boolean); 8786 pragma Inline (Set_Else_Actions); 8787 pragma Inline (Set_Else_Statements); 8788 pragma Inline (Set_Elsif_Parts); 8789 pragma Inline (Set_Enclosing_Variant); 8790 pragma Inline (Set_End_Label); 8791 pragma Inline (Set_End_Span); 8792 pragma Inline (Set_Entity); 8793 pragma Inline (Set_Entry_Body_Formal_Part); 8794 pragma Inline (Set_Entry_Call_Alternative); 8795 pragma Inline (Set_Entry_Call_Statement); 8796 pragma Inline (Set_Entry_Direct_Name); 8797 pragma Inline (Set_Entry_Index); 8798 pragma Inline (Set_Entry_Index_Specification); 8799 pragma Inline (Set_Etype); 8800 pragma Inline (Set_Exception_Choices); 8801 pragma Inline (Set_Exception_Junk); 8802 pragma Inline (Set_Exception_Handlers); 8803 pragma Inline (Set_Expansion_Delayed); 8804 pragma Inline (Set_Explicit_Actual_Parameter); 8805 pragma Inline (Set_Explicit_Generic_Actual_Parameter); 8806 pragma Inline (Set_Expression); 8807 pragma Inline (Set_Expressions); 8808 pragma Inline (Set_First_Bit); 8809 pragma Inline (Set_First_Inlined_Subprogram); 8810 pragma Inline (Set_First_Name); 8811 pragma Inline (Set_First_Named_Actual); 8812 pragma Inline (Set_First_Real_Statement); 8813 pragma Inline (Set_First_Subtype_Link); 8814 pragma Inline (Set_Float_Truncate); 8815 pragma Inline (Set_Formal_Type_Definition); 8816 pragma Inline (Set_Forwards_OK); 8817 pragma Inline (Set_From_At_Mod); 8818 pragma Inline (Set_Generic_Associations); 8819 pragma Inline (Set_Generic_Formal_Declarations); 8820 pragma Inline (Set_Generic_Parent); 8821 pragma Inline (Set_Generic_Parent_Type); 8822 pragma Inline (Set_Handled_Statement_Sequence); 8823 pragma Inline (Set_Handler_List_Entry); 8824 pragma Inline (Set_Has_Created_Identifier); 8825 pragma Inline (Set_Has_Dynamic_Length_Check); 8826 pragma Inline (Set_Has_Dynamic_Range_Check); 8827 pragma Inline (Set_Has_No_Elaboration_Code); 8828 pragma Inline (Set_Has_Priority_Pragma); 8829 pragma Inline (Set_Has_Private_View); 8830 pragma Inline (Set_Has_Storage_Size_Pragma); 8831 pragma Inline (Set_Has_Task_Info_Pragma); 8832 pragma Inline (Set_Has_Task_Name_Pragma); 8833 pragma Inline (Set_Has_Wide_Character); 8834 pragma Inline (Set_Hidden_By_Use_Clause); 8835 pragma Inline (Set_High_Bound); 8836 pragma Inline (Set_Identifier); 8837 pragma Inline (Set_Implicit_With); 8838 pragma Inline (Set_Includes_Infinities); 8839 pragma Inline (Set_In_Present); 8840 pragma Inline (Set_Instance_Spec); 8841 pragma Inline (Set_Intval); 8842 pragma Inline (Set_Is_Asynchronous_Call_Block); 8843 pragma Inline (Set_Is_Component_Left_Opnd); 8844 pragma Inline (Set_Is_Component_Right_Opnd); 8845 pragma Inline (Set_Is_Controlling_Actual); 8846 pragma Inline (Set_Is_In_Discriminant_Check); 8847 pragma Inline (Set_Is_Machine_Number); 8848 pragma Inline (Set_Is_Null_Loop); 8849 pragma Inline (Set_Is_Overloaded); 8850 pragma Inline (Set_Is_Power_Of_2_For_Shift); 8851 pragma Inline (Set_Is_Protected_Subprogram_Body); 8852 pragma Inline (Set_Is_Static_Expression); 8853 pragma Inline (Set_Is_Subprogram_Descriptor); 8854 pragma Inline (Set_Is_Task_Allocation_Block); 8855 pragma Inline (Set_Is_Task_Master); 8856 pragma Inline (Set_Iteration_Scheme); 8857 pragma Inline (Set_Itype); 8858 pragma Inline (Set_Kill_Range_Check); 8859 pragma Inline (Set_Last_Bit); 8860 pragma Inline (Set_Last_Name); 8861 pragma Inline (Set_Library_Unit); 8862 pragma Inline (Set_Label_Construct); 8863 pragma Inline (Set_Left_Opnd); 8864 pragma Inline (Set_Limited_View_Installed); 8865 pragma Inline (Set_Limited_Present); 8866 pragma Inline (Set_Literals); 8867 pragma Inline (Set_Loop_Actions); 8868 pragma Inline (Set_Loop_Parameter_Specification); 8869 pragma Inline (Set_Low_Bound); 8870 pragma Inline (Set_Mod_Clause); 8871 pragma Inline (Set_More_Ids); 8872 pragma Inline (Set_Must_Be_Byte_Aligned); 8873 pragma Inline (Set_Must_Not_Freeze); 8874 pragma Inline (Set_Name); 8875 pragma Inline (Set_Names); 8876 pragma Inline (Set_Next_Entity); 8877 pragma Inline (Set_Next_Named_Actual); 8878 pragma Inline (Set_Next_Use_Clause); 8879 pragma Inline (Set_No_Ctrl_Actions); 8880 pragma Inline (Set_No_Elaboration_Check); 8881 pragma Inline (Set_No_Entities_Ref_In_Spec); 8882 pragma Inline (Set_No_Initialization); 8883 pragma Inline (Set_No_Truncation); 8884 pragma Inline (Set_Null_Present); 8885 pragma Inline (Set_Null_Record_Present); 8886 pragma Inline (Set_Object_Definition); 8887 pragma Inline (Set_OK_For_Stream); 8888 pragma Inline (Set_Original_Discriminant); 8889 pragma Inline (Set_Original_Entity); 8890 pragma Inline (Set_Others_Discrete_Choices); 8891 pragma Inline (Set_Out_Present); 8892 pragma Inline (Set_Parameter_Associations); 8893 pragma Inline (Set_Parameter_Specifications); 8894 pragma Inline (Set_Parameter_List_Truncated); 8895 pragma Inline (Set_Parameter_Type); 8896 pragma Inline (Set_Parent_Spec); 8897 pragma Inline (Set_Position); 8898 pragma Inline (Set_Pragma_Argument_Associations); 8899 pragma Inline (Set_Pragmas_After); 8900 pragma Inline (Set_Pragmas_Before); 8901 pragma Inline (Set_Prefix); 8902 pragma Inline (Set_Present_Expr); 8903 pragma Inline (Set_Prev_Ids); 8904 pragma Inline (Set_Print_In_Hex); 8905 pragma Inline (Set_Private_Declarations); 8906 pragma Inline (Set_Private_Present); 8907 pragma Inline (Set_Procedure_To_Call); 8908 pragma Inline (Set_Proper_Body); 8909 pragma Inline (Set_Protected_Definition); 8910 pragma Inline (Set_Protected_Present); 8911 pragma Inline (Set_Raises_Constraint_Error); 8912 pragma Inline (Set_Range_Constraint); 8913 pragma Inline (Set_Range_Expression); 8914 pragma Inline (Set_Real_Range_Specification); 8915 pragma Inline (Set_Realval); 8916 pragma Inline (Set_Reason); 8917 pragma Inline (Set_Record_Extension_Part); 8918 pragma Inline (Set_Redundant_Use); 8919 pragma Inline (Set_Return_Type); 8920 pragma Inline (Set_Reverse_Present); 8921 pragma Inline (Set_Right_Opnd); 8922 pragma Inline (Set_Rounded_Result); 8923 pragma Inline (Set_Scope); 8924 pragma Inline (Set_Select_Alternatives); 8925 pragma Inline (Set_Selector_Name); 8926 pragma Inline (Set_Selector_Names); 8927 pragma Inline (Set_Shift_Count_OK); 8928 pragma Inline (Set_Source_Type); 8929 pragma Inline (Set_Specification); 8930 pragma Inline (Set_Statements); 8931 pragma Inline (Set_Static_Processing_OK); 8932 pragma Inline (Set_Storage_Pool); 8933 pragma Inline (Set_Strval); 8934 pragma Inline (Set_Subtype_Indication); 8935 pragma Inline (Set_Subtype_Mark); 8936 pragma Inline (Set_Subtype_Marks); 8937 pragma Inline (Set_Tagged_Present); 8938 pragma Inline (Set_Target_Type); 8939 pragma Inline (Set_Task_Body_Procedure); 8940 pragma Inline (Set_Task_Definition); 8941 pragma Inline (Set_Then_Actions); 8942 pragma Inline (Set_Then_Statements); 8943 pragma Inline (Set_Triggering_Alternative); 8944 pragma Inline (Set_Triggering_Statement); 8945 pragma Inline (Set_Treat_Fixed_As_Integer); 8946 pragma Inline (Set_TSS_Elist); 8947 pragma Inline (Set_Type_Definition); 8948 pragma Inline (Set_Unit); 8949 pragma Inline (Set_Unknown_Discriminants_Present); 8950 pragma Inline (Set_Unreferenced_In_Spec); 8951 pragma Inline (Set_Variant_Part); 8952 pragma Inline (Set_Variants); 8953 pragma Inline (Set_Visible_Declarations); 8954 pragma Inline (Set_Was_Originally_Stub); 8955 pragma Inline (Set_Zero_Cost_Handling); 8956 8957end Sinfo; 8958