From 15cf5147f7a97759ac3385d214533d5500b3f9c3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 10 Jan 2016 11:05:31 +0100 Subject: Set type staticness for a constant declaration and attribute specification. Fix for issue 10. --- src/vhdl/nodes_meta.adb | 418 ++++++++++++++++++++++++------------------------ 1 file changed, 210 insertions(+), 208 deletions(-) (limited to 'src/vhdl/nodes_meta.adb') diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index 16fb1f4..0f8b5bf 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -2278,13 +2278,14 @@ package body Nodes_Meta is Field_Resolution_Indication, -- Iir_Kind_Attribute_Specification Field_Entity_Class, - Field_Entity_Name_List, Field_Chain, Field_Attribute_Value_Spec_Chain, Field_Expression, Field_Attribute_Designator, Field_Attribute_Specification_Chain, + Field_Entity_Name_List, Field_Parent, + Field_Type, -- Iir_Kind_Disconnection_Specification Field_Chain, Field_Signal_List, @@ -4009,213 +4010,213 @@ package body Nodes_Meta is Iir_Kind_Array_Element_Resolution => 200, Iir_Kind_Record_Resolution => 201, Iir_Kind_Record_Element_Resolution => 204, - Iir_Kind_Attribute_Specification => 212, - Iir_Kind_Disconnection_Specification => 217, - Iir_Kind_Configuration_Specification => 222, - Iir_Kind_Access_Type_Definition => 229, - Iir_Kind_Incomplete_Type_Definition => 236, - Iir_Kind_File_Type_Definition => 243, - Iir_Kind_Protected_Type_Declaration => 252, - Iir_Kind_Record_Type_Definition => 262, - Iir_Kind_Array_Type_Definition => 274, - Iir_Kind_Array_Subtype_Definition => 289, - Iir_Kind_Record_Subtype_Definition => 300, - Iir_Kind_Access_Subtype_Definition => 308, - Iir_Kind_Physical_Subtype_Definition => 317, - Iir_Kind_Floating_Subtype_Definition => 327, - Iir_Kind_Integer_Subtype_Definition => 336, - Iir_Kind_Enumeration_Subtype_Definition => 345, - Iir_Kind_Enumeration_Type_Definition => 354, - Iir_Kind_Integer_Type_Definition => 360, - Iir_Kind_Floating_Type_Definition => 366, - Iir_Kind_Physical_Type_Definition => 375, - Iir_Kind_Range_Expression => 381, - Iir_Kind_Protected_Type_Body => 388, - Iir_Kind_Subtype_Definition => 392, - Iir_Kind_Scalar_Nature_Definition => 396, - Iir_Kind_Overload_List => 397, - Iir_Kind_Type_Declaration => 403, - Iir_Kind_Anonymous_Type_Declaration => 408, - Iir_Kind_Subtype_Declaration => 416, - Iir_Kind_Nature_Declaration => 422, - Iir_Kind_Subnature_Declaration => 428, - Iir_Kind_Package_Declaration => 438, - Iir_Kind_Package_Instantiation_Declaration => 449, - Iir_Kind_Package_Body => 456, - Iir_Kind_Configuration_Declaration => 465, - Iir_Kind_Entity_Declaration => 477, - Iir_Kind_Architecture_Body => 489, - Iir_Kind_Context_Declaration => 495, - Iir_Kind_Package_Header => 497, - Iir_Kind_Unit_Declaration => 506, - Iir_Kind_Library_Declaration => 513, - Iir_Kind_Component_Declaration => 523, - Iir_Kind_Attribute_Declaration => 530, - Iir_Kind_Group_Template_Declaration => 536, - Iir_Kind_Group_Declaration => 543, - Iir_Kind_Element_Declaration => 550, - Iir_Kind_Non_Object_Alias_Declaration => 558, - Iir_Kind_Psl_Declaration => 566, - Iir_Kind_Terminal_Declaration => 572, - Iir_Kind_Free_Quantity_Declaration => 581, - Iir_Kind_Across_Quantity_Declaration => 593, - Iir_Kind_Through_Quantity_Declaration => 605, - Iir_Kind_Enumeration_Literal => 616, - Iir_Kind_Function_Declaration => 640, - Iir_Kind_Procedure_Declaration => 663, - Iir_Kind_Function_Body => 673, - Iir_Kind_Procedure_Body => 684, - Iir_Kind_Object_Alias_Declaration => 696, - Iir_Kind_File_Declaration => 711, - Iir_Kind_Guard_Signal_Declaration => 724, - Iir_Kind_Signal_Declaration => 741, - Iir_Kind_Variable_Declaration => 754, - Iir_Kind_Constant_Declaration => 768, - Iir_Kind_Iterator_Declaration => 780, - Iir_Kind_Interface_Constant_Declaration => 796, - Iir_Kind_Interface_Variable_Declaration => 812, - Iir_Kind_Interface_Signal_Declaration => 833, - Iir_Kind_Interface_File_Declaration => 849, - Iir_Kind_Interface_Package_Declaration => 858, - Iir_Kind_Identity_Operator => 862, - Iir_Kind_Negation_Operator => 866, - Iir_Kind_Absolute_Operator => 870, - Iir_Kind_Not_Operator => 874, - Iir_Kind_Condition_Operator => 878, - Iir_Kind_Reduction_And_Operator => 882, - Iir_Kind_Reduction_Or_Operator => 886, - Iir_Kind_Reduction_Nand_Operator => 890, - Iir_Kind_Reduction_Nor_Operator => 894, - Iir_Kind_Reduction_Xor_Operator => 898, - Iir_Kind_Reduction_Xnor_Operator => 902, - Iir_Kind_And_Operator => 907, - Iir_Kind_Or_Operator => 912, - Iir_Kind_Nand_Operator => 917, - Iir_Kind_Nor_Operator => 922, - Iir_Kind_Xor_Operator => 927, - Iir_Kind_Xnor_Operator => 932, - Iir_Kind_Equality_Operator => 937, - Iir_Kind_Inequality_Operator => 942, - Iir_Kind_Less_Than_Operator => 947, - Iir_Kind_Less_Than_Or_Equal_Operator => 952, - Iir_Kind_Greater_Than_Operator => 957, - Iir_Kind_Greater_Than_Or_Equal_Operator => 962, - Iir_Kind_Match_Equality_Operator => 967, - Iir_Kind_Match_Inequality_Operator => 972, - Iir_Kind_Match_Less_Than_Operator => 977, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 982, - Iir_Kind_Match_Greater_Than_Operator => 987, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 992, - Iir_Kind_Sll_Operator => 997, - Iir_Kind_Sla_Operator => 1002, - Iir_Kind_Srl_Operator => 1007, - Iir_Kind_Sra_Operator => 1012, - Iir_Kind_Rol_Operator => 1017, - Iir_Kind_Ror_Operator => 1022, - Iir_Kind_Addition_Operator => 1027, - Iir_Kind_Substraction_Operator => 1032, - Iir_Kind_Concatenation_Operator => 1037, - Iir_Kind_Multiplication_Operator => 1042, - Iir_Kind_Division_Operator => 1047, - Iir_Kind_Modulus_Operator => 1052, - Iir_Kind_Remainder_Operator => 1057, - Iir_Kind_Exponentiation_Operator => 1062, - Iir_Kind_Function_Call => 1070, - Iir_Kind_Aggregate => 1076, - Iir_Kind_Parenthesis_Expression => 1079, - Iir_Kind_Qualified_Expression => 1083, - Iir_Kind_Type_Conversion => 1088, - Iir_Kind_Allocator_By_Expression => 1092, - Iir_Kind_Allocator_By_Subtype => 1098, - Iir_Kind_Selected_Element => 1104, - Iir_Kind_Dereference => 1109, - Iir_Kind_Implicit_Dereference => 1114, - Iir_Kind_Slice_Name => 1121, - Iir_Kind_Indexed_Name => 1127, - Iir_Kind_Psl_Expression => 1129, - Iir_Kind_Sensitized_Process_Statement => 1149, - Iir_Kind_Process_Statement => 1169, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1180, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1192, - Iir_Kind_Concurrent_Assertion_Statement => 1200, - Iir_Kind_Psl_Default_Clock => 1204, - Iir_Kind_Psl_Assert_Statement => 1213, - Iir_Kind_Psl_Cover_Statement => 1222, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1229, - Iir_Kind_Block_Statement => 1242, - Iir_Kind_If_Generate_Statement => 1252, - Iir_Kind_For_Generate_Statement => 1261, - Iir_Kind_Component_Instantiation_Statement => 1271, - Iir_Kind_Simple_Simultaneous_Statement => 1278, - Iir_Kind_Generate_Statement_Body => 1289, - Iir_Kind_If_Generate_Else_Clause => 1294, - Iir_Kind_Signal_Assignment_Statement => 1303, - Iir_Kind_Null_Statement => 1307, - Iir_Kind_Assertion_Statement => 1314, - Iir_Kind_Report_Statement => 1320, - Iir_Kind_Wait_Statement => 1327, - Iir_Kind_Variable_Assignment_Statement => 1333, - Iir_Kind_Return_Statement => 1339, - Iir_Kind_For_Loop_Statement => 1348, - Iir_Kind_While_Loop_Statement => 1356, - Iir_Kind_Next_Statement => 1362, - Iir_Kind_Exit_Statement => 1368, - Iir_Kind_Case_Statement => 1376, - Iir_Kind_Procedure_Call_Statement => 1382, - Iir_Kind_If_Statement => 1391, - Iir_Kind_Elsif => 1396, - Iir_Kind_Character_Literal => 1403, - Iir_Kind_Simple_Name => 1410, - Iir_Kind_Selected_Name => 1418, - Iir_Kind_Operator_Symbol => 1423, - Iir_Kind_Selected_By_All_Name => 1428, - Iir_Kind_Parenthesis_Name => 1432, - Iir_Kind_External_Constant_Name => 1441, - Iir_Kind_External_Signal_Name => 1450, - Iir_Kind_External_Variable_Name => 1459, - Iir_Kind_Package_Pathname => 1462, - Iir_Kind_Absolute_Pathname => 1463, - Iir_Kind_Relative_Pathname => 1464, - Iir_Kind_Pathname_Element => 1468, - Iir_Kind_Base_Attribute => 1470, - Iir_Kind_Left_Type_Attribute => 1475, - Iir_Kind_Right_Type_Attribute => 1480, - Iir_Kind_High_Type_Attribute => 1485, - Iir_Kind_Low_Type_Attribute => 1490, - Iir_Kind_Ascending_Type_Attribute => 1495, - Iir_Kind_Image_Attribute => 1501, - Iir_Kind_Value_Attribute => 1507, - Iir_Kind_Pos_Attribute => 1513, - Iir_Kind_Val_Attribute => 1519, - Iir_Kind_Succ_Attribute => 1525, - Iir_Kind_Pred_Attribute => 1531, - Iir_Kind_Leftof_Attribute => 1537, - Iir_Kind_Rightof_Attribute => 1543, - Iir_Kind_Delayed_Attribute => 1551, - Iir_Kind_Stable_Attribute => 1559, - Iir_Kind_Quiet_Attribute => 1567, - Iir_Kind_Transaction_Attribute => 1575, - Iir_Kind_Event_Attribute => 1579, - Iir_Kind_Active_Attribute => 1583, - Iir_Kind_Last_Event_Attribute => 1587, - Iir_Kind_Last_Active_Attribute => 1591, - Iir_Kind_Last_Value_Attribute => 1595, - Iir_Kind_Driving_Attribute => 1599, - Iir_Kind_Driving_Value_Attribute => 1603, - Iir_Kind_Behavior_Attribute => 1603, - Iir_Kind_Structure_Attribute => 1603, - Iir_Kind_Simple_Name_Attribute => 1610, - Iir_Kind_Instance_Name_Attribute => 1615, - Iir_Kind_Path_Name_Attribute => 1620, - Iir_Kind_Left_Array_Attribute => 1627, - Iir_Kind_Right_Array_Attribute => 1634, - Iir_Kind_High_Array_Attribute => 1641, - Iir_Kind_Low_Array_Attribute => 1648, - Iir_Kind_Length_Array_Attribute => 1655, - Iir_Kind_Ascending_Array_Attribute => 1662, - Iir_Kind_Range_Array_Attribute => 1669, - Iir_Kind_Reverse_Range_Array_Attribute => 1676, - Iir_Kind_Attribute_Name => 1684 + Iir_Kind_Attribute_Specification => 213, + Iir_Kind_Disconnection_Specification => 218, + Iir_Kind_Configuration_Specification => 223, + Iir_Kind_Access_Type_Definition => 230, + Iir_Kind_Incomplete_Type_Definition => 237, + Iir_Kind_File_Type_Definition => 244, + Iir_Kind_Protected_Type_Declaration => 253, + Iir_Kind_Record_Type_Definition => 263, + Iir_Kind_Array_Type_Definition => 275, + Iir_Kind_Array_Subtype_Definition => 290, + Iir_Kind_Record_Subtype_Definition => 301, + Iir_Kind_Access_Subtype_Definition => 309, + Iir_Kind_Physical_Subtype_Definition => 318, + Iir_Kind_Floating_Subtype_Definition => 328, + Iir_Kind_Integer_Subtype_Definition => 337, + Iir_Kind_Enumeration_Subtype_Definition => 346, + Iir_Kind_Enumeration_Type_Definition => 355, + Iir_Kind_Integer_Type_Definition => 361, + Iir_Kind_Floating_Type_Definition => 367, + Iir_Kind_Physical_Type_Definition => 376, + Iir_Kind_Range_Expression => 382, + Iir_Kind_Protected_Type_Body => 389, + Iir_Kind_Subtype_Definition => 393, + Iir_Kind_Scalar_Nature_Definition => 397, + Iir_Kind_Overload_List => 398, + Iir_Kind_Type_Declaration => 404, + Iir_Kind_Anonymous_Type_Declaration => 409, + Iir_Kind_Subtype_Declaration => 417, + Iir_Kind_Nature_Declaration => 423, + Iir_Kind_Subnature_Declaration => 429, + Iir_Kind_Package_Declaration => 439, + Iir_Kind_Package_Instantiation_Declaration => 450, + Iir_Kind_Package_Body => 457, + Iir_Kind_Configuration_Declaration => 466, + Iir_Kind_Entity_Declaration => 478, + Iir_Kind_Architecture_Body => 490, + Iir_Kind_Context_Declaration => 496, + Iir_Kind_Package_Header => 498, + Iir_Kind_Unit_Declaration => 507, + Iir_Kind_Library_Declaration => 514, + Iir_Kind_Component_Declaration => 524, + Iir_Kind_Attribute_Declaration => 531, + Iir_Kind_Group_Template_Declaration => 537, + Iir_Kind_Group_Declaration => 544, + Iir_Kind_Element_Declaration => 551, + Iir_Kind_Non_Object_Alias_Declaration => 559, + Iir_Kind_Psl_Declaration => 567, + Iir_Kind_Terminal_Declaration => 573, + Iir_Kind_Free_Quantity_Declaration => 582, + Iir_Kind_Across_Quantity_Declaration => 594, + Iir_Kind_Through_Quantity_Declaration => 606, + Iir_Kind_Enumeration_Literal => 617, + Iir_Kind_Function_Declaration => 641, + Iir_Kind_Procedure_Declaration => 664, + Iir_Kind_Function_Body => 674, + Iir_Kind_Procedure_Body => 685, + Iir_Kind_Object_Alias_Declaration => 697, + Iir_Kind_File_Declaration => 712, + Iir_Kind_Guard_Signal_Declaration => 725, + Iir_Kind_Signal_Declaration => 742, + Iir_Kind_Variable_Declaration => 755, + Iir_Kind_Constant_Declaration => 769, + Iir_Kind_Iterator_Declaration => 781, + Iir_Kind_Interface_Constant_Declaration => 797, + Iir_Kind_Interface_Variable_Declaration => 813, + Iir_Kind_Interface_Signal_Declaration => 834, + Iir_Kind_Interface_File_Declaration => 850, + Iir_Kind_Interface_Package_Declaration => 859, + Iir_Kind_Identity_Operator => 863, + Iir_Kind_Negation_Operator => 867, + Iir_Kind_Absolute_Operator => 871, + Iir_Kind_Not_Operator => 875, + Iir_Kind_Condition_Operator => 879, + Iir_Kind_Reduction_And_Operator => 883, + Iir_Kind_Reduction_Or_Operator => 887, + Iir_Kind_Reduction_Nand_Operator => 891, + Iir_Kind_Reduction_Nor_Operator => 895, + Iir_Kind_Reduction_Xor_Operator => 899, + Iir_Kind_Reduction_Xnor_Operator => 903, + Iir_Kind_And_Operator => 908, + Iir_Kind_Or_Operator => 913, + Iir_Kind_Nand_Operator => 918, + Iir_Kind_Nor_Operator => 923, + Iir_Kind_Xor_Operator => 928, + Iir_Kind_Xnor_Operator => 933, + Iir_Kind_Equality_Operator => 938, + Iir_Kind_Inequality_Operator => 943, + Iir_Kind_Less_Than_Operator => 948, + Iir_Kind_Less_Than_Or_Equal_Operator => 953, + Iir_Kind_Greater_Than_Operator => 958, + Iir_Kind_Greater_Than_Or_Equal_Operator => 963, + Iir_Kind_Match_Equality_Operator => 968, + Iir_Kind_Match_Inequality_Operator => 973, + Iir_Kind_Match_Less_Than_Operator => 978, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 983, + Iir_Kind_Match_Greater_Than_Operator => 988, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 993, + Iir_Kind_Sll_Operator => 998, + Iir_Kind_Sla_Operator => 1003, + Iir_Kind_Srl_Operator => 1008, + Iir_Kind_Sra_Operator => 1013, + Iir_Kind_Rol_Operator => 1018, + Iir_Kind_Ror_Operator => 1023, + Iir_Kind_Addition_Operator => 1028, + Iir_Kind_Substraction_Operator => 1033, + Iir_Kind_Concatenation_Operator => 1038, + Iir_Kind_Multiplication_Operator => 1043, + Iir_Kind_Division_Operator => 1048, + Iir_Kind_Modulus_Operator => 1053, + Iir_Kind_Remainder_Operator => 1058, + Iir_Kind_Exponentiation_Operator => 1063, + Iir_Kind_Function_Call => 1071, + Iir_Kind_Aggregate => 1077, + Iir_Kind_Parenthesis_Expression => 1080, + Iir_Kind_Qualified_Expression => 1084, + Iir_Kind_Type_Conversion => 1089, + Iir_Kind_Allocator_By_Expression => 1093, + Iir_Kind_Allocator_By_Subtype => 1099, + Iir_Kind_Selected_Element => 1105, + Iir_Kind_Dereference => 1110, + Iir_Kind_Implicit_Dereference => 1115, + Iir_Kind_Slice_Name => 1122, + Iir_Kind_Indexed_Name => 1128, + Iir_Kind_Psl_Expression => 1130, + Iir_Kind_Sensitized_Process_Statement => 1150, + Iir_Kind_Process_Statement => 1170, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1181, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1193, + Iir_Kind_Concurrent_Assertion_Statement => 1201, + Iir_Kind_Psl_Default_Clock => 1205, + Iir_Kind_Psl_Assert_Statement => 1214, + Iir_Kind_Psl_Cover_Statement => 1223, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1230, + Iir_Kind_Block_Statement => 1243, + Iir_Kind_If_Generate_Statement => 1253, + Iir_Kind_For_Generate_Statement => 1262, + Iir_Kind_Component_Instantiation_Statement => 1272, + Iir_Kind_Simple_Simultaneous_Statement => 1279, + Iir_Kind_Generate_Statement_Body => 1290, + Iir_Kind_If_Generate_Else_Clause => 1295, + Iir_Kind_Signal_Assignment_Statement => 1304, + Iir_Kind_Null_Statement => 1308, + Iir_Kind_Assertion_Statement => 1315, + Iir_Kind_Report_Statement => 1321, + Iir_Kind_Wait_Statement => 1328, + Iir_Kind_Variable_Assignment_Statement => 1334, + Iir_Kind_Return_Statement => 1340, + Iir_Kind_For_Loop_Statement => 1349, + Iir_Kind_While_Loop_Statement => 1357, + Iir_Kind_Next_Statement => 1363, + Iir_Kind_Exit_Statement => 1369, + Iir_Kind_Case_Statement => 1377, + Iir_Kind_Procedure_Call_Statement => 1383, + Iir_Kind_If_Statement => 1392, + Iir_Kind_Elsif => 1397, + Iir_Kind_Character_Literal => 1404, + Iir_Kind_Simple_Name => 1411, + Iir_Kind_Selected_Name => 1419, + Iir_Kind_Operator_Symbol => 1424, + Iir_Kind_Selected_By_All_Name => 1429, + Iir_Kind_Parenthesis_Name => 1433, + Iir_Kind_External_Constant_Name => 1442, + Iir_Kind_External_Signal_Name => 1451, + Iir_Kind_External_Variable_Name => 1460, + Iir_Kind_Package_Pathname => 1463, + Iir_Kind_Absolute_Pathname => 1464, + Iir_Kind_Relative_Pathname => 1465, + Iir_Kind_Pathname_Element => 1469, + Iir_Kind_Base_Attribute => 1471, + Iir_Kind_Left_Type_Attribute => 1476, + Iir_Kind_Right_Type_Attribute => 1481, + Iir_Kind_High_Type_Attribute => 1486, + Iir_Kind_Low_Type_Attribute => 1491, + Iir_Kind_Ascending_Type_Attribute => 1496, + Iir_Kind_Image_Attribute => 1502, + Iir_Kind_Value_Attribute => 1508, + Iir_Kind_Pos_Attribute => 1514, + Iir_Kind_Val_Attribute => 1520, + Iir_Kind_Succ_Attribute => 1526, + Iir_Kind_Pred_Attribute => 1532, + Iir_Kind_Leftof_Attribute => 1538, + Iir_Kind_Rightof_Attribute => 1544, + Iir_Kind_Delayed_Attribute => 1552, + Iir_Kind_Stable_Attribute => 1560, + Iir_Kind_Quiet_Attribute => 1568, + Iir_Kind_Transaction_Attribute => 1576, + Iir_Kind_Event_Attribute => 1580, + Iir_Kind_Active_Attribute => 1584, + Iir_Kind_Last_Event_Attribute => 1588, + Iir_Kind_Last_Active_Attribute => 1592, + Iir_Kind_Last_Value_Attribute => 1596, + Iir_Kind_Driving_Attribute => 1600, + Iir_Kind_Driving_Value_Attribute => 1604, + Iir_Kind_Behavior_Attribute => 1604, + Iir_Kind_Structure_Attribute => 1604, + Iir_Kind_Simple_Name_Attribute => 1611, + Iir_Kind_Instance_Name_Attribute => 1616, + Iir_Kind_Path_Name_Attribute => 1621, + Iir_Kind_Left_Array_Attribute => 1628, + Iir_Kind_Right_Array_Attribute => 1635, + Iir_Kind_High_Array_Attribute => 1642, + Iir_Kind_Low_Array_Attribute => 1649, + Iir_Kind_Length_Array_Attribute => 1656, + Iir_Kind_Ascending_Array_Attribute => 1663, + Iir_Kind_Range_Array_Attribute => 1670, + Iir_Kind_Reverse_Range_Array_Attribute => 1677, + Iir_Kind_Attribute_Name => 1685 ); function Get_Fields (K : Iir_Kind) return Fields_Array @@ -6712,6 +6713,7 @@ package body Nodes_Meta is | Iir_Kind_Overflow_Literal | Iir_Kind_Attribute_Value | Iir_Kind_Record_Element_Constraint + | Iir_Kind_Attribute_Specification | Iir_Kind_Range_Expression | Iir_Kind_Type_Declaration | Iir_Kind_Subtype_Declaration -- cgit