config/sparc/sol2-bi.h: Revert previous delta.
[official-gcc.git] / gcc / ada / snames.adb
blob9a1a1beb6ae92f612513d84c6a57b389129ebb03
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S N A M E S --
6 -- --
7 -- B o d y --
8 -- --
9 -- --
10 -- Copyright (C) 1992-2002, Free Software Foundation, Inc. --
11 -- --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
22 -- --
23 -- As a special exception, if other files instantiate generics from this --
24 -- unit, or you link this unit with other files to produce an executable, --
25 -- this unit does not by itself cause the resulting executable to be --
26 -- covered by the GNU General Public License. This exception does not --
27 -- however invalidate any other reasons why the executable file might be --
28 -- covered by the GNU Public License. --
29 -- --
30 -- GNAT was originally developed by the GNAT team at New York University. --
31 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 -- --
33 ------------------------------------------------------------------------------
35 with Namet; use Namet;
36 with Table;
38 package body Snames is
40 -- Table used to record convention identifiers
42 type Convention_Id_Entry is record
43 Name : Name_Id;
44 Convention : Convention_Id;
45 end record;
47 package Convention_Identifiers is new Table.Table (
48 Table_Component_Type => Convention_Id_Entry,
49 Table_Index_Type => Int,
50 Table_Low_Bound => 1,
51 Table_Initial => 50,
52 Table_Increment => 200,
53 Table_Name => "Name_Convention_Identifiers");
55 -- Table of names to be set by Initialize. Each name is terminated by a
56 -- single #, and the end of the list is marked by a null entry, i.e. by
57 -- two # marks in succession. Note that the table does not include the
58 -- entries for a-z, since these are initialized by Namet itself.
60 Preset_Names : constant String :=
61 "_parent#" &
62 "_tag#" &
63 "off#" &
64 "space#" &
65 "time#" &
66 "_init_proc#" &
67 "_size#" &
68 "_abort_signal#" &
69 "_address_resolver#" &
70 "_assign#" &
71 "_chain#" &
72 "_clean#" &
73 "_controller#" &
74 "_entry_bodies#" &
75 "_expunge#" &
76 "_final_list#" &
77 "_idepth#" &
78 "_init#" &
79 "_local_final_list#" &
80 "_master#" &
81 "_object#" &
82 "_priority#" &
83 "_service#" &
84 "_tags#" &
85 "_task#" &
86 "_task_id#" &
87 "_task_info#" &
88 "_task_name#" &
89 "_trace_sp#" &
90 "initialize#" &
91 "adjust#" &
92 "finalize#" &
93 "next#" &
94 "prev#" &
95 "_deep_adjust#" &
96 "_equality#" &
97 "_deep_finalize#" &
98 "_deep_initialize#" &
99 "_input#" &
100 "_output#" &
101 "_ras_access#" &
102 "_ras_dereference#" &
103 "_read#" &
104 "_rep_to_pos#" &
105 "_write#" &
106 "allocate#" &
107 "deallocate#" &
108 "dereference#" &
109 "decimal_io#" &
110 "enumeration_io#" &
111 "fixed_io#" &
112 "float_io#" &
113 "integer_io#" &
114 "modular_io#" &
115 "a_textio#" &
116 "a_witeio#" &
117 "const#" &
118 "<error>#" &
119 "go#" &
120 "put#" &
121 "put_line#" &
122 "to#" &
123 "finalization#" &
124 "finalization_root#" &
125 "interfaces#" &
126 "standard#" &
127 "system#" &
128 "text_io#" &
129 "wide_text_io#" &
130 "addr#" &
131 "async#" &
132 "get_active_partition_id#" &
133 "get_rci_package_receiver#" &
134 "origin#" &
135 "params#" &
136 "partition#" &
137 "partition_interface#" &
138 "ras#" &
139 "rci_name#" &
140 "receiver#" &
141 "result#" &
142 "rpc#" &
143 "subp_id#" &
144 "Oabs#" &
145 "Oand#" &
146 "Omod#" &
147 "Onot#" &
148 "Oor#" &
149 "Orem#" &
150 "Oxor#" &
151 "Oeq#" &
152 "One#" &
153 "Olt#" &
154 "Ole#" &
155 "Ogt#" &
156 "Oge#" &
157 "Oadd#" &
158 "Osubtract#" &
159 "Oconcat#" &
160 "Omultiply#" &
161 "Odivide#" &
162 "Oexpon#" &
163 "ada_83#" &
164 "ada_95#" &
165 "c_pass_by_copy#" &
166 "component_alignment#" &
167 "convention_identifier#" &
168 "discard_names#" &
169 "elaboration_checks#" &
170 "eliminate#" &
171 "extend_system#" &
172 "extensions_allowed#" &
173 "external_name_casing#" &
174 "float_representation#" &
175 "initialize_scalars#" &
176 "license#" &
177 "locking_policy#" &
178 "long_float#" &
179 "no_run_time#" &
180 "normalize_scalars#" &
181 "polling#" &
182 "propagate_exceptions#" &
183 "queuing_policy#" &
184 "ravenscar#" &
185 "restricted_run_time#" &
186 "restrictions#" &
187 "reviewable#" &
188 "source_file_name#" &
189 "style_checks#" &
190 "suppress#" &
191 "task_dispatching_policy#" &
192 "unsuppress#" &
193 "use_vads_size#" &
194 "warnings#" &
195 "validity_checks#" &
196 "abort_defer#" &
197 "all_calls_remote#" &
198 "annotate#" &
199 "assert#" &
200 "asynchronous#" &
201 "atomic#" &
202 "atomic_components#" &
203 "attach_handler#" &
204 "comment#" &
205 "common_object#" &
206 "complex_representation#" &
207 "controlled#" &
208 "convention#" &
209 "cpp_class#" &
210 "cpp_constructor#" &
211 "cpp_virtual#" &
212 "cpp_vtable#" &
213 "debug#" &
214 "elaborate#" &
215 "elaborate_all#" &
216 "elaborate_body#" &
217 "export#" &
218 "export_exception#" &
219 "export_function#" &
220 "export_object#" &
221 "export_procedure#" &
222 "export_valued_procedure#" &
223 "external#" &
224 "finalize_storage_only#" &
225 "ident#" &
226 "import#" &
227 "import_exception#" &
228 "import_function#" &
229 "import_object#" &
230 "import_procedure#" &
231 "import_valued_procedure#" &
232 "inline#" &
233 "inline_always#" &
234 "inline_generic#" &
235 "inspection_point#" &
236 "interface#" &
237 "interface_name#" &
238 "interrupt_handler#" &
239 "interrupt_priority#" &
240 "java_constructor#" &
241 "java_interface#" &
242 "link_with#" &
243 "linker_alias#" &
244 "linker_options#" &
245 "linker_section#" &
246 "list#" &
247 "machine_attribute#" &
248 "main#" &
249 "main_storage#" &
250 "memory_size#" &
251 "no_return#" &
252 "optimize#" &
253 "pack#" &
254 "page#" &
255 "passive#" &
256 "preelaborate#" &
257 "priority#" &
258 "psect_object#" &
259 "pure#" &
260 "pure_function#" &
261 "remote_call_interface#" &
262 "remote_types#" &
263 "share_generic#" &
264 "shared#" &
265 "shared_passive#" &
266 "source_reference#" &
267 "stream_convert#" &
268 "subtitle#" &
269 "suppress_all#" &
270 "suppress_debug_info#" &
271 "suppress_initialization#" &
272 "system_name#" &
273 "task_info#" &
274 "task_name#" &
275 "task_storage#" &
276 "time_slice#" &
277 "title#" &
278 "unchecked_union#" &
279 "unimplemented_unit#" &
280 "universal_data#" &
281 "unreferenced#" &
282 "unreserve_all_interrupts#" &
283 "volatile#" &
284 "volatile_components#" &
285 "weak_external#" &
286 "ada#" &
287 "assembler#" &
288 "cobol#" &
289 "cpp#" &
290 "fortran#" &
291 "intrinsic#" &
292 "java#" &
293 "stdcall#" &
294 "stubbed#" &
295 "asm#" &
296 "assembly#" &
297 "default#" &
298 "dll#" &
299 "win32#" &
300 "as_is#" &
301 "body_file_name#" &
302 "casing#" &
303 "code#" &
304 "component#" &
305 "component_size_4#" &
306 "copy#" &
307 "d_float#" &
308 "descriptor#" &
309 "dot_replacement#" &
310 "dynamic#" &
311 "entity#" &
312 "external_name#" &
313 "first_optional_parameter#" &
314 "form#" &
315 "g_float#" &
316 "gcc#" &
317 "gnat#" &
318 "gpl#" &
319 "ieee_float#" &
320 "homonym_number#" &
321 "internal#" &
322 "link_name#" &
323 "lowercase#" &
324 "max_size#" &
325 "mechanism#" &
326 "mixedcase#" &
327 "modified_gpl#" &
328 "name#" &
329 "nca#" &
330 "no#" &
331 "on#" &
332 "parameter_types#" &
333 "reference#" &
334 "restricted#" &
335 "result_mechanism#" &
336 "result_type#" &
337 "sb#" &
338 "section#" &
339 "semaphore#" &
340 "spec_file_name#" &
341 "static#" &
342 "stack_size#" &
343 "subunit_file_name#" &
344 "task_stack_size_default#" &
345 "task_type#" &
346 "time_slicing_enabled#" &
347 "top_guard#" &
348 "uba#" &
349 "ubs#" &
350 "ubsb#" &
351 "unit_name#" &
352 "unknown#" &
353 "unrestricted#" &
354 "uppercase#" &
355 "vax_float#" &
356 "vms#" &
357 "working_storage#" &
358 "abort_signal#" &
359 "access#" &
360 "address#" &
361 "address_size#" &
362 "aft#" &
363 "alignment#" &
364 "asm_input#" &
365 "asm_output#" &
366 "ast_entry#" &
367 "bit#" &
368 "bit_order#" &
369 "bit_position#" &
370 "body_version#" &
371 "callable#" &
372 "caller#" &
373 "code_address#" &
374 "component_size#" &
375 "compose#" &
376 "constrained#" &
377 "count#" &
378 "default_bit_order#" &
379 "definite#" &
380 "delta#" &
381 "denorm#" &
382 "digits#" &
383 "elaborated#" &
384 "emax#" &
385 "enum_rep#" &
386 "epsilon#" &
387 "exponent#" &
388 "external_tag#" &
389 "first#" &
390 "first_bit#" &
391 "fixed_value#" &
392 "fore#" &
393 "has_discriminants#" &
394 "identity#" &
395 "img#" &
396 "integer_value#" &
397 "large#" &
398 "last#" &
399 "last_bit#" &
400 "leading_part#" &
401 "length#" &
402 "machine_emax#" &
403 "machine_emin#" &
404 "machine_mantissa#" &
405 "machine_overflows#" &
406 "machine_radix#" &
407 "machine_rounds#" &
408 "machine_size#" &
409 "mantissa#" &
410 "max_size_in_storage_elements#" &
411 "maximum_alignment#" &
412 "mechanism_code#" &
413 "model_emin#" &
414 "model_epsilon#" &
415 "model_mantissa#" &
416 "model_small#" &
417 "modulus#" &
418 "null_parameter#" &
419 "object_size#" &
420 "partition_id#" &
421 "passed_by_reference#" &
422 "pos#" &
423 "position#" &
424 "range#" &
425 "range_length#" &
426 "round#" &
427 "safe_emax#" &
428 "safe_first#" &
429 "safe_large#" &
430 "safe_last#" &
431 "safe_small#" &
432 "scale#" &
433 "scaling#" &
434 "signed_zeros#" &
435 "size#" &
436 "small#" &
437 "storage_size#" &
438 "storage_unit#" &
439 "tag#" &
440 "terminated#" &
441 "to_address#" &
442 "type_class#" &
443 "uet_address#" &
444 "unbiased_rounding#" &
445 "unchecked_access#" &
446 "universal_literal_string#" &
447 "unrestricted_access#" &
448 "vads_size#" &
449 "val#" &
450 "valid#" &
451 "value_size#" &
452 "version#" &
453 "wchar_t_size#" &
454 "wide_width#" &
455 "width#" &
456 "word_size#" &
457 "adjacent#" &
458 "ceiling#" &
459 "copy_sign#" &
460 "floor#" &
461 "fraction#" &
462 "image#" &
463 "input#" &
464 "machine#" &
465 "max#" &
466 "min#" &
467 "model#" &
468 "pred#" &
469 "remainder#" &
470 "rounding#" &
471 "succ#" &
472 "truncation#" &
473 "value#" &
474 "wide_image#" &
475 "wide_value#" &
476 "output#" &
477 "read#" &
478 "write#" &
479 "elab_body#" &
480 "elab_spec#" &
481 "storage_pool#" &
482 "base#" &
483 "class#" &
484 "ceiling_locking#" &
485 "inheritance_locking#" &
486 "fifo_queuing#" &
487 "priority_queuing#" &
488 "fifo_within_priorities#" &
489 "access_check#" &
490 "accessibility_check#" &
491 "discriminant_check#" &
492 "division_check#" &
493 "elaboration_check#" &
494 "index_check#" &
495 "length_check#" &
496 "overflow_check#" &
497 "range_check#" &
498 "storage_check#" &
499 "tag_check#" &
500 "all_checks#" &
501 "abort#" &
502 "abs#" &
503 "accept#" &
504 "and#" &
505 "all#" &
506 "array#" &
507 "at#" &
508 "begin#" &
509 "body#" &
510 "case#" &
511 "constant#" &
512 "declare#" &
513 "delay#" &
514 "do#" &
515 "else#" &
516 "elsif#" &
517 "end#" &
518 "entry#" &
519 "exception#" &
520 "exit#" &
521 "for#" &
522 "function#" &
523 "generic#" &
524 "goto#" &
525 "if#" &
526 "in#" &
527 "is#" &
528 "limited#" &
529 "loop#" &
530 "mod#" &
531 "new#" &
532 "not#" &
533 "null#" &
534 "of#" &
535 "or#" &
536 "others#" &
537 "out#" &
538 "package#" &
539 "pragma#" &
540 "private#" &
541 "procedure#" &
542 "raise#" &
543 "record#" &
544 "rem#" &
545 "renames#" &
546 "return#" &
547 "reverse#" &
548 "select#" &
549 "separate#" &
550 "subtype#" &
551 "task#" &
552 "terminate#" &
553 "then#" &
554 "type#" &
555 "use#" &
556 "when#" &
557 "while#" &
558 "with#" &
559 "xor#" &
560 "divide#" &
561 "enclosing_entity#" &
562 "exception_information#" &
563 "exception_message#" &
564 "exception_name#" &
565 "file#" &
566 "import_address#" &
567 "import_largest_value#" &
568 "import_value#" &
569 "is_negative#" &
570 "line#" &
571 "rotate_left#" &
572 "rotate_right#" &
573 "shift_left#" &
574 "shift_right#" &
575 "shift_right_arithmetic#" &
576 "source_location#" &
577 "unchecked_conversion#" &
578 "unchecked_deallocation#" &
579 "abstract#" &
580 "aliased#" &
581 "protected#" &
582 "until#" &
583 "requeue#" &
584 "tagged#" &
585 "raise_exception#" &
586 "binder#" &
587 "builder#" &
588 "compiler#" &
589 "cross_reference#" &
590 "default_switches#" &
591 "exec_dir#" &
592 "extends#" &
593 "finder#" &
594 "gnatls#" &
595 "gnatstub#" &
596 "implementation#" &
597 "implementation_exceptions#" &
598 "implementation_suffix#" &
599 "languages#" &
600 "library_dir#" &
601 "library_elaboration#" &
602 "library_kind#" &
603 "library_name#" &
604 "library_version#" &
605 "linker#" &
606 "naming#" &
607 "object_dir#" &
608 "project#" &
609 "separate_suffix#" &
610 "source_dirs#" &
611 "source_files#" &
612 "source_list_file#" &
613 "specification#" &
614 "specification_exceptions#" &
615 "specification_suffix#" &
616 "switches#" &
617 "#";
619 ---------------------
620 -- Generated Names --
621 ---------------------
623 -- This section lists the various cases of generated names which are
624 -- built from existing names by adding unique leading and/or trailing
625 -- upper case letters. In some cases these names are built recursively,
626 -- in particular names built from types may be built from types which
627 -- themselves have generated names. In this list, xxx represents an
628 -- existing name to which identifying letters are prepended or appended,
629 -- and a trailing n represents a serial number in an external name that
630 -- has some semantic significance (e.g. the n'th index type of an array).
632 -- xxxA access type for formal xxx in entry param record (Exp_Ch9)
633 -- xxxB tag table for tagged type xxx (Exp_Ch3)
634 -- xxxB task body procedure for task xxx (Exp_Ch9)
635 -- xxxD dispatch table for tagged type xxx (Exp_Ch3)
636 -- xxxD discriminal for discriminant xxx (Sem_Ch3)
637 -- xxxDn n'th discr check function for rec type xxx (Exp_Ch3)
638 -- xxxE elaboration boolean flag for task xxx (Exp_Ch9)
639 -- xxxE dispatch table pointer type for tagged type xxx (Exp_Ch3)
640 -- xxxE parameters for accept body for entry xxx (Exp_Ch9)
641 -- xxxFn n'th primitive of a tagged type (named xxx) (Exp_Ch3)
642 -- xxxI initialization procedure for type xxx (Exp_Ch3)
643 -- xxxJ tag table type index for tagged type xxx (Exp_Ch3)
644 -- xxxM master Id value for access type xxx (Exp_Ch3)
645 -- xxxP tag table pointer type for tagged type xxx (Exp_Ch3)
646 -- xxxP parameter record type for entry xxx (Exp_Ch9)
647 -- xxxPA access to parameter record type for entry xxx (Exp_Ch9)
648 -- xxxPn pointer type for n'th primitive of tagged type xxx (Exp_Ch3)
649 -- xxxR dispatch table pointer for tagged type xxx (Exp_Ch3)
650 -- xxxT tag table type for tagged type xxx (Exp_Ch3)
651 -- xxxT literal table for enumeration type xxx (Sem_Ch3)
652 -- xxxV type for task value record for task xxx (Exp_Ch9)
653 -- xxxX entry index constant (Exp_Ch9)
654 -- xxxY dispatch table type for tagged type xxx (Exp_Ch3)
655 -- xxxZ size variable for task xxx (Exp_Ch9)
657 -- Implicit type names
659 -- TxxxT type of literal table for enumeration type xxx (Sem_Ch3)
661 -- (Note: this list is not complete or accurate ???)
663 ----------------------
664 -- Get_Attribute_Id --
665 ----------------------
667 function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
668 begin
669 return Attribute_Id'Val (N - First_Attribute_Name);
670 end Get_Attribute_Id;
672 ------------------
673 -- Get_Check_Id --
674 ------------------
676 function Get_Check_Id (N : Name_Id) return Check_Id is
677 begin
678 return Check_Id'Val (N - First_Check_Name);
679 end Get_Check_Id;
681 -----------------------
682 -- Get_Convention_Id --
683 -----------------------
685 function Get_Convention_Id (N : Name_Id) return Convention_Id is
686 begin
687 case N is
688 when Name_Ada => return Convention_Ada;
689 when Name_Assembler => return Convention_Assembler;
690 when Name_C => return Convention_C;
691 when Name_COBOL => return Convention_COBOL;
692 when Name_CPP => return Convention_CPP;
693 when Name_Fortran => return Convention_Fortran;
694 when Name_Intrinsic => return Convention_Intrinsic;
695 when Name_Java => return Convention_Java;
696 when Name_Stdcall => return Convention_Stdcall;
697 when Name_Stubbed => return Convention_Stubbed;
699 when others =>
700 for J in 1 .. Convention_Identifiers.Last loop
701 if N = Convention_Identifiers.Table (J).Name then
702 return Convention_Identifiers.Table (J).Convention;
703 end if;
704 end loop;
706 raise Program_Error;
707 end case;
708 end Get_Convention_Id;
710 ---------------------------
711 -- Get_Locking_Policy_Id --
712 ---------------------------
714 function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id is
715 begin
716 return Locking_Policy_Id'Val (N - First_Locking_Policy_Name);
717 end Get_Locking_Policy_Id;
719 -------------------
720 -- Get_Pragma_Id --
721 -------------------
723 function Get_Pragma_Id (N : Name_Id) return Pragma_Id is
724 begin
725 if N = Name_AST_Entry then
726 return Pragma_AST_Entry;
727 elsif N = Name_Storage_Size then
728 return Pragma_Storage_Size;
729 elsif N = Name_Storage_Unit then
730 return Pragma_Storage_Unit;
731 else
732 return Pragma_Id'Val (N - First_Pragma_Name);
733 end if;
734 end Get_Pragma_Id;
736 ---------------------------
737 -- Get_Queuing_Policy_Id --
738 ---------------------------
740 function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id is
741 begin
742 return Queuing_Policy_Id'Val (N - First_Queuing_Policy_Name);
743 end Get_Queuing_Policy_Id;
745 ------------------------------------
746 -- Get_Task_Dispatching_Policy_Id --
747 ------------------------------------
749 function Get_Task_Dispatching_Policy_Id (N : Name_Id)
750 return Task_Dispatching_Policy_Id is
751 begin
752 return Task_Dispatching_Policy_Id'Val
753 (N - First_Task_Dispatching_Policy_Name);
754 end Get_Task_Dispatching_Policy_Id;
756 ----------------
757 -- Initialize --
758 ----------------
760 procedure Initialize is
761 P_Index : Natural;
762 Discard_Name : Name_Id;
764 begin
765 P_Index := Preset_Names'First;
767 loop
768 Name_Len := 0;
770 while Preset_Names (P_Index) /= '#' loop
771 Name_Len := Name_Len + 1;
772 Name_Buffer (Name_Len) := Preset_Names (P_Index);
773 P_Index := P_Index + 1;
774 end loop;
776 -- We do the Name_Find call to enter the name into the table, but
777 -- we don't need to do anything with the result, since we already
778 -- initialized all the preset names to have the right value (we
779 -- are depending on the order of the names and Preset_Names).
781 Discard_Name := Name_Find;
782 P_Index := P_Index + 1;
783 exit when Preset_Names (P_Index) = '#';
784 end loop;
786 -- Make sure that number of names in standard table is correct. If
787 -- this check fails, run utility program XSNAMES to construct a new
788 -- properly matching version of the body.
790 pragma Assert (Discard_Name = Last_Predefined_Name);
792 -- Initialize the convention identifiers table with the standard
793 -- set of synonyms that we recognize for conventions.
795 Convention_Identifiers.Init;
797 Convention_Identifiers.Append ((Name_Asm, Convention_Assembler));
798 Convention_Identifiers.Append ((Name_Assembly, Convention_Assembler));
800 Convention_Identifiers.Append ((Name_Default, Convention_C));
801 Convention_Identifiers.Append ((Name_External, Convention_C));
803 Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall));
804 Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall));
805 end Initialize;
807 -----------------------
808 -- Is_Attribute_Name --
809 -----------------------
811 function Is_Attribute_Name (N : Name_Id) return Boolean is
812 begin
813 return N in First_Attribute_Name .. Last_Attribute_Name;
814 end Is_Attribute_Name;
816 -------------------
817 -- Is_Check_Name --
818 -------------------
820 function Is_Check_Name (N : Name_Id) return Boolean is
821 begin
822 return N in First_Check_Name .. Last_Check_Name;
823 end Is_Check_Name;
825 ------------------------
826 -- Is_Convention_Name --
827 ------------------------
829 function Is_Convention_Name (N : Name_Id) return Boolean is
830 begin
831 if N in First_Convention_Name .. Last_Convention_Name
832 or else N = Name_C
833 then
834 return True;
836 else
837 for J in 1 .. Convention_Identifiers.Last loop
838 if N = Convention_Identifiers.Table (J).Name then
839 return True;
840 end if;
841 end loop;
843 return False;
844 end if;
845 end Is_Convention_Name;
847 ------------------------------
848 -- Is_Entity_Attribute_Name --
849 ------------------------------
851 function Is_Entity_Attribute_Name (N : Name_Id) return Boolean is
852 begin
853 return N in First_Entity_Attribute_Name .. Last_Entity_Attribute_Name;
854 end Is_Entity_Attribute_Name;
856 --------------------------------
857 -- Is_Function_Attribute_Name --
858 --------------------------------
860 function Is_Function_Attribute_Name (N : Name_Id) return Boolean is
861 begin
862 return N in
863 First_Renamable_Function_Attribute ..
864 Last_Renamable_Function_Attribute;
865 end Is_Function_Attribute_Name;
867 ----------------------------
868 -- Is_Locking_Policy_Name --
869 ----------------------------
871 function Is_Locking_Policy_Name (N : Name_Id) return Boolean is
872 begin
873 return N in First_Locking_Policy_Name .. Last_Locking_Policy_Name;
874 end Is_Locking_Policy_Name;
876 -----------------------------
877 -- Is_Operator_Symbol_Name --
878 -----------------------------
880 function Is_Operator_Symbol_Name (N : Name_Id) return Boolean is
881 begin
882 return N in First_Operator_Name .. Last_Operator_Name;
883 end Is_Operator_Symbol_Name;
885 --------------------
886 -- Is_Pragma_Name --
887 --------------------
889 function Is_Pragma_Name (N : Name_Id) return Boolean is
890 begin
891 return N in First_Pragma_Name .. Last_Pragma_Name
892 or else N = Name_AST_Entry
893 or else N = Name_Storage_Size
894 or else N = Name_Storage_Unit;
895 end Is_Pragma_Name;
897 ---------------------------------
898 -- Is_Procedure_Attribute_Name --
899 ---------------------------------
901 function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean is
902 begin
903 return N in First_Procedure_Attribute .. Last_Procedure_Attribute;
904 end Is_Procedure_Attribute_Name;
906 ----------------------------
907 -- Is_Queuing_Policy_Name --
908 ----------------------------
910 function Is_Queuing_Policy_Name (N : Name_Id) return Boolean is
911 begin
912 return N in First_Queuing_Policy_Name .. Last_Queuing_Policy_Name;
913 end Is_Queuing_Policy_Name;
915 -------------------------------------
916 -- Is_Task_Dispatching_Policy_Name --
917 -------------------------------------
919 function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean is
920 begin
921 return N in First_Task_Dispatching_Policy_Name ..
922 Last_Task_Dispatching_Policy_Name;
923 end Is_Task_Dispatching_Policy_Name;
925 ----------------------------
926 -- Is_Type_Attribute_Name --
927 ----------------------------
929 function Is_Type_Attribute_Name (N : Name_Id) return Boolean is
930 begin
931 return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
932 end Is_Type_Attribute_Name;
934 ----------------------------------
935 -- Record_Convention_Identifier --
936 ----------------------------------
938 procedure Record_Convention_Identifier
939 (Id : Name_Id;
940 Convention : Convention_Id)
942 begin
943 Convention_Identifiers.Append ((Id, Convention));
944 end Record_Convention_Identifier;
946 end Snames;