-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, 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- --
-- 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, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- 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, --
------------------------------------------------------------------------------
with Namet; use Namet;
+with Opt; use Opt;
with Table;
package body Snames is
"_task_info#" &
"_task_name#" &
"_trace_sp#" &
+ "_disp_asynchronous_select#" &
+ "_disp_conditional_select#" &
+ "_disp_get_prim_op_kind#" &
+ "_disp_timed_select#" &
+ "_disp_get_task_id#" &
"initialize#" &
"adjust#" &
"finalize#" &
"partition#" &
"partition_interface#" &
"ras#" &
- "call#" &
+ "_call#" &
"rci_name#" &
"receiver#" &
"result#" &
"ada_83#" &
"ada_95#" &
"ada_05#" &
+ "ada_2005#" &
+ "assertion_policy#" &
"c_pass_by_copy#" &
+ "compile_time_error#" &
"compile_time_warning#" &
"component_alignment#" &
"convention_identifier#" &
+ "debug_policy#" &
"detect_blocking#" &
"discard_names#" &
"elaboration_checks#" &
"no_strict_aliasing#" &
"normalize_scalars#" &
"polling#" &
- "persistent_data#" &
- "persistent_object#" &
+ "persistent_bss#" &
+ "priority_specific_dispatching#" &
"profile#" &
"profile_warnings#" &
"propagate_exceptions#" &
"use_vads_size#" &
"validity_checks#" &
"warnings#" &
+ "wide_character_encoding#" &
"abort_defer#" &
"all_calls_remote#" &
"annotate#" &
"attach_handler#" &
"comment#" &
"common_object#" &
+ "complete_representation#" &
"complex_representation#" &
"controlled#" &
"convention#" &
"keep_names#" &
"link_with#" &
"linker_alias#" &
+ "linker_constructor#" &
+ "linker_destructor#" &
"linker_options#" &
"linker_section#" &
"list#" &
"pack#" &
"page#" &
"passive#" &
+ "preelaborable_initialization#" &
"preelaborate#" &
- "priority#" &
+ "preelaborate_05#" &
"psect_object#" &
"pure#" &
+ "pure_05#" &
"pure_function#" &
"remote_call_interface#" &
"remote_types#" &
"unchecked_union#" &
"unimplemented_unit#" &
"unreferenced#" &
+ "unreferenced_objects#" &
"unreserve_all_interrupts#" &
"volatile#" &
"volatile_components#" &
"asm#" &
"assembly#" &
"default#" &
+ "c_plus_plus#" &
"dll#" &
"win32#" &
"as_is#" &
+ "attribute_name#" &
"body_file_name#" &
"boolean_entry_barriers#" &
+ "check#" &
"casing#" &
"code#" &
"component#" &
"dot_replacement#" &
"dynamic#" &
"entity#" &
+ "entry_count#" &
"external_name#" &
"first_optional_parameter#" &
"form#" &
"gnat#" &
"gpl#" &
"ieee_float#" &
+ "ignore#" &
+ "info#" &
"internal#" &
"link_name#" &
"lowercase#" &
"max_entry_queue_length#" &
"max_size#" &
"mechanism#" &
+ "message#" &
"mixedcase#" &
"modified_gpl#" &
"name#" &
"semaphore#" &
"simple_barriers#" &
"spec_file_name#" &
+ "state#" &
"static#" &
"stack_size#" &
"subunit_file_name#" &
"user#" &
"vax_float#" &
"vms#" &
+ "vtable_ptr#" &
"working_storage#" &
"abort_signal#" &
"access#" &
"machine_mantissa#" &
"machine_overflows#" &
"machine_radix#" &
+ "machine_rounding#" &
"machine_rounds#" &
"machine_size#" &
"mantissa#" &
"pool_address#" &
"pos#" &
"position#" &
+ "priority#" &
"range#" &
"range_length#" &
"round#" &
"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#" &
"range_check#" &
"storage_check#" &
"tag_check#" &
+ "validity_check#" &
"all_checks#" &
"abort#" &
"abs#" &
"exception_message#" &
"exception_name#" &
"file#" &
+ "generic_dispatching_constructor#" &
"import_address#" &
"import_largest_value#" &
"import_value#" &
"unchecked_conversion#" &
"unchecked_deallocation#" &
"to_pointer#" &
+ "free#" &
"abstract#" &
"aliased#" &
"protected#" &
"tagged#" &
"raise_exception#" &
"ada_roots#" &
+ "archive_builder#" &
+ "archive_indexer#" &
+ "archive_suffix#" &
"binder#" &
"binder_driver#" &
"body_suffix#" &
"builder#" &
+ "builder_switches#" &
"compiler#" &
"compiler_driver#" &
"compiler_kind#" &
+ "compiler_minimum_options#" &
+ "compiler_pic_option#" &
"compute_dependency#" &
+ "config_body_file_name#" &
+ "config_body_file_name_pattern#" &
+ "config_file_switches#" &
+ "config_file_unique#" &
+ "config_spec_file_name#" &
+ "config_spec_file_name_pattern#" &
"cross_reference#" &
+ "default_builder_switches#" &
+ "default_global_compiler_switches#" &
+ "default_language#" &
"default_linker#" &
"default_switches#" &
+ "dependency_file_kind#" &
"dependency_option#" &
"exec_dir#" &
"executable#" &
"extends#" &
"externally_built#" &
"finder#" &
+ "global_compiler_switches#" &
"global_configuration_pragmas#" &
+ "global_config_file#" &
"gnatls#" &
"gnatstub#" &
"implementation#" &
"implementation_exceptions#" &
"implementation_suffix#" &
"include_option#" &
+ "include_path#" &
+ "include_path_file#" &
+ "language_kind#" &
"language_processing#" &
"languages#" &
- "library_dir#" &
+ "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_reference_symbol_file#" &
"library_src_dir#" &
+ "library_support#" &
"library_symbol_file#" &
"library_symbol_policy#" &
"library_version#" &
+ "library_version_options#" &
"linker#" &
+ "linker_executable_option#" &
+ "linker_lib_dir_option#" &
+ "linker_lib_name_option#" &
+ "local_config_file#" &
"local_configuration_pragmas#" &
"locally_removed_files#" &
+ "mapping_file_switches#" &
+ "mapping_spec_suffix#" &
+ "mapping_body_suffix#" &
"metrics#" &
+ "minimum_binder_options#" &
"naming#" &
+ "objects_path#" &
+ "objects_path_file#" &
"object_dir#" &
"pretty_printer#" &
"project#" &
+ "roots#" &
+ "run_path_option#" &
+ "runtime_project#" &
+ "shared_library_minimum_options#" &
+ "shared_library_prefix#" &
+ "shared_library_suffix#" &
"separate_suffix#" &
"source_dirs#" &
"source_files#" &
"specification#" &
"specification_exceptions#" &
"specification_suffix#" &
+ "stack#" &
"switches#" &
+ "symbolic_link_supported#" &
+ "toolchain_version#" &
"unaligned_valid#" &
"interface#" &
"overriding#" &
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_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 --
---------------------------
return Pragma_AST_Entry;
elsif N = Name_Interface then
return Pragma_Interface;
+ elsif N = Name_Priority then
+ return Pragma_Priority;
elsif N = Name_Storage_Size then
return Pragma_Storage_Size;
elsif N = Name_Storage_Unit then
Convention_Identifiers.Init;
- Convention_Identifiers.Append ((Name_Asm, Convention_Assembler));
- Convention_Identifiers.Append ((Name_Assembly, Convention_Assembler));
+ 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_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));
+ Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall));
+ Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall));
end Initialize;
-----------------------
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 --
----------------------------
return N in First_Pragma_Name .. Last_Pragma_Name
or else N = Name_AST_Entry
or else N = Name_Interface
+ or else N = Name_Priority
or else N = Name_Storage_Size
or else N = Name_Storage_Unit;
end Is_Pragma_Name;