Commit b62a90f2 by Arnaud Charlet

Makefile.in: (stamp-tools): Add handling of snames.ad[sb]

2009-04-10  Thomas Quinot  <quinot@adacore.com>

gnattools/
	* Makefile.in: (stamp-tools): Add handling of snames.ad[sb]

ada/
	* snames.h, snames.ads, snames.adb: Remove files, now generated from
	templates.

	* snames.h-tmpl, snames.ads-tmpl, snames.adb-tmpl: Templates for the
	above.

	* xsnamest.adb: New file.

	* gcc-interface/Make-lang.in: New target for automated generation of
	snames.ads, snames.adb and snames.h

From-SVN: r145893
parent 0d246707
2009-04-10 Thomas Quinot <quinot@adacore.com>
* snames.h, snames.ads, snames.adb: Remove files, now generated from
templates.
* snames.h-tmpl, snames.ads-tmpl, snames.adb-tmpl: Templates for the
above.
* xsnamest.adb: New file.
* gcc-interface/Make-lang.in: New target for automated generation of
snames.ads, snames.adb and snames.h
2009-04-10 Tristan Gingold <gingold@adacore.com> 2009-04-10 Tristan Gingold <gingold@adacore.com>
* gcc-interface/Makefile.in, gcc-interface/utils.c: Include "rtl.h" to * gcc-interface/Makefile.in, gcc-interface/utils.c: Include "rtl.h" to
...@@ -762,7 +762,7 @@ ada.uninstall: ...@@ -762,7 +762,7 @@ ada.uninstall:
ada.mostlyclean: ada.mostlyclean:
-$(RM) ada/*$(objext) ada/*.ali ada/b_*.c -$(RM) ada/*$(objext) ada/*.ali ada/b_*.c
-$(RM) ada/*$(coverageexts) -$(RM) ada/*$(coverageexts)
-$(RM) ada/sdefault.adb ada/stamp-sdefault -$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
-$(RMDIR) ada/tools -$(RMDIR) ada/tools
ada.clean: ada.clean:
ada.distclean: ada.distclean:
...@@ -792,6 +792,7 @@ ada.maintainer-clean: ...@@ -792,6 +792,7 @@ ada.maintainer-clean:
-$(RM) ada/nmake.adb -$(RM) ada/nmake.adb
-$(RM) ada/nmake.ads -$(RM) ada/nmake.ads
-$(RM) ada/treeprs.ads -$(RM) ada/treeprs.ads
-$(RM) ada/snames.ads ada/snames.adb ada/snames.h
# Stage hooks: # Stage hooks:
# The main makefile has already created stage?/ada # The main makefile has already created stage?/ada
...@@ -914,7 +915,7 @@ gnatstage2: force ...@@ -914,7 +915,7 @@ gnatstage2: force
# Ada language specific files. # Ada language specific files.
ada_extra_files : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \ ada_extra_files : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \
ada/nmake.ads ada/nmake.ads ada/snames.ads ada/snames.adb ada/snames.h
ada/b_gnat1.c : $(GNAT1_ADA_OBJS) ada/b_gnat1.c : $(GNAT1_ADA_OBJS)
$(GNATBIND) -C $(ADA_INCLUDES) -o ada/b_gnat1.c -n ada/gnat1drv.ali $(GNATBIND) -C $(ADA_INCLUDES) -o ada/b_gnat1.c -n ada/gnat1drv.ali
...@@ -943,6 +944,16 @@ ada/sinfo.h : ada/sinfo.ads ada/xsinfo.adb ...@@ -943,6 +944,16 @@ ada/sinfo.h : ada/sinfo.ads ada/xsinfo.adb
$(CP) $^ ada/bldtools/sinfo $(CP) $^ ada/bldtools/sinfo
(cd ada/bldtools/sinfo && $(GNATMAKE) -q xsinfo && ./xsinfo ../../sinfo.h ) (cd ada/bldtools/sinfo && $(GNATMAKE) -q xsinfo && ./xsinfo ../../sinfo.h )
ada/snames.h ada/snames.ads ada/snames.adb : ada/stamp-snames
@true
ada/stamp-snames : ada/snames.ads-tmpl ada/snames.adb-tmpl ada/snames.h-tmpl ada/xsnamest.adb
-$(MKDIR) ada/bldtools/snamest
$(RM) $(addprefix ada/bldtools/snamest/,$(notdir $^))
$(CP) $^ ada/bldtools/snamest
(cd ada/bldtools/snamest; gnatmake -q xsnamest ; ./xsnamest ; cp snames.ns ../../snames.ads ; cp snames.nb ../../snames.adb ; cp snames.nh ../../snames.h)
touch $@
ada/nmake.adb : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/xutil.ads ada/xutil.adb ada/nmake.adb : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/xutil.ads ada/xutil.adb
-$(MKDIR) ada/bldtools/nmake_b -$(MKDIR) ada/bldtools/nmake_b
$(RM) $(addprefix ada/bldtools/nmake_b/,$(notdir $^)) $(RM) $(addprefix ada/bldtools/nmake_b/,$(notdir $^))
......
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S N A M E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Opt; use Opt;
with Table;
with Types; use Types;
package body Snames is
-- Table used to record convention identifiers
type Convention_Id_Entry is record
Name : Name_Id;
Convention : Convention_Id;
end record;
package Convention_Identifiers is new Table.Table (
Table_Component_Type => Convention_Id_Entry,
Table_Index_Type => Int,
Table_Low_Bound => 1,
Table_Initial => 50,
Table_Increment => 200,
Table_Name => "Name_Convention_Identifiers");
-- Table of names to be set by Initialize. Each name is terminated by a
-- single #, and the end of the list is marked by a null entry, i.e. by
-- two # marks in succession. Note that the table does not include the
-- entries for a-z, since these are initialized by Namet itself.
Preset_Names : constant String :=
"_parent#" &
"_tag#" &
"off#" &
"space#" &
"time#" &
"_abort_signal#" &
"_alignment#" &
"_assign#" &
"_atcb#" &
"_chain#" &
"_clean#" &
"_controller#" &
"_entry_bodies#" &
"_expunge#" &
"_final_list#" &
"_idepth#" &
"_init#" &
"_local_final_list#" &
"_master#" &
"_object#" &
"_postconditions#" &
"_priority#" &
"_process_atsd#" &
"_relative_deadline#" &
"_result#" &
"_secondary_stack#" &
"_service#" &
"_size#" &
"_stack#" &
"_tags#" &
"_task#" &
"_task_id#" &
"_task_info#" &
"_task_name#" &
"_trace_sp#" &
"_disp_asynchronous_select#" &
"_disp_conditional_select#" &
"_disp_get_prim_op_kind#" &
"_disp_get_task_id#" &
"_disp_requeue#" &
"_disp_timed_select#" &
"initialize#" &
"adjust#" &
"finalize#" &
"next#" &
"prev#" &
"allocate#" &
"deallocate#" &
"dereference#" &
"decimal_io#" &
"enumeration_io#" &
"fixed_io#" &
"float_io#" &
"integer_io#" &
"modular_io#" &
"const#" &
"<error>#" &
"go#" &
"put#" &
"put_line#" &
"to#" &
"exception_traces#" &
"finalization#" &
"finalization_root#" &
"interfaces#" &
"most_recent_exception#" &
"standard#" &
"system#" &
"text_io#" &
"wide_text_io#" &
"wide_wide_text_io#" &
"no_dsa#" &
"garlic_dsa#" &
"polyorb_dsa#" &
"addr#" &
"async#" &
"get_active_partition_id#" &
"get_rci_package_receiver#" &
"get_rci_package_ref#" &
"origin#" &
"params#" &
"partition#" &
"partition_interface#" &
"ras#" &
"_call#" &
"rci_name#" &
"receiver#" &
"rpc#" &
"subp_id#" &
"operation#" &
"argument#" &
"arg_modes#" &
"handler#" &
"target#" &
"req#" &
"obj_typecode#" &
"stub#" &
"Oabs#" &
"Oand#" &
"Omod#" &
"Onot#" &
"Oor#" &
"Orem#" &
"Oxor#" &
"Oeq#" &
"One#" &
"Olt#" &
"Ole#" &
"Ogt#" &
"Oge#" &
"Oadd#" &
"Osubtract#" &
"Oconcat#" &
"Omultiply#" &
"Odivide#" &
"Oexpon#" &
"ada_83#" &
"ada_95#" &
"ada_05#" &
"ada_2005#" &
"assertion_policy#" &
"assume_no_invalid_values#" &
"c_pass_by_copy#" &
"check_name#" &
"check_policy#" &
"compile_time_error#" &
"compile_time_warning#" &
"compiler_unit#" &
"component_alignment#" &
"convention_identifier#" &
"debug_policy#" &
"detect_blocking#" &
"discard_names#" &
"elaboration_checks#" &
"eliminate#" &
"extend_system#" &
"extensions_allowed#" &
"external_name_casing#" &
"favor_top_level#" &
"float_representation#" &
"implicit_packing#" &
"initialize_scalars#" &
"interrupt_state#" &
"license#" &
"locking_policy#" &
"long_float#" &
"no_run_time#" &
"no_strict_aliasing#" &
"normalize_scalars#" &
"optimize_alignment#" &
"persistent_bss#" &
"polling#" &
"priority_specific_dispatching#" &
"profile#" &
"profile_warnings#" &
"propagate_exceptions#" &
"queuing_policy#" &
"ravenscar#" &
"restricted_run_time#" &
"restrictions#" &
"restriction_warnings#" &
"reviewable#" &
"source_file_name#" &
"source_file_name_project#" &
"style_checks#" &
"suppress#" &
"suppress_exception_locations#" &
"task_dispatching_policy#" &
"universal_data#" &
"unsuppress#" &
"use_vads_size#" &
"validity_checks#" &
"warnings#" &
"wide_character_encoding#" &
"abort_defer#" &
"all_calls_remote#" &
"annotate#" &
"assert#" &
"asynchronous#" &
"atomic#" &
"atomic_components#" &
"attach_handler#" &
"check#" &
"cil_constructor#" &
"comment#" &
"common_object#" &
"complete_representation#" &
"complex_representation#" &
"controlled#" &
"convention#" &
"cpp_class#" &
"cpp_constructor#" &
"cpp_virtual#" &
"cpp_vtable#" &
"debug#" &
"elaborate#" &
"elaborate_all#" &
"elaborate_body#" &
"export#" &
"export_exception#" &
"export_function#" &
"export_object#" &
"export_procedure#" &
"export_value#" &
"export_valued_procedure#" &
"external#" &
"finalize_storage_only#" &
"ident#" &
"implemented_by_entry#" &
"import#" &
"import_exception#" &
"import_function#" &
"import_object#" &
"import_procedure#" &
"import_valued_procedure#" &
"inline#" &
"inline_always#" &
"inline_generic#" &
"inspection_point#" &
"interface_name#" &
"interrupt_handler#" &
"interrupt_priority#" &
"java_constructor#" &
"java_interface#" &
"keep_names#" &
"link_with#" &
"linker_alias#" &
"linker_constructor#" &
"linker_destructor#" &
"linker_options#" &
"linker_section#" &
"list#" &
"machine_attribute#" &
"main#" &
"main_storage#" &
"memory_size#" &
"no_body#" &
"no_return#" &
"obsolescent#" &
"optimize#" &
"pack#" &
"page#" &
"passive#" &
"postcondition#" &
"precondition#" &
"preelaborable_initialization#" &
"preelaborate#" &
"preelaborate_05#" &
"psect_object#" &
"pure#" &
"pure_05#" &
"pure_function#" &
"relative_deadline#" &
"remote_call_interface#" &
"remote_types#" &
"share_generic#" &
"shared#" &
"shared_passive#" &
"source_reference#" &
"static_elaboration_desired#" &
"stream_convert#" &
"subtitle#" &
"suppress_all#" &
"suppress_debug_info#" &
"suppress_initialization#" &
"system_name#" &
"task_info#" &
"task_name#" &
"task_storage#" &
"thread_local_storage#" &
"time_slice#" &
"title#" &
"unchecked_union#" &
"unimplemented_unit#" &
"universal_aliasing#" &
"unmodified#" &
"unreferenced#" &
"unreferenced_objects#" &
"unreserve_all_interrupts#" &
"volatile#" &
"volatile_components#" &
"weak_external#" &
"ada#" &
"assembler#" &
"cil#" &
"cobol#" &
"cpp#" &
"fortran#" &
"intrinsic#" &
"java#" &
"stdcall#" &
"stubbed#" &
"asm#" &
"assembly#" &
"default#" &
"c_plus_plus#" &
"dll#" &
"win32#" &
"as_is#" &
"assertion#" &
"attribute_name#" &
"body_file_name#" &
"boolean_entry_barriers#" &
"casing#" &
"code#" &
"component#" &
"component_size_4#" &
"copy#" &
"d_float#" &
"descriptor#" &
"dot_replacement#" &
"dynamic#" &
"entity#" &
"entry_count#" &
"external_name#" &
"first_optional_parameter#" &
"form#" &
"g_float#" &
"gcc#" &
"gnat#" &
"gpl#" &
"ieee_float#" &
"ignore#" &
"info#" &
"internal#" &
"link_name#" &
"lowercase#" &
"max_entry_queue_depth#" &
"max_entry_queue_length#" &
"max_size#" &
"mechanism#" &
"message#" &
"mixedcase#" &
"modified_gpl#" &
"name#" &
"nca#" &
"no#" &
"no_dependence#" &
"no_dynamic_attachment#" &
"no_dynamic_interrupts#" &
"no_requeue#" &
"no_requeue_statements#" &
"no_task_attributes#" &
"no_task_attributes_package#" &
"on#" &
"policy#" &
"parameter_types#" &
"reference#" &
"restricted#" &
"result_mechanism#" &
"result_type#" &
"runtime#" &
"sb#" &
"secondary_stack_size#" &
"section#" &
"semaphore#" &
"short_descriptor#" &
"simple_barriers#" &
"spec_file_name#" &
"state#" &
"static#" &
"stack_size#" &
"subunit_file_name#" &
"task_stack_size_default#" &
"task_type#" &
"time_slicing_enabled#" &
"top_guard#" &
"uba#" &
"ubs#" &
"ubsb#" &
"unit_name#" &
"unknown#" &
"unrestricted#" &
"uppercase#" &
"user#" &
"vax_float#" &
"vms#" &
"vtable_ptr#" &
"working_storage#" &
"abort_signal#" &
"access#" &
"address#" &
"address_size#" &
"aft#" &
"alignment#" &
"asm_input#" &
"asm_output#" &
"ast_entry#" &
"bit#" &
"bit_order#" &
"bit_position#" &
"body_version#" &
"callable#" &
"caller#" &
"code_address#" &
"component_size#" &
"compose#" &
"constrained#" &
"count#" &
"default_bit_order#" &
"definite#" &
"delta#" &
"denorm#" &
"digits#" &
"elaborated#" &
"emax#" &
"enabled#" &
"enum_rep#" &
"enum_val#" &
"epsilon#" &
"exponent#" &
"external_tag#" &
"fast_math#" &
"first#" &
"first_bit#" &
"fixed_value#" &
"fore#" &
"has_access_values#" &
"has_discriminants#" &
"has_tagged_values#" &
"identity#" &
"img#" &
"integer_value#" &
"invalid_value#" &
"large#" &
"last#" &
"last_bit#" &
"leading_part#" &
"length#" &
"machine_emax#" &
"machine_emin#" &
"machine_mantissa#" &
"machine_overflows#" &
"machine_radix#" &
"machine_rounding#" &
"machine_rounds#" &
"machine_size#" &
"mantissa#" &
"max_size_in_storage_elements#" &
"maximum_alignment#" &
"mechanism_code#" &
"mod#" &
"model_emin#" &
"model_epsilon#" &
"model_mantissa#" &
"model_small#" &
"modulus#" &
"null_parameter#" &
"object_size#" &
"old#" &
"partition_id#" &
"passed_by_reference#" &
"pool_address#" &
"pos#" &
"position#" &
"priority#" &
"range#" &
"range_length#" &
"result#" &
"round#" &
"safe_emax#" &
"safe_first#" &
"safe_large#" &
"safe_last#" &
"safe_small#" &
"scale#" &
"scaling#" &
"signed_zeros#" &
"size#" &
"small#" &
"storage_size#" &
"storage_unit#" &
"stream_size#" &
"tag#" &
"target_name#" &
"terminated#" &
"to_address#" &
"type_class#" &
"uet_address#" &
"unbiased_rounding#" &
"unchecked_access#" &
"unconstrained_array#" &
"universal_literal_string#" &
"unrestricted_access#" &
"vads_size#" &
"val#" &
"valid#" &
"value_size#" &
"version#" &
"wchar_t_size#" &
"wide_wide_width#" &
"wide_width#" &
"width#" &
"word_size#" &
"adjacent#" &
"ceiling#" &
"copy_sign#" &
"floor#" &
"fraction#" &
"from_any#" &
"image#" &
"input#" &
"machine#" &
"max#" &
"min#" &
"model#" &
"pred#" &
"remainder#" &
"rounding#" &
"succ#" &
"to_any#" &
"truncation#" &
"typecode#" &
"value#" &
"wide_image#" &
"wide_wide_image#" &
"wide_value#" &
"wide_wide_value#" &
"output#" &
"read#" &
"write#" &
"elab_body#" &
"elab_spec#" &
"storage_pool#" &
"base#" &
"class#" &
"stub_type#" &
"ceiling_locking#" &
"inheritance_locking#" &
"fifo_queuing#" &
"priority_queuing#" &
"edf_across_priorities#" &
"fifo_within_priorities#" &
"non_preemptive_within_priorities#" &
"round_robin_within_priorities#" &
"access_check#" &
"accessibility_check#" &
"alignment_check#" &
"discriminant_check#" &
"division_check#" &
"elaboration_check#" &
"index_check#" &
"length_check#" &
"overflow_check#" &
"range_check#" &
"storage_check#" &
"tag_check#" &
"validity_check#" &
"all_checks#" &
"abort#" &
"abs#" &
"accept#" &
"and#" &
"all#" &
"array#" &
"at#" &
"begin#" &
"body#" &
"case#" &
"constant#" &
"declare#" &
"delay#" &
"do#" &
"else#" &
"elsif#" &
"end#" &
"entry#" &
"exception#" &
"exit#" &
"for#" &
"function#" &
"generic#" &
"goto#" &
"if#" &
"in#" &
"is#" &
"limited#" &
"loop#" &
"new#" &
"not#" &
"null#" &
"of#" &
"or#" &
"others#" &
"out#" &
"package#" &
"pragma#" &
"private#" &
"procedure#" &
"raise#" &
"record#" &
"rem#" &
"renames#" &
"return#" &
"reverse#" &
"select#" &
"separate#" &
"subtype#" &
"task#" &
"terminate#" &
"then#" &
"type#" &
"use#" &
"when#" &
"while#" &
"with#" &
"xor#" &
"divide#" &
"enclosing_entity#" &
"exception_information#" &
"exception_message#" &
"exception_name#" &
"file#" &
"generic_dispatching_constructor#" &
"import_address#" &
"import_largest_value#" &
"import_value#" &
"is_negative#" &
"line#" &
"rotate_left#" &
"rotate_right#" &
"shift_left#" &
"shift_right#" &
"shift_right_arithmetic#" &
"source_location#" &
"unchecked_conversion#" &
"unchecked_deallocation#" &
"to_pointer#" &
"free#" &
"abstract#" &
"aliased#" &
"protected#" &
"until#" &
"requeue#" &
"tagged#" &
"raise_exception#" &
"ada_roots#" &
"aggregate#" &
"archive_builder#" &
"archive_builder_append_option#" &
"archive_indexer#" &
"archive_suffix#" &
"binder#" &
"binder_prefix#" &
"body_suffix#" &
"builder#" &
"builder_switches#" &
"compiler#" &
"compiler_command#" &
"compiler_kind#" &
"config_body_file_name#" &
"config_body_file_name_pattern#" &
"config_file_switches#" &
"config_file_unique#" &
"config_spec_file_name#" &
"config_spec_file_name_pattern#" &
"configuration#" &
"cross_reference#" &
"default_language#" &
"default_switches#" &
"dependency_driver#" &
"dependency_file_kind#" &
"dependency_switches#" &
"driver#" &
"excluded_source_dirs#" &
"excluded_source_files#" &
"excluded_source_list_file#" &
"exec_dir#" &
"executable#" &
"executable_suffix#" &
"extends#" &
"externally_built#" &
"finder#" &
"global_compilation_switches#" &
"global_configuration_pragmas#" &
"global_config_file#" &
"gnatls#" &
"gnatstub#" &
"ide#" &
"implementation#" &
"implementation_exceptions#" &
"implementation_suffix#" &
"include_switches#" &
"include_path#" &
"include_path_file#" &
"inherit_source_path#" &
"language_kind#" &
"language_processing#" &
"languages#" &
"library#" &
"library_ali_dir#" &
"library_auto_init#" &
"library_auto_init_supported#" &
"library_builder#" &
"library_dir#" &
"library_gcc#" &
"library_interface#" &
"library_kind#" &
"library_name#" &
"library_major_minor_id_supported#" &
"library_options#" &
"library_partial_linker#" &
"library_reference_symbol_file#" &
"library_src_dir#" &
"library_support#" &
"library_symbol_file#" &
"library_symbol_policy#" &
"library_version#" &
"library_version_switches#" &
"linker#" &
"linker_executable_option#" &
"linker_lib_dir_option#" &
"linker_lib_name_option#" &
"local_config_file#" &
"local_configuration_pragmas#" &
"locally_removed_files#" &
"map_file_option#" &
"mapping_file_switches#" &
"mapping_spec_suffix#" &
"mapping_body_suffix#" &
"metrics#" &
"naming#" &
"object_generated#" &
"objects_linked#" &
"objects_path#" &
"objects_path_file#" &
"object_dir#" &
"path_syntax#" &
"pic_option#" &
"pretty_printer#" &
"prefix#" &
"project#" &
"project_dir#" &
"roots#" &
"required_switches#" &
"run_path_option#" &
"runtime_project#" &
"shared_library_minimum_switches#" &
"shared_library_prefix#" &
"shared_library_suffix#" &
"separate_suffix#" &
"source_dirs#" &
"source_files#" &
"source_list_file#" &
"spec#" &
"spec_suffix#" &
"specification#" &
"specification_exceptions#" &
"specification_suffix#" &
"stack#" &
"switches#" &
"symbolic_link_supported#" &
"sync#" &
"synchronize#" &
"toolchain_description#" &
"toolchain_version#" &
"runtime_library_dir#" &
"unaligned_valid#" &
"interface#" &
"overriding#" &
"synchronized#" &
"#";
---------------------
-- Generated Names --
---------------------
-- This section lists the various cases of generated names which are
-- built from existing names by adding unique leading and/or trailing
-- upper case letters. In some cases these names are built recursively,
-- in particular names built from types may be built from types which
-- themselves have generated names. In this list, xxx represents an
-- existing name to which identifying letters are prepended or appended,
-- and a trailing n represents a serial number in an external name that
-- has some semantic significance (e.g. the n'th index type of an array).
-- xxxA access type for formal xxx in entry param record (Exp_Ch9)
-- xxxB tag table for tagged type xxx (Exp_Ch3)
-- xxxB task body procedure for task xxx (Exp_Ch9)
-- xxxD dispatch table for tagged type xxx (Exp_Ch3)
-- xxxD discriminal for discriminant xxx (Sem_Ch3)
-- xxxDn n'th discr check function for rec type xxx (Exp_Ch3)
-- xxxE elaboration boolean flag for task xxx (Exp_Ch9)
-- xxxE dispatch table pointer type for tagged type xxx (Exp_Ch3)
-- xxxE parameters for accept body for entry xxx (Exp_Ch9)
-- xxxFn n'th primitive of a tagged type (named xxx) (Exp_Ch3)
-- xxxJ tag table type index for tagged type xxx (Exp_Ch3)
-- xxxM master Id value for access type xxx (Exp_Ch3)
-- xxxP tag table pointer type for tagged type xxx (Exp_Ch3)
-- xxxP parameter record type for entry xxx (Exp_Ch9)
-- xxxPA access to parameter record type for entry xxx (Exp_Ch9)
-- xxxPn pointer type for n'th primitive of tagged type xxx (Exp_Ch3)
-- xxxR dispatch table pointer for tagged type xxx (Exp_Ch3)
-- xxxT tag table type for tagged type xxx (Exp_Ch3)
-- xxxT literal table for enumeration type xxx (Sem_Ch3)
-- xxxV type for task value record for task xxx (Exp_Ch9)
-- xxxX entry index constant (Exp_Ch9)
-- xxxY dispatch table type for tagged type xxx (Exp_Ch3)
-- xxxZ size variable for task xxx (Exp_Ch9)
-- TSS names
-- xxxDA deep adjust routine for type xxx (Exp_TSS)
-- xxxDF deep finalize routine for type xxx (Exp_TSS)
-- xxxDI deep initialize routine for type xxx (Exp_TSS)
-- xxxEQ composite equality routine for record type xxx (Exp_TSS)
-- xxxFA PolyORB/DSA From_Any converter for type xxx (Exp_TSS)
-- xxxIP initialization procedure for type xxx (Exp_TSS)
-- xxxRA RAS type access routine for type xxx (Exp_TSS)
-- xxxRD RAS type dereference routine for type xxx (Exp_TSS)
-- xxxRP Rep to Pos conversion for enumeration type xxx (Exp_TSS)
-- xxxSA array/slice assignment for controlled comp. arrays (Exp_TSS)
-- xxxSI stream input attribute subprogram for type xxx (Exp_TSS)
-- xxxSO stream output attribute subprogram for type xxx (Exp_TSS)
-- xxxSR stream read attribute subprogram for type xxx (Exp_TSS)
-- xxxSW stream write attribute subprogram for type xxx (Exp_TSS)
-- xxxTA PolyORB/DSA To_Any converter for type xxx (Exp_TSS)
-- xxxTC PolyORB/DSA Typecode for type xxx (Exp_TSS)
-- Implicit type names
-- TxxxT type of literal table for enumeration type xxx (Sem_Ch3)
-- (Note: this list is not complete or accurate ???)
----------------------
-- Get_Attribute_Id --
----------------------
function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
begin
return Attribute_Id'Val (N - First_Attribute_Name);
end Get_Attribute_Id;
-----------------------
-- Get_Convention_Id --
-----------------------
function Get_Convention_Id (N : Name_Id) return Convention_Id is
begin
case N is
when Name_Ada => return Convention_Ada;
when Name_Assembler => return Convention_Assembler;
when Name_C => return Convention_C;
when Name_CIL => return Convention_CIL;
when Name_COBOL => return Convention_COBOL;
when Name_CPP => return Convention_CPP;
when Name_Fortran => return Convention_Fortran;
when Name_Intrinsic => return Convention_Intrinsic;
when Name_Java => return Convention_Java;
when Name_Stdcall => return Convention_Stdcall;
when Name_Stubbed => return Convention_Stubbed;
-- If no direct match, then we must have a convention
-- identifier pragma that has specified this name.
when others =>
for J in 1 .. Convention_Identifiers.Last loop
if N = Convention_Identifiers.Table (J).Name then
return Convention_Identifiers.Table (J).Convention;
end if;
end loop;
raise Program_Error;
end case;
end Get_Convention_Id;
-------------------------
-- Get_Convention_Name --
-------------------------
function Get_Convention_Name (C : Convention_Id) return Name_Id is
begin
case C is
when Convention_Ada => return Name_Ada;
when Convention_Assembler => return Name_Assembler;
when Convention_C => return Name_C;
when Convention_CIL => return Name_CIL;
when Convention_COBOL => return Name_COBOL;
when Convention_CPP => return Name_CPP;
when Convention_Entry => return Name_Entry;
when Convention_Fortran => return Name_Fortran;
when Convention_Intrinsic => return Name_Intrinsic;
when Convention_Java => return Name_Java;
when Convention_Protected => return Name_Protected;
when Convention_Stdcall => return Name_Stdcall;
when Convention_Stubbed => return Name_Stubbed;
end case;
end Get_Convention_Name;
---------------------------
-- Get_Locking_Policy_Id --
---------------------------
function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id is
begin
return Locking_Policy_Id'Val (N - First_Locking_Policy_Name);
end Get_Locking_Policy_Id;
-------------------
-- Get_Pragma_Id --
-------------------
function Get_Pragma_Id (N : Name_Id) return Pragma_Id is
begin
if N = Name_AST_Entry then
return Pragma_AST_Entry;
elsif N = Name_Fast_Math then
return Pragma_Fast_Math;
elsif N = Name_Interface then
return Pragma_Interface;
elsif N = Name_Priority then
return Pragma_Priority;
elsif N = Name_Relative_Deadline then
return Pragma_Relative_Deadline;
elsif N = Name_Storage_Size then
return Pragma_Storage_Size;
elsif N = Name_Storage_Unit then
return Pragma_Storage_Unit;
elsif N not in First_Pragma_Name .. Last_Pragma_Name then
return Unknown_Pragma;
else
return Pragma_Id'Val (N - First_Pragma_Name);
end if;
end Get_Pragma_Id;
---------------------------
-- Get_Queuing_Policy_Id --
---------------------------
function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id is
begin
return Queuing_Policy_Id'Val (N - First_Queuing_Policy_Name);
end Get_Queuing_Policy_Id;
------------------------------------
-- Get_Task_Dispatching_Policy_Id --
------------------------------------
function Get_Task_Dispatching_Policy_Id
(N : Name_Id) return Task_Dispatching_Policy_Id
is
begin
return Task_Dispatching_Policy_Id'Val
(N - First_Task_Dispatching_Policy_Name);
end Get_Task_Dispatching_Policy_Id;
----------------
-- Initialize --
----------------
procedure Initialize is
P_Index : Natural;
Discard_Name : Name_Id;
begin
P_Index := Preset_Names'First;
loop
Name_Len := 0;
while Preset_Names (P_Index) /= '#' loop
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := Preset_Names (P_Index);
P_Index := P_Index + 1;
end loop;
-- We do the Name_Find call to enter the name into the table, but
-- we don't need to do anything with the result, since we already
-- initialized all the preset names to have the right value (we
-- are depending on the order of the names and Preset_Names).
Discard_Name := Name_Find;
P_Index := P_Index + 1;
exit when Preset_Names (P_Index) = '#';
end loop;
-- Make sure that number of names in standard table is correct. If
-- this check fails, run utility program XSNAMES to construct a new
-- properly matching version of the body.
pragma Assert (Discard_Name = Last_Predefined_Name);
-- Initialize the convention identifiers table with the standard
-- set of synonyms that we recognize for conventions.
Convention_Identifiers.Init;
Convention_Identifiers.Append ((Name_Asm, Convention_Assembler));
Convention_Identifiers.Append ((Name_Assembly, Convention_Assembler));
Convention_Identifiers.Append ((Name_Default, Convention_C));
Convention_Identifiers.Append ((Name_External, Convention_C));
Convention_Identifiers.Append ((Name_C_Plus_Plus, Convention_CPP));
Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall));
Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall));
end Initialize;
-----------------------
-- Is_Attribute_Name --
-----------------------
function Is_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Attribute_Name .. Last_Attribute_Name;
end Is_Attribute_Name;
----------------------------------
-- Is_Configuration_Pragma_Name --
----------------------------------
function Is_Configuration_Pragma_Name (N : Name_Id) return Boolean is
begin
return N in First_Pragma_Name .. Last_Configuration_Pragma_Name
or else N = Name_Fast_Math;
end Is_Configuration_Pragma_Name;
------------------------
-- Is_Convention_Name --
------------------------
function Is_Convention_Name (N : Name_Id) return Boolean is
begin
-- Check if this is one of the standard conventions
if N in First_Convention_Name .. Last_Convention_Name
or else N = Name_C
then
return True;
-- Otherwise check if it is in convention identifier table
else
for J in 1 .. Convention_Identifiers.Last loop
if N = Convention_Identifiers.Table (J).Name then
return True;
end if;
end loop;
return False;
end if;
end Is_Convention_Name;
------------------------------
-- Is_Entity_Attribute_Name --
------------------------------
function Is_Entity_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Entity_Attribute_Name .. Last_Entity_Attribute_Name;
end Is_Entity_Attribute_Name;
--------------------------------
-- Is_Function_Attribute_Name --
--------------------------------
function Is_Function_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in
First_Renamable_Function_Attribute ..
Last_Renamable_Function_Attribute;
end Is_Function_Attribute_Name;
---------------------
-- Is_Keyword_Name --
---------------------
function Is_Keyword_Name (N : Name_Id) return Boolean is
begin
return Get_Name_Table_Byte (N) /= 0
and then (Ada_Version >= Ada_95
or else N not in Ada_95_Reserved_Words)
and then (Ada_Version >= Ada_05
or else N not in Ada_2005_Reserved_Words);
end Is_Keyword_Name;
----------------------------
-- Is_Locking_Policy_Name --
----------------------------
function Is_Locking_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Locking_Policy_Name .. Last_Locking_Policy_Name;
end Is_Locking_Policy_Name;
-----------------------------
-- Is_Operator_Symbol_Name --
-----------------------------
function Is_Operator_Symbol_Name (N : Name_Id) return Boolean is
begin
return N in First_Operator_Name .. Last_Operator_Name;
end Is_Operator_Symbol_Name;
--------------------
-- Is_Pragma_Name --
--------------------
function Is_Pragma_Name (N : Name_Id) return Boolean is
begin
return N in First_Pragma_Name .. Last_Pragma_Name
or else N = Name_AST_Entry
or else N = Name_Fast_Math
or else N = Name_Interface
or else N = Name_Relative_Deadline
or else N = Name_Priority
or else N = Name_Storage_Size
or else N = Name_Storage_Unit;
end Is_Pragma_Name;
---------------------------------
-- Is_Procedure_Attribute_Name --
---------------------------------
function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Procedure_Attribute .. Last_Procedure_Attribute;
end Is_Procedure_Attribute_Name;
----------------------------
-- Is_Queuing_Policy_Name --
----------------------------
function Is_Queuing_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Queuing_Policy_Name .. Last_Queuing_Policy_Name;
end Is_Queuing_Policy_Name;
-------------------------------------
-- Is_Task_Dispatching_Policy_Name --
-------------------------------------
function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Task_Dispatching_Policy_Name ..
Last_Task_Dispatching_Policy_Name;
end Is_Task_Dispatching_Policy_Name;
----------------------------
-- Is_Type_Attribute_Name --
----------------------------
function Is_Type_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
end Is_Type_Attribute_Name;
----------------------------------
-- Record_Convention_Identifier --
----------------------------------
procedure Record_Convention_Identifier
(Id : Name_Id;
Convention : Convention_Id)
is
begin
Convention_Identifiers.Append ((Id, Convention));
end Record_Convention_Identifier;
end Snames;
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S N A M E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Opt; use Opt;
with Table;
with Types; use Types;
package body Snames is
-- Table used to record convention identifiers
type Convention_Id_Entry is record
Name : Name_Id;
Convention : Convention_Id;
end record;
package Convention_Identifiers is new Table.Table (
Table_Component_Type => Convention_Id_Entry,
Table_Index_Type => Int,
Table_Low_Bound => 1,
Table_Initial => 50,
Table_Increment => 200,
Table_Name => "Name_Convention_Identifiers");
-- Table of names to be set by Initialize. Each name is terminated by a
-- single #, and the end of the list is marked by a null entry, i.e. by
-- two # marks in succession. Note that the table does not include the
-- entries for a-z, since these are initialized by Namet itself.
Preset_Names : constant String :=
!! TEMPLATE INSERTION POINT
"#";
---------------------
-- Generated Names --
---------------------
-- This section lists the various cases of generated names which are
-- built from existing names by adding unique leading and/or trailing
-- upper case letters. In some cases these names are built recursively,
-- in particular names built from types may be built from types which
-- themselves have generated names. In this list, xxx represents an
-- existing name to which identifying letters are prepended or appended,
-- and a trailing n represents a serial number in an external name that
-- has some semantic significance (e.g. the n'th index type of an array).
-- xxxA access type for formal xxx in entry param record (Exp_Ch9)
-- xxxB tag table for tagged type xxx (Exp_Ch3)
-- xxxB task body procedure for task xxx (Exp_Ch9)
-- xxxD dispatch table for tagged type xxx (Exp_Ch3)
-- xxxD discriminal for discriminant xxx (Sem_Ch3)
-- xxxDn n'th discr check function for rec type xxx (Exp_Ch3)
-- xxxE elaboration boolean flag for task xxx (Exp_Ch9)
-- xxxE dispatch table pointer type for tagged type xxx (Exp_Ch3)
-- xxxE parameters for accept body for entry xxx (Exp_Ch9)
-- xxxFn n'th primitive of a tagged type (named xxx) (Exp_Ch3)
-- xxxJ tag table type index for tagged type xxx (Exp_Ch3)
-- xxxM master Id value for access type xxx (Exp_Ch3)
-- xxxP tag table pointer type for tagged type xxx (Exp_Ch3)
-- xxxP parameter record type for entry xxx (Exp_Ch9)
-- xxxPA access to parameter record type for entry xxx (Exp_Ch9)
-- xxxPn pointer type for n'th primitive of tagged type xxx (Exp_Ch3)
-- xxxR dispatch table pointer for tagged type xxx (Exp_Ch3)
-- xxxT tag table type for tagged type xxx (Exp_Ch3)
-- xxxT literal table for enumeration type xxx (Sem_Ch3)
-- xxxV type for task value record for task xxx (Exp_Ch9)
-- xxxX entry index constant (Exp_Ch9)
-- xxxY dispatch table type for tagged type xxx (Exp_Ch3)
-- xxxZ size variable for task xxx (Exp_Ch9)
-- TSS names
-- xxxDA deep adjust routine for type xxx (Exp_TSS)
-- xxxDF deep finalize routine for type xxx (Exp_TSS)
-- xxxDI deep initialize routine for type xxx (Exp_TSS)
-- xxxEQ composite equality routine for record type xxx (Exp_TSS)
-- xxxFA PolyORB/DSA From_Any converter for type xxx (Exp_TSS)
-- xxxIP initialization procedure for type xxx (Exp_TSS)
-- xxxRA RAS type access routine for type xxx (Exp_TSS)
-- xxxRD RAS type dereference routine for type xxx (Exp_TSS)
-- xxxRP Rep to Pos conversion for enumeration type xxx (Exp_TSS)
-- xxxSA array/slice assignment for controlled comp. arrays (Exp_TSS)
-- xxxSI stream input attribute subprogram for type xxx (Exp_TSS)
-- xxxSO stream output attribute subprogram for type xxx (Exp_TSS)
-- xxxSR stream read attribute subprogram for type xxx (Exp_TSS)
-- xxxSW stream write attribute subprogram for type xxx (Exp_TSS)
-- xxxTA PolyORB/DSA To_Any converter for type xxx (Exp_TSS)
-- xxxTC PolyORB/DSA Typecode for type xxx (Exp_TSS)
-- Implicit type names
-- TxxxT type of literal table for enumeration type xxx (Sem_Ch3)
-- (Note: this list is not complete or accurate ???)
----------------------
-- Get_Attribute_Id --
----------------------
function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
begin
return Attribute_Id'Val (N - First_Attribute_Name);
end Get_Attribute_Id;
-----------------------
-- Get_Convention_Id --
-----------------------
function Get_Convention_Id (N : Name_Id) return Convention_Id is
begin
case N is
when Name_Ada => return Convention_Ada;
when Name_Assembler => return Convention_Assembler;
when Name_C => return Convention_C;
when Name_CIL => return Convention_CIL;
when Name_COBOL => return Convention_COBOL;
when Name_CPP => return Convention_CPP;
when Name_Fortran => return Convention_Fortran;
when Name_Intrinsic => return Convention_Intrinsic;
when Name_Java => return Convention_Java;
when Name_Stdcall => return Convention_Stdcall;
when Name_Stubbed => return Convention_Stubbed;
-- If no direct match, then we must have a convention
-- identifier pragma that has specified this name.
when others =>
for J in 1 .. Convention_Identifiers.Last loop
if N = Convention_Identifiers.Table (J).Name then
return Convention_Identifiers.Table (J).Convention;
end if;
end loop;
raise Program_Error;
end case;
end Get_Convention_Id;
-------------------------
-- Get_Convention_Name --
-------------------------
function Get_Convention_Name (C : Convention_Id) return Name_Id is
begin
case C is
when Convention_Ada => return Name_Ada;
when Convention_Assembler => return Name_Assembler;
when Convention_C => return Name_C;
when Convention_CIL => return Name_CIL;
when Convention_COBOL => return Name_COBOL;
when Convention_CPP => return Name_CPP;
when Convention_Entry => return Name_Entry;
when Convention_Fortran => return Name_Fortran;
when Convention_Intrinsic => return Name_Intrinsic;
when Convention_Java => return Name_Java;
when Convention_Protected => return Name_Protected;
when Convention_Stdcall => return Name_Stdcall;
when Convention_Stubbed => return Name_Stubbed;
end case;
end Get_Convention_Name;
---------------------------
-- Get_Locking_Policy_Id --
---------------------------
function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id is
begin
return Locking_Policy_Id'Val (N - First_Locking_Policy_Name);
end Get_Locking_Policy_Id;
-------------------
-- Get_Pragma_Id --
-------------------
function Get_Pragma_Id (N : Name_Id) return Pragma_Id is
begin
if N = Name_AST_Entry then
return Pragma_AST_Entry;
elsif N = Name_Fast_Math then
return Pragma_Fast_Math;
elsif N = Name_Interface then
return Pragma_Interface;
elsif N = Name_Priority then
return Pragma_Priority;
elsif N = Name_Relative_Deadline then
return Pragma_Relative_Deadline;
elsif N = Name_Storage_Size then
return Pragma_Storage_Size;
elsif N = Name_Storage_Unit then
return Pragma_Storage_Unit;
elsif N not in First_Pragma_Name .. Last_Pragma_Name then
return Unknown_Pragma;
else
return Pragma_Id'Val (N - First_Pragma_Name);
end if;
end Get_Pragma_Id;
---------------------------
-- Get_Queuing_Policy_Id --
---------------------------
function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id is
begin
return Queuing_Policy_Id'Val (N - First_Queuing_Policy_Name);
end Get_Queuing_Policy_Id;
------------------------------------
-- Get_Task_Dispatching_Policy_Id --
------------------------------------
function Get_Task_Dispatching_Policy_Id
(N : Name_Id) return Task_Dispatching_Policy_Id
is
begin
return Task_Dispatching_Policy_Id'Val
(N - First_Task_Dispatching_Policy_Name);
end Get_Task_Dispatching_Policy_Id;
----------------
-- Initialize --
----------------
procedure Initialize is
P_Index : Natural;
Discard_Name : Name_Id;
begin
P_Index := Preset_Names'First;
loop
Name_Len := 0;
while Preset_Names (P_Index) /= '#' loop
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := Preset_Names (P_Index);
P_Index := P_Index + 1;
end loop;
-- We do the Name_Find call to enter the name into the table, but
-- we don't need to do anything with the result, since we already
-- initialized all the preset names to have the right value (we
-- are depending on the order of the names and Preset_Names).
Discard_Name := Name_Find;
P_Index := P_Index + 1;
exit when Preset_Names (P_Index) = '#';
end loop;
-- Make sure that number of names in standard table is correct. If
-- this check fails, run utility program XSNAMES to construct a new
-- properly matching version of the body.
pragma Assert (Discard_Name = Last_Predefined_Name);
-- Initialize the convention identifiers table with the standard
-- set of synonyms that we recognize for conventions.
Convention_Identifiers.Init;
Convention_Identifiers.Append ((Name_Asm, Convention_Assembler));
Convention_Identifiers.Append ((Name_Assembly, Convention_Assembler));
Convention_Identifiers.Append ((Name_Default, Convention_C));
Convention_Identifiers.Append ((Name_External, Convention_C));
Convention_Identifiers.Append ((Name_C_Plus_Plus, Convention_CPP));
Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall));
Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall));
end Initialize;
-----------------------
-- Is_Attribute_Name --
-----------------------
function Is_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Attribute_Name .. Last_Attribute_Name;
end Is_Attribute_Name;
----------------------------------
-- Is_Configuration_Pragma_Name --
----------------------------------
function Is_Configuration_Pragma_Name (N : Name_Id) return Boolean is
begin
return N in First_Pragma_Name .. Last_Configuration_Pragma_Name
or else N = Name_Fast_Math;
end Is_Configuration_Pragma_Name;
------------------------
-- Is_Convention_Name --
------------------------
function Is_Convention_Name (N : Name_Id) return Boolean is
begin
-- Check if this is one of the standard conventions
if N in First_Convention_Name .. Last_Convention_Name
or else N = Name_C
then
return True;
-- Otherwise check if it is in convention identifier table
else
for J in 1 .. Convention_Identifiers.Last loop
if N = Convention_Identifiers.Table (J).Name then
return True;
end if;
end loop;
return False;
end if;
end Is_Convention_Name;
------------------------------
-- Is_Entity_Attribute_Name --
------------------------------
function Is_Entity_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Entity_Attribute_Name .. Last_Entity_Attribute_Name;
end Is_Entity_Attribute_Name;
--------------------------------
-- Is_Function_Attribute_Name --
--------------------------------
function Is_Function_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in
First_Renamable_Function_Attribute ..
Last_Renamable_Function_Attribute;
end Is_Function_Attribute_Name;
---------------------
-- Is_Keyword_Name --
---------------------
function Is_Keyword_Name (N : Name_Id) return Boolean is
begin
return Get_Name_Table_Byte (N) /= 0
and then (Ada_Version >= Ada_95
or else N not in Ada_95_Reserved_Words)
and then (Ada_Version >= Ada_05
or else N not in Ada_2005_Reserved_Words);
end Is_Keyword_Name;
----------------------------
-- Is_Locking_Policy_Name --
----------------------------
function Is_Locking_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Locking_Policy_Name .. Last_Locking_Policy_Name;
end Is_Locking_Policy_Name;
-----------------------------
-- Is_Operator_Symbol_Name --
-----------------------------
function Is_Operator_Symbol_Name (N : Name_Id) return Boolean is
begin
return N in First_Operator_Name .. Last_Operator_Name;
end Is_Operator_Symbol_Name;
--------------------
-- Is_Pragma_Name --
--------------------
function Is_Pragma_Name (N : Name_Id) return Boolean is
begin
return N in First_Pragma_Name .. Last_Pragma_Name
or else N = Name_AST_Entry
or else N = Name_Fast_Math
or else N = Name_Interface
or else N = Name_Relative_Deadline
or else N = Name_Priority
or else N = Name_Storage_Size
or else N = Name_Storage_Unit;
end Is_Pragma_Name;
---------------------------------
-- Is_Procedure_Attribute_Name --
---------------------------------
function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Procedure_Attribute .. Last_Procedure_Attribute;
end Is_Procedure_Attribute_Name;
----------------------------
-- Is_Queuing_Policy_Name --
----------------------------
function Is_Queuing_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Queuing_Policy_Name .. Last_Queuing_Policy_Name;
end Is_Queuing_Policy_Name;
-------------------------------------
-- Is_Task_Dispatching_Policy_Name --
-------------------------------------
function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean is
begin
return N in First_Task_Dispatching_Policy_Name ..
Last_Task_Dispatching_Policy_Name;
end Is_Task_Dispatching_Policy_Name;
----------------------------
-- Is_Type_Attribute_Name --
----------------------------
function Is_Type_Attribute_Name (N : Name_Id) return Boolean is
begin
return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
end Is_Type_Attribute_Name;
----------------------------------
-- Record_Convention_Identifier --
----------------------------------
procedure Record_Convention_Identifier
(Id : Name_Id;
Convention : Convention_Id)
is
begin
Convention_Identifiers.Append ((Id, Convention));
end Record_Convention_Identifier;
end Snames;
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Namet; use Namet;
package Snames is
-- This package contains definitions of standard names (i.e. entries in the
-- Names table) that are used throughout the GNAT compiler). It also contains
-- the definitions of some enumeration types whose definitions are tied to
-- the order of these preset names.
-- WARNING: There is a C file, snames.h which duplicates some of the
-- definitions in this file and must be kept properly synchronized.
-- If you change this package, you should run xsnames.
------------------
-- Preset Names --
------------------
-- The following are preset entries in the names table, which are entered
-- at the start of every compilation for easy access. Note that the order
-- of initialization of these names in the body must be coordinated with
-- the order of names in this table.
-- Note: a name may not appear more than once in the following list. If
-- additional pragmas or attributes are introduced which might otherwise
-- cause a duplicate, then list it only once in this table, and adjust the
-- definition of the functions for testing for pragma names and attribute
-- names, and returning their ID values. Of course everything is simpler
-- if no such duplications occur!
-- First we have the one character names used to optimize the lookup
-- process for one character identifiers (to avoid the hashing in this
-- case) There are a full 256 of these, but only the entries for lower
-- case and upper case letters have identifiers
-- The lower case letter entries are used for one character identifiers
-- appearing in the source, for example in pragma Interface (C).
Name_A : constant Name_Id := First_Name_Id + Character'Pos ('a');
Name_B : constant Name_Id := First_Name_Id + Character'Pos ('b');
Name_C : constant Name_Id := First_Name_Id + Character'Pos ('c');
Name_D : constant Name_Id := First_Name_Id + Character'Pos ('d');
Name_E : constant Name_Id := First_Name_Id + Character'Pos ('e');
Name_F : constant Name_Id := First_Name_Id + Character'Pos ('f');
Name_G : constant Name_Id := First_Name_Id + Character'Pos ('g');
Name_H : constant Name_Id := First_Name_Id + Character'Pos ('h');
Name_I : constant Name_Id := First_Name_Id + Character'Pos ('i');
Name_J : constant Name_Id := First_Name_Id + Character'Pos ('j');
Name_K : constant Name_Id := First_Name_Id + Character'Pos ('k');
Name_L : constant Name_Id := First_Name_Id + Character'Pos ('l');
Name_M : constant Name_Id := First_Name_Id + Character'Pos ('m');
Name_N : constant Name_Id := First_Name_Id + Character'Pos ('n');
Name_O : constant Name_Id := First_Name_Id + Character'Pos ('o');
Name_P : constant Name_Id := First_Name_Id + Character'Pos ('p');
Name_Q : constant Name_Id := First_Name_Id + Character'Pos ('q');
Name_R : constant Name_Id := First_Name_Id + Character'Pos ('r');
Name_S : constant Name_Id := First_Name_Id + Character'Pos ('s');
Name_T : constant Name_Id := First_Name_Id + Character'Pos ('t');
Name_U : constant Name_Id := First_Name_Id + Character'Pos ('u');
Name_V : constant Name_Id := First_Name_Id + Character'Pos ('v');
Name_W : constant Name_Id := First_Name_Id + Character'Pos ('w');
Name_X : constant Name_Id := First_Name_Id + Character'Pos ('x');
Name_Y : constant Name_Id := First_Name_Id + Character'Pos ('y');
Name_Z : constant Name_Id := First_Name_Id + Character'Pos ('z');
-- The upper case letter entries are used by expander code for local
-- variables that do not require unique names (e.g. formal parameter
-- names in constructed procedures)
Name_uA : constant Name_Id := First_Name_Id + Character'Pos ('A');
Name_uB : constant Name_Id := First_Name_Id + Character'Pos ('B');
Name_uC : constant Name_Id := First_Name_Id + Character'Pos ('C');
Name_uD : constant Name_Id := First_Name_Id + Character'Pos ('D');
Name_uE : constant Name_Id := First_Name_Id + Character'Pos ('E');
Name_uF : constant Name_Id := First_Name_Id + Character'Pos ('F');
Name_uG : constant Name_Id := First_Name_Id + Character'Pos ('G');
Name_uH : constant Name_Id := First_Name_Id + Character'Pos ('H');
Name_uI : constant Name_Id := First_Name_Id + Character'Pos ('I');
Name_uJ : constant Name_Id := First_Name_Id + Character'Pos ('J');
Name_uK : constant Name_Id := First_Name_Id + Character'Pos ('K');
Name_uL : constant Name_Id := First_Name_Id + Character'Pos ('L');
Name_uM : constant Name_Id := First_Name_Id + Character'Pos ('M');
Name_uN : constant Name_Id := First_Name_Id + Character'Pos ('N');
Name_uO : constant Name_Id := First_Name_Id + Character'Pos ('O');
Name_uP : constant Name_Id := First_Name_Id + Character'Pos ('P');
Name_uQ : constant Name_Id := First_Name_Id + Character'Pos ('Q');
Name_uR : constant Name_Id := First_Name_Id + Character'Pos ('R');
Name_uS : constant Name_Id := First_Name_Id + Character'Pos ('S');
Name_uT : constant Name_Id := First_Name_Id + Character'Pos ('T');
Name_uU : constant Name_Id := First_Name_Id + Character'Pos ('U');
Name_uV : constant Name_Id := First_Name_Id + Character'Pos ('V');
Name_uW : constant Name_Id := First_Name_Id + Character'Pos ('W');
Name_uX : constant Name_Id := First_Name_Id + Character'Pos ('X');
Name_uY : constant Name_Id := First_Name_Id + Character'Pos ('Y');
Name_uZ : constant Name_Id := First_Name_Id + Character'Pos ('Z');
-- Note: the following table is read by the utility program XSNAMES and
-- its format should not be changed without coordinating with this program.
N : constant Name_Id := First_Name_Id + 256;
-- Synonym used in standard name definitions
-- Some names that are used by gigi, and whose definitions are reflected
-- in the C header file a-snames.h. They are placed at the start so that
-- the need to modify a-snames.h is minimized.
Name_uParent : constant Name_Id := N + 000;
Name_uTag : constant Name_Id := N + 001;
Name_Off : constant Name_Id := N + 002;
Name_Space : constant Name_Id := N + 003;
Name_Time : constant Name_Id := N + 004;
-- Some special names used by the expander. Note that the lower case u's
-- at the start of these names get translated to extra underscores. These
-- names are only referenced internally by expander generated code.
Name_uAbort_Signal : constant Name_Id := N + 005;
Name_uAlignment : constant Name_Id := N + 006;
Name_uAssign : constant Name_Id := N + 007;
Name_uATCB : constant Name_Id := N + 008;
Name_uChain : constant Name_Id := N + 009;
Name_uClean : constant Name_Id := N + 010;
Name_uController : constant Name_Id := N + 011;
Name_uEntry_Bodies : constant Name_Id := N + 012;
Name_uExpunge : constant Name_Id := N + 013;
Name_uFinal_List : constant Name_Id := N + 014;
Name_uIdepth : constant Name_Id := N + 015;
Name_uInit : constant Name_Id := N + 016;
Name_uLocal_Final_List : constant Name_Id := N + 017;
Name_uMaster : constant Name_Id := N + 018;
Name_uObject : constant Name_Id := N + 019;
Name_uPostconditions : constant Name_Id := N + 020;
Name_uPriority : constant Name_Id := N + 021;
Name_uProcess_ATSD : constant Name_Id := N + 022;
Name_uRelative_Deadline : constant Name_Id := N + 023;
Name_uResult : constant Name_Id := N + 024;
Name_uSecondary_Stack : constant Name_Id := N + 025;
Name_uService : constant Name_Id := N + 026;
Name_uSize : constant Name_Id := N + 027;
Name_uStack : constant Name_Id := N + 028;
Name_uTags : constant Name_Id := N + 029;
Name_uTask : constant Name_Id := N + 030;
Name_uTask_Id : constant Name_Id := N + 031;
Name_uTask_Info : constant Name_Id := N + 032;
Name_uTask_Name : constant Name_Id := N + 033;
Name_uTrace_Sp : constant Name_Id := N + 034;
-- Names of predefined primitives used in the expansion of dispatching
-- requeue and select statements, Abort, 'Callable and 'Terminated.
Name_uDisp_Asynchronous_Select : constant Name_Id := N + 035;
Name_uDisp_Conditional_Select : constant Name_Id := N + 036;
Name_uDisp_Get_Prim_Op_Kind : constant Name_Id := N + 037;
Name_uDisp_Get_Task_Id : constant Name_Id := N + 038;
Name_uDisp_Requeue : constant Name_Id := N + 039;
Name_uDisp_Timed_Select : constant Name_Id := N + 040;
-- Names of routines in Ada.Finalization, needed by expander
Name_Initialize : constant Name_Id := N + 041;
Name_Adjust : constant Name_Id := N + 042;
Name_Finalize : constant Name_Id := N + 043;
-- Names of fields declared in System.Finalization_Implementation,
-- needed by the expander when generating code for finalization.
Name_Next : constant Name_Id := N + 044;
Name_Prev : constant Name_Id := N + 045;
-- Names of allocation routines, also needed by expander
Name_Allocate : constant Name_Id := N + 046;
Name_Deallocate : constant Name_Id := N + 047;
Name_Dereference : constant Name_Id := N + 048;
-- Names of Text_IO generic subpackages (see Rtsfind.Text_IO_Kludge)
First_Text_IO_Package : constant Name_Id := N + 049;
Name_Decimal_IO : constant Name_Id := N + 049;
Name_Enumeration_IO : constant Name_Id := N + 050;
Name_Fixed_IO : constant Name_Id := N + 051;
Name_Float_IO : constant Name_Id := N + 052;
Name_Integer_IO : constant Name_Id := N + 053;
Name_Modular_IO : constant Name_Id := N + 054;
Last_Text_IO_Package : constant Name_Id := N + 054;
subtype Text_IO_Package_Name is Name_Id
range First_Text_IO_Package .. Last_Text_IO_Package;
-- Some miscellaneous names used for error detection/recovery
Name_Const : constant Name_Id := N + 055;
Name_Error : constant Name_Id := N + 056;
Name_Go : constant Name_Id := N + 057;
Name_Put : constant Name_Id := N + 058;
Name_Put_Line : constant Name_Id := N + 059;
Name_To : constant Name_Id := N + 060;
-- Names for packages that are treated specially by the compiler
Name_Exception_Traces : constant Name_Id := N + 061;
Name_Finalization : constant Name_Id := N + 062;
Name_Finalization_Root : constant Name_Id := N + 063;
Name_Interfaces : constant Name_Id := N + 064;
Name_Most_Recent_Exception : constant Name_Id := N + 065;
Name_Standard : constant Name_Id := N + 066;
Name_System : constant Name_Id := N + 067;
Name_Text_IO : constant Name_Id := N + 068;
Name_Wide_Text_IO : constant Name_Id := N + 069;
Name_Wide_Wide_Text_IO : constant Name_Id := N + 070;
-- Names of implementations of the distributed systems annex
First_PCS_Name : constant Name_Id := N + 071;
Name_No_DSA : constant Name_Id := N + 071;
Name_GARLIC_DSA : constant Name_Id := N + 072;
Name_PolyORB_DSA : constant Name_Id := N + 073;
Last_PCS_Name : constant Name_Id := N + 073;
subtype PCS_Names is Name_Id
range First_PCS_Name .. Last_PCS_Name;
-- Names of identifiers used in expanding distribution stubs
Name_Addr : constant Name_Id := N + 074;
Name_Async : constant Name_Id := N + 075;
Name_Get_Active_Partition_ID : constant Name_Id := N + 076;
Name_Get_RCI_Package_Receiver : constant Name_Id := N + 077;
Name_Get_RCI_Package_Ref : constant Name_Id := N + 078;
Name_Origin : constant Name_Id := N + 079;
Name_Params : constant Name_Id := N + 080;
Name_Partition : constant Name_Id := N + 081;
Name_Partition_Interface : constant Name_Id := N + 082;
Name_Ras : constant Name_Id := N + 083;
Name_uCall : constant Name_Id := N + 084;
Name_RCI_Name : constant Name_Id := N + 085;
Name_Receiver : constant Name_Id := N + 086;
Name_Rpc : constant Name_Id := N + 087;
Name_Subp_Id : constant Name_Id := N + 088;
Name_Operation : constant Name_Id := N + 089;
Name_Argument : constant Name_Id := N + 090;
Name_Arg_Modes : constant Name_Id := N + 091;
Name_Handler : constant Name_Id := N + 092;
Name_Target : constant Name_Id := N + 093;
Name_Req : constant Name_Id := N + 094;
Name_Obj_TypeCode : constant Name_Id := N + 095;
Name_Stub : constant Name_Id := N + 096;
-- Operator Symbol entries. The actual names have an upper case O at
-- the start in place of the Op_ prefix (e.g. the actual name that
-- corresponds to Name_Op_Abs is "Oabs".
First_Operator_Name : constant Name_Id := N + 097;
Name_Op_Abs : constant Name_Id := N + 097; -- "abs"
Name_Op_And : constant Name_Id := N + 098; -- "and"
Name_Op_Mod : constant Name_Id := N + 099; -- "mod"
Name_Op_Not : constant Name_Id := N + 100; -- "not"
Name_Op_Or : constant Name_Id := N + 101; -- "or"
Name_Op_Rem : constant Name_Id := N + 102; -- "rem"
Name_Op_Xor : constant Name_Id := N + 103; -- "xor"
Name_Op_Eq : constant Name_Id := N + 104; -- "="
Name_Op_Ne : constant Name_Id := N + 105; -- "/="
Name_Op_Lt : constant Name_Id := N + 106; -- "<"
Name_Op_Le : constant Name_Id := N + 107; -- "<="
Name_Op_Gt : constant Name_Id := N + 108; -- ">"
Name_Op_Ge : constant Name_Id := N + 109; -- ">="
Name_Op_Add : constant Name_Id := N + 110; -- "+"
Name_Op_Subtract : constant Name_Id := N + 111; -- "-"
Name_Op_Concat : constant Name_Id := N + 112; -- "&"
Name_Op_Multiply : constant Name_Id := N + 113; -- "*"
Name_Op_Divide : constant Name_Id := N + 114; -- "/"
Name_Op_Expon : constant Name_Id := N + 115; -- "**"
Last_Operator_Name : constant Name_Id := N + 115;
-- Names for all pragmas recognized by GNAT. The entries with the comment
-- "Ada 83" are pragmas that are defined in Ada 83, but not in Ada 95.
-- These pragmas are fully implemented in both Ada 83 and Ada 95 modes
-- in GNAT.
-- The entries marked GNAT are pragmas that are defined by GNAT
-- and implemented in both Ada 83 and Ada 95 modes. Full descriptions
-- of these implementation dependent pragmas may be found in the
-- appropriate section in unit Sem_Prag in file sem-prag.adb.
-- The entries marked Ada05 are technically implementation dependent
-- pragmas, but they correspond to standard proposals for Ada 2005.
-- The entries marked VMS are VMS specific pragmas that are recognized
-- only in OpenVMS versions of GNAT. They are ignored in other versions
-- with an appropriate warning.
-- The entries marked AAMP are AAMP specific pragmas that are recognized
-- only in GNAT for the AAMP. They are ignored in other versions with
-- appropriate warnings.
First_Pragma_Name : constant Name_Id := N + 116;
-- Configuration pragmas are grouped at start
Name_Ada_83 : constant Name_Id := N + 116; -- GNAT
Name_Ada_95 : constant Name_Id := N + 117; -- GNAT
Name_Ada_05 : constant Name_Id := N + 118; -- GNAT
Name_Ada_2005 : constant Name_Id := N + 119; -- GNAT
Name_Assertion_Policy : constant Name_Id := N + 120; -- Ada 05
Name_Assume_No_Invalid_Values : constant Name_Id := N + 121; -- GNAT
Name_C_Pass_By_Copy : constant Name_Id := N + 122; -- GNAT
Name_Check_Name : constant Name_Id := N + 123; -- GNAT
Name_Check_Policy : constant Name_Id := N + 124; -- GNAT
Name_Compile_Time_Error : constant Name_Id := N + 125; -- GNAT
Name_Compile_Time_Warning : constant Name_Id := N + 126; -- GNAT
Name_Compiler_Unit : constant Name_Id := N + 127; -- GNAT
Name_Component_Alignment : constant Name_Id := N + 128; -- GNAT
Name_Convention_Identifier : constant Name_Id := N + 129; -- GNAT
Name_Debug_Policy : constant Name_Id := N + 130; -- GNAT
Name_Detect_Blocking : constant Name_Id := N + 131; -- Ada 05
Name_Discard_Names : constant Name_Id := N + 132;
Name_Elaboration_Checks : constant Name_Id := N + 133; -- GNAT
Name_Eliminate : constant Name_Id := N + 134; -- GNAT
Name_Extend_System : constant Name_Id := N + 135; -- GNAT
Name_Extensions_Allowed : constant Name_Id := N + 136; -- GNAT
Name_External_Name_Casing : constant Name_Id := N + 137; -- GNAT
-- Note: Fast_Math is not in this list because its name matches -- GNAT
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id, Is_[Configuration_]Pragma_Id, and
-- correctly recognize and process Fast_Math.
Name_Favor_Top_Level : constant Name_Id := N + 138; -- GNAT
Name_Float_Representation : constant Name_Id := N + 139; -- GNAT
Name_Implicit_Packing : constant Name_Id := N + 140; -- GNAT
Name_Initialize_Scalars : constant Name_Id := N + 141; -- GNAT
Name_Interrupt_State : constant Name_Id := N + 142; -- GNAT
Name_License : constant Name_Id := N + 143; -- GNAT
Name_Locking_Policy : constant Name_Id := N + 144;
Name_Long_Float : constant Name_Id := N + 145; -- VMS
Name_No_Run_Time : constant Name_Id := N + 146; -- GNAT
Name_No_Strict_Aliasing : constant Name_Id := N + 147; -- GNAT
Name_Normalize_Scalars : constant Name_Id := N + 148;
Name_Optimize_Alignment : constant Name_Id := N + 149; -- GNAT
Name_Persistent_BSS : constant Name_Id := N + 150; -- GNAT
Name_Polling : constant Name_Id := N + 151; -- GNAT
Name_Priority_Specific_Dispatching : constant Name_Id := N + 152; -- Ada 05
Name_Profile : constant Name_Id := N + 153; -- Ada 05
Name_Profile_Warnings : constant Name_Id := N + 154; -- GNAT
Name_Propagate_Exceptions : constant Name_Id := N + 155; -- GNAT
Name_Queuing_Policy : constant Name_Id := N + 156;
Name_Ravenscar : constant Name_Id := N + 157; -- GNAT
Name_Restricted_Run_Time : constant Name_Id := N + 158; -- GNAT
Name_Restrictions : constant Name_Id := N + 159;
Name_Restriction_Warnings : constant Name_Id := N + 160; -- GNAT
Name_Reviewable : constant Name_Id := N + 161;
Name_Source_File_Name : constant Name_Id := N + 162; -- GNAT
Name_Source_File_Name_Project : constant Name_Id := N + 163; -- GNAT
Name_Style_Checks : constant Name_Id := N + 164; -- GNAT
Name_Suppress : constant Name_Id := N + 165;
Name_Suppress_Exception_Locations : constant Name_Id := N + 166; -- GNAT
Name_Task_Dispatching_Policy : constant Name_Id := N + 167;
Name_Universal_Data : constant Name_Id := N + 168; -- AAMP
Name_Unsuppress : constant Name_Id := N + 169; -- Ada 05
Name_Use_VADS_Size : constant Name_Id := N + 170; -- GNAT
Name_Validity_Checks : constant Name_Id := N + 171; -- GNAT
Name_Warnings : constant Name_Id := N + 172; -- GNAT
Name_Wide_Character_Encoding : constant Name_Id := N + 173; -- GNAT
Last_Configuration_Pragma_Name : constant Name_Id := N + 173;
-- Remaining pragma names
Name_Abort_Defer : constant Name_Id := N + 174; -- GNAT
Name_All_Calls_Remote : constant Name_Id := N + 175;
Name_Annotate : constant Name_Id := N + 176; -- GNAT
-- Note: AST_Entry is not in this list because its name matches -- VMS
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id and Is_Pragma_Id correctly recognize
-- and process Name_AST_Entry.
Name_Assert : constant Name_Id := N + 177; -- Ada 05
Name_Asynchronous : constant Name_Id := N + 178;
Name_Atomic : constant Name_Id := N + 179;
Name_Atomic_Components : constant Name_Id := N + 180;
Name_Attach_Handler : constant Name_Id := N + 181;
Name_Check : constant Name_Id := N + 182; -- GNAT
Name_CIL_Constructor : constant Name_Id := N + 183; -- GNAT
Name_Comment : constant Name_Id := N + 184; -- GNAT
Name_Common_Object : constant Name_Id := N + 185; -- GNAT
Name_Complete_Representation : constant Name_Id := N + 186; -- GNAT
Name_Complex_Representation : constant Name_Id := N + 187; -- GNAT
Name_Controlled : constant Name_Id := N + 188;
Name_Convention : constant Name_Id := N + 189;
Name_CPP_Class : constant Name_Id := N + 190; -- GNAT
Name_CPP_Constructor : constant Name_Id := N + 191; -- GNAT
Name_CPP_Virtual : constant Name_Id := N + 192; -- GNAT
Name_CPP_Vtable : constant Name_Id := N + 193; -- GNAT
Name_Debug : constant Name_Id := N + 194; -- GNAT
Name_Elaborate : constant Name_Id := N + 195; -- Ada 83
Name_Elaborate_All : constant Name_Id := N + 196;
Name_Elaborate_Body : constant Name_Id := N + 197;
Name_Export : constant Name_Id := N + 198;
Name_Export_Exception : constant Name_Id := N + 199; -- VMS
Name_Export_Function : constant Name_Id := N + 200; -- GNAT
Name_Export_Object : constant Name_Id := N + 201; -- GNAT
Name_Export_Procedure : constant Name_Id := N + 202; -- GNAT
Name_Export_Value : constant Name_Id := N + 203; -- GNAT
Name_Export_Valued_Procedure : constant Name_Id := N + 204; -- GNAT
Name_External : constant Name_Id := N + 205; -- GNAT
Name_Finalize_Storage_Only : constant Name_Id := N + 206; -- GNAT
Name_Ident : constant Name_Id := N + 207; -- VMS
Name_Implemented_By_Entry : constant Name_Id := N + 208; -- Ada 05
Name_Import : constant Name_Id := N + 209;
Name_Import_Exception : constant Name_Id := N + 210; -- VMS
Name_Import_Function : constant Name_Id := N + 211; -- GNAT
Name_Import_Object : constant Name_Id := N + 212; -- GNAT
Name_Import_Procedure : constant Name_Id := N + 213; -- GNAT
Name_Import_Valued_Procedure : constant Name_Id := N + 214; -- GNAT
Name_Inline : constant Name_Id := N + 215;
Name_Inline_Always : constant Name_Id := N + 216; -- GNAT
Name_Inline_Generic : constant Name_Id := N + 217; -- GNAT
Name_Inspection_Point : constant Name_Id := N + 218;
-- Note: Interface is not in this list because its name matches -- GNAT
-- an Ada 2005 keyword. However it is included in the definition
-- of the type Attribute_Id, and the functions Get_Pragma_Id and
-- Is_Pragma_Id correctly recognize and process Name_Storage_Size.
Name_Interface_Name : constant Name_Id := N + 219; -- GNAT
Name_Interrupt_Handler : constant Name_Id := N + 220;
Name_Interrupt_Priority : constant Name_Id := N + 221;
Name_Java_Constructor : constant Name_Id := N + 222; -- GNAT
Name_Java_Interface : constant Name_Id := N + 223; -- GNAT
Name_Keep_Names : constant Name_Id := N + 224; -- GNAT
Name_Link_With : constant Name_Id := N + 225; -- GNAT
Name_Linker_Alias : constant Name_Id := N + 226; -- GNAT
Name_Linker_Constructor : constant Name_Id := N + 227; -- GNAT
Name_Linker_Destructor : constant Name_Id := N + 228; -- GNAT
Name_Linker_Options : constant Name_Id := N + 229;
Name_Linker_Section : constant Name_Id := N + 230; -- GNAT
Name_List : constant Name_Id := N + 231;
Name_Machine_Attribute : constant Name_Id := N + 232; -- GNAT
Name_Main : constant Name_Id := N + 233; -- GNAT
Name_Main_Storage : constant Name_Id := N + 234; -- GNAT
Name_Memory_Size : constant Name_Id := N + 235; -- Ada 83
Name_No_Body : constant Name_Id := N + 236; -- GNAT
Name_No_Return : constant Name_Id := N + 237; -- GNAT
Name_Obsolescent : constant Name_Id := N + 238; -- GNAT
Name_Optimize : constant Name_Id := N + 239;
Name_Pack : constant Name_Id := N + 240;
Name_Page : constant Name_Id := N + 241;
Name_Passive : constant Name_Id := N + 242; -- GNAT
Name_Postcondition : constant Name_Id := N + 243; -- GNAT
Name_Precondition : constant Name_Id := N + 244; -- GNAT
Name_Preelaborable_Initialization : constant Name_Id := N + 245; -- Ada 05
Name_Preelaborate : constant Name_Id := N + 246;
Name_Preelaborate_05 : constant Name_Id := N + 247; -- GNAT
-- Note: Priority is not in this list because its name matches
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id and Is_Pragma_Id correctly recognize
-- and process Priority. Priority is a standard Ada 95 pragma.
Name_Psect_Object : constant Name_Id := N + 248; -- VMS
Name_Pure : constant Name_Id := N + 249;
Name_Pure_05 : constant Name_Id := N + 250; -- GNAT
Name_Pure_Function : constant Name_Id := N + 251; -- GNAT
Name_Relative_Deadline : constant Name_Id := N + 252; -- Ada 05
Name_Remote_Call_Interface : constant Name_Id := N + 253;
Name_Remote_Types : constant Name_Id := N + 254;
Name_Share_Generic : constant Name_Id := N + 255; -- GNAT
Name_Shared : constant Name_Id := N + 256; -- Ada 83
Name_Shared_Passive : constant Name_Id := N + 257;
-- Note: Storage_Size is not in this list because its name
-- matches the name of the corresponding attribute. However,
-- it is included in the definition of the type Attribute_Id,
-- and the functions Get_Pragma_Id and Is_Pragma_Id correctly
-- recognize and process Name_Storage_Size.
-- Note: Storage_Unit is also omitted from the list because
-- of a clash with an attribute name, and is treated similarly.
Name_Source_Reference : constant Name_Id := N + 258; -- GNAT
Name_Static_Elaboration_Desired : constant Name_Id := N + 259; -- GNAT
Name_Stream_Convert : constant Name_Id := N + 260; -- GNAT
Name_Subtitle : constant Name_Id := N + 261; -- GNAT
Name_Suppress_All : constant Name_Id := N + 262; -- GNAT
Name_Suppress_Debug_Info : constant Name_Id := N + 263; -- GNAT
Name_Suppress_Initialization : constant Name_Id := N + 264; -- GNAT
Name_System_Name : constant Name_Id := N + 265; -- Ada 83
Name_Task_Info : constant Name_Id := N + 266; -- GNAT
Name_Task_Name : constant Name_Id := N + 267; -- GNAT
Name_Task_Storage : constant Name_Id := N + 268; -- VMS
Name_Thread_Local_Storage : constant Name_Id := N + 269; -- GNAT
Name_Time_Slice : constant Name_Id := N + 270; -- GNAT
Name_Title : constant Name_Id := N + 271; -- GNAT
Name_Unchecked_Union : constant Name_Id := N + 272; -- Ada 05
Name_Unimplemented_Unit : constant Name_Id := N + 273; -- GNAT
Name_Universal_Aliasing : constant Name_Id := N + 274; -- GNAT
Name_Unmodified : constant Name_Id := N + 275; -- GNAT
Name_Unreferenced : constant Name_Id := N + 276; -- GNAT
Name_Unreferenced_Objects : constant Name_Id := N + 277; -- GNAT
Name_Unreserve_All_Interrupts : constant Name_Id := N + 278; -- GNAT
Name_Volatile : constant Name_Id := N + 279;
Name_Volatile_Components : constant Name_Id := N + 280;
Name_Weak_External : constant Name_Id := N + 281; -- GNAT
Last_Pragma_Name : constant Name_Id := N + 281;
-- Language convention names for pragma Convention/Export/Import/Interface
-- Note that Name_C is not included in this list, since it was already
-- declared earlier in the context of one-character identifier names
-- (where the order is critical to the fast look up process).
-- Note: there are no convention names corresponding to the conventions
-- Entry and Protected, this is because these conventions cannot be
-- specified by a pragma.
First_Convention_Name : constant Name_Id := N + 282;
Name_Ada : constant Name_Id := N + 282;
Name_Assembler : constant Name_Id := N + 283;
Name_CIL : constant Name_Id := N + 284;
Name_COBOL : constant Name_Id := N + 285;
Name_CPP : constant Name_Id := N + 286;
Name_Fortran : constant Name_Id := N + 287;
Name_Intrinsic : constant Name_Id := N + 288;
Name_Java : constant Name_Id := N + 289;
Name_Stdcall : constant Name_Id := N + 290;
Name_Stubbed : constant Name_Id := N + 291;
Last_Convention_Name : constant Name_Id := N + 291;
-- The following names are preset as synonyms for Assembler
Name_Asm : constant Name_Id := N + 292;
Name_Assembly : constant Name_Id := N + 293;
-- The following names are preset as synonyms for C
Name_Default : constant Name_Id := N + 294;
-- Name_External (previously defined as pragma)
-- The following names are preset as synonyms for CPP
Name_C_Plus_Plus : constant Name_Id := N + 295;
-- The following names are present as synonyms for Stdcall
Name_DLL : constant Name_Id := N + 296;
Name_Win32 : constant Name_Id := N + 297;
-- Other special names used in processing pragmas
Name_As_Is : constant Name_Id := N + 298;
Name_Assertion : constant Name_Id := N + 299;
Name_Attribute_Name : constant Name_Id := N + 300;
Name_Body_File_Name : constant Name_Id := N + 301;
Name_Boolean_Entry_Barriers : constant Name_Id := N + 302;
Name_Casing : constant Name_Id := N + 303;
Name_Code : constant Name_Id := N + 304;
Name_Component : constant Name_Id := N + 305;
Name_Component_Size_4 : constant Name_Id := N + 306;
Name_Copy : constant Name_Id := N + 307;
Name_D_Float : constant Name_Id := N + 308;
Name_Descriptor : constant Name_Id := N + 309;
Name_Dot_Replacement : constant Name_Id := N + 310;
Name_Dynamic : constant Name_Id := N + 311;
Name_Entity : constant Name_Id := N + 312;
Name_Entry_Count : constant Name_Id := N + 313;
Name_External_Name : constant Name_Id := N + 314;
Name_First_Optional_Parameter : constant Name_Id := N + 315;
Name_Form : constant Name_Id := N + 316;
Name_G_Float : constant Name_Id := N + 317;
Name_Gcc : constant Name_Id := N + 318;
Name_Gnat : constant Name_Id := N + 319;
Name_GPL : constant Name_Id := N + 320;
Name_IEEE_Float : constant Name_Id := N + 321;
Name_Ignore : constant Name_Id := N + 322;
Name_Info : constant Name_Id := N + 323;
Name_Internal : constant Name_Id := N + 324;
Name_Link_Name : constant Name_Id := N + 325;
Name_Lowercase : constant Name_Id := N + 326;
Name_Max_Entry_Queue_Depth : constant Name_Id := N + 327;
Name_Max_Entry_Queue_Length : constant Name_Id := N + 328;
Name_Max_Size : constant Name_Id := N + 329;
Name_Mechanism : constant Name_Id := N + 330;
Name_Message : constant Name_Id := N + 331;
Name_Mixedcase : constant Name_Id := N + 332;
Name_Modified_GPL : constant Name_Id := N + 333;
Name_Name : constant Name_Id := N + 334;
Name_NCA : constant Name_Id := N + 335;
Name_No : constant Name_Id := N + 336;
Name_No_Dependence : constant Name_Id := N + 337;
Name_No_Dynamic_Attachment : constant Name_Id := N + 338;
Name_No_Dynamic_Interrupts : constant Name_Id := N + 339;
Name_No_Requeue : constant Name_Id := N + 340;
Name_No_Requeue_Statements : constant Name_Id := N + 341;
Name_No_Task_Attributes : constant Name_Id := N + 342;
Name_No_Task_Attributes_Package : constant Name_Id := N + 343;
Name_On : constant Name_Id := N + 344;
Name_Policy : constant Name_Id := N + 345;
Name_Parameter_Types : constant Name_Id := N + 346;
Name_Reference : constant Name_Id := N + 347;
Name_Restricted : constant Name_Id := N + 348;
Name_Result_Mechanism : constant Name_Id := N + 349;
Name_Result_Type : constant Name_Id := N + 350;
Name_Runtime : constant Name_Id := N + 351;
Name_SB : constant Name_Id := N + 352;
Name_Secondary_Stack_Size : constant Name_Id := N + 353;
Name_Section : constant Name_Id := N + 354;
Name_Semaphore : constant Name_Id := N + 355;
Name_Short_Descriptor : constant Name_Id := N + 356;
Name_Simple_Barriers : constant Name_Id := N + 357;
Name_Spec_File_Name : constant Name_Id := N + 358;
Name_State : constant Name_Id := N + 359;
Name_Static : constant Name_Id := N + 360;
Name_Stack_Size : constant Name_Id := N + 361;
Name_Subunit_File_Name : constant Name_Id := N + 362;
Name_Task_Stack_Size_Default : constant Name_Id := N + 363;
Name_Task_Type : constant Name_Id := N + 364;
Name_Time_Slicing_Enabled : constant Name_Id := N + 365;
Name_Top_Guard : constant Name_Id := N + 366;
Name_UBA : constant Name_Id := N + 367;
Name_UBS : constant Name_Id := N + 368;
Name_UBSB : constant Name_Id := N + 369;
Name_Unit_Name : constant Name_Id := N + 370;
Name_Unknown : constant Name_Id := N + 371;
Name_Unrestricted : constant Name_Id := N + 372;
Name_Uppercase : constant Name_Id := N + 373;
Name_User : constant Name_Id := N + 374;
Name_VAX_Float : constant Name_Id := N + 375;
Name_VMS : constant Name_Id := N + 376;
Name_Vtable_Ptr : constant Name_Id := N + 377;
Name_Working_Storage : constant Name_Id := N + 378;
-- Names of recognized attributes. The entries with the comment "Ada 83"
-- are attributes that are defined in Ada 83, but not in Ada 95. These
-- attributes are implemented in both Ada 83 and Ada 95 modes in GNAT.
-- The entries marked GNAT are attributes that are defined by GNAT
-- and implemented in both Ada 83 and Ada 95 modes. Full descriptions
-- of these implementation dependent attributes may be found in the
-- appropriate section in package Sem_Attr in file sem-attr.ads.
-- The entries marked VMS are recognized only in OpenVMS implementations
-- of GNAT, and are treated as illegal in all other contexts.
First_Attribute_Name : constant Name_Id := N + 379;
Name_Abort_Signal : constant Name_Id := N + 379; -- GNAT
Name_Access : constant Name_Id := N + 380;
Name_Address : constant Name_Id := N + 381;
Name_Address_Size : constant Name_Id := N + 382; -- GNAT
Name_Aft : constant Name_Id := N + 383;
Name_Alignment : constant Name_Id := N + 384;
Name_Asm_Input : constant Name_Id := N + 385; -- GNAT
Name_Asm_Output : constant Name_Id := N + 386; -- GNAT
Name_AST_Entry : constant Name_Id := N + 387; -- VMS
Name_Bit : constant Name_Id := N + 388; -- GNAT
Name_Bit_Order : constant Name_Id := N + 389;
Name_Bit_Position : constant Name_Id := N + 390; -- GNAT
Name_Body_Version : constant Name_Id := N + 391;
Name_Callable : constant Name_Id := N + 392;
Name_Caller : constant Name_Id := N + 393;
Name_Code_Address : constant Name_Id := N + 394; -- GNAT
Name_Component_Size : constant Name_Id := N + 395;
Name_Compose : constant Name_Id := N + 396;
Name_Constrained : constant Name_Id := N + 397;
Name_Count : constant Name_Id := N + 398;
Name_Default_Bit_Order : constant Name_Id := N + 399; -- GNAT
Name_Definite : constant Name_Id := N + 400;
Name_Delta : constant Name_Id := N + 401;
Name_Denorm : constant Name_Id := N + 402;
Name_Digits : constant Name_Id := N + 403;
Name_Elaborated : constant Name_Id := N + 404; -- GNAT
Name_Emax : constant Name_Id := N + 405; -- Ada 83
Name_Enabled : constant Name_Id := N + 406; -- GNAT
Name_Enum_Rep : constant Name_Id := N + 407; -- GNAT
Name_Enum_Val : constant Name_Id := N + 408; -- GNAT
Name_Epsilon : constant Name_Id := N + 409; -- Ada 83
Name_Exponent : constant Name_Id := N + 410;
Name_External_Tag : constant Name_Id := N + 411;
Name_Fast_Math : constant Name_Id := N + 412; -- GNAT
Name_First : constant Name_Id := N + 413;
Name_First_Bit : constant Name_Id := N + 414;
Name_Fixed_Value : constant Name_Id := N + 415; -- GNAT
Name_Fore : constant Name_Id := N + 416;
Name_Has_Access_Values : constant Name_Id := N + 417; -- GNAT
Name_Has_Discriminants : constant Name_Id := N + 418; -- GNAT
Name_Has_Tagged_Values : constant Name_Id := N + 419; -- GNAT
Name_Identity : constant Name_Id := N + 420;
Name_Img : constant Name_Id := N + 421; -- GNAT
Name_Integer_Value : constant Name_Id := N + 422; -- GNAT
Name_Invalid_Value : constant Name_Id := N + 423; -- GNAT
Name_Large : constant Name_Id := N + 424; -- Ada 83
Name_Last : constant Name_Id := N + 425;
Name_Last_Bit : constant Name_Id := N + 426;
Name_Leading_Part : constant Name_Id := N + 427;
Name_Length : constant Name_Id := N + 428;
Name_Machine_Emax : constant Name_Id := N + 429;
Name_Machine_Emin : constant Name_Id := N + 430;
Name_Machine_Mantissa : constant Name_Id := N + 431;
Name_Machine_Overflows : constant Name_Id := N + 432;
Name_Machine_Radix : constant Name_Id := N + 433;
Name_Machine_Rounding : constant Name_Id := N + 434; -- Ada 05
Name_Machine_Rounds : constant Name_Id := N + 435;
Name_Machine_Size : constant Name_Id := N + 436; -- GNAT
Name_Mantissa : constant Name_Id := N + 437; -- Ada 83
Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 438;
Name_Maximum_Alignment : constant Name_Id := N + 439; -- GNAT
Name_Mechanism_Code : constant Name_Id := N + 440; -- GNAT
Name_Mod : constant Name_Id := N + 441; -- Ada 05
Name_Model_Emin : constant Name_Id := N + 442;
Name_Model_Epsilon : constant Name_Id := N + 443;
Name_Model_Mantissa : constant Name_Id := N + 444;
Name_Model_Small : constant Name_Id := N + 445;
Name_Modulus : constant Name_Id := N + 446;
Name_Null_Parameter : constant Name_Id := N + 447; -- GNAT
Name_Object_Size : constant Name_Id := N + 448; -- GNAT
Name_Old : constant Name_Id := N + 449; -- GNAT
Name_Partition_ID : constant Name_Id := N + 450;
Name_Passed_By_Reference : constant Name_Id := N + 451; -- GNAT
Name_Pool_Address : constant Name_Id := N + 452;
Name_Pos : constant Name_Id := N + 453;
Name_Position : constant Name_Id := N + 454;
Name_Priority : constant Name_Id := N + 455; -- Ada 05
Name_Range : constant Name_Id := N + 456;
Name_Range_Length : constant Name_Id := N + 457; -- GNAT
Name_Result : constant Name_Id := N + 458; -- GNAT
Name_Round : constant Name_Id := N + 459;
Name_Safe_Emax : constant Name_Id := N + 460; -- Ada 83
Name_Safe_First : constant Name_Id := N + 461;
Name_Safe_Large : constant Name_Id := N + 462; -- Ada 83
Name_Safe_Last : constant Name_Id := N + 463;
Name_Safe_Small : constant Name_Id := N + 464; -- Ada 83
Name_Scale : constant Name_Id := N + 465;
Name_Scaling : constant Name_Id := N + 466;
Name_Signed_Zeros : constant Name_Id := N + 467;
Name_Size : constant Name_Id := N + 468;
Name_Small : constant Name_Id := N + 469;
Name_Storage_Size : constant Name_Id := N + 470;
Name_Storage_Unit : constant Name_Id := N + 471; -- GNAT
Name_Stream_Size : constant Name_Id := N + 472; -- Ada 05
Name_Tag : constant Name_Id := N + 473;
Name_Target_Name : constant Name_Id := N + 474; -- GNAT
Name_Terminated : constant Name_Id := N + 475;
Name_To_Address : constant Name_Id := N + 476; -- GNAT
Name_Type_Class : constant Name_Id := N + 477; -- GNAT
Name_UET_Address : constant Name_Id := N + 478; -- GNAT
Name_Unbiased_Rounding : constant Name_Id := N + 479;
Name_Unchecked_Access : constant Name_Id := N + 480;
Name_Unconstrained_Array : constant Name_Id := N + 481;
Name_Universal_Literal_String : constant Name_Id := N + 482; -- GNAT
Name_Unrestricted_Access : constant Name_Id := N + 483; -- GNAT
Name_VADS_Size : constant Name_Id := N + 484; -- GNAT
Name_Val : constant Name_Id := N + 485;
Name_Valid : constant Name_Id := N + 486;
Name_Value_Size : constant Name_Id := N + 487; -- GNAT
Name_Version : constant Name_Id := N + 488;
Name_Wchar_T_Size : constant Name_Id := N + 489; -- GNAT
Name_Wide_Wide_Width : constant Name_Id := N + 490; -- Ada 05
Name_Wide_Width : constant Name_Id := N + 491;
Name_Width : constant Name_Id := N + 492;
Name_Word_Size : constant Name_Id := N + 493; -- GNAT
-- Attributes that designate attributes returning renamable functions,
-- i.e. functions that return other than a universal value and that
-- have non-universal arguments.
First_Renamable_Function_Attribute : constant Name_Id := N + 494;
Name_Adjacent : constant Name_Id := N + 494;
Name_Ceiling : constant Name_Id := N + 495;
Name_Copy_Sign : constant Name_Id := N + 496;
Name_Floor : constant Name_Id := N + 497;
Name_Fraction : constant Name_Id := N + 498;
Name_From_Any : constant Name_Id := N + 499; -- GNAT
Name_Image : constant Name_Id := N + 500;
Name_Input : constant Name_Id := N + 501;
Name_Machine : constant Name_Id := N + 502;
Name_Max : constant Name_Id := N + 503;
Name_Min : constant Name_Id := N + 504;
Name_Model : constant Name_Id := N + 505;
Name_Pred : constant Name_Id := N + 506;
Name_Remainder : constant Name_Id := N + 507;
Name_Rounding : constant Name_Id := N + 508;
Name_Succ : constant Name_Id := N + 509;
Name_To_Any : constant Name_Id := N + 510; -- GNAT
Name_Truncation : constant Name_Id := N + 511;
Name_TypeCode : constant Name_Id := N + 512; -- GNAT
Name_Value : constant Name_Id := N + 513;
Name_Wide_Image : constant Name_Id := N + 514;
Name_Wide_Wide_Image : constant Name_Id := N + 515;
Name_Wide_Value : constant Name_Id := N + 516;
Name_Wide_Wide_Value : constant Name_Id := N + 517;
Last_Renamable_Function_Attribute : constant Name_Id := N + 517;
-- Attributes that designate procedures
First_Procedure_Attribute : constant Name_Id := N + 518;
Name_Output : constant Name_Id := N + 518;
Name_Read : constant Name_Id := N + 519;
Name_Write : constant Name_Id := N + 520;
Last_Procedure_Attribute : constant Name_Id := N + 520;
-- Remaining attributes are ones that return entities
First_Entity_Attribute_Name : constant Name_Id := N + 521;
Name_Elab_Body : constant Name_Id := N + 521; -- GNAT
Name_Elab_Spec : constant Name_Id := N + 522; -- GNAT
Name_Storage_Pool : constant Name_Id := N + 523;
-- These attributes are the ones that return types
First_Type_Attribute_Name : constant Name_Id := N + 524;
Name_Base : constant Name_Id := N + 524;
Name_Class : constant Name_Id := N + 525;
Name_Stub_Type : constant Name_Id := N + 526;
Last_Type_Attribute_Name : constant Name_Id := N + 526;
Last_Entity_Attribute_Name : constant Name_Id := N + 526;
Last_Attribute_Name : constant Name_Id := N + 526;
-- Names of recognized locking policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. C for Ceiling_Locking). If new policy names are added,
-- the first character must be distinct.
First_Locking_Policy_Name : constant Name_Id := N + 527;
Name_Ceiling_Locking : constant Name_Id := N + 527;
Name_Inheritance_Locking : constant Name_Id := N + 528;
Last_Locking_Policy_Name : constant Name_Id := N + 528;
-- Names of recognized queuing policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. F for FIFO_Queuing). If new policy names are added,
-- the first character must be distinct.
First_Queuing_Policy_Name : constant Name_Id := N + 529;
Name_FIFO_Queuing : constant Name_Id := N + 529;
Name_Priority_Queuing : constant Name_Id := N + 530;
Last_Queuing_Policy_Name : constant Name_Id := N + 530;
-- Names of recognized task dispatching policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. F for FIFO_Within_Priorities). If new policy names
-- are added, the first character must be distinct.
First_Task_Dispatching_Policy_Name : constant Name_Id := N + 531;
Name_EDF_Across_Priorities : constant Name_Id := N + 531;
Name_FIFO_Within_Priorities : constant Name_Id := N + 532;
Name_Non_Preemptive_Within_Priorities : constant Name_Id := N + 533;
Name_Round_Robin_Within_Priorities : constant Name_Id := N + 534;
Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 534;
-- Names of recognized checks for pragma Suppress
First_Check_Name : constant Name_Id := N + 535;
Name_Access_Check : constant Name_Id := N + 535;
Name_Accessibility_Check : constant Name_Id := N + 536;
Name_Alignment_Check : constant Name_Id := N + 537; -- GNAT
Name_Discriminant_Check : constant Name_Id := N + 538;
Name_Division_Check : constant Name_Id := N + 539;
Name_Elaboration_Check : constant Name_Id := N + 540;
Name_Index_Check : constant Name_Id := N + 541;
Name_Length_Check : constant Name_Id := N + 542;
Name_Overflow_Check : constant Name_Id := N + 543;
Name_Range_Check : constant Name_Id := N + 544;
Name_Storage_Check : constant Name_Id := N + 545;
Name_Tag_Check : constant Name_Id := N + 546;
Name_Validity_Check : constant Name_Id := N + 547; -- GNAT
Name_All_Checks : constant Name_Id := N + 548;
Last_Check_Name : constant Name_Id := N + 548;
-- Names corresponding to reserved keywords, excluding those already
-- declared in the attribute list (Access, Delta, Digits, Mod, Range).
Name_Abort : constant Name_Id := N + 549;
Name_Abs : constant Name_Id := N + 550;
Name_Accept : constant Name_Id := N + 551;
Name_And : constant Name_Id := N + 552;
Name_All : constant Name_Id := N + 553;
Name_Array : constant Name_Id := N + 554;
Name_At : constant Name_Id := N + 555;
Name_Begin : constant Name_Id := N + 556;
Name_Body : constant Name_Id := N + 557;
Name_Case : constant Name_Id := N + 558;
Name_Constant : constant Name_Id := N + 559;
Name_Declare : constant Name_Id := N + 560;
Name_Delay : constant Name_Id := N + 561;
Name_Do : constant Name_Id := N + 562;
Name_Else : constant Name_Id := N + 563;
Name_Elsif : constant Name_Id := N + 564;
Name_End : constant Name_Id := N + 565;
Name_Entry : constant Name_Id := N + 566;
Name_Exception : constant Name_Id := N + 567;
Name_Exit : constant Name_Id := N + 568;
Name_For : constant Name_Id := N + 569;
Name_Function : constant Name_Id := N + 570;
Name_Generic : constant Name_Id := N + 571;
Name_Goto : constant Name_Id := N + 572;
Name_If : constant Name_Id := N + 573;
Name_In : constant Name_Id := N + 574;
Name_Is : constant Name_Id := N + 575;
Name_Limited : constant Name_Id := N + 576;
Name_Loop : constant Name_Id := N + 577;
Name_New : constant Name_Id := N + 578;
Name_Not : constant Name_Id := N + 579;
Name_Null : constant Name_Id := N + 580;
Name_Of : constant Name_Id := N + 581;
Name_Or : constant Name_Id := N + 582;
Name_Others : constant Name_Id := N + 583;
Name_Out : constant Name_Id := N + 584;
Name_Package : constant Name_Id := N + 585;
Name_Pragma : constant Name_Id := N + 586;
Name_Private : constant Name_Id := N + 587;
Name_Procedure : constant Name_Id := N + 588;
Name_Raise : constant Name_Id := N + 589;
Name_Record : constant Name_Id := N + 590;
Name_Rem : constant Name_Id := N + 591;
Name_Renames : constant Name_Id := N + 592;
Name_Return : constant Name_Id := N + 593;
Name_Reverse : constant Name_Id := N + 594;
Name_Select : constant Name_Id := N + 595;
Name_Separate : constant Name_Id := N + 596;
Name_Subtype : constant Name_Id := N + 597;
Name_Task : constant Name_Id := N + 598;
Name_Terminate : constant Name_Id := N + 599;
Name_Then : constant Name_Id := N + 600;
Name_Type : constant Name_Id := N + 601;
Name_Use : constant Name_Id := N + 602;
Name_When : constant Name_Id := N + 603;
Name_While : constant Name_Id := N + 604;
Name_With : constant Name_Id := N + 605;
Name_Xor : constant Name_Id := N + 606;
-- Names of intrinsic subprograms
-- Note: Asm is missing from this list, since Asm is a legitimate
-- convention name. So is To_Address, which is a GNAT attribute.
First_Intrinsic_Name : constant Name_Id := N + 607;
Name_Divide : constant Name_Id := N + 607;
Name_Enclosing_Entity : constant Name_Id := N + 608;
Name_Exception_Information : constant Name_Id := N + 609;
Name_Exception_Message : constant Name_Id := N + 610;
Name_Exception_Name : constant Name_Id := N + 611;
Name_File : constant Name_Id := N + 612;
Name_Generic_Dispatching_Constructor : constant Name_Id := N + 613;
Name_Import_Address : constant Name_Id := N + 614;
Name_Import_Largest_Value : constant Name_Id := N + 615;
Name_Import_Value : constant Name_Id := N + 616;
Name_Is_Negative : constant Name_Id := N + 617;
Name_Line : constant Name_Id := N + 618;
Name_Rotate_Left : constant Name_Id := N + 619;
Name_Rotate_Right : constant Name_Id := N + 620;
Name_Shift_Left : constant Name_Id := N + 621;
Name_Shift_Right : constant Name_Id := N + 622;
Name_Shift_Right_Arithmetic : constant Name_Id := N + 623;
Name_Source_Location : constant Name_Id := N + 624;
Name_Unchecked_Conversion : constant Name_Id := N + 625;
Name_Unchecked_Deallocation : constant Name_Id := N + 626;
Name_To_Pointer : constant Name_Id := N + 627;
Last_Intrinsic_Name : constant Name_Id := N + 627;
-- Names used in processing intrinsic calls
Name_Free : constant Name_Id := N + 628;
-- Reserved words used only in Ada 95
First_95_Reserved_Word : constant Name_Id := N + 629;
Name_Abstract : constant Name_Id := N + 629;
Name_Aliased : constant Name_Id := N + 630;
Name_Protected : constant Name_Id := N + 631;
Name_Until : constant Name_Id := N + 632;
Name_Requeue : constant Name_Id := N + 633;
Name_Tagged : constant Name_Id := N + 634;
Last_95_Reserved_Word : constant Name_Id := N + 634;
subtype Ada_95_Reserved_Words is
Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word;
-- Miscellaneous names used in semantic checking
Name_Raise_Exception : constant Name_Id := N + 635;
-- Additional reserved words and identifiers used in GNAT Project Files
-- Note that Name_External is already previously declared
Name_Ada_Roots : constant Name_Id := N + 636;
Name_Aggregate : constant Name_Id := N + 637;
Name_Archive_Builder : constant Name_Id := N + 638;
Name_Archive_Builder_Append_Option : constant Name_Id := N + 639;
Name_Archive_Indexer : constant Name_Id := N + 640;
Name_Archive_Suffix : constant Name_Id := N + 641;
Name_Binder : constant Name_Id := N + 642;
Name_Binder_Prefix : constant Name_Id := N + 643;
Name_Body_Suffix : constant Name_Id := N + 644;
Name_Builder : constant Name_Id := N + 645;
Name_Builder_Switches : constant Name_Id := N + 646;
Name_Compiler : constant Name_Id := N + 647;
Name_Compiler_Command : constant Name_Id := N + 648;
Name_Compiler_Kind : constant Name_Id := N + 649;
Name_Config_Body_File_Name : constant Name_Id := N + 650;
Name_Config_Body_File_Name_Pattern : constant Name_Id := N + 651;
Name_Config_File_Switches : constant Name_Id := N + 652;
Name_Config_File_Unique : constant Name_Id := N + 653;
Name_Config_Spec_File_Name : constant Name_Id := N + 654;
Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + 655;
Name_Configuration : constant Name_Id := N + 656;
Name_Cross_Reference : constant Name_Id := N + 657;
Name_Default_Language : constant Name_Id := N + 658;
Name_Default_Switches : constant Name_Id := N + 659;
Name_Dependency_Driver : constant Name_Id := N + 660;
Name_Dependency_File_Kind : constant Name_Id := N + 661;
Name_Dependency_Switches : constant Name_Id := N + 662;
Name_Driver : constant Name_Id := N + 663;
Name_Excluded_Source_Dirs : constant Name_Id := N + 664;
Name_Excluded_Source_Files : constant Name_Id := N + 665;
Name_Excluded_Source_List_File : constant Name_Id := N + 666;
Name_Exec_Dir : constant Name_Id := N + 667;
Name_Executable : constant Name_Id := N + 668;
Name_Executable_Suffix : constant Name_Id := N + 669;
Name_Extends : constant Name_Id := N + 670;
Name_Externally_Built : constant Name_Id := N + 671;
Name_Finder : constant Name_Id := N + 672;
Name_Global_Compilation_Switches : constant Name_Id := N + 673;
Name_Global_Configuration_Pragmas : constant Name_Id := N + 674;
Name_Global_Config_File : constant Name_Id := N + 675;
Name_Gnatls : constant Name_Id := N + 676;
Name_Gnatstub : constant Name_Id := N + 677;
Name_Ide : constant Name_Id := N + 678;
Name_Implementation : constant Name_Id := N + 679;
Name_Implementation_Exceptions : constant Name_Id := N + 680;
Name_Implementation_Suffix : constant Name_Id := N + 681;
Name_Include_Switches : constant Name_Id := N + 682;
Name_Include_Path : constant Name_Id := N + 683;
Name_Include_Path_File : constant Name_Id := N + 684;
Name_Inherit_Source_Path : constant Name_Id := N + 685;
Name_Language_Kind : constant Name_Id := N + 686;
Name_Language_Processing : constant Name_Id := N + 687;
Name_Languages : constant Name_Id := N + 688;
Name_Library : constant Name_Id := N + 689;
Name_Library_Ali_Dir : constant Name_Id := N + 690;
Name_Library_Auto_Init : constant Name_Id := N + 691;
Name_Library_Auto_Init_Supported : constant Name_Id := N + 692;
Name_Library_Builder : constant Name_Id := N + 693;
Name_Library_Dir : constant Name_Id := N + 694;
Name_Library_GCC : constant Name_Id := N + 695;
Name_Library_Interface : constant Name_Id := N + 696;
Name_Library_Kind : constant Name_Id := N + 697;
Name_Library_Name : constant Name_Id := N + 698;
Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + 699;
Name_Library_Options : constant Name_Id := N + 700;
Name_Library_Partial_Linker : constant Name_Id := N + 701;
Name_Library_Reference_Symbol_File : constant Name_Id := N + 702;
Name_Library_Src_Dir : constant Name_Id := N + 703;
Name_Library_Support : constant Name_Id := N + 704;
Name_Library_Symbol_File : constant Name_Id := N + 705;
Name_Library_Symbol_Policy : constant Name_Id := N + 706;
Name_Library_Version : constant Name_Id := N + 707;
Name_Library_Version_Switches : constant Name_Id := N + 708;
Name_Linker : constant Name_Id := N + 709;
Name_Linker_Executable_Option : constant Name_Id := N + 710;
Name_Linker_Lib_Dir_Option : constant Name_Id := N + 711;
Name_Linker_Lib_Name_Option : constant Name_Id := N + 712;
Name_Local_Config_File : constant Name_Id := N + 713;
Name_Local_Configuration_Pragmas : constant Name_Id := N + 714;
Name_Locally_Removed_Files : constant Name_Id := N + 715;
Name_Map_File_Option : constant Name_Id := N + 716;
Name_Mapping_File_Switches : constant Name_Id := N + 717;
Name_Mapping_Spec_Suffix : constant Name_Id := N + 718;
Name_Mapping_Body_Suffix : constant Name_Id := N + 719;
Name_Metrics : constant Name_Id := N + 720;
Name_Naming : constant Name_Id := N + 721;
Name_Object_Generated : constant Name_Id := N + 722;
Name_Objects_Linked : constant Name_Id := N + 723;
Name_Objects_Path : constant Name_Id := N + 724;
Name_Objects_Path_File : constant Name_Id := N + 725;
Name_Object_Dir : constant Name_Id := N + 726;
Name_Path_Syntax : constant Name_Id := N + 727;
Name_Pic_Option : constant Name_Id := N + 728;
Name_Pretty_Printer : constant Name_Id := N + 729;
Name_Prefix : constant Name_Id := N + 730;
Name_Project : constant Name_Id := N + 731;
Name_Project_Dir : constant Name_Id := N + 732;
Name_Roots : constant Name_Id := N + 733;
Name_Required_Switches : constant Name_Id := N + 734;
Name_Run_Path_Option : constant Name_Id := N + 735;
Name_Runtime_Project : constant Name_Id := N + 736;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 737;
Name_Shared_Library_Prefix : constant Name_Id := N + 738;
Name_Shared_Library_Suffix : constant Name_Id := N + 739;
Name_Separate_Suffix : constant Name_Id := N + 740;
Name_Source_Dirs : constant Name_Id := N + 741;
Name_Source_Files : constant Name_Id := N + 742;
Name_Source_List_File : constant Name_Id := N + 743;
Name_Spec : constant Name_Id := N + 744;
Name_Spec_Suffix : constant Name_Id := N + 745;
Name_Specification : constant Name_Id := N + 746;
Name_Specification_Exceptions : constant Name_Id := N + 747;
Name_Specification_Suffix : constant Name_Id := N + 748;
Name_Stack : constant Name_Id := N + 749;
Name_Switches : constant Name_Id := N + 750;
Name_Symbolic_Link_Supported : constant Name_Id := N + 751;
Name_Sync : constant Name_Id := N + 752;
Name_Synchronize : constant Name_Id := N + 753;
Name_Toolchain_Description : constant Name_Id := N + 754;
Name_Toolchain_Version : constant Name_Id := N + 755;
Name_Runtime_Library_Dir : constant Name_Id := N + 756;
-- Other miscellaneous names used in front end
Name_Unaligned_Valid : constant Name_Id := N + 757;
-- Ada 2005 reserved words
First_2005_Reserved_Word : constant Name_Id := N + 758;
Name_Interface : constant Name_Id := N + 758;
Name_Overriding : constant Name_Id := N + 759;
Name_Synchronized : constant Name_Id := N + 760;
Last_2005_Reserved_Word : constant Name_Id := N + 760;
subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body
Last_Predefined_Name : constant Name_Id := N + 760;
---------------------------------------
-- Subtypes Defining Name Categories --
---------------------------------------
subtype Any_Operator_Name is Name_Id range
First_Operator_Name .. Last_Operator_Name;
subtype Configuration_Pragma_Names is Name_Id range
First_Pragma_Name .. Last_Configuration_Pragma_Name;
------------------------------
-- Attribute ID Definitions --
------------------------------
type Attribute_Id is (
Attribute_Abort_Signal,
Attribute_Access,
Attribute_Address,
Attribute_Address_Size,
Attribute_Aft,
Attribute_Alignment,
Attribute_Asm_Input,
Attribute_Asm_Output,
Attribute_AST_Entry,
Attribute_Bit,
Attribute_Bit_Order,
Attribute_Bit_Position,
Attribute_Body_Version,
Attribute_Callable,
Attribute_Caller,
Attribute_Code_Address,
Attribute_Component_Size,
Attribute_Compose,
Attribute_Constrained,
Attribute_Count,
Attribute_Default_Bit_Order,
Attribute_Definite,
Attribute_Delta,
Attribute_Denorm,
Attribute_Digits,
Attribute_Elaborated,
Attribute_Emax,
Attribute_Enabled,
Attribute_Enum_Rep,
Attribute_Enum_Val,
Attribute_Epsilon,
Attribute_Exponent,
Attribute_External_Tag,
Attribute_Fast_Math,
Attribute_First,
Attribute_First_Bit,
Attribute_Fixed_Value,
Attribute_Fore,
Attribute_Has_Access_Values,
Attribute_Has_Discriminants,
Attribute_Has_Tagged_Values,
Attribute_Identity,
Attribute_Img,
Attribute_Integer_Value,
Attribute_Invalid_Value,
Attribute_Large,
Attribute_Last,
Attribute_Last_Bit,
Attribute_Leading_Part,
Attribute_Length,
Attribute_Machine_Emax,
Attribute_Machine_Emin,
Attribute_Machine_Mantissa,
Attribute_Machine_Overflows,
Attribute_Machine_Radix,
Attribute_Machine_Rounding,
Attribute_Machine_Rounds,
Attribute_Machine_Size,
Attribute_Mantissa,
Attribute_Max_Size_In_Storage_Elements,
Attribute_Maximum_Alignment,
Attribute_Mechanism_Code,
Attribute_Mod,
Attribute_Model_Emin,
Attribute_Model_Epsilon,
Attribute_Model_Mantissa,
Attribute_Model_Small,
Attribute_Modulus,
Attribute_Null_Parameter,
Attribute_Object_Size,
Attribute_Old,
Attribute_Partition_ID,
Attribute_Passed_By_Reference,
Attribute_Pool_Address,
Attribute_Pos,
Attribute_Position,
Attribute_Priority,
Attribute_Range,
Attribute_Range_Length,
Attribute_Result,
Attribute_Round,
Attribute_Safe_Emax,
Attribute_Safe_First,
Attribute_Safe_Large,
Attribute_Safe_Last,
Attribute_Safe_Small,
Attribute_Scale,
Attribute_Scaling,
Attribute_Signed_Zeros,
Attribute_Size,
Attribute_Small,
Attribute_Storage_Size,
Attribute_Storage_Unit,
Attribute_Stream_Size,
Attribute_Tag,
Attribute_Target_Name,
Attribute_Terminated,
Attribute_To_Address,
Attribute_Type_Class,
Attribute_UET_Address,
Attribute_Unbiased_Rounding,
Attribute_Unchecked_Access,
Attribute_Unconstrained_Array,
Attribute_Universal_Literal_String,
Attribute_Unrestricted_Access,
Attribute_VADS_Size,
Attribute_Val,
Attribute_Valid,
Attribute_Value_Size,
Attribute_Version,
Attribute_Wchar_T_Size,
Attribute_Wide_Wide_Width,
Attribute_Wide_Width,
Attribute_Width,
Attribute_Word_Size,
-- Attributes designating renamable functions
Attribute_Adjacent,
Attribute_Ceiling,
Attribute_Copy_Sign,
Attribute_Floor,
Attribute_Fraction,
Attribute_From_Any,
Attribute_Image,
Attribute_Input,
Attribute_Machine,
Attribute_Max,
Attribute_Min,
Attribute_Model,
Attribute_Pred,
Attribute_Remainder,
Attribute_Rounding,
Attribute_Succ,
Attribute_To_Any,
Attribute_Truncation,
Attribute_TypeCode,
Attribute_Value,
Attribute_Wide_Image,
Attribute_Wide_Wide_Image,
Attribute_Wide_Value,
Attribute_Wide_Wide_Value,
-- Attributes designating procedures
Attribute_Output,
Attribute_Read,
Attribute_Write,
-- Entity attributes (includes type attributes)
Attribute_Elab_Body,
Attribute_Elab_Spec,
Attribute_Storage_Pool,
-- Type attributes
Attribute_Base,
Attribute_Class,
Attribute_Stub_Type);
type Attribute_Class_Array is array (Attribute_Id) of Boolean;
-- Type used to build attribute classification flag arrays
------------------------------------
-- Convention Name ID Definitions --
------------------------------------
type Convention_Id is (
-- The native-to-Ada (non-foreign) conventions come first. These include
-- the ones defined in the RM, plus Stubbed.
Convention_Ada,
Convention_Intrinsic,
Convention_Entry,
Convention_Protected,
Convention_Stubbed,
-- The remaining conventions are foreign language conventions
Convention_Assembler, -- also Asm, Assembly
Convention_C, -- also Default, External
Convention_CIL,
Convention_COBOL,
Convention_CPP,
Convention_Fortran,
Convention_Java,
Convention_Stdcall); -- also DLL, Win32
-- Note: Convention C_Pass_By_Copy is allowed only for record
-- types (where it is treated like C except that the appropriate
-- flag is set in the record type). Recognizing this convention
-- is specially handled in Sem_Prag.
for Convention_Id'Size use 8;
-- Plenty of space for expansion
subtype Foreign_Convention is
Convention_Id range Convention_Assembler .. Convention_Id'Last;
-----------------------------------
-- Locking Policy ID Definitions --
-----------------------------------
type Locking_Policy_Id is (
Locking_Policy_Inheritance_Locking,
Locking_Policy_Ceiling_Locking);
---------------------------
-- Pragma ID Definitions --
---------------------------
type Pragma_Id is (
-- Configuration pragmas
-- Note: This list is in the GNAT users guide, so be sure that if any
-- additions or deletions are made to the following list, they are
-- properly reflected in the users guide.
Pragma_Ada_83,
Pragma_Ada_95,
Pragma_Ada_05,
Pragma_Ada_2005,
Pragma_Assertion_Policy,
Pragma_Assume_No_Invalid_Values,
Pragma_C_Pass_By_Copy,
Pragma_Check_Name,
Pragma_Check_Policy,
Pragma_Compile_Time_Error,
Pragma_Compile_Time_Warning,
Pragma_Compiler_Unit,
Pragma_Component_Alignment,
Pragma_Convention_Identifier,
Pragma_Debug_Policy,
Pragma_Detect_Blocking,
Pragma_Discard_Names,
Pragma_Elaboration_Checks,
Pragma_Eliminate,
Pragma_Extend_System,
Pragma_Extensions_Allowed,
Pragma_External_Name_Casing,
Pragma_Favor_Top_Level,
Pragma_Float_Representation,
Pragma_Implicit_Packing,
Pragma_Initialize_Scalars,
Pragma_Interrupt_State,
Pragma_License,
Pragma_Locking_Policy,
Pragma_Long_Float,
Pragma_No_Run_Time,
Pragma_No_Strict_Aliasing,
Pragma_Normalize_Scalars,
Pragma_Optimize_Alignment,
Pragma_Persistent_BSS,
Pragma_Polling,
Pragma_Priority_Specific_Dispatching,
Pragma_Profile,
Pragma_Profile_Warnings,
Pragma_Propagate_Exceptions,
Pragma_Queuing_Policy,
Pragma_Ravenscar,
Pragma_Restricted_Run_Time,
Pragma_Restrictions,
Pragma_Restriction_Warnings,
Pragma_Reviewable,
Pragma_Source_File_Name,
Pragma_Source_File_Name_Project,
Pragma_Style_Checks,
Pragma_Suppress,
Pragma_Suppress_Exception_Locations,
Pragma_Task_Dispatching_Policy,
Pragma_Universal_Data,
Pragma_Unsuppress,
Pragma_Use_VADS_Size,
Pragma_Validity_Checks,
Pragma_Warnings,
Pragma_Wide_Character_Encoding,
-- Remaining (non-configuration) pragmas
Pragma_Abort_Defer,
Pragma_All_Calls_Remote,
Pragma_Annotate,
Pragma_Assert,
Pragma_Asynchronous,
Pragma_Atomic,
Pragma_Atomic_Components,
Pragma_Attach_Handler,
Pragma_Check,
Pragma_CIL_Constructor,
Pragma_Comment,
Pragma_Common_Object,
Pragma_Complete_Representation,
Pragma_Complex_Representation,
Pragma_Controlled,
Pragma_Convention,
Pragma_CPP_Class,
Pragma_CPP_Constructor,
Pragma_CPP_Virtual,
Pragma_CPP_Vtable,
Pragma_Debug,
Pragma_Elaborate,
Pragma_Elaborate_All,
Pragma_Elaborate_Body,
Pragma_Export,
Pragma_Export_Exception,
Pragma_Export_Function,
Pragma_Export_Object,
Pragma_Export_Procedure,
Pragma_Export_Value,
Pragma_Export_Valued_Procedure,
Pragma_External,
Pragma_Finalize_Storage_Only,
Pragma_Ident,
Pragma_Implemented_By_Entry,
Pragma_Import,
Pragma_Import_Exception,
Pragma_Import_Function,
Pragma_Import_Object,
Pragma_Import_Procedure,
Pragma_Import_Valued_Procedure,
Pragma_Inline,
Pragma_Inline_Always,
Pragma_Inline_Generic,
Pragma_Inspection_Point,
Pragma_Interface_Name,
Pragma_Interrupt_Handler,
Pragma_Interrupt_Priority,
Pragma_Java_Constructor,
Pragma_Java_Interface,
Pragma_Keep_Names,
Pragma_Link_With,
Pragma_Linker_Alias,
Pragma_Linker_Constructor,
Pragma_Linker_Destructor,
Pragma_Linker_Options,
Pragma_Linker_Section,
Pragma_List,
Pragma_Machine_Attribute,
Pragma_Main,
Pragma_Main_Storage,
Pragma_Memory_Size,
Pragma_No_Body,
Pragma_No_Return,
Pragma_Obsolescent,
Pragma_Optimize,
Pragma_Pack,
Pragma_Page,
Pragma_Passive,
Pragma_Postcondition,
Pragma_Precondition,
Pragma_Preelaborable_Initialization,
Pragma_Preelaborate,
Pragma_Preelaborate_05,
Pragma_Psect_Object,
Pragma_Pure,
Pragma_Pure_05,
Pragma_Pure_Function,
Pragma_Relative_Deadline,
Pragma_Remote_Call_Interface,
Pragma_Remote_Types,
Pragma_Share_Generic,
Pragma_Shared,
Pragma_Shared_Passive,
Pragma_Source_Reference,
Pragma_Static_Elaboration_Desired,
Pragma_Stream_Convert,
Pragma_Subtitle,
Pragma_Suppress_All,
Pragma_Suppress_Debug_Info,
Pragma_Suppress_Initialization,
Pragma_System_Name,
Pragma_Task_Info,
Pragma_Task_Name,
Pragma_Task_Storage,
Pragma_Thread_Local_Storage,
Pragma_Time_Slice,
Pragma_Title,
Pragma_Unchecked_Union,
Pragma_Unimplemented_Unit,
Pragma_Universal_Aliasing,
Pragma_Unmodified,
Pragma_Unreferenced,
Pragma_Unreferenced_Objects,
Pragma_Unreserve_All_Interrupts,
Pragma_Volatile,
Pragma_Volatile_Components,
Pragma_Weak_External,
-- The following pragmas are on their own, out of order, because of the
-- special processing required to deal with the fact that their names
-- match existing attribute names.
Pragma_AST_Entry,
Pragma_Fast_Math,
Pragma_Interface,
Pragma_Priority,
Pragma_Storage_Size,
Pragma_Storage_Unit,
-- The value to represent an unknown or unrecognized pragma
Unknown_Pragma);
-----------------------------------
-- Queuing Policy ID definitions --
-----------------------------------
type Queuing_Policy_Id is (
Queuing_Policy_FIFO_Queuing,
Queuing_Policy_Priority_Queuing);
--------------------------------------------
-- Task Dispatching Policy ID definitions --
--------------------------------------------
type Task_Dispatching_Policy_Id is (
Task_Dispatching_FIFO_Within_Priorities);
-- Id values used to identify task dispatching policies
-----------------
-- Subprograms --
-----------------
procedure Initialize;
-- Called to initialize the preset names in the names table
function Is_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute
function Is_Entity_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized entity attribute,
-- i.e. an attribute reference that returns an entity.
function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute that
-- designates a procedure (and can therefore appear as a statement).
function Is_Function_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute
-- that designates a renameable function, and can therefore appear in
-- a renaming statement. Note that not all attributes designating
-- functions are renamable, in particular, those returning a universal
-- value cannot be renamed.
function Is_Type_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized type attribute,
-- i.e. an attribute reference that returns a type
function Is_Convention_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of one of the recognized
-- language conventions, as required by pragma Convention, Import,
-- Export, Interface. Returns True if so. Also returns True for a
-- name that has been specified by a Convention_Identifier pragma.
-- If neither case holds, returns False.
function Is_Keyword_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is one of the (reserved) keyword names. This
-- includes all the keywords defined in the Ada standard (taking into
-- effect the Ada version). It also includes additional keywords in
-- contexts where additional keywords have been added. For example, in the
-- context of parsing project files, keywords such as PROJECT are included.
function Is_Locking_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized locking policy
function Is_Operator_Symbol_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of an operator symbol
function Is_Pragma_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized pragma. Note that
-- pragmas AST_Entry, Fast_Math, Priority, Storage_Size, and Storage_Unit
-- are recognized as pragmas by this function even though their names are
-- separate from the other pragma names. For this reason, clients should
-- always use this function, rather than do range tests on Name_Id values.
function Is_Configuration_Pragma_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized configuration
-- pragma. Note that pragma Fast_Math is recognized as a configuration
-- pragma by this function even though its name is separate from other
-- configuration pragma names. For this reason, clients should always
-- use this function, rather than do range tests on Name_Id values.
function Is_Queuing_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized queuing policy
function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized task
-- dispatching policy.
function Get_Attribute_Id (N : Name_Id) return Attribute_Id;
-- Returns Id of attribute corresponding to given name. It is an error to
-- call this function with a name that is not the name of a attribute.
function Get_Convention_Id (N : Name_Id) return Convention_Id;
-- Returns Id of language convention corresponding to given name. It is an
-- to call this function with a name that is not the name of a convention,
-- or one previously given in a call to Record_Convention_Identifier.
function Get_Convention_Name (C : Convention_Id) return Name_Id;
-- Returns the name of language convention corresponding to given
-- convention id.
function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id;
-- Returns Id of locking policy corresponding to given name. It is an error
-- to call this function with a name that is not the name of a check.
function Get_Pragma_Id (N : Name_Id) return Pragma_Id;
-- Returns Id of pragma corresponding to given name. Returns Unknown_Pragma
-- if N is not a name of a known (Ada defined or GNAT-specific) pragma.
-- Note that the function also works correctly for names of pragmas that
-- are not included in the main list of pragma Names (AST_Entry, Priority,
-- Storage_Size, and Storage_Unit (e.g. Name_Storage_Size returns
-- Pragma_Storage_Size).
function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id;
-- Returns Id of queuing policy corresponding to given name. It is an error
-- to call this function with a name that is not the name of a check.
function Get_Task_Dispatching_Policy_Id
(N : Name_Id) return Task_Dispatching_Policy_Id;
-- Returns Id of task dispatching policy corresponding to given name. It
-- is an error to call this function with a name that is not the name of
-- a defined check.
procedure Record_Convention_Identifier
(Id : Name_Id;
Convention : Convention_Id);
-- A call to this procedure, resulting from an occurrence of a pragma
-- Convention_Identifier, records that from now on an occurrence of Id
-- will be recognized as a name for the specified convention.
private
pragma Inline (Is_Attribute_Name);
pragma Inline (Is_Entity_Attribute_Name);
pragma Inline (Is_Type_Attribute_Name);
pragma Inline (Is_Locking_Policy_Name);
pragma Inline (Is_Operator_Symbol_Name);
pragma Inline (Is_Queuing_Policy_Name);
pragma Inline (Is_Pragma_Name);
pragma Inline (Is_Task_Dispatching_Policy_Name);
end Snames;
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S N A M E S --
-- --
-- T e m p l a t e --
-- --
-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Namet; use Namet;
package Snames is
-- This package contains definitions of standard names (i.e. entries in the
-- Names table) that are used throughout the GNAT compiler). It also contains
-- the definitions of some enumeration types whose definitions are tied to
-- the order of these preset names.
------------------
-- Preset Names --
------------------
-- The following are preset entries in the names table, which are entered
-- at the start of every compilation for easy access. Note that the order
-- of initialization of these names in the body must be coordinated with
-- the order of names in this table.
-- Note: a name may not appear more than once in the following list. If
-- additional pragmas or attributes are introduced which might otherwise
-- cause a duplicate, then list it only once in this table, and adjust the
-- definition of the functions for testing for pragma names and attribute
-- names, and returning their ID values. Of course everything is simpler
-- if no such duplications occur!
-- First we have the one character names used to optimize the lookup
-- process for one character identifiers (to avoid the hashing in this
-- case) There are a full 256 of these, but only the entries for lower
-- case and upper case letters have identifiers
-- The lower case letter entries are used for one character identifiers
-- appearing in the source, for example in pragma Interface (C).
Name_A : constant Name_Id := First_Name_Id + Character'Pos ('a');
Name_B : constant Name_Id := First_Name_Id + Character'Pos ('b');
Name_C : constant Name_Id := First_Name_Id + Character'Pos ('c');
Name_D : constant Name_Id := First_Name_Id + Character'Pos ('d');
Name_E : constant Name_Id := First_Name_Id + Character'Pos ('e');
Name_F : constant Name_Id := First_Name_Id + Character'Pos ('f');
Name_G : constant Name_Id := First_Name_Id + Character'Pos ('g');
Name_H : constant Name_Id := First_Name_Id + Character'Pos ('h');
Name_I : constant Name_Id := First_Name_Id + Character'Pos ('i');
Name_J : constant Name_Id := First_Name_Id + Character'Pos ('j');
Name_K : constant Name_Id := First_Name_Id + Character'Pos ('k');
Name_L : constant Name_Id := First_Name_Id + Character'Pos ('l');
Name_M : constant Name_Id := First_Name_Id + Character'Pos ('m');
Name_N : constant Name_Id := First_Name_Id + Character'Pos ('n');
Name_O : constant Name_Id := First_Name_Id + Character'Pos ('o');
Name_P : constant Name_Id := First_Name_Id + Character'Pos ('p');
Name_Q : constant Name_Id := First_Name_Id + Character'Pos ('q');
Name_R : constant Name_Id := First_Name_Id + Character'Pos ('r');
Name_S : constant Name_Id := First_Name_Id + Character'Pos ('s');
Name_T : constant Name_Id := First_Name_Id + Character'Pos ('t');
Name_U : constant Name_Id := First_Name_Id + Character'Pos ('u');
Name_V : constant Name_Id := First_Name_Id + Character'Pos ('v');
Name_W : constant Name_Id := First_Name_Id + Character'Pos ('w');
Name_X : constant Name_Id := First_Name_Id + Character'Pos ('x');
Name_Y : constant Name_Id := First_Name_Id + Character'Pos ('y');
Name_Z : constant Name_Id := First_Name_Id + Character'Pos ('z');
-- The upper case letter entries are used by expander code for local
-- variables that do not require unique names (e.g. formal parameter
-- names in constructed procedures)
Name_uA : constant Name_Id := First_Name_Id + Character'Pos ('A');
Name_uB : constant Name_Id := First_Name_Id + Character'Pos ('B');
Name_uC : constant Name_Id := First_Name_Id + Character'Pos ('C');
Name_uD : constant Name_Id := First_Name_Id + Character'Pos ('D');
Name_uE : constant Name_Id := First_Name_Id + Character'Pos ('E');
Name_uF : constant Name_Id := First_Name_Id + Character'Pos ('F');
Name_uG : constant Name_Id := First_Name_Id + Character'Pos ('G');
Name_uH : constant Name_Id := First_Name_Id + Character'Pos ('H');
Name_uI : constant Name_Id := First_Name_Id + Character'Pos ('I');
Name_uJ : constant Name_Id := First_Name_Id + Character'Pos ('J');
Name_uK : constant Name_Id := First_Name_Id + Character'Pos ('K');
Name_uL : constant Name_Id := First_Name_Id + Character'Pos ('L');
Name_uM : constant Name_Id := First_Name_Id + Character'Pos ('M');
Name_uN : constant Name_Id := First_Name_Id + Character'Pos ('N');
Name_uO : constant Name_Id := First_Name_Id + Character'Pos ('O');
Name_uP : constant Name_Id := First_Name_Id + Character'Pos ('P');
Name_uQ : constant Name_Id := First_Name_Id + Character'Pos ('Q');
Name_uR : constant Name_Id := First_Name_Id + Character'Pos ('R');
Name_uS : constant Name_Id := First_Name_Id + Character'Pos ('S');
Name_uT : constant Name_Id := First_Name_Id + Character'Pos ('T');
Name_uU : constant Name_Id := First_Name_Id + Character'Pos ('U');
Name_uV : constant Name_Id := First_Name_Id + Character'Pos ('V');
Name_uW : constant Name_Id := First_Name_Id + Character'Pos ('W');
Name_uX : constant Name_Id := First_Name_Id + Character'Pos ('X');
Name_uY : constant Name_Id := First_Name_Id + Character'Pos ('Y');
Name_uZ : constant Name_Id := First_Name_Id + Character'Pos ('Z');
-- Note: the following table is read by the utility program XSNAMES and
-- its format should not be changed without coordinating with this program.
N : constant Name_Id := First_Name_Id + 256;
-- Synonym used in standard name definitions
-- Names referenced in snames.h
Name_uParent : constant Name_Id := N + $;
Name_uTag : constant Name_Id := N + $;
Name_Off : constant Name_Id := N + $;
Name_Space : constant Name_Id := N + $;
Name_Time : constant Name_Id := N + $;
-- Some special names used by the expander. Note that the lower case u's
-- at the start of these names get translated to extra underscores. These
-- names are only referenced internally by expander generated code.
Name_uAbort_Signal : constant Name_Id := N + $;
Name_uAlignment : constant Name_Id := N + $;
Name_uAssign : constant Name_Id := N + $;
Name_uATCB : constant Name_Id := N + $;
Name_uChain : constant Name_Id := N + $;
Name_uClean : constant Name_Id := N + $;
Name_uController : constant Name_Id := N + $;
Name_uEntry_Bodies : constant Name_Id := N + $;
Name_uExpunge : constant Name_Id := N + $;
Name_uFinal_List : constant Name_Id := N + $;
Name_uIdepth : constant Name_Id := N + $;
Name_uInit : constant Name_Id := N + $;
Name_uLocal_Final_List : constant Name_Id := N + $;
Name_uMaster : constant Name_Id := N + $;
Name_uObject : constant Name_Id := N + $;
Name_uPostconditions : constant Name_Id := N + $;
Name_uPriority : constant Name_Id := N + $;
Name_uProcess_ATSD : constant Name_Id := N + $;
Name_uRelative_Deadline : constant Name_Id := N + $;
Name_uResult : constant Name_Id := N + $;
Name_uSecondary_Stack : constant Name_Id := N + $;
Name_uService : constant Name_Id := N + $;
Name_uSize : constant Name_Id := N + $;
Name_uStack : constant Name_Id := N + $;
Name_uTags : constant Name_Id := N + $;
Name_uTask : constant Name_Id := N + $;
Name_uTask_Id : constant Name_Id := N + $;
Name_uTask_Info : constant Name_Id := N + $;
Name_uTask_Name : constant Name_Id := N + $;
Name_uTrace_Sp : constant Name_Id := N + $;
-- Names of predefined primitives used in the expansion of dispatching
-- requeue and select statements, Abort, 'Callable and 'Terminated.
Name_uDisp_Asynchronous_Select : constant Name_Id := N + $;
Name_uDisp_Conditional_Select : constant Name_Id := N + $;
Name_uDisp_Get_Prim_Op_Kind : constant Name_Id := N + $;
Name_uDisp_Get_Task_Id : constant Name_Id := N + $;
Name_uDisp_Requeue : constant Name_Id := N + $;
Name_uDisp_Timed_Select : constant Name_Id := N + $;
-- Names of routines in Ada.Finalization, needed by expander
Name_Initialize : constant Name_Id := N + $;
Name_Adjust : constant Name_Id := N + $;
Name_Finalize : constant Name_Id := N + $;
-- Names of fields declared in System.Finalization_Implementation,
-- needed by the expander when generating code for finalization.
Name_Next : constant Name_Id := N + $;
Name_Prev : constant Name_Id := N + $;
-- Names of allocation routines, also needed by expander
Name_Allocate : constant Name_Id := N + $;
Name_Deallocate : constant Name_Id := N + $;
Name_Dereference : constant Name_Id := N + $;
-- Names of Text_IO generic subpackages (see Rtsfind.Text_IO_Kludge)
First_Text_IO_Package : constant Name_Id := N + $;
Name_Decimal_IO : constant Name_Id := N + $;
Name_Enumeration_IO : constant Name_Id := N + $;
Name_Fixed_IO : constant Name_Id := N + $;
Name_Float_IO : constant Name_Id := N + $;
Name_Integer_IO : constant Name_Id := N + $;
Name_Modular_IO : constant Name_Id := N + $;
Last_Text_IO_Package : constant Name_Id := N + $;
subtype Text_IO_Package_Name is Name_Id
range First_Text_IO_Package .. Last_Text_IO_Package;
-- Some miscellaneous names used for error detection/recovery
Name_Const : constant Name_Id := N + $;
Name_Error : constant Name_Id := N + $;
Name_Go : constant Name_Id := N + $;
Name_Put : constant Name_Id := N + $;
Name_Put_Line : constant Name_Id := N + $;
Name_To : constant Name_Id := N + $;
-- Names for packages that are treated specially by the compiler
Name_Exception_Traces : constant Name_Id := N + $;
Name_Finalization : constant Name_Id := N + $;
Name_Finalization_Root : constant Name_Id := N + $;
Name_Interfaces : constant Name_Id := N + $;
Name_Most_Recent_Exception : constant Name_Id := N + $;
Name_Standard : constant Name_Id := N + $;
Name_System : constant Name_Id := N + $;
Name_Text_IO : constant Name_Id := N + $;
Name_Wide_Text_IO : constant Name_Id := N + $;
Name_Wide_Wide_Text_IO : constant Name_Id := N + $;
-- Names of implementations of the distributed systems annex
First_PCS_Name : constant Name_Id := N + $;
Name_No_DSA : constant Name_Id := N + $;
Name_GARLIC_DSA : constant Name_Id := N + $;
Name_PolyORB_DSA : constant Name_Id := N + $;
Last_PCS_Name : constant Name_Id := N + $;
subtype PCS_Names is Name_Id
range First_PCS_Name .. Last_PCS_Name;
-- Names of identifiers used in expanding distribution stubs
Name_Addr : constant Name_Id := N + $;
Name_Async : constant Name_Id := N + $;
Name_Get_Active_Partition_ID : constant Name_Id := N + $;
Name_Get_RCI_Package_Receiver : constant Name_Id := N + $;
Name_Get_RCI_Package_Ref : constant Name_Id := N + $;
Name_Origin : constant Name_Id := N + $;
Name_Params : constant Name_Id := N + $;
Name_Partition : constant Name_Id := N + $;
Name_Partition_Interface : constant Name_Id := N + $;
Name_Ras : constant Name_Id := N + $;
Name_uCall : constant Name_Id := N + $;
Name_RCI_Name : constant Name_Id := N + $;
Name_Receiver : constant Name_Id := N + $;
Name_Rpc : constant Name_Id := N + $;
Name_Subp_Id : constant Name_Id := N + $;
Name_Operation : constant Name_Id := N + $;
Name_Argument : constant Name_Id := N + $;
Name_Arg_Modes : constant Name_Id := N + $;
Name_Handler : constant Name_Id := N + $;
Name_Target : constant Name_Id := N + $;
Name_Req : constant Name_Id := N + $;
Name_Obj_TypeCode : constant Name_Id := N + $;
Name_Stub : constant Name_Id := N + $;
-- Operator Symbol entries. The actual names have an upper case O at
-- the start in place of the Op_ prefix (e.g. the actual name that
-- corresponds to Name_Op_Abs is "Oabs".
First_Operator_Name : constant Name_Id := N + $;
Name_Op_Abs : constant Name_Id := N + $; -- "abs"
Name_Op_And : constant Name_Id := N + $; -- "and"
Name_Op_Mod : constant Name_Id := N + $; -- "mod"
Name_Op_Not : constant Name_Id := N + $; -- "not"
Name_Op_Or : constant Name_Id := N + $; -- "or"
Name_Op_Rem : constant Name_Id := N + $; -- "rem"
Name_Op_Xor : constant Name_Id := N + $; -- "xor"
Name_Op_Eq : constant Name_Id := N + $; -- "="
Name_Op_Ne : constant Name_Id := N + $; -- "/="
Name_Op_Lt : constant Name_Id := N + $; -- "<"
Name_Op_Le : constant Name_Id := N + $; -- "<="
Name_Op_Gt : constant Name_Id := N + $; -- ">"
Name_Op_Ge : constant Name_Id := N + $; -- ">="
Name_Op_Add : constant Name_Id := N + $; -- "+"
Name_Op_Subtract : constant Name_Id := N + $; -- "-"
Name_Op_Concat : constant Name_Id := N + $; -- "&"
Name_Op_Multiply : constant Name_Id := N + $; -- "*"
Name_Op_Divide : constant Name_Id := N + $; -- "/"
Name_Op_Expon : constant Name_Id := N + $; -- "**"
Last_Operator_Name : constant Name_Id := N + $;
-- Names for all pragmas recognized by GNAT. The entries with the comment
-- "Ada 83" are pragmas that are defined in Ada 83, but not in Ada 95.
-- These pragmas are fully implemented in both Ada 83 and Ada 95 modes
-- in GNAT.
-- The entries marked GNAT are pragmas that are defined by GNAT
-- and implemented in both Ada 83 and Ada 95 modes. Full descriptions
-- of these implementation dependent pragmas may be found in the
-- appropriate section in unit Sem_Prag in file sem-prag.adb.
-- The entries marked Ada05 are technically implementation dependent
-- pragmas, but they correspond to standard proposals for Ada 2005.
-- The entries marked VMS are VMS specific pragmas that are recognized
-- only in OpenVMS versions of GNAT. They are ignored in other versions
-- with an appropriate warning.
-- The entries marked AAMP are AAMP specific pragmas that are recognized
-- only in GNAT for the AAMP. They are ignored in other versions with
-- appropriate warnings.
First_Pragma_Name : constant Name_Id := N + $;
-- Configuration pragmas are grouped at start
Name_Ada_83 : constant Name_Id := N + $; -- GNAT
Name_Ada_95 : constant Name_Id := N + $; -- GNAT
Name_Ada_05 : constant Name_Id := N + $; -- GNAT
Name_Ada_2005 : constant Name_Id := N + $; -- GNAT
Name_Assertion_Policy : constant Name_Id := N + $; -- Ada 05
Name_Assume_No_Invalid_Values : constant Name_Id := N + $; -- GNAT
Name_C_Pass_By_Copy : constant Name_Id := N + $; -- GNAT
Name_Check_Name : constant Name_Id := N + $; -- GNAT
Name_Check_Policy : constant Name_Id := N + $; -- GNAT
Name_Compile_Time_Error : constant Name_Id := N + $; -- GNAT
Name_Compile_Time_Warning : constant Name_Id := N + $; -- GNAT
Name_Compiler_Unit : constant Name_Id := N + $; -- GNAT
Name_Component_Alignment : constant Name_Id := N + $; -- GNAT
Name_Convention_Identifier : constant Name_Id := N + $; -- GNAT
Name_Debug_Policy : constant Name_Id := N + $; -- GNAT
Name_Detect_Blocking : constant Name_Id := N + $; -- Ada 05
Name_Discard_Names : constant Name_Id := N + $;
Name_Elaboration_Checks : constant Name_Id := N + $; -- GNAT
Name_Eliminate : constant Name_Id := N + $; -- GNAT
Name_Extend_System : constant Name_Id := N + $; -- GNAT
Name_Extensions_Allowed : constant Name_Id := N + $; -- GNAT
Name_External_Name_Casing : constant Name_Id := N + $; -- GNAT
-- Note: Fast_Math is not in this list because its name matches -- GNAT
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id, Is_[Configuration_]Pragma_Id, and
-- correctly recognize and process Fast_Math.
Name_Favor_Top_Level : constant Name_Id := N + $; -- GNAT
Name_Float_Representation : constant Name_Id := N + $; -- GNAT
Name_Implicit_Packing : constant Name_Id := N + $; -- GNAT
Name_Initialize_Scalars : constant Name_Id := N + $; -- GNAT
Name_Interrupt_State : constant Name_Id := N + $; -- GNAT
Name_License : constant Name_Id := N + $; -- GNAT
Name_Locking_Policy : constant Name_Id := N + $;
Name_Long_Float : constant Name_Id := N + $; -- VMS
Name_No_Run_Time : constant Name_Id := N + $; -- GNAT
Name_No_Strict_Aliasing : constant Name_Id := N + $; -- GNAT
Name_Normalize_Scalars : constant Name_Id := N + $;
Name_Optimize_Alignment : constant Name_Id := N + $; -- GNAT
Name_Persistent_BSS : constant Name_Id := N + $; -- GNAT
Name_Polling : constant Name_Id := N + $; -- GNAT
Name_Priority_Specific_Dispatching : constant Name_Id := N + $; -- Ada 05
Name_Profile : constant Name_Id := N + $; -- Ada 05
Name_Profile_Warnings : constant Name_Id := N + $; -- GNAT
Name_Propagate_Exceptions : constant Name_Id := N + $; -- GNAT
Name_Queuing_Policy : constant Name_Id := N + $;
Name_Ravenscar : constant Name_Id := N + $; -- GNAT
Name_Restricted_Run_Time : constant Name_Id := N + $; -- GNAT
Name_Restrictions : constant Name_Id := N + $;
Name_Restriction_Warnings : constant Name_Id := N + $; -- GNAT
Name_Reviewable : constant Name_Id := N + $;
Name_Source_File_Name : constant Name_Id := N + $; -- GNAT
Name_Source_File_Name_Project : constant Name_Id := N + $; -- GNAT
Name_Style_Checks : constant Name_Id := N + $; -- GNAT
Name_Suppress : constant Name_Id := N + $;
Name_Suppress_Exception_Locations : constant Name_Id := N + $; -- GNAT
Name_Task_Dispatching_Policy : constant Name_Id := N + $;
Name_Universal_Data : constant Name_Id := N + $; -- AAMP
Name_Unsuppress : constant Name_Id := N + $; -- Ada 05
Name_Use_VADS_Size : constant Name_Id := N + $; -- GNAT
Name_Validity_Checks : constant Name_Id := N + $; -- GNAT
Name_Warnings : constant Name_Id := N + $; -- GNAT
Name_Wide_Character_Encoding : constant Name_Id := N + $; -- GNAT
Last_Configuration_Pragma_Name : constant Name_Id := N + $;
-- Remaining pragma names
Name_Abort_Defer : constant Name_Id := N + $; -- GNAT
Name_All_Calls_Remote : constant Name_Id := N + $;
Name_Annotate : constant Name_Id := N + $; -- GNAT
-- Note: AST_Entry is not in this list because its name matches -- VMS
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id and Is_Pragma_Id correctly recognize
-- and process Name_AST_Entry.
Name_Assert : constant Name_Id := N + $; -- Ada 05
Name_Asynchronous : constant Name_Id := N + $;
Name_Atomic : constant Name_Id := N + $;
Name_Atomic_Components : constant Name_Id := N + $;
Name_Attach_Handler : constant Name_Id := N + $;
Name_Check : constant Name_Id := N + $; -- GNAT
Name_CIL_Constructor : constant Name_Id := N + $; -- GNAT
Name_Comment : constant Name_Id := N + $; -- GNAT
Name_Common_Object : constant Name_Id := N + $; -- GNAT
Name_Complete_Representation : constant Name_Id := N + $; -- GNAT
Name_Complex_Representation : constant Name_Id := N + $; -- GNAT
Name_Controlled : constant Name_Id := N + $;
Name_Convention : constant Name_Id := N + $;
Name_CPP_Class : constant Name_Id := N + $; -- GNAT
Name_CPP_Constructor : constant Name_Id := N + $; -- GNAT
Name_CPP_Virtual : constant Name_Id := N + $; -- GNAT
Name_CPP_Vtable : constant Name_Id := N + $; -- GNAT
Name_Debug : constant Name_Id := N + $; -- GNAT
Name_Elaborate : constant Name_Id := N + $; -- Ada 83
Name_Elaborate_All : constant Name_Id := N + $;
Name_Elaborate_Body : constant Name_Id := N + $;
Name_Export : constant Name_Id := N + $;
Name_Export_Exception : constant Name_Id := N + $; -- VMS
Name_Export_Function : constant Name_Id := N + $; -- GNAT
Name_Export_Object : constant Name_Id := N + $; -- GNAT
Name_Export_Procedure : constant Name_Id := N + $; -- GNAT
Name_Export_Value : constant Name_Id := N + $; -- GNAT
Name_Export_Valued_Procedure : constant Name_Id := N + $; -- GNAT
Name_External : constant Name_Id := N + $; -- GNAT
Name_Finalize_Storage_Only : constant Name_Id := N + $; -- GNAT
Name_Ident : constant Name_Id := N + $; -- VMS
Name_Implemented_By_Entry : constant Name_Id := N + $; -- Ada 05
Name_Import : constant Name_Id := N + $;
Name_Import_Exception : constant Name_Id := N + $; -- VMS
Name_Import_Function : constant Name_Id := N + $; -- GNAT
Name_Import_Object : constant Name_Id := N + $; -- GNAT
Name_Import_Procedure : constant Name_Id := N + $; -- GNAT
Name_Import_Valued_Procedure : constant Name_Id := N + $; -- GNAT
Name_Inline : constant Name_Id := N + $;
Name_Inline_Always : constant Name_Id := N + $; -- GNAT
Name_Inline_Generic : constant Name_Id := N + $; -- GNAT
Name_Inspection_Point : constant Name_Id := N + $;
-- Note: Interface is not in this list because its name matches -- GNAT
-- an Ada 2005 keyword. However it is included in the definition
-- of the type Attribute_Id, and the functions Get_Pragma_Id and
-- Is_Pragma_Id correctly recognize and process Name_Storage_Size.
Name_Interface_Name : constant Name_Id := N + $; -- GNAT
Name_Interrupt_Handler : constant Name_Id := N + $;
Name_Interrupt_Priority : constant Name_Id := N + $;
Name_Java_Constructor : constant Name_Id := N + $; -- GNAT
Name_Java_Interface : constant Name_Id := N + $; -- GNAT
Name_Keep_Names : constant Name_Id := N + $; -- GNAT
Name_Link_With : constant Name_Id := N + $; -- GNAT
Name_Linker_Alias : constant Name_Id := N + $; -- GNAT
Name_Linker_Constructor : constant Name_Id := N + $; -- GNAT
Name_Linker_Destructor : constant Name_Id := N + $; -- GNAT
Name_Linker_Options : constant Name_Id := N + $;
Name_Linker_Section : constant Name_Id := N + $; -- GNAT
Name_List : constant Name_Id := N + $;
Name_Machine_Attribute : constant Name_Id := N + $; -- GNAT
Name_Main : constant Name_Id := N + $; -- GNAT
Name_Main_Storage : constant Name_Id := N + $; -- GNAT
Name_Memory_Size : constant Name_Id := N + $; -- Ada 83
Name_No_Body : constant Name_Id := N + $; -- GNAT
Name_No_Return : constant Name_Id := N + $; -- GNAT
Name_Obsolescent : constant Name_Id := N + $; -- GNAT
Name_Optimize : constant Name_Id := N + $;
Name_Pack : constant Name_Id := N + $;
Name_Page : constant Name_Id := N + $;
Name_Passive : constant Name_Id := N + $; -- GNAT
Name_Postcondition : constant Name_Id := N + $; -- GNAT
Name_Precondition : constant Name_Id := N + $; -- GNAT
Name_Preelaborable_Initialization : constant Name_Id := N + $; -- Ada 05
Name_Preelaborate : constant Name_Id := N + $;
Name_Preelaborate_05 : constant Name_Id := N + $; -- GNAT
-- Note: Priority is not in this list because its name matches
-- the name of the corresponding attribute. However, it is
-- included in the definition of the type Pragma_Id, and the
-- functions Get_Pragma_Id and Is_Pragma_Id correctly recognize
-- and process Priority. Priority is a standard Ada 95 pragma.
Name_Psect_Object : constant Name_Id := N + $; -- VMS
Name_Pure : constant Name_Id := N + $;
Name_Pure_05 : constant Name_Id := N + $; -- GNAT
Name_Pure_Function : constant Name_Id := N + $; -- GNAT
Name_Relative_Deadline : constant Name_Id := N + $; -- Ada 05
Name_Remote_Call_Interface : constant Name_Id := N + $;
Name_Remote_Types : constant Name_Id := N + $;
Name_Share_Generic : constant Name_Id := N + $; -- GNAT
Name_Shared : constant Name_Id := N + $; -- Ada 83
Name_Shared_Passive : constant Name_Id := N + $;
-- Note: Storage_Size is not in this list because its name
-- matches the name of the corresponding attribute. However,
-- it is included in the definition of the type Attribute_Id,
-- and the functions Get_Pragma_Id and Is_Pragma_Id correctly
-- recognize and process Name_Storage_Size.
-- Note: Storage_Unit is also omitted from the list because
-- of a clash with an attribute name, and is treated similarly.
Name_Source_Reference : constant Name_Id := N + $; -- GNAT
Name_Static_Elaboration_Desired : constant Name_Id := N + $; -- GNAT
Name_Stream_Convert : constant Name_Id := N + $; -- GNAT
Name_Subtitle : constant Name_Id := N + $; -- GNAT
Name_Suppress_All : constant Name_Id := N + $; -- GNAT
Name_Suppress_Debug_Info : constant Name_Id := N + $; -- GNAT
Name_Suppress_Initialization : constant Name_Id := N + $; -- GNAT
Name_System_Name : constant Name_Id := N + $; -- Ada 83
Name_Task_Info : constant Name_Id := N + $; -- GNAT
Name_Task_Name : constant Name_Id := N + $; -- GNAT
Name_Task_Storage : constant Name_Id := N + $; -- VMS
Name_Thread_Local_Storage : constant Name_Id := N + $; -- GNAT
Name_Time_Slice : constant Name_Id := N + $; -- GNAT
Name_Title : constant Name_Id := N + $; -- GNAT
Name_Unchecked_Union : constant Name_Id := N + $; -- Ada 05
Name_Unimplemented_Unit : constant Name_Id := N + $; -- GNAT
Name_Universal_Aliasing : constant Name_Id := N + $; -- GNAT
Name_Unmodified : constant Name_Id := N + $; -- GNAT
Name_Unreferenced : constant Name_Id := N + $; -- GNAT
Name_Unreferenced_Objects : constant Name_Id := N + $; -- GNAT
Name_Unreserve_All_Interrupts : constant Name_Id := N + $; -- GNAT
Name_Volatile : constant Name_Id := N + $;
Name_Volatile_Components : constant Name_Id := N + $;
Name_Weak_External : constant Name_Id := N + $; -- GNAT
Last_Pragma_Name : constant Name_Id := N + $;
-- Language convention names for pragma Convention/Export/Import/Interface
-- Note that Name_C is not included in this list, since it was already
-- declared earlier in the context of one-character identifier names
-- (where the order is critical to the fast look up process).
-- Note: there are no convention names corresponding to the conventions
-- Entry and Protected, this is because these conventions cannot be
-- specified by a pragma.
First_Convention_Name : constant Name_Id := N + $;
Name_Ada : constant Name_Id := N + $;
Name_Assembler : constant Name_Id := N + $;
Name_CIL : constant Name_Id := N + $;
Name_COBOL : constant Name_Id := N + $;
Name_CPP : constant Name_Id := N + $;
Name_Fortran : constant Name_Id := N + $;
Name_Intrinsic : constant Name_Id := N + $;
Name_Java : constant Name_Id := N + $;
Name_Stdcall : constant Name_Id := N + $;
Name_Stubbed : constant Name_Id := N + $;
Last_Convention_Name : constant Name_Id := N + $;
-- The following names are preset as synonyms for Assembler
Name_Asm : constant Name_Id := N + $;
Name_Assembly : constant Name_Id := N + $;
-- The following names are preset as synonyms for C
Name_Default : constant Name_Id := N + $;
-- Name_External (previously defined as pragma)
-- The following names are preset as synonyms for CPP
Name_C_Plus_Plus : constant Name_Id := N + $;
-- The following names are present as synonyms for Stdcall
Name_DLL : constant Name_Id := N + $;
Name_Win32 : constant Name_Id := N + $;
-- Other special names used in processing pragmas
Name_As_Is : constant Name_Id := N + $;
Name_Assertion : constant Name_Id := N + $;
Name_Attribute_Name : constant Name_Id := N + $;
Name_Body_File_Name : constant Name_Id := N + $;
Name_Boolean_Entry_Barriers : constant Name_Id := N + $;
Name_Casing : constant Name_Id := N + $;
Name_Code : constant Name_Id := N + $;
Name_Component : constant Name_Id := N + $;
Name_Component_Size_4 : constant Name_Id := N + $;
Name_Copy : constant Name_Id := N + $;
Name_D_Float : constant Name_Id := N + $;
Name_Descriptor : constant Name_Id := N + $;
Name_Dot_Replacement : constant Name_Id := N + $;
Name_Dynamic : constant Name_Id := N + $;
Name_Entity : constant Name_Id := N + $;
Name_Entry_Count : constant Name_Id := N + $;
Name_External_Name : constant Name_Id := N + $;
Name_First_Optional_Parameter : constant Name_Id := N + $;
Name_Form : constant Name_Id := N + $;
Name_G_Float : constant Name_Id := N + $;
Name_Gcc : constant Name_Id := N + $;
Name_Gnat : constant Name_Id := N + $;
Name_GPL : constant Name_Id := N + $;
Name_IEEE_Float : constant Name_Id := N + $;
Name_Ignore : constant Name_Id := N + $;
Name_Info : constant Name_Id := N + $;
Name_Internal : constant Name_Id := N + $;
Name_Link_Name : constant Name_Id := N + $;
Name_Lowercase : constant Name_Id := N + $;
Name_Max_Entry_Queue_Depth : constant Name_Id := N + $;
Name_Max_Entry_Queue_Length : constant Name_Id := N + $;
Name_Max_Size : constant Name_Id := N + $;
Name_Mechanism : constant Name_Id := N + $;
Name_Message : constant Name_Id := N + $;
Name_Mixedcase : constant Name_Id := N + $;
Name_Modified_GPL : constant Name_Id := N + $;
Name_Name : constant Name_Id := N + $;
Name_NCA : constant Name_Id := N + $;
Name_No : constant Name_Id := N + $;
Name_No_Dependence : constant Name_Id := N + $;
Name_No_Dynamic_Attachment : constant Name_Id := N + $;
Name_No_Dynamic_Interrupts : constant Name_Id := N + $;
Name_No_Requeue : constant Name_Id := N + $;
Name_No_Requeue_Statements : constant Name_Id := N + $;
Name_No_Task_Attributes : constant Name_Id := N + $;
Name_No_Task_Attributes_Package : constant Name_Id := N + $;
Name_On : constant Name_Id := N + $;
Name_Policy : constant Name_Id := N + $;
Name_Parameter_Types : constant Name_Id := N + $;
Name_Reference : constant Name_Id := N + $;
Name_Restricted : constant Name_Id := N + $;
Name_Result_Mechanism : constant Name_Id := N + $;
Name_Result_Type : constant Name_Id := N + $;
Name_Runtime : constant Name_Id := N + $;
Name_SB : constant Name_Id := N + $;
Name_Secondary_Stack_Size : constant Name_Id := N + $;
Name_Section : constant Name_Id := N + $;
Name_Semaphore : constant Name_Id := N + $;
Name_Short_Descriptor : constant Name_Id := N + $;
Name_Simple_Barriers : constant Name_Id := N + $;
Name_Spec_File_Name : constant Name_Id := N + $;
Name_State : constant Name_Id := N + $;
Name_Static : constant Name_Id := N + $;
Name_Stack_Size : constant Name_Id := N + $;
Name_Subunit_File_Name : constant Name_Id := N + $;
Name_Task_Stack_Size_Default : constant Name_Id := N + $;
Name_Task_Type : constant Name_Id := N + $;
Name_Time_Slicing_Enabled : constant Name_Id := N + $;
Name_Top_Guard : constant Name_Id := N + $;
Name_UBA : constant Name_Id := N + $;
Name_UBS : constant Name_Id := N + $;
Name_UBSB : constant Name_Id := N + $;
Name_Unit_Name : constant Name_Id := N + $;
Name_Unknown : constant Name_Id := N + $;
Name_Unrestricted : constant Name_Id := N + $;
Name_Uppercase : constant Name_Id := N + $;
Name_User : constant Name_Id := N + $;
Name_VAX_Float : constant Name_Id := N + $;
Name_VMS : constant Name_Id := N + $;
Name_Vtable_Ptr : constant Name_Id := N + $;
Name_Working_Storage : constant Name_Id := N + $;
-- Names of recognized attributes. The entries with the comment "Ada 83"
-- are attributes that are defined in Ada 83, but not in Ada 95. These
-- attributes are implemented in both Ada 83 and Ada 95 modes in GNAT.
-- The entries marked GNAT are attributes that are defined by GNAT
-- and implemented in both Ada 83 and Ada 95 modes. Full descriptions
-- of these implementation dependent attributes may be found in the
-- appropriate section in package Sem_Attr in file sem-attr.ads.
-- The entries marked VMS are recognized only in OpenVMS implementations
-- of GNAT, and are treated as illegal in all other contexts.
First_Attribute_Name : constant Name_Id := N + $;
Name_Abort_Signal : constant Name_Id := N + $; -- GNAT
Name_Access : constant Name_Id := N + $;
Name_Address : constant Name_Id := N + $;
Name_Address_Size : constant Name_Id := N + $; -- GNAT
Name_Aft : constant Name_Id := N + $;
Name_Alignment : constant Name_Id := N + $;
Name_Asm_Input : constant Name_Id := N + $; -- GNAT
Name_Asm_Output : constant Name_Id := N + $; -- GNAT
Name_AST_Entry : constant Name_Id := N + $; -- VMS
Name_Bit : constant Name_Id := N + $; -- GNAT
Name_Bit_Order : constant Name_Id := N + $;
Name_Bit_Position : constant Name_Id := N + $; -- GNAT
Name_Body_Version : constant Name_Id := N + $;
Name_Callable : constant Name_Id := N + $;
Name_Caller : constant Name_Id := N + $;
Name_Code_Address : constant Name_Id := N + $; -- GNAT
Name_Component_Size : constant Name_Id := N + $;
Name_Compose : constant Name_Id := N + $;
Name_Constrained : constant Name_Id := N + $;
Name_Count : constant Name_Id := N + $;
Name_Default_Bit_Order : constant Name_Id := N + $; -- GNAT
Name_Definite : constant Name_Id := N + $;
Name_Delta : constant Name_Id := N + $;
Name_Denorm : constant Name_Id := N + $;
Name_Digits : constant Name_Id := N + $;
Name_Elaborated : constant Name_Id := N + $; -- GNAT
Name_Emax : constant Name_Id := N + $; -- Ada 83
Name_Enabled : constant Name_Id := N + $; -- GNAT
Name_Enum_Rep : constant Name_Id := N + $; -- GNAT
Name_Enum_Val : constant Name_Id := N + $; -- GNAT
Name_Epsilon : constant Name_Id := N + $; -- Ada 83
Name_Exponent : constant Name_Id := N + $;
Name_External_Tag : constant Name_Id := N + $;
Name_Fast_Math : constant Name_Id := N + $; -- GNAT
Name_First : constant Name_Id := N + $;
Name_First_Bit : constant Name_Id := N + $;
Name_Fixed_Value : constant Name_Id := N + $; -- GNAT
Name_Fore : constant Name_Id := N + $;
Name_Has_Access_Values : constant Name_Id := N + $; -- GNAT
Name_Has_Discriminants : constant Name_Id := N + $; -- GNAT
Name_Has_Tagged_Values : constant Name_Id := N + $; -- GNAT
Name_Identity : constant Name_Id := N + $;
Name_Img : constant Name_Id := N + $; -- GNAT
Name_Integer_Value : constant Name_Id := N + $; -- GNAT
Name_Invalid_Value : constant Name_Id := N + $; -- GNAT
Name_Large : constant Name_Id := N + $; -- Ada 83
Name_Last : constant Name_Id := N + $;
Name_Last_Bit : constant Name_Id := N + $;
Name_Leading_Part : constant Name_Id := N + $;
Name_Length : constant Name_Id := N + $;
Name_Machine_Emax : constant Name_Id := N + $;
Name_Machine_Emin : constant Name_Id := N + $;
Name_Machine_Mantissa : constant Name_Id := N + $;
Name_Machine_Overflows : constant Name_Id := N + $;
Name_Machine_Radix : constant Name_Id := N + $;
Name_Machine_Rounding : constant Name_Id := N + $; -- Ada 05
Name_Machine_Rounds : constant Name_Id := N + $;
Name_Machine_Size : constant Name_Id := N + $; -- GNAT
Name_Mantissa : constant Name_Id := N + $; -- Ada 83
Name_Max_Size_In_Storage_Elements : constant Name_Id := N + $;
Name_Maximum_Alignment : constant Name_Id := N + $; -- GNAT
Name_Mechanism_Code : constant Name_Id := N + $; -- GNAT
Name_Mod : constant Name_Id := N + $; -- Ada 05
Name_Model_Emin : constant Name_Id := N + $;
Name_Model_Epsilon : constant Name_Id := N + $;
Name_Model_Mantissa : constant Name_Id := N + $;
Name_Model_Small : constant Name_Id := N + $;
Name_Modulus : constant Name_Id := N + $;
Name_Null_Parameter : constant Name_Id := N + $; -- GNAT
Name_Object_Size : constant Name_Id := N + $; -- GNAT
Name_Old : constant Name_Id := N + $; -- GNAT
Name_Partition_ID : constant Name_Id := N + $;
Name_Passed_By_Reference : constant Name_Id := N + $; -- GNAT
Name_Pool_Address : constant Name_Id := N + $;
Name_Pos : constant Name_Id := N + $;
Name_Position : constant Name_Id := N + $;
Name_Priority : constant Name_Id := N + $; -- Ada 05
Name_Range : constant Name_Id := N + $;
Name_Range_Length : constant Name_Id := N + $; -- GNAT
Name_Result : constant Name_Id := N + $; -- GNAT
Name_Round : constant Name_Id := N + $;
Name_Safe_Emax : constant Name_Id := N + $; -- Ada 83
Name_Safe_First : constant Name_Id := N + $;
Name_Safe_Large : constant Name_Id := N + $; -- Ada 83
Name_Safe_Last : constant Name_Id := N + $;
Name_Safe_Small : constant Name_Id := N + $; -- Ada 83
Name_Scale : constant Name_Id := N + $;
Name_Scaling : constant Name_Id := N + $;
Name_Signed_Zeros : constant Name_Id := N + $;
Name_Size : constant Name_Id := N + $;
Name_Small : constant Name_Id := N + $;
Name_Storage_Size : constant Name_Id := N + $;
Name_Storage_Unit : constant Name_Id := N + $; -- GNAT
Name_Stream_Size : constant Name_Id := N + $; -- Ada 05
Name_Tag : constant Name_Id := N + $;
Name_Target_Name : constant Name_Id := N + $; -- GNAT
Name_Terminated : constant Name_Id := N + $;
Name_To_Address : constant Name_Id := N + $; -- GNAT
Name_Type_Class : constant Name_Id := N + $; -- GNAT
Name_UET_Address : constant Name_Id := N + $; -- GNAT
Name_Unbiased_Rounding : constant Name_Id := N + $;
Name_Unchecked_Access : constant Name_Id := N + $;
Name_Unconstrained_Array : constant Name_Id := N + $;
Name_Universal_Literal_String : constant Name_Id := N + $; -- GNAT
Name_Unrestricted_Access : constant Name_Id := N + $; -- GNAT
Name_VADS_Size : constant Name_Id := N + $; -- GNAT
Name_Val : constant Name_Id := N + $;
Name_Valid : constant Name_Id := N + $;
Name_Value_Size : constant Name_Id := N + $; -- GNAT
Name_Version : constant Name_Id := N + $;
Name_Wchar_T_Size : constant Name_Id := N + $; -- GNAT
Name_Wide_Wide_Width : constant Name_Id := N + $; -- Ada 05
Name_Wide_Width : constant Name_Id := N + $;
Name_Width : constant Name_Id := N + $;
Name_Word_Size : constant Name_Id := N + $; -- GNAT
-- Attributes that designate attributes returning renamable functions,
-- i.e. functions that return other than a universal value and that
-- have non-universal arguments.
First_Renamable_Function_Attribute : constant Name_Id := N + $;
Name_Adjacent : constant Name_Id := N + $;
Name_Ceiling : constant Name_Id := N + $;
Name_Copy_Sign : constant Name_Id := N + $;
Name_Floor : constant Name_Id := N + $;
Name_Fraction : constant Name_Id := N + $;
Name_From_Any : constant Name_Id := N + $; -- GNAT
Name_Image : constant Name_Id := N + $;
Name_Input : constant Name_Id := N + $;
Name_Machine : constant Name_Id := N + $;
Name_Max : constant Name_Id := N + $;
Name_Min : constant Name_Id := N + $;
Name_Model : constant Name_Id := N + $;
Name_Pred : constant Name_Id := N + $;
Name_Remainder : constant Name_Id := N + $;
Name_Rounding : constant Name_Id := N + $;
Name_Succ : constant Name_Id := N + $;
Name_To_Any : constant Name_Id := N + $; -- GNAT
Name_Truncation : constant Name_Id := N + $;
Name_TypeCode : constant Name_Id := N + $; -- GNAT
Name_Value : constant Name_Id := N + $;
Name_Wide_Image : constant Name_Id := N + $;
Name_Wide_Wide_Image : constant Name_Id := N + $;
Name_Wide_Value : constant Name_Id := N + $;
Name_Wide_Wide_Value : constant Name_Id := N + $;
Last_Renamable_Function_Attribute : constant Name_Id := N + $;
-- Attributes that designate procedures
First_Procedure_Attribute : constant Name_Id := N + $;
Name_Output : constant Name_Id := N + $;
Name_Read : constant Name_Id := N + $;
Name_Write : constant Name_Id := N + $;
Last_Procedure_Attribute : constant Name_Id := N + $;
-- Remaining attributes are ones that return entities
First_Entity_Attribute_Name : constant Name_Id := N + $;
Name_Elab_Body : constant Name_Id := N + $; -- GNAT
Name_Elab_Spec : constant Name_Id := N + $; -- GNAT
Name_Storage_Pool : constant Name_Id := N + $;
-- These attributes are the ones that return types
First_Type_Attribute_Name : constant Name_Id := N + $;
Name_Base : constant Name_Id := N + $;
Name_Class : constant Name_Id := N + $;
Name_Stub_Type : constant Name_Id := N + $;
Last_Type_Attribute_Name : constant Name_Id := N + $;
Last_Entity_Attribute_Name : constant Name_Id := N + $;
Last_Attribute_Name : constant Name_Id := N + $;
-- Names of recognized locking policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. C for Ceiling_Locking). If new policy names are added,
-- the first character must be distinct.
First_Locking_Policy_Name : constant Name_Id := N + $;
Name_Ceiling_Locking : constant Name_Id := N + $;
Name_Inheritance_Locking : constant Name_Id := N + $;
Last_Locking_Policy_Name : constant Name_Id := N + $;
-- Names of recognized queuing policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. F for FIFO_Queuing). If new policy names are added,
-- the first character must be distinct.
First_Queuing_Policy_Name : constant Name_Id := N + $;
Name_FIFO_Queuing : constant Name_Id := N + $;
Name_Priority_Queuing : constant Name_Id := N + $;
Last_Queuing_Policy_Name : constant Name_Id := N + $;
-- Names of recognized task dispatching policy identifiers
-- Note: policies are identified by the first character of the
-- name (e.g. F for FIFO_Within_Priorities). If new policy names
-- are added, the first character must be distinct.
First_Task_Dispatching_Policy_Name : constant Name_Id := N + $;
Name_EDF_Across_Priorities : constant Name_Id := N + $;
Name_FIFO_Within_Priorities : constant Name_Id := N + $;
Name_Non_Preemptive_Within_Priorities : constant Name_Id := N + $;
Name_Round_Robin_Within_Priorities : constant Name_Id := N + $;
Last_Task_Dispatching_Policy_Name : constant Name_Id := N + $;
-- Names of recognized checks for pragma Suppress
First_Check_Name : constant Name_Id := N + $;
Name_Access_Check : constant Name_Id := N + $;
Name_Accessibility_Check : constant Name_Id := N + $;
Name_Alignment_Check : constant Name_Id := N + $; -- GNAT
Name_Discriminant_Check : constant Name_Id := N + $;
Name_Division_Check : constant Name_Id := N + $;
Name_Elaboration_Check : constant Name_Id := N + $;
Name_Index_Check : constant Name_Id := N + $;
Name_Length_Check : constant Name_Id := N + $;
Name_Overflow_Check : constant Name_Id := N + $;
Name_Range_Check : constant Name_Id := N + $;
Name_Storage_Check : constant Name_Id := N + $;
Name_Tag_Check : constant Name_Id := N + $;
Name_Validity_Check : constant Name_Id := N + $; -- GNAT
Name_All_Checks : constant Name_Id := N + $;
Last_Check_Name : constant Name_Id := N + $;
-- Names corresponding to reserved keywords, excluding those already
-- declared in the attribute list (Access, Delta, Digits, Mod, Range).
Name_Abort : constant Name_Id := N + $;
Name_Abs : constant Name_Id := N + $;
Name_Accept : constant Name_Id := N + $;
Name_And : constant Name_Id := N + $;
Name_All : constant Name_Id := N + $;
Name_Array : constant Name_Id := N + $;
Name_At : constant Name_Id := N + $;
Name_Begin : constant Name_Id := N + $;
Name_Body : constant Name_Id := N + $;
Name_Case : constant Name_Id := N + $;
Name_Constant : constant Name_Id := N + $;
Name_Declare : constant Name_Id := N + $;
Name_Delay : constant Name_Id := N + $;
Name_Do : constant Name_Id := N + $;
Name_Else : constant Name_Id := N + $;
Name_Elsif : constant Name_Id := N + $;
Name_End : constant Name_Id := N + $;
Name_Entry : constant Name_Id := N + $;
Name_Exception : constant Name_Id := N + $;
Name_Exit : constant Name_Id := N + $;
Name_For : constant Name_Id := N + $;
Name_Function : constant Name_Id := N + $;
Name_Generic : constant Name_Id := N + $;
Name_Goto : constant Name_Id := N + $;
Name_If : constant Name_Id := N + $;
Name_In : constant Name_Id := N + $;
Name_Is : constant Name_Id := N + $;
Name_Limited : constant Name_Id := N + $;
Name_Loop : constant Name_Id := N + $;
Name_New : constant Name_Id := N + $;
Name_Not : constant Name_Id := N + $;
Name_Null : constant Name_Id := N + $;
Name_Of : constant Name_Id := N + $;
Name_Or : constant Name_Id := N + $;
Name_Others : constant Name_Id := N + $;
Name_Out : constant Name_Id := N + $;
Name_Package : constant Name_Id := N + $;
Name_Pragma : constant Name_Id := N + $;
Name_Private : constant Name_Id := N + $;
Name_Procedure : constant Name_Id := N + $;
Name_Raise : constant Name_Id := N + $;
Name_Record : constant Name_Id := N + $;
Name_Rem : constant Name_Id := N + $;
Name_Renames : constant Name_Id := N + $;
Name_Return : constant Name_Id := N + $;
Name_Reverse : constant Name_Id := N + $;
Name_Select : constant Name_Id := N + $;
Name_Separate : constant Name_Id := N + $;
Name_Subtype : constant Name_Id := N + $;
Name_Task : constant Name_Id := N + $;
Name_Terminate : constant Name_Id := N + $;
Name_Then : constant Name_Id := N + $;
Name_Type : constant Name_Id := N + $;
Name_Use : constant Name_Id := N + $;
Name_When : constant Name_Id := N + $;
Name_While : constant Name_Id := N + $;
Name_With : constant Name_Id := N + $;
Name_Xor : constant Name_Id := N + $;
-- Names of intrinsic subprograms
-- Note: Asm is missing from this list, since Asm is a legitimate
-- convention name. So is To_Address, which is a GNAT attribute.
First_Intrinsic_Name : constant Name_Id := N + $;
Name_Divide : constant Name_Id := N + $;
Name_Enclosing_Entity : constant Name_Id := N + $;
Name_Exception_Information : constant Name_Id := N + $;
Name_Exception_Message : constant Name_Id := N + $;
Name_Exception_Name : constant Name_Id := N + $;
Name_File : constant Name_Id := N + $;
Name_Generic_Dispatching_Constructor : constant Name_Id := N + $;
Name_Import_Address : constant Name_Id := N + $;
Name_Import_Largest_Value : constant Name_Id := N + $;
Name_Import_Value : constant Name_Id := N + $;
Name_Is_Negative : constant Name_Id := N + $;
Name_Line : constant Name_Id := N + $;
Name_Rotate_Left : constant Name_Id := N + $;
Name_Rotate_Right : constant Name_Id := N + $;
Name_Shift_Left : constant Name_Id := N + $;
Name_Shift_Right : constant Name_Id := N + $;
Name_Shift_Right_Arithmetic : constant Name_Id := N + $;
Name_Source_Location : constant Name_Id := N + $;
Name_Unchecked_Conversion : constant Name_Id := N + $;
Name_Unchecked_Deallocation : constant Name_Id := N + $;
Name_To_Pointer : constant Name_Id := N + $;
Last_Intrinsic_Name : constant Name_Id := N + $;
-- Names used in processing intrinsic calls
Name_Free : constant Name_Id := N + 628;
-- Reserved words used only in Ada 95
First_95_Reserved_Word : constant Name_Id := N + $;
Name_Abstract : constant Name_Id := N + $;
Name_Aliased : constant Name_Id := N + $;
Name_Protected : constant Name_Id := N + $;
Name_Until : constant Name_Id := N + $;
Name_Requeue : constant Name_Id := N + $;
Name_Tagged : constant Name_Id := N + $;
Last_95_Reserved_Word : constant Name_Id := N + $;
subtype Ada_95_Reserved_Words is
Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word;
-- Miscellaneous names used in semantic checking
Name_Raise_Exception : constant Name_Id := N + 635;
-- Additional reserved words and identifiers used in GNAT Project Files
-- Note that Name_External is already previously declared
Name_Ada_Roots : constant Name_Id := N + $;
Name_Aggregate : constant Name_Id := N + $;
Name_Archive_Builder : constant Name_Id := N + $;
Name_Archive_Builder_Append_Option : constant Name_Id := N + $;
Name_Archive_Indexer : constant Name_Id := N + $;
Name_Archive_Suffix : constant Name_Id := N + $;
Name_Binder : constant Name_Id := N + $;
Name_Binder_Prefix : constant Name_Id := N + $;
Name_Body_Suffix : constant Name_Id := N + $;
Name_Builder : constant Name_Id := N + $;
Name_Builder_Switches : constant Name_Id := N + $;
Name_Compiler : constant Name_Id := N + $;
Name_Compiler_Command : constant Name_Id := N + $;
Name_Compiler_Kind : constant Name_Id := N + $;
Name_Config_Body_File_Name : constant Name_Id := N + $;
Name_Config_Body_File_Name_Pattern : constant Name_Id := N + $;
Name_Config_File_Switches : constant Name_Id := N + $;
Name_Config_File_Unique : constant Name_Id := N + $;
Name_Config_Spec_File_Name : constant Name_Id := N + $;
Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + $;
Name_Configuration : constant Name_Id := N + $;
Name_Cross_Reference : constant Name_Id := N + $;
Name_Default_Language : constant Name_Id := N + $;
Name_Default_Switches : constant Name_Id := N + $;
Name_Dependency_Driver : constant Name_Id := N + $;
Name_Dependency_File_Kind : constant Name_Id := N + $;
Name_Dependency_Switches : constant Name_Id := N + $;
Name_Driver : constant Name_Id := N + $;
Name_Excluded_Source_Dirs : constant Name_Id := N + $;
Name_Excluded_Source_Files : constant Name_Id := N + $;
Name_Excluded_Source_List_File : constant Name_Id := N + $;
Name_Exec_Dir : constant Name_Id := N + $;
Name_Executable : constant Name_Id := N + $;
Name_Executable_Suffix : constant Name_Id := N + $;
Name_Extends : constant Name_Id := N + $;
Name_Externally_Built : constant Name_Id := N + $;
Name_Finder : constant Name_Id := N + $;
Name_Global_Compilation_Switches : constant Name_Id := N + $;
Name_Global_Configuration_Pragmas : constant Name_Id := N + $;
Name_Global_Config_File : constant Name_Id := N + $;
Name_Gnatls : constant Name_Id := N + $;
Name_Gnatstub : constant Name_Id := N + $;
Name_Ide : constant Name_Id := N + $;
Name_Implementation : constant Name_Id := N + $;
Name_Implementation_Exceptions : constant Name_Id := N + $;
Name_Implementation_Suffix : constant Name_Id := N + $;
Name_Include_Switches : constant Name_Id := N + $;
Name_Include_Path : constant Name_Id := N + $;
Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $;
Name_Language_Processing : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $;
Name_Library : constant Name_Id := N + $;
Name_Library_Ali_Dir : constant Name_Id := N + $;
Name_Library_Auto_Init : constant Name_Id := N + $;
Name_Library_Auto_Init_Supported : constant Name_Id := N + $;
Name_Library_Builder : constant Name_Id := N + $;
Name_Library_Dir : constant Name_Id := N + $;
Name_Library_GCC : constant Name_Id := N + $;
Name_Library_Interface : constant Name_Id := N + $;
Name_Library_Kind : constant Name_Id := N + $;
Name_Library_Name : constant Name_Id := N + $;
Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + $;
Name_Library_Options : constant Name_Id := N + $;
Name_Library_Partial_Linker : constant Name_Id := N + $;
Name_Library_Reference_Symbol_File : constant Name_Id := N + $;
Name_Library_Src_Dir : constant Name_Id := N + $;
Name_Library_Support : constant Name_Id := N + $;
Name_Library_Symbol_File : constant Name_Id := N + $;
Name_Library_Symbol_Policy : constant Name_Id := N + $;
Name_Library_Version : constant Name_Id := N + $;
Name_Library_Version_Switches : constant Name_Id := N + $;
Name_Linker : constant Name_Id := N + $;
Name_Linker_Executable_Option : constant Name_Id := N + $;
Name_Linker_Lib_Dir_Option : constant Name_Id := N + $;
Name_Linker_Lib_Name_Option : constant Name_Id := N + $;
Name_Local_Config_File : constant Name_Id := N + $;
Name_Local_Configuration_Pragmas : constant Name_Id := N + $;
Name_Locally_Removed_Files : constant Name_Id := N + $;
Name_Map_File_Option : constant Name_Id := N + $;
Name_Mapping_File_Switches : constant Name_Id := N + $;
Name_Mapping_Spec_Suffix : constant Name_Id := N + $;
Name_Mapping_Body_Suffix : constant Name_Id := N + $;
Name_Metrics : constant Name_Id := N + $;
Name_Naming : constant Name_Id := N + $;
Name_Object_Generated : constant Name_Id := N + $;
Name_Objects_Linked : constant Name_Id := N + $;
Name_Objects_Path : constant Name_Id := N + $;
Name_Objects_Path_File : constant Name_Id := N + $;
Name_Object_Dir : constant Name_Id := N + $;
Name_Path_Syntax : constant Name_Id := N + $;
Name_Pic_Option : constant Name_Id := N + $;
Name_Pretty_Printer : constant Name_Id := N + $;
Name_Prefix : constant Name_Id := N + $;
Name_Project : constant Name_Id := N + $;
Name_Project_Dir : constant Name_Id := N + $;
Name_Roots : constant Name_Id := N + $;
Name_Required_Switches : constant Name_Id := N + $;
Name_Run_Path_Option : constant Name_Id := N + $;
Name_Runtime_Project : constant Name_Id := N + $;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + $;
Name_Shared_Library_Prefix : constant Name_Id := N + $;
Name_Shared_Library_Suffix : constant Name_Id := N + $;
Name_Separate_Suffix : constant Name_Id := N + $;
Name_Source_Dirs : constant Name_Id := N + $;
Name_Source_Files : constant Name_Id := N + $;
Name_Source_List_File : constant Name_Id := N + $;
Name_Spec : constant Name_Id := N + $;
Name_Spec_Suffix : constant Name_Id := N + $;
Name_Specification : constant Name_Id := N + $;
Name_Specification_Exceptions : constant Name_Id := N + $;
Name_Specification_Suffix : constant Name_Id := N + $;
Name_Stack : constant Name_Id := N + $;
Name_Switches : constant Name_Id := N + $;
Name_Symbolic_Link_Supported : constant Name_Id := N + $;
Name_Sync : constant Name_Id := N + $;
Name_Synchronize : constant Name_Id := N + $;
Name_Toolchain_Description : constant Name_Id := N + $;
Name_Toolchain_Version : constant Name_Id := N + $;
Name_Runtime_Library_Dir : constant Name_Id := N + $;
-- Other miscellaneous names used in front end
Name_Unaligned_Valid : constant Name_Id := N + $;
-- Ada 2005 reserved words
First_2005_Reserved_Word : constant Name_Id := N + $;
Name_Interface : constant Name_Id := N + $;
Name_Overriding : constant Name_Id := N + $;
Name_Synchronized : constant Name_Id := N + $;
Last_2005_Reserved_Word : constant Name_Id := N + $;
subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body
Last_Predefined_Name : constant Name_Id := N + $;
---------------------------------------
-- Subtypes Defining Name Categories --
---------------------------------------
subtype Any_Operator_Name is Name_Id range
First_Operator_Name .. Last_Operator_Name;
subtype Configuration_Pragma_Names is Name_Id range
First_Pragma_Name .. Last_Configuration_Pragma_Name;
------------------------------
-- Attribute ID Definitions --
------------------------------
type Attribute_Id is (
Attribute_Abort_Signal,
Attribute_Access,
Attribute_Address,
Attribute_Address_Size,
Attribute_Aft,
Attribute_Alignment,
Attribute_Asm_Input,
Attribute_Asm_Output,
Attribute_AST_Entry,
Attribute_Bit,
Attribute_Bit_Order,
Attribute_Bit_Position,
Attribute_Body_Version,
Attribute_Callable,
Attribute_Caller,
Attribute_Code_Address,
Attribute_Component_Size,
Attribute_Compose,
Attribute_Constrained,
Attribute_Count,
Attribute_Default_Bit_Order,
Attribute_Definite,
Attribute_Delta,
Attribute_Denorm,
Attribute_Digits,
Attribute_Elaborated,
Attribute_Emax,
Attribute_Enabled,
Attribute_Enum_Rep,
Attribute_Enum_Val,
Attribute_Epsilon,
Attribute_Exponent,
Attribute_External_Tag,
Attribute_Fast_Math,
Attribute_First,
Attribute_First_Bit,
Attribute_Fixed_Value,
Attribute_Fore,
Attribute_Has_Access_Values,
Attribute_Has_Discriminants,
Attribute_Has_Tagged_Values,
Attribute_Identity,
Attribute_Img,
Attribute_Integer_Value,
Attribute_Invalid_Value,
Attribute_Large,
Attribute_Last,
Attribute_Last_Bit,
Attribute_Leading_Part,
Attribute_Length,
Attribute_Machine_Emax,
Attribute_Machine_Emin,
Attribute_Machine_Mantissa,
Attribute_Machine_Overflows,
Attribute_Machine_Radix,
Attribute_Machine_Rounding,
Attribute_Machine_Rounds,
Attribute_Machine_Size,
Attribute_Mantissa,
Attribute_Max_Size_In_Storage_Elements,
Attribute_Maximum_Alignment,
Attribute_Mechanism_Code,
Attribute_Mod,
Attribute_Model_Emin,
Attribute_Model_Epsilon,
Attribute_Model_Mantissa,
Attribute_Model_Small,
Attribute_Modulus,
Attribute_Null_Parameter,
Attribute_Object_Size,
Attribute_Old,
Attribute_Partition_ID,
Attribute_Passed_By_Reference,
Attribute_Pool_Address,
Attribute_Pos,
Attribute_Position,
Attribute_Priority,
Attribute_Range,
Attribute_Range_Length,
Attribute_Result,
Attribute_Round,
Attribute_Safe_Emax,
Attribute_Safe_First,
Attribute_Safe_Large,
Attribute_Safe_Last,
Attribute_Safe_Small,
Attribute_Scale,
Attribute_Scaling,
Attribute_Signed_Zeros,
Attribute_Size,
Attribute_Small,
Attribute_Storage_Size,
Attribute_Storage_Unit,
Attribute_Stream_Size,
Attribute_Tag,
Attribute_Target_Name,
Attribute_Terminated,
Attribute_To_Address,
Attribute_Type_Class,
Attribute_UET_Address,
Attribute_Unbiased_Rounding,
Attribute_Unchecked_Access,
Attribute_Unconstrained_Array,
Attribute_Universal_Literal_String,
Attribute_Unrestricted_Access,
Attribute_VADS_Size,
Attribute_Val,
Attribute_Valid,
Attribute_Value_Size,
Attribute_Version,
Attribute_Wchar_T_Size,
Attribute_Wide_Wide_Width,
Attribute_Wide_Width,
Attribute_Width,
Attribute_Word_Size,
-- Attributes designating renamable functions
Attribute_Adjacent,
Attribute_Ceiling,
Attribute_Copy_Sign,
Attribute_Floor,
Attribute_Fraction,
Attribute_From_Any,
Attribute_Image,
Attribute_Input,
Attribute_Machine,
Attribute_Max,
Attribute_Min,
Attribute_Model,
Attribute_Pred,
Attribute_Remainder,
Attribute_Rounding,
Attribute_Succ,
Attribute_To_Any,
Attribute_Truncation,
Attribute_TypeCode,
Attribute_Value,
Attribute_Wide_Image,
Attribute_Wide_Wide_Image,
Attribute_Wide_Value,
Attribute_Wide_Wide_Value,
-- Attributes designating procedures
Attribute_Output,
Attribute_Read,
Attribute_Write,
-- Entity attributes (includes type attributes)
Attribute_Elab_Body,
Attribute_Elab_Spec,
Attribute_Storage_Pool,
-- Type attributes
Attribute_Base,
Attribute_Class,
Attribute_Stub_Type);
type Attribute_Class_Array is array (Attribute_Id) of Boolean;
-- Type used to build attribute classification flag arrays
------------------------------------
-- Convention Name ID Definitions --
------------------------------------
type Convention_Id is (
-- The native-to-Ada (non-foreign) conventions come first. These include
-- the ones defined in the RM, plus Stubbed.
Convention_Ada,
Convention_Intrinsic,
Convention_Entry,
Convention_Protected,
Convention_Stubbed,
-- The remaining conventions are foreign language conventions
Convention_Assembler, -- also Asm, Assembly
Convention_C, -- also Default, External
Convention_CIL,
Convention_COBOL,
Convention_CPP,
Convention_Fortran,
Convention_Java,
Convention_Stdcall); -- also DLL, Win32
-- Note: Convention C_Pass_By_Copy is allowed only for record
-- types (where it is treated like C except that the appropriate
-- flag is set in the record type). Recognizing this convention
-- is specially handled in Sem_Prag.
for Convention_Id'Size use 8;
-- Plenty of space for expansion
subtype Foreign_Convention is
Convention_Id range Convention_Assembler .. Convention_Id'Last;
-----------------------------------
-- Locking Policy ID Definitions --
-----------------------------------
type Locking_Policy_Id is (
Locking_Policy_Inheritance_Locking,
Locking_Policy_Ceiling_Locking);
---------------------------
-- Pragma ID Definitions --
---------------------------
type Pragma_Id is (
-- Configuration pragmas
-- Note: This list is in the GNAT users guide, so be sure that if any
-- additions or deletions are made to the following list, they are
-- properly reflected in the users guide.
Pragma_Ada_83,
Pragma_Ada_95,
Pragma_Ada_05,
Pragma_Ada_2005,
Pragma_Assertion_Policy,
Pragma_Assume_No_Invalid_Values,
Pragma_C_Pass_By_Copy,
Pragma_Check_Name,
Pragma_Check_Policy,
Pragma_Compile_Time_Error,
Pragma_Compile_Time_Warning,
Pragma_Compiler_Unit,
Pragma_Component_Alignment,
Pragma_Convention_Identifier,
Pragma_Debug_Policy,
Pragma_Detect_Blocking,
Pragma_Discard_Names,
Pragma_Elaboration_Checks,
Pragma_Eliminate,
Pragma_Extend_System,
Pragma_Extensions_Allowed,
Pragma_External_Name_Casing,
Pragma_Favor_Top_Level,
Pragma_Float_Representation,
Pragma_Implicit_Packing,
Pragma_Initialize_Scalars,
Pragma_Interrupt_State,
Pragma_License,
Pragma_Locking_Policy,
Pragma_Long_Float,
Pragma_No_Run_Time,
Pragma_No_Strict_Aliasing,
Pragma_Normalize_Scalars,
Pragma_Optimize_Alignment,
Pragma_Persistent_BSS,
Pragma_Polling,
Pragma_Priority_Specific_Dispatching,
Pragma_Profile,
Pragma_Profile_Warnings,
Pragma_Propagate_Exceptions,
Pragma_Queuing_Policy,
Pragma_Ravenscar,
Pragma_Restricted_Run_Time,
Pragma_Restrictions,
Pragma_Restriction_Warnings,
Pragma_Reviewable,
Pragma_Source_File_Name,
Pragma_Source_File_Name_Project,
Pragma_Style_Checks,
Pragma_Suppress,
Pragma_Suppress_Exception_Locations,
Pragma_Task_Dispatching_Policy,
Pragma_Universal_Data,
Pragma_Unsuppress,
Pragma_Use_VADS_Size,
Pragma_Validity_Checks,
Pragma_Warnings,
Pragma_Wide_Character_Encoding,
-- Remaining (non-configuration) pragmas
Pragma_Abort_Defer,
Pragma_All_Calls_Remote,
Pragma_Annotate,
Pragma_Assert,
Pragma_Asynchronous,
Pragma_Atomic,
Pragma_Atomic_Components,
Pragma_Attach_Handler,
Pragma_Check,
Pragma_CIL_Constructor,
Pragma_Comment,
Pragma_Common_Object,
Pragma_Complete_Representation,
Pragma_Complex_Representation,
Pragma_Controlled,
Pragma_Convention,
Pragma_CPP_Class,
Pragma_CPP_Constructor,
Pragma_CPP_Virtual,
Pragma_CPP_Vtable,
Pragma_Debug,
Pragma_Elaborate,
Pragma_Elaborate_All,
Pragma_Elaborate_Body,
Pragma_Export,
Pragma_Export_Exception,
Pragma_Export_Function,
Pragma_Export_Object,
Pragma_Export_Procedure,
Pragma_Export_Value,
Pragma_Export_Valued_Procedure,
Pragma_External,
Pragma_Finalize_Storage_Only,
Pragma_Ident,
Pragma_Implemented_By_Entry,
Pragma_Import,
Pragma_Import_Exception,
Pragma_Import_Function,
Pragma_Import_Object,
Pragma_Import_Procedure,
Pragma_Import_Valued_Procedure,
Pragma_Inline,
Pragma_Inline_Always,
Pragma_Inline_Generic,
Pragma_Inspection_Point,
Pragma_Interface_Name,
Pragma_Interrupt_Handler,
Pragma_Interrupt_Priority,
Pragma_Java_Constructor,
Pragma_Java_Interface,
Pragma_Keep_Names,
Pragma_Link_With,
Pragma_Linker_Alias,
Pragma_Linker_Constructor,
Pragma_Linker_Destructor,
Pragma_Linker_Options,
Pragma_Linker_Section,
Pragma_List,
Pragma_Machine_Attribute,
Pragma_Main,
Pragma_Main_Storage,
Pragma_Memory_Size,
Pragma_No_Body,
Pragma_No_Return,
Pragma_Obsolescent,
Pragma_Optimize,
Pragma_Pack,
Pragma_Page,
Pragma_Passive,
Pragma_Postcondition,
Pragma_Precondition,
Pragma_Preelaborable_Initialization,
Pragma_Preelaborate,
Pragma_Preelaborate_05,
Pragma_Psect_Object,
Pragma_Pure,
Pragma_Pure_05,
Pragma_Pure_Function,
Pragma_Relative_Deadline,
Pragma_Remote_Call_Interface,
Pragma_Remote_Types,
Pragma_Share_Generic,
Pragma_Shared,
Pragma_Shared_Passive,
Pragma_Source_Reference,
Pragma_Static_Elaboration_Desired,
Pragma_Stream_Convert,
Pragma_Subtitle,
Pragma_Suppress_All,
Pragma_Suppress_Debug_Info,
Pragma_Suppress_Initialization,
Pragma_System_Name,
Pragma_Task_Info,
Pragma_Task_Name,
Pragma_Task_Storage,
Pragma_Thread_Local_Storage,
Pragma_Time_Slice,
Pragma_Title,
Pragma_Unchecked_Union,
Pragma_Unimplemented_Unit,
Pragma_Universal_Aliasing,
Pragma_Unmodified,
Pragma_Unreferenced,
Pragma_Unreferenced_Objects,
Pragma_Unreserve_All_Interrupts,
Pragma_Volatile,
Pragma_Volatile_Components,
Pragma_Weak_External,
-- The following pragmas are on their own, out of order, because of the
-- special processing required to deal with the fact that their names
-- match existing attribute names.
Pragma_AST_Entry,
Pragma_Fast_Math,
Pragma_Interface,
Pragma_Priority,
Pragma_Storage_Size,
Pragma_Storage_Unit,
-- The value to represent an unknown or unrecognized pragma
Unknown_Pragma);
-----------------------------------
-- Queuing Policy ID definitions --
-----------------------------------
type Queuing_Policy_Id is (
Queuing_Policy_FIFO_Queuing,
Queuing_Policy_Priority_Queuing);
--------------------------------------------
-- Task Dispatching Policy ID definitions --
--------------------------------------------
type Task_Dispatching_Policy_Id is (
Task_Dispatching_FIFO_Within_Priorities);
-- Id values used to identify task dispatching policies
-----------------
-- Subprograms --
-----------------
procedure Initialize;
-- Called to initialize the preset names in the names table
function Is_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute
function Is_Entity_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized entity attribute,
-- i.e. an attribute reference that returns an entity.
function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute that
-- designates a procedure (and can therefore appear as a statement).
function Is_Function_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized attribute
-- that designates a renameable function, and can therefore appear in
-- a renaming statement. Note that not all attributes designating
-- functions are renamable, in particular, those returning a universal
-- value cannot be renamed.
function Is_Type_Attribute_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized type attribute,
-- i.e. an attribute reference that returns a type
function Is_Convention_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of one of the recognized
-- language conventions, as required by pragma Convention, Import,
-- Export, Interface. Returns True if so. Also returns True for a
-- name that has been specified by a Convention_Identifier pragma.
-- If neither case holds, returns False.
function Is_Keyword_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is one of the (reserved) keyword names. This
-- includes all the keywords defined in the Ada standard (taking into
-- effect the Ada version). It also includes additional keywords in
-- contexts where additional keywords have been added. For example, in the
-- context of parsing project files, keywords such as PROJECT are included.
function Is_Locking_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized locking policy
function Is_Operator_Symbol_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of an operator symbol
function Is_Pragma_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized pragma. Note that
-- pragmas AST_Entry, Fast_Math, Priority, Storage_Size, and Storage_Unit
-- are recognized as pragmas by this function even though their names are
-- separate from the other pragma names. For this reason, clients should
-- always use this function, rather than do range tests on Name_Id values.
function Is_Configuration_Pragma_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized configuration
-- pragma. Note that pragma Fast_Math is recognized as a configuration
-- pragma by this function even though its name is separate from other
-- configuration pragma names. For this reason, clients should always
-- use this function, rather than do range tests on Name_Id values.
function Is_Queuing_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized queuing policy
function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean;
-- Test to see if the name N is the name of a recognized task
-- dispatching policy.
function Get_Attribute_Id (N : Name_Id) return Attribute_Id;
-- Returns Id of attribute corresponding to given name. It is an error to
-- call this function with a name that is not the name of a attribute.
function Get_Convention_Id (N : Name_Id) return Convention_Id;
-- Returns Id of language convention corresponding to given name. It is an
-- to call this function with a name that is not the name of a convention,
-- or one previously given in a call to Record_Convention_Identifier.
function Get_Convention_Name (C : Convention_Id) return Name_Id;
-- Returns the name of language convention corresponding to given
-- convention id.
function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id;
-- Returns Id of locking policy corresponding to given name. It is an error
-- to call this function with a name that is not the name of a check.
function Get_Pragma_Id (N : Name_Id) return Pragma_Id;
-- Returns Id of pragma corresponding to given name. Returns Unknown_Pragma
-- if N is not a name of a known (Ada defined or GNAT-specific) pragma.
-- Note that the function also works correctly for names of pragmas that
-- are not included in the main list of pragma Names (AST_Entry, Priority,
-- Storage_Size, and Storage_Unit (e.g. Name_Storage_Size returns
-- Pragma_Storage_Size).
function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id;
-- Returns Id of queuing policy corresponding to given name. It is an error
-- to call this function with a name that is not the name of a check.
function Get_Task_Dispatching_Policy_Id
(N : Name_Id) return Task_Dispatching_Policy_Id;
-- Returns Id of task dispatching policy corresponding to given name. It
-- is an error to call this function with a name that is not the name of
-- a defined check.
procedure Record_Convention_Identifier
(Id : Name_Id;
Convention : Convention_Id);
-- A call to this procedure, resulting from an occurrence of a pragma
-- Convention_Identifier, records that from now on an occurrence of Id
-- will be recognized as a name for the specified convention.
private
pragma Inline (Is_Attribute_Name);
pragma Inline (Is_Entity_Attribute_Name);
pragma Inline (Is_Type_Attribute_Name);
pragma Inline (Is_Locking_Policy_Name);
pragma Inline (Is_Operator_Symbol_Name);
pragma Inline (Is_Queuing_Policy_Name);
pragma Inline (Is_Pragma_Name);
pragma Inline (Is_Task_Dispatching_Policy_Name);
end Snames;
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* S N A M E S *
* *
* C Header File *
* *
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING3. If not, go to *
* http://www.gnu.org/licenses for a complete copy of the license. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This is the C file that corresponds to the Ada package specification
Snames. It was created automatically from the file snames.ads. */
/* Name_Id values */
#define Name_uParent (First_Name_Id + 256 + 0)
#define Name_uTag (First_Name_Id + 256 + 1)
#define Name_Off (First_Name_Id + 256 + 2)
#define Name_Space (First_Name_Id + 256 + 3)
#define Name_Time (First_Name_Id + 256 + 4)
/* Define the function to return one of the numeric values below. Note
that it actually returns a char since an enumeration value of less
than 256 entries is represented that way in Ada. The operand is a Chars
field value. */
#define Get_Attribute_Id snames__get_attribute_id
extern unsigned char Get_Attribute_Id (int);
/* Define the numeric values for attributes. */
#define Attr_Abort_Signal 0
#define Attr_Access 1
#define Attr_Address 2
#define Attr_Address_Size 3
#define Attr_Aft 4
#define Attr_Alignment 5
#define Attr_Asm_Input 6
#define Attr_Asm_Output 7
#define Attr_AST_Entry 8
#define Attr_Bit 9
#define Attr_Bit_Order 10
#define Attr_Bit_Position 11
#define Attr_Body_Version 12
#define Attr_Callable 13
#define Attr_Caller 14
#define Attr_Code_Address 15
#define Attr_Component_Size 16
#define Attr_Compose 17
#define Attr_Constrained 18
#define Attr_Count 19
#define Attr_Default_Bit_Order 20
#define Attr_Definite 21
#define Attr_Delta 22
#define Attr_Denorm 23
#define Attr_Digits 24
#define Attr_Elaborated 25
#define Attr_Emax 26
#define Attr_Enabled 27
#define Attr_Enum_Rep 28
#define Attr_Enum_Val 29
#define Attr_Epsilon 30
#define Attr_Exponent 31
#define Attr_External_Tag 32
#define Attr_Fast_Math 33
#define Attr_First 34
#define Attr_First_Bit 35
#define Attr_Fixed_Value 36
#define Attr_Fore 37
#define Attr_Has_Access_Values 38
#define Attr_Has_Discriminants 39
#define Attr_Has_Tagged_Values 40
#define Attr_Identity 41
#define Attr_Img 42
#define Attr_Integer_Value 43
#define Attr_Invalid_Value 44
#define Attr_Large 45
#define Attr_Last 46
#define Attr_Last_Bit 47
#define Attr_Leading_Part 48
#define Attr_Length 49
#define Attr_Machine_Emax 50
#define Attr_Machine_Emin 51
#define Attr_Machine_Mantissa 52
#define Attr_Machine_Overflows 53
#define Attr_Machine_Radix 54
#define Attr_Machine_Rounding 55
#define Attr_Machine_Rounds 56
#define Attr_Machine_Size 57
#define Attr_Mantissa 58
#define Attr_Max_Size_In_Storage_Elements 59
#define Attr_Maximum_Alignment 60
#define Attr_Mechanism_Code 61
#define Attr_Mod 62
#define Attr_Model_Emin 63
#define Attr_Model_Epsilon 64
#define Attr_Model_Mantissa 65
#define Attr_Model_Small 66
#define Attr_Modulus 67
#define Attr_Null_Parameter 68
#define Attr_Object_Size 69
#define Attr_Old 70
#define Attr_Partition_ID 71
#define Attr_Passed_By_Reference 72
#define Attr_Pool_Address 73
#define Attr_Pos 74
#define Attr_Position 75
#define Attr_Priority 76
#define Attr_Range 77
#define Attr_Range_Length 78
#define Attr_Result 79
#define Attr_Round 80
#define Attr_Safe_Emax 81
#define Attr_Safe_First 82
#define Attr_Safe_Large 83
#define Attr_Safe_Last 84
#define Attr_Safe_Small 85
#define Attr_Scale 86
#define Attr_Scaling 87
#define Attr_Signed_Zeros 88
#define Attr_Size 89
#define Attr_Small 90
#define Attr_Storage_Size 91
#define Attr_Storage_Unit 92
#define Attr_Stream_Size 93
#define Attr_Tag 94
#define Attr_Target_Name 95
#define Attr_Terminated 96
#define Attr_To_Address 97
#define Attr_Type_Class 98
#define Attr_UET_Address 99
#define Attr_Unbiased_Rounding 100
#define Attr_Unchecked_Access 101
#define Attr_Unconstrained_Array 102
#define Attr_Universal_Literal_String 103
#define Attr_Unrestricted_Access 104
#define Attr_VADS_Size 105
#define Attr_Val 106
#define Attr_Valid 107
#define Attr_Value_Size 108
#define Attr_Version 109
#define Attr_Wchar_T_Size 110
#define Attr_Wide_Wide_Width 111
#define Attr_Wide_Width 112
#define Attr_Width 113
#define Attr_Word_Size 114
#define Attr_Adjacent 115
#define Attr_Ceiling 116
#define Attr_Copy_Sign 117
#define Attr_Floor 118
#define Attr_Fraction 119
#define Attr_From_Any 120
#define Attr_Image 121
#define Attr_Input 122
#define Attr_Machine 123
#define Attr_Max 124
#define Attr_Min 125
#define Attr_Model 126
#define Attr_Pred 127
#define Attr_Remainder 128
#define Attr_Rounding 129
#define Attr_Succ 130
#define Attr_To_Any 131
#define Attr_Truncation 132
#define Attr_TypeCode 133
#define Attr_Value 134
#define Attr_Wide_Image 135
#define Attr_Wide_Wide_Image 136
#define Attr_Wide_Value 137
#define Attr_Wide_Wide_Value 138
#define Attr_Output 139
#define Attr_Read 140
#define Attr_Write 141
#define Attr_Elab_Body 142
#define Attr_Elab_Spec 143
#define Attr_Storage_Pool 144
#define Attr_Base 145
#define Attr_Class 146
#define Attr_Stub_Type 147
/* Define the numeric values for the conventions. */
#define Convention_Ada 0
#define Convention_Intrinsic 1
#define Convention_Entry 2
#define Convention_Protected 3
#define Convention_Stubbed 4
#define Convention_Assembler 5
#define Convention_C 6
#define Convention_CIL 7
#define Convention_COBOL 8
#define Convention_CPP 9
#define Convention_Fortran 10
#define Convention_Java 11
#define Convention_Stdcall 12
/* Define the function to check if a Name_Id value is a valid pragma */
#define Is_Pragma_Name snames__is_pragma_name
extern Boolean Is_Pragma_Name (Name_Id);
/* Define the function to return one of the numeric values below. Note
that it actually returns a char since an enumeration value of less
than 256 entries is represented that way in Ada. The operand is a Chars
field value. */
#define Get_Pragma_Id snames__get_pragma_id
extern unsigned char Get_Pragma_Id (int);
/* Define the numeric values for the pragmas. */
#define Pragma_Ada_83 0
#define Pragma_Ada_95 1
#define Pragma_Ada_05 2
#define Pragma_Ada_2005 3
#define Pragma_Assertion_Policy 4
#define Pragma_Assume_No_Invalid_Values 5
#define Pragma_C_Pass_By_Copy 6
#define Pragma_Check_Name 7
#define Pragma_Check_Policy 8
#define Pragma_Compile_Time_Error 9
#define Pragma_Compile_Time_Warning 10
#define Pragma_Compiler_Unit 11
#define Pragma_Component_Alignment 12
#define Pragma_Convention_Identifier 13
#define Pragma_Debug_Policy 14
#define Pragma_Detect_Blocking 15
#define Pragma_Discard_Names 16
#define Pragma_Elaboration_Checks 17
#define Pragma_Eliminate 18
#define Pragma_Extend_System 19
#define Pragma_Extensions_Allowed 20
#define Pragma_External_Name_Casing 21
#define Pragma_Favor_Top_Level 22
#define Pragma_Float_Representation 23
#define Pragma_Implicit_Packing 24
#define Pragma_Initialize_Scalars 25
#define Pragma_Interrupt_State 26
#define Pragma_License 27
#define Pragma_Locking_Policy 28
#define Pragma_Long_Float 29
#define Pragma_No_Run_Time 30
#define Pragma_No_Strict_Aliasing 31
#define Pragma_Normalize_Scalars 32
#define Pragma_Optimize_Alignment 33
#define Pragma_Persistent_BSS 34
#define Pragma_Polling 35
#define Pragma_Priority_Specific_Dispatching 36
#define Pragma_Profile 37
#define Pragma_Profile_Warnings 38
#define Pragma_Propagate_Exceptions 39
#define Pragma_Queuing_Policy 40
#define Pragma_Ravenscar 41
#define Pragma_Restricted_Run_Time 42
#define Pragma_Restrictions 43
#define Pragma_Restriction_Warnings 44
#define Pragma_Reviewable 45
#define Pragma_Source_File_Name 46
#define Pragma_Source_File_Name_Project 47
#define Pragma_Style_Checks 48
#define Pragma_Suppress 49
#define Pragma_Suppress_Exception_Locations 50
#define Pragma_Task_Dispatching_Policy 51
#define Pragma_Universal_Data 52
#define Pragma_Unsuppress 53
#define Pragma_Use_VADS_Size 54
#define Pragma_Validity_Checks 55
#define Pragma_Warnings 56
#define Pragma_Wide_Character_Encoding 57
#define Pragma_Abort_Defer 58
#define Pragma_All_Calls_Remote 59
#define Pragma_Annotate 60
#define Pragma_Assert 61
#define Pragma_Asynchronous 62
#define Pragma_Atomic 63
#define Pragma_Atomic_Components 64
#define Pragma_Attach_Handler 65
#define Pragma_Check 66
#define Pragma_CIL_Constructor 67
#define Pragma_Comment 68
#define Pragma_Common_Object 69
#define Pragma_Complete_Representation 70
#define Pragma_Complex_Representation 71
#define Pragma_Controlled 72
#define Pragma_Convention 73
#define Pragma_CPP_Class 74
#define Pragma_CPP_Constructor 75
#define Pragma_CPP_Virtual 76
#define Pragma_CPP_Vtable 77
#define Pragma_Debug 78
#define Pragma_Elaborate 79
#define Pragma_Elaborate_All 80
#define Pragma_Elaborate_Body 81
#define Pragma_Export 82
#define Pragma_Export_Exception 83
#define Pragma_Export_Function 84
#define Pragma_Export_Object 85
#define Pragma_Export_Procedure 86
#define Pragma_Export_Value 87
#define Pragma_Export_Valued_Procedure 88
#define Pragma_External 89
#define Pragma_Finalize_Storage_Only 90
#define Pragma_Ident 91
#define Pragma_Implemented_By_Entry 92
#define Pragma_Import 93
#define Pragma_Import_Exception 94
#define Pragma_Import_Function 95
#define Pragma_Import_Object 96
#define Pragma_Import_Procedure 97
#define Pragma_Import_Valued_Procedure 98
#define Pragma_Inline 99
#define Pragma_Inline_Always 100
#define Pragma_Inline_Generic 101
#define Pragma_Inspection_Point 102
#define Pragma_Interface_Name 103
#define Pragma_Interrupt_Handler 104
#define Pragma_Interrupt_Priority 105
#define Pragma_Java_Constructor 106
#define Pragma_Java_Interface 107
#define Pragma_Keep_Names 108
#define Pragma_Link_With 109
#define Pragma_Linker_Alias 110
#define Pragma_Linker_Constructor 111
#define Pragma_Linker_Destructor 112
#define Pragma_Linker_Options 113
#define Pragma_Linker_Section 114
#define Pragma_List 115
#define Pragma_Machine_Attribute 116
#define Pragma_Main 117
#define Pragma_Main_Storage 118
#define Pragma_Memory_Size 119
#define Pragma_No_Body 120
#define Pragma_No_Return 121
#define Pragma_Obsolescent 122
#define Pragma_Optimize 123
#define Pragma_Pack 124
#define Pragma_Page 125
#define Pragma_Passive 126
#define Pragma_Postcondition 127
#define Pragma_Precondition 128
#define Pragma_Preelaborable_Initialization 129
#define Pragma_Preelaborate 130
#define Pragma_Preelaborate_05 131
#define Pragma_Psect_Object 132
#define Pragma_Pure 133
#define Pragma_Pure_05 134
#define Pragma_Pure_Function 135
#define Pragma_Relative_Deadline 136
#define Pragma_Remote_Call_Interface 137
#define Pragma_Remote_Types 138
#define Pragma_Share_Generic 139
#define Pragma_Shared 140
#define Pragma_Shared_Passive 141
#define Pragma_Source_Reference 142
#define Pragma_Static_Elaboration_Desired 143
#define Pragma_Stream_Convert 144
#define Pragma_Subtitle 145
#define Pragma_Suppress_All 146
#define Pragma_Suppress_Debug_Info 147
#define Pragma_Suppress_Initialization 148
#define Pragma_System_Name 149
#define Pragma_Task_Info 150
#define Pragma_Task_Name 151
#define Pragma_Task_Storage 152
#define Pragma_Thread_Local_Storage 153
#define Pragma_Time_Slice 154
#define Pragma_Title 155
#define Pragma_Unchecked_Union 156
#define Pragma_Unimplemented_Unit 157
#define Pragma_Universal_Aliasing 158
#define Pragma_Unmodified 159
#define Pragma_Unreferenced 160
#define Pragma_Unreferenced_Objects 161
#define Pragma_Unreserve_All_Interrupts 162
#define Pragma_Volatile 163
#define Pragma_Volatile_Components 164
#define Pragma_Weak_External 165
#define Pragma_AST_Entry 166
#define Pragma_Fast_Math 167
#define Pragma_Interface 168
#define Pragma_Priority 169
#define Pragma_Storage_Size 170
#define Pragma_Storage_Unit 171
/* End of snames.h (C version of Snames package spec) */
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* S N A M E S *
* *
* C Header File *
* *
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING3. If not, go to *
* http://www.gnu.org/licenses for a complete copy of the license. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This is the C file that corresponds to the Ada package specification
Snames. It was created automatically from the file snames.ads. */
/* Name_Id values */
#define Name_ !! TEMPLATE INSERTION POINT
/* Define the function to return one of the numeric values below. Note
that it actually returns a char since an enumeration value of less
than 256 entries is represented that way in Ada. The operand is a Chars
field value. */
#define Get_Attribute_Id snames__get_attribute_id
extern unsigned char Get_Attribute_Id (int);
/* Define the numeric values for attributes. */
#define Attr_ !! TEMPLATE INSERTION POINT
/* Define the numeric values for the conventions. */
#define Convention_ !! TEMPLATE INSERTION POINT
/* Define the function to check if a Name_Id value is a valid pragma */
#define Is_Pragma_Name snames__is_pragma_name
extern Boolean Is_Pragma_Name (Name_Id);
/* Define the function to return one of the numeric values below. Note
that it actually returns a char since an enumeration value of less
than 256 entries is represented that way in Ada. The operand is a Chars
field value. */
#define Get_Pragma_Id snames__get_pragma_id
extern unsigned char Get_Pragma_Id (int);
/* Define the numeric values for the pragmas. */
#define Pragma_ !! TEMPLATE_INSERTION_POINT
/* End of snames.h (C version of Snames package spec) */
------------------------------------------------------------------------------
-- --
-- GNAT SYSTEM UTILITIES --
-- --
-- X S N A M E S T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This utility is used to make a new version of the Snames package when new
-- names are added. This version reads a template file from snames.adt in
-- which the numbers are all written as $, and generates a new version of
-- the spec file snames.ads (written to snames.ns). It also reads snames.adb
-- and generates an updated body (written to snames.nb), and snames.h and
-- generates an updated C header file (written to snames.nh).
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Spitbol; use GNAT.Spitbol;
with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns;
procedure XSnamesT is
InB : File_Type;
InT : File_Type;
OutS : File_Type;
OutB : File_Type;
InH : File_Type;
OutH : File_Type;
A, B : VString := Nul;
Line : VString := Nul;
Name0 : VString := Nul;
Name1 : VString := Nul;
Oval : VString := Nul;
Restl : VString := Nul;
Name_Ref : constant Pattern := Span (' ') * A & Break (' ') * Name0
& Span (' ') * B
& ": constant Name_Id := N + $;"
& Rest * Restl;
Get_Name : constant Pattern := "Name_" & Rest * Name1;
Chk_Low : constant Pattern := Pos (0) & Any (Lower_Set) & Rest & Pos (1);
Findu : constant Pattern := Span ('u') * A;
Val : Natural;
Xlate_U_Und : constant Character_Mapping := To_Mapping ("u", "_");
M : Match_Result;
type Header_Symbol is (None, Name, Attr, Conv, Prag);
-- A symbol in the header file
procedure Output_Header_Line (S : Header_Symbol);
-- Output header line
Header_Name : aliased String := "Name";
Header_Attr : aliased String := "Attr";
Header_Conv : aliased String := "Convention";
Header_Prag : aliased String := "Pragma";
-- Prefixes used in the header file
type String_Ptr is access all String;
Header_Prefix : constant array (Header_Symbol) of String_Ptr :=
(null,
Header_Name'Access,
Header_Attr'Access,
Header_Conv'Access,
Header_Prag'Access);
-- Patterns used in the spec file
Get_Attr : constant Pattern := Span (' ') & "Attribute_"
& Break (",)") * Name1;
Get_Conv : constant Pattern := Span (' ') & "Convention_"
& Break (",)") * Name1;
Get_Prag : constant Pattern := Span (' ') & "Pragma_"
& Break (",)") * Name1;
type Header_Symbol_Counter is array (Header_Symbol) of Natural;
Header_Counter : Header_Symbol_Counter := (0, 0, 0, 0, 0);
Header_Current_Symbol : Header_Symbol := None;
Header_Pending_Line : VString := Nul;
------------------------
-- Output_Header_Line --
------------------------
procedure Output_Header_Line (S : Header_Symbol) is
function Make_Value (V : Integer) return String;
-- Build the definition for the current macro (Names are integers
-- offset to N, while other items are enumeration values).
function Make_Value (V : Integer) return String is
begin
if S = Name then
return "(First_Name_Id + 256 + " & V & ")";
else
return "" & V;
end if;
end Make_Value;
begin
-- Skip all the #define for S-prefixed symbols in the header.
-- Of course we are making implicit assumptions:
-- (1) No newline between symbols with the same prefix.
-- (2) Prefix order is the same as in snames.ads.
if Header_Current_Symbol /= S then
declare
Name2 : Vstring;
Pat : constant Pattern := "#define "
& Header_Prefix (S).all
& Break (' ') * Name2;
In_Pat : Boolean := False;
begin
if Header_Current_Symbol /= None then
Put_Line (OutH, Header_Pending_Line);
end if;
loop
Line := Get_Line (InH);
if Match (Line, Pat) then
In_Pat := True;
elsif In_Pat then
Header_Pending_Line := Line;
exit;
else
Put_Line (OutH, Line);
end if;
end loop;
Header_Current_Symbol := S;
end;
end if;
-- Now output the line
-- Note that we must ensure at least one space between macro name and
-- parens, otherwise the parenthesized value gets treated as an argument
-- specification.
Put_Line (OutH, "#define " & Header_Prefix (S).all
& "_" & Name1
& (30 - Natural'Min (29, Length (Name1))) * ' '
& Make_Value (Header_Counter (S)));
Header_Counter (S) := Header_Counter (S) + 1;
end Output_Header_Line;
-- Start of processing for XSnames
begin
Open (InT, In_File, "snames.ads-tmpl");
Open (InB, In_File, "snames.adb-tmpl");
Open (InH, In_File, "snames.h-tmpl");
Create (OutS, Out_File, "snames.ns");
Create (OutB, Out_File, "snames.nb");
Create (OutH, Out_File, "snames.nh");
Anchored_Mode := True;
Val := 0;
loop
Line := Get_Line (InB);
exit when Match (Line, " Preset_Names");
Put_Line (OutB, Line);
end loop;
Put_Line (OutB, Line);
LoopN : while not End_Of_File (InT) loop
Line := Get_Line (InT);
if not Match (Line, Name_Ref) then
Put_Line (OutS, Line);
if Match (Line, Get_Attr) then
Output_Header_Line (Attr);
elsif Match (Line, Get_Conv) then
Output_Header_Line (Conv);
elsif Match (Line, Get_Prag) then
Output_Header_Line (Prag);
end if;
else
Oval := Lpad (V (Val), 3, '0');
if Match (Name0, "Last_") then
Oval := Lpad (V (Val - 1), 3, '0');
end if;
Put_Line
(OutS, A & Name0 & B & ": constant Name_Id := N + "
& Oval & ';' & Restl);
if Match (Name0, Get_Name) then
Name0 := Name1;
Val := Val + 1;
if Match (Name0, Findu, M) then
Replace (M, Translate (A, Xlate_U_Und));
Translate (Name0, Lower_Case_Map);
elsif not Match (Name0, "Op_", "") then
Translate (Name0, Lower_Case_Map);
else
Name0 := 'O' & Translate (Name0, Lower_Case_Map);
end if;
if Name0 = "error" then
Name0 := V ("<error>");
end if;
if not Match (Name0, Chk_Low) then
Put_Line (OutB, " """ & Name0 & "#"" &");
end if;
Output_Header_Line (Name);
end if;
end if;
end loop LoopN;
loop
Line := Get_Line (InB);
exit when Match (Line, " ""#"";");
end loop;
Put_Line (OutB, Line);
while not End_Of_File (InB) loop
Line := Get_Line (InB);
Put_Line (OutB, Line);
end loop;
Put_Line (OutH, Header_Pending_Line);
while not End_Of_File (InH) loop
Line := Get_Line (InH);
Put_Line (OutH, Line);
end loop;
end XSnamesT;
2009-04-10 Arnaud Charlet <charlet@adacore.com>
* Makefile.in (stamp-tools): Add handling of snames.ad[sb]
2009-04-09 Jakub Jelinek <jakub@redhat.com> 2009-04-09 Jakub Jelinek <jakub@redhat.com>
* Makefile.in: Change copyright header to refer to version * Makefile.in: Change copyright header to refer to version
......
...@@ -161,7 +161,7 @@ $(GCC_DIR)/stamp-gnatlib-rts: ...@@ -161,7 +161,7 @@ $(GCC_DIR)/stamp-gnatlib-rts:
$(GCC_DIR)/stamp-tools: $(GCC_DIR)/stamp-tools:
-rm -rf $(GCC_DIR)/ada/tools -rm -rf $(GCC_DIR)/ada/tools
-mkdir -p $(GCC_DIR)/ada/tools -mkdir -p $(GCC_DIR)/ada/tools
-(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb .) -(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb ../snames.ads ../snames.adb .)
-$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \ -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\ rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\
$(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \ $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment