1-- Rules in String_Matching_Gnat syntax: 2Too_short : check naming_convention (all, "...."); 3Standard : check naming_convention (all, not "integer"); 4Global_Only : check naming_convention (global all, not "^l_"); 5Local_Only : check naming_convention (local all, not "^g_"); 6 7Types : check naming_convention (type, "^T_", "_T$"); 8Enum_T : check naming_convention (Enumeration_Type, "_enum$"); 9Tasks : check naming_convention (task_type, "_task$"); 10Modular : check naming_convention (Modular_Integer_Type, "_mod$"); 11Private : check naming_convention (private_type, "^priv_"); 12Tagged : check naming_convention (Tagged_Type, "_tagged$"); 13Interface : check naming_convention (Interface_Type, "_interface$"); 14Class : check naming_convention (Class_type, "_class$"); 15Access : check naming_convention (Access_Type, "_access_"); 16Access_R : check naming_convention (Access_to_regular_type, "_regular$"); 17Access_T : check naming_convention (Access_to_tagged_type, "_tagged$"); 18Access_C : check naming_convention (Access_to_class_type, "_class$"); 19Access_SP : check naming_convention (Access_to_sp_type, "_sp$"); 20access_Ta : check naming_convention (access_to_task_type, "_task$"); 21 22Title_Case: check naming_convention (variable, case_sensitive "^[A-Z][a-z0-9]*(_[A-Z0-9][a-z0-9]*)*$"); 23Bool_Var : check naming_convention (others standard.boolean variable, "^Is_", "^Has_"); 24Not_Bool : check naming_convention (variable, not "^Is_", not "^Has_"); 25Discr : check naming_convention (Discriminant, "^D_"); 26Protec_F : check naming_convention (protected_field, "^pf_"); 27Rec_F : check naming_convention (Record_field, "^rf_"); 28Enum_Var : check naming_convention (root () procedure_formal_out, "^E_"); 29Int_Var : check naming_convention (root range mod procedure_formal_out, "^I_"); 30 31Const1 : check naming_convention (root constant, "^C_"); 32Const2 : Check naming_convention (constant, "^Const_"); 33Stat_Const: check naming_convention (regular_static_constant, "_Static$"); 34Enums : check naming_convention (root Enumeration, "^Enum_"); 35 36Label : check naming_convention (label, not "_"); 37 38Stmt : check naming_convention (stmt_name, not "ock$"); 39Loop : check naming_convention (loop_name, "^G_"); 40 41Procs : check naming_convention (procedure, not "_Gen$"); 42Protect : check naming_convention (protected_procedure, "^protec_"); 43Task_E : check naming_convention (task_entry, "^task_"); 44 45Wide_F : check naming_convention (standard.wide_string function, "^Wide_", not "^Wide_Wide_"); 46W_Wide_F : check naming_convention (standard.wide_wide_string function, "^Wide_Wide_"); 47Non_Wide_F: check naming_convention (function, not "^Wide_"); 48 49Generics1 : check naming_convention (generic, "_Gen$"); 50Generics2 : check naming_convention (others generic_sp, "^SP_"); 51Generics3 : check naming_convention (generic_procedure, "^proc_"); 52 53Exc_Ren : check naming_convention (exception_renaming, "excR$"); 54 55 56-- Rules given in String_Matching_Portable syntax: 57-- Too_short : check naming_convention (all, "????*"); 58-- Standard : check naming_convention (all, not integer); 59-- Global_Only : check naming_convention (all, global not "l_*"); 60-- Local_Only : check naming_convention (all, local not "g_*"); 61 62-- Types : check naming_convention (type, "T_*", "*_T"); 63-- Enum_T : check_naming_convention (Enumerated_Type, "*_enum"); 64-- Tasks : check naming_convention (task_type, "_task"); 65-- Modular : check naming_convention (Modular_Integer_Type, "*_mod"); 66-- Private : check naming_convention (private_type, "priv_*"); 67-- Tagged : check naming_convention (Tagged_Type, "*_tagged"); 68-- Interface : check naming_convention (Interface_Type, "*_interface"); 69-- Class : check naming_convention (Class_type, "*_class"); 70-- Access : check naming_convention (Access_Type, "*_access_*"); 71-- Access_R : check naming_convention (Access_to_regular_type, "*_regular"); 72-- Access_T : check naming_convention (Access_to_tagged_type, "*_tagged"); 73-- Access_C : check naming_convention (Access_to_regular_type, "*_class"); 74-- Access_SP : check naming_convention (Access_to_sp_type, "*_sp"); 75-- access_Ta : check naming_convention (access_to_task_type, "*_task"); 76 77-- Bool_Var : check naming_convention (standard.boolean variable, "Is_*", "Has_*"); 78-- Not_Bool : check naming_convention (variable, not "Is_*", not "Has_*"); 79-- Discr : check naming_convention (Discriminant, "D_*"); 80-- Protec_F : check naming_convention (protected_field, "pf_*"); 81-- Rec_F : check naming_convention (Record_field, "rf_*"); 82 83-- Const1 : check naming_convention (root constant, "C_*"); 84-- Const2 : Check naming_convention (constant, "Const_*"); 85-- Enums : check naming_convention (root Enumeration, "Enum_*"); 86 87-- Label : check naming_convention (label, not "*_*"); 88 89-- Stmt : check naming_convention (stmt_name, not "*ock"); 90-- Loop : check naming_convention (loop_name, "G_*"); 91 92-- Procs : check naming_convention (procedure, not "*_Gen"); 93-- Protect : check naming_convention (protected_procedure, "protec_*"); 94-- Task_E : check naming_convention (task_entry, "task_*"); 95 96-- Generics1 : check naming_convention (generic, "*_Gen"); 97-- Generics2 : check naming_convention (others generic_sp, "SP_*"); 98-- Generics3 : check naming_convention (generic_procedure, "proc_*"); 99 100-- Exc_Ren : check naming_convention (exception_renaming, "*excR"); 101