diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 581 | ||||
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 23 | ||||
-rw-r--r-- | src/vhdl/vhdl-prints.adb | 9 |
4 files changed, 330 insertions, 286 deletions
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index a791c532c..2fa4d6aaf 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -710,6 +710,9 @@ package Vhdl.Nodes is -- -- Get/Set_Chain (Field2) -- + -- Only for Iir_Kind_Configuration_Specification: + -- Get/Set_Has_End (Flag11) + -- -- Get/Set_Is_Ref (Flag12) -- Iir_Kind_Disconnection_Specification (Short) diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 49cb0253c..cec4bdd7f 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -2872,6 +2872,7 @@ package body Vhdl.Nodes_Meta is Field_Generic_Map_Aspect_Chain, Field_Port_Map_Aspect_Chain, -- Iir_Kind_Component_Configuration + Field_Has_End, Field_Is_Ref, Field_Parent, Field_Component_Name, @@ -2963,6 +2964,7 @@ package body Vhdl.Nodes_Meta is Field_Expression, Field_Chain, -- Iir_Kind_Configuration_Specification + Field_Has_End, Field_Is_Ref, Field_Parent, Field_Component_Name, @@ -5410,291 +5412,291 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Psl_Hierarchical_Name => 204, Iir_Kind_Block_Configuration => 210, Iir_Kind_Block_Header => 214, - Iir_Kind_Component_Configuration => 221, - Iir_Kind_Binding_Indication => 225, - Iir_Kind_Entity_Class => 227, - Iir_Kind_Attribute_Value => 235, - Iir_Kind_Signature => 240, - Iir_Kind_Aggregate_Info => 247, - Iir_Kind_Procedure_Call => 251, - Iir_Kind_Record_Element_Constraint => 259, - Iir_Kind_Array_Element_Resolution => 261, - Iir_Kind_Record_Resolution => 262, - Iir_Kind_Record_Element_Resolution => 265, - Iir_Kind_Break_Element => 269, - Iir_Kind_Attribute_Specification => 278, - Iir_Kind_Disconnection_Specification => 284, - Iir_Kind_Step_Limit_Specification => 290, - Iir_Kind_Configuration_Specification => 296, - Iir_Kind_Access_Type_Definition => 303, - Iir_Kind_Incomplete_Type_Definition => 310, - Iir_Kind_Interface_Type_Definition => 316, - Iir_Kind_File_Type_Definition => 322, - Iir_Kind_Protected_Type_Declaration => 332, - Iir_Kind_Record_Type_Definition => 342, - Iir_Kind_Array_Type_Definition => 353, - Iir_Kind_Array_Subtype_Definition => 370, - Iir_Kind_Record_Subtype_Definition => 383, - Iir_Kind_Access_Subtype_Definition => 391, - Iir_Kind_File_Subtype_Definition => 398, - Iir_Kind_Physical_Subtype_Definition => 408, - Iir_Kind_Floating_Subtype_Definition => 419, - Iir_Kind_Integer_Subtype_Definition => 429, - Iir_Kind_Enumeration_Subtype_Definition => 439, - Iir_Kind_Enumeration_Type_Definition => 450, - Iir_Kind_Integer_Type_Definition => 458, - Iir_Kind_Floating_Type_Definition => 466, - Iir_Kind_Physical_Type_Definition => 477, - Iir_Kind_Range_Expression => 485, - Iir_Kind_Protected_Type_Body => 493, - Iir_Kind_Wildcard_Type_Definition => 497, - Iir_Kind_Foreign_Vector_Type_Definition => 498, - Iir_Kind_Subtype_Definition => 505, - Iir_Kind_Scalar_Nature_Definition => 513, - Iir_Kind_Record_Nature_Definition => 526, - Iir_Kind_Array_Nature_Definition => 540, - Iir_Kind_Array_Subnature_Definition => 555, - Iir_Kind_Overload_List => 556, - Iir_Kind_Foreign_Module => 561, - Iir_Kind_Entity_Declaration => 574, - Iir_Kind_Configuration_Declaration => 584, - Iir_Kind_Context_Declaration => 590, - Iir_Kind_Package_Declaration => 605, - Iir_Kind_Package_Instantiation_Declaration => 619, - Iir_Kind_Vmode_Declaration => 631, - Iir_Kind_Vprop_Declaration => 643, - Iir_Kind_Vunit_Declaration => 656, - Iir_Kind_Package_Body => 664, - Iir_Kind_Architecture_Body => 677, - Iir_Kind_Type_Declaration => 684, - Iir_Kind_Anonymous_Type_Declaration => 690, - Iir_Kind_Subtype_Declaration => 698, - Iir_Kind_Nature_Declaration => 704, - Iir_Kind_Subnature_Declaration => 711, - Iir_Kind_Package_Header => 713, - Iir_Kind_Unit_Declaration => 722, - Iir_Kind_Library_Declaration => 730, - Iir_Kind_Component_Declaration => 740, - Iir_Kind_Attribute_Declaration => 747, - Iir_Kind_Group_Template_Declaration => 753, - Iir_Kind_Group_Declaration => 760, - Iir_Kind_Element_Declaration => 768, - Iir_Kind_Nature_Element_Declaration => 775, - Iir_Kind_Non_Object_Alias_Declaration => 783, - Iir_Kind_Psl_Declaration => 791, - Iir_Kind_Psl_Boolean_Parameter => 799, - Iir_Kind_Psl_Endpoint_Declaration => 813, - Iir_Kind_Enumeration_Literal => 825, - Iir_Kind_Function_Declaration => 851, - Iir_Kind_Procedure_Declaration => 874, - Iir_Kind_Function_Body => 884, - Iir_Kind_Procedure_Body => 895, - Iir_Kind_Function_Instantiation_Declaration => 906, - Iir_Kind_Procedure_Instantiation_Declaration => 916, - Iir_Kind_Terminal_Declaration => 926, - Iir_Kind_Object_Alias_Declaration => 938, - Iir_Kind_Free_Quantity_Declaration => 950, - Iir_Kind_Spectrum_Quantity_Declaration => 963, - Iir_Kind_Noise_Quantity_Declaration => 975, - Iir_Kind_Across_Quantity_Declaration => 991, - Iir_Kind_Through_Quantity_Declaration => 1007, - Iir_Kind_File_Declaration => 1022, - Iir_Kind_Guard_Signal_Declaration => 1036, - Iir_Kind_Signal_Declaration => 1053, - Iir_Kind_Variable_Declaration => 1066, - Iir_Kind_Constant_Declaration => 1080, - Iir_Kind_Iterator_Declaration => 1092, - Iir_Kind_Interface_Constant_Declaration => 1109, - Iir_Kind_Interface_Variable_Declaration => 1125, - Iir_Kind_Interface_Signal_Declaration => 1146, - Iir_Kind_Interface_File_Declaration => 1162, - Iir_Kind_Interface_Quantity_Declaration => 1178, - Iir_Kind_Interface_Terminal_Declaration => 1190, - Iir_Kind_Interface_Type_Declaration => 1202, - Iir_Kind_Interface_Package_Declaration => 1216, - Iir_Kind_Interface_Function_Declaration => 1236, - Iir_Kind_Interface_Procedure_Declaration => 1252, - Iir_Kind_Attribute_Implicit_Declaration => 1255, - Iir_Kind_Suspend_State_Declaration => 1258, - Iir_Kind_Identity_Operator => 1262, - Iir_Kind_Negation_Operator => 1266, - Iir_Kind_Absolute_Operator => 1270, - Iir_Kind_Not_Operator => 1274, - Iir_Kind_Implicit_Condition_Operator => 1278, - Iir_Kind_Condition_Operator => 1282, - Iir_Kind_Reduction_And_Operator => 1286, - Iir_Kind_Reduction_Or_Operator => 1290, - Iir_Kind_Reduction_Nand_Operator => 1294, - Iir_Kind_Reduction_Nor_Operator => 1298, - Iir_Kind_Reduction_Xor_Operator => 1302, - Iir_Kind_Reduction_Xnor_Operator => 1306, - Iir_Kind_And_Operator => 1311, - Iir_Kind_Or_Operator => 1316, - Iir_Kind_Nand_Operator => 1321, - Iir_Kind_Nor_Operator => 1326, - Iir_Kind_Xor_Operator => 1331, - Iir_Kind_Xnor_Operator => 1336, - Iir_Kind_Equality_Operator => 1341, - Iir_Kind_Inequality_Operator => 1346, - Iir_Kind_Less_Than_Operator => 1351, - Iir_Kind_Less_Than_Or_Equal_Operator => 1356, - Iir_Kind_Greater_Than_Operator => 1361, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1366, - Iir_Kind_Match_Equality_Operator => 1371, - Iir_Kind_Match_Inequality_Operator => 1376, - Iir_Kind_Match_Less_Than_Operator => 1381, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1386, - Iir_Kind_Match_Greater_Than_Operator => 1391, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1396, - Iir_Kind_Sll_Operator => 1401, - Iir_Kind_Sla_Operator => 1406, - Iir_Kind_Srl_Operator => 1411, - Iir_Kind_Sra_Operator => 1416, - Iir_Kind_Rol_Operator => 1421, - Iir_Kind_Ror_Operator => 1426, - Iir_Kind_Addition_Operator => 1431, - Iir_Kind_Substraction_Operator => 1436, - Iir_Kind_Concatenation_Operator => 1441, - Iir_Kind_Multiplication_Operator => 1446, - Iir_Kind_Division_Operator => 1451, - Iir_Kind_Modulus_Operator => 1456, - Iir_Kind_Remainder_Operator => 1461, - Iir_Kind_Exponentiation_Operator => 1466, - Iir_Kind_Function_Call => 1474, - Iir_Kind_Aggregate => 1482, - Iir_Kind_Parenthesis_Expression => 1485, - Iir_Kind_Qualified_Expression => 1489, - Iir_Kind_Type_Conversion => 1494, - Iir_Kind_Allocator_By_Expression => 1499, - Iir_Kind_Allocator_By_Subtype => 1505, - Iir_Kind_Selected_Element => 1513, - Iir_Kind_Dereference => 1518, - Iir_Kind_Implicit_Dereference => 1523, - Iir_Kind_Slice_Name => 1530, - Iir_Kind_Indexed_Name => 1536, - Iir_Kind_Psl_Prev => 1542, - Iir_Kind_Psl_Stable => 1547, - Iir_Kind_Psl_Rose => 1552, - Iir_Kind_Psl_Fell => 1557, - Iir_Kind_Psl_Onehot => 1560, - Iir_Kind_Psl_Onehot0 => 1563, - Iir_Kind_Psl_Expression => 1565, - Iir_Kind_Sensitized_Process_Statement => 1587, - Iir_Kind_Process_Statement => 1608, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1621, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1634, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1648, - Iir_Kind_Concurrent_Assertion_Statement => 1656, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1663, - Iir_Kind_Concurrent_Break_Statement => 1671, - Iir_Kind_Psl_Assert_Directive => 1685, - Iir_Kind_Psl_Assume_Directive => 1697, - Iir_Kind_Psl_Cover_Directive => 1709, - Iir_Kind_Psl_Restrict_Directive => 1720, - Iir_Kind_Block_Statement => 1734, - Iir_Kind_If_Generate_Statement => 1745, - Iir_Kind_Case_Generate_Statement => 1754, - Iir_Kind_For_Generate_Statement => 1763, - Iir_Kind_Component_Instantiation_Statement => 1775, - Iir_Kind_Psl_Default_Clock => 1778, - Iir_Kind_Generate_Statement_Body => 1789, - Iir_Kind_If_Generate_Else_Clause => 1795, - Iir_Kind_Simple_Simultaneous_Statement => 1802, - Iir_Kind_Simultaneous_Null_Statement => 1806, - Iir_Kind_Simultaneous_Procedural_Statement => 1817, - Iir_Kind_Simultaneous_Case_Statement => 1826, - Iir_Kind_Simultaneous_If_Statement => 1835, - Iir_Kind_Simultaneous_Elsif => 1841, - Iir_Kind_Simple_Signal_Assignment_Statement => 1852, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1863, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1875, - Iir_Kind_Signal_Force_Assignment_Statement => 1885, - Iir_Kind_Signal_Release_Assignment_Statement => 1894, - Iir_Kind_Null_Statement => 1898, - Iir_Kind_Assertion_Statement => 1905, - Iir_Kind_Report_Statement => 1911, - Iir_Kind_Wait_Statement => 1919, - Iir_Kind_Variable_Assignment_Statement => 1926, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1933, - Iir_Kind_Return_Statement => 1939, - Iir_Kind_For_Loop_Statement => 1950, - Iir_Kind_While_Loop_Statement => 1961, - Iir_Kind_Next_Statement => 1968, - Iir_Kind_Exit_Statement => 1975, - Iir_Kind_Case_Statement => 1984, - Iir_Kind_Procedure_Call_Statement => 1990, - Iir_Kind_Break_Statement => 1997, - Iir_Kind_If_Statement => 2007, - Iir_Kind_Suspend_State_Statement => 2011, - Iir_Kind_Elsif => 2017, - Iir_Kind_Character_Literal => 2024, - Iir_Kind_Simple_Name => 2031, - Iir_Kind_Selected_Name => 2039, - Iir_Kind_Operator_Symbol => 2044, - Iir_Kind_Reference_Name => 2049, - Iir_Kind_External_Constant_Name => 2058, - Iir_Kind_External_Signal_Name => 2068, - Iir_Kind_External_Variable_Name => 2078, - Iir_Kind_Selected_By_All_Name => 2084, - Iir_Kind_Parenthesis_Name => 2089, - Iir_Kind_Package_Pathname => 2093, - Iir_Kind_Absolute_Pathname => 2094, - Iir_Kind_Relative_Pathname => 2095, - Iir_Kind_Pathname_Element => 2100, - Iir_Kind_Base_Attribute => 2102, - Iir_Kind_Subtype_Attribute => 2107, - Iir_Kind_Element_Attribute => 2112, - Iir_Kind_Across_Attribute => 2117, - Iir_Kind_Through_Attribute => 2122, - Iir_Kind_Nature_Reference_Attribute => 2126, - Iir_Kind_Left_Type_Attribute => 2131, - Iir_Kind_Right_Type_Attribute => 2136, - Iir_Kind_High_Type_Attribute => 2141, - Iir_Kind_Low_Type_Attribute => 2146, - Iir_Kind_Ascending_Type_Attribute => 2151, - Iir_Kind_Image_Attribute => 2157, - Iir_Kind_Value_Attribute => 2163, - Iir_Kind_Pos_Attribute => 2169, - Iir_Kind_Val_Attribute => 2175, - Iir_Kind_Succ_Attribute => 2181, - Iir_Kind_Pred_Attribute => 2187, - Iir_Kind_Leftof_Attribute => 2193, - Iir_Kind_Rightof_Attribute => 2199, - Iir_Kind_Signal_Slew_Attribute => 2207, - Iir_Kind_Quantity_Slew_Attribute => 2215, - Iir_Kind_Ramp_Attribute => 2223, - Iir_Kind_Zoh_Attribute => 2231, - Iir_Kind_Ltf_Attribute => 2239, - Iir_Kind_Ztf_Attribute => 2249, - Iir_Kind_Dot_Attribute => 2256, - Iir_Kind_Integ_Attribute => 2263, - Iir_Kind_Quantity_Delayed_Attribute => 2271, - Iir_Kind_Above_Attribute => 2279, - Iir_Kind_Delayed_Attribute => 2288, - Iir_Kind_Stable_Attribute => 2297, - Iir_Kind_Quiet_Attribute => 2306, - Iir_Kind_Transaction_Attribute => 2315, - Iir_Kind_Event_Attribute => 2319, - Iir_Kind_Active_Attribute => 2323, - Iir_Kind_Last_Event_Attribute => 2327, - Iir_Kind_Last_Active_Attribute => 2331, - Iir_Kind_Last_Value_Attribute => 2335, - Iir_Kind_Driving_Attribute => 2339, - Iir_Kind_Driving_Value_Attribute => 2343, - Iir_Kind_Behavior_Attribute => 2343, - Iir_Kind_Structure_Attribute => 2343, - Iir_Kind_Simple_Name_Attribute => 2350, - Iir_Kind_Instance_Name_Attribute => 2355, - Iir_Kind_Path_Name_Attribute => 2360, - Iir_Kind_Left_Array_Attribute => 2367, - Iir_Kind_Right_Array_Attribute => 2374, - Iir_Kind_High_Array_Attribute => 2381, - Iir_Kind_Low_Array_Attribute => 2388, - Iir_Kind_Length_Array_Attribute => 2395, - Iir_Kind_Ascending_Array_Attribute => 2402, - Iir_Kind_Range_Array_Attribute => 2409, - Iir_Kind_Reverse_Range_Array_Attribute => 2416, - Iir_Kind_Attribute_Name => 2425 + Iir_Kind_Component_Configuration => 222, + Iir_Kind_Binding_Indication => 226, + Iir_Kind_Entity_Class => 228, + Iir_Kind_Attribute_Value => 236, + Iir_Kind_Signature => 241, + Iir_Kind_Aggregate_Info => 248, + Iir_Kind_Procedure_Call => 252, + Iir_Kind_Record_Element_Constraint => 260, + Iir_Kind_Array_Element_Resolution => 262, + Iir_Kind_Record_Resolution => 263, + Iir_Kind_Record_Element_Resolution => 266, + Iir_Kind_Break_Element => 270, + Iir_Kind_Attribute_Specification => 279, + Iir_Kind_Disconnection_Specification => 285, + Iir_Kind_Step_Limit_Specification => 291, + Iir_Kind_Configuration_Specification => 298, + Iir_Kind_Access_Type_Definition => 305, + Iir_Kind_Incomplete_Type_Definition => 312, + Iir_Kind_Interface_Type_Definition => 318, + Iir_Kind_File_Type_Definition => 324, + Iir_Kind_Protected_Type_Declaration => 334, + Iir_Kind_Record_Type_Definition => 344, + Iir_Kind_Array_Type_Definition => 355, + Iir_Kind_Array_Subtype_Definition => 372, + Iir_Kind_Record_Subtype_Definition => 385, + Iir_Kind_Access_Subtype_Definition => 393, + Iir_Kind_File_Subtype_Definition => 400, + Iir_Kind_Physical_Subtype_Definition => 410, + Iir_Kind_Floating_Subtype_Definition => 421, + Iir_Kind_Integer_Subtype_Definition => 431, + Iir_Kind_Enumeration_Subtype_Definition => 441, + Iir_Kind_Enumeration_Type_Definition => 452, + Iir_Kind_Integer_Type_Definition => 460, + Iir_Kind_Floating_Type_Definition => 468, + Iir_Kind_Physical_Type_Definition => 479, + Iir_Kind_Range_Expression => 487, + Iir_Kind_Protected_Type_Body => 495, + Iir_Kind_Wildcard_Type_Definition => 499, + Iir_Kind_Foreign_Vector_Type_Definition => 500, + Iir_Kind_Subtype_Definition => 507, + Iir_Kind_Scalar_Nature_Definition => 515, + Iir_Kind_Record_Nature_Definition => 528, + Iir_Kind_Array_Nature_Definition => 542, + Iir_Kind_Array_Subnature_Definition => 557, + Iir_Kind_Overload_List => 558, + Iir_Kind_Foreign_Module => 563, + Iir_Kind_Entity_Declaration => 576, + Iir_Kind_Configuration_Declaration => 586, + Iir_Kind_Context_Declaration => 592, + Iir_Kind_Package_Declaration => 607, + Iir_Kind_Package_Instantiation_Declaration => 621, + Iir_Kind_Vmode_Declaration => 633, + Iir_Kind_Vprop_Declaration => 645, + Iir_Kind_Vunit_Declaration => 658, + Iir_Kind_Package_Body => 666, + Iir_Kind_Architecture_Body => 679, + Iir_Kind_Type_Declaration => 686, + Iir_Kind_Anonymous_Type_Declaration => 692, + Iir_Kind_Subtype_Declaration => 700, + Iir_Kind_Nature_Declaration => 706, + Iir_Kind_Subnature_Declaration => 713, + Iir_Kind_Package_Header => 715, + Iir_Kind_Unit_Declaration => 724, + Iir_Kind_Library_Declaration => 732, + Iir_Kind_Component_Declaration => 742, + Iir_Kind_Attribute_Declaration => 749, + Iir_Kind_Group_Template_Declaration => 755, + Iir_Kind_Group_Declaration => 762, + Iir_Kind_Element_Declaration => 770, + Iir_Kind_Nature_Element_Declaration => 777, + Iir_Kind_Non_Object_Alias_Declaration => 785, + Iir_Kind_Psl_Declaration => 793, + Iir_Kind_Psl_Boolean_Parameter => 801, + Iir_Kind_Psl_Endpoint_Declaration => 815, + Iir_Kind_Enumeration_Literal => 827, + Iir_Kind_Function_Declaration => 853, + Iir_Kind_Procedure_Declaration => 876, + Iir_Kind_Function_Body => 886, + Iir_Kind_Procedure_Body => 897, + Iir_Kind_Function_Instantiation_Declaration => 908, + Iir_Kind_Procedure_Instantiation_Declaration => 918, + Iir_Kind_Terminal_Declaration => 928, + Iir_Kind_Object_Alias_Declaration => 940, + Iir_Kind_Free_Quantity_Declaration => 952, + Iir_Kind_Spectrum_Quantity_Declaration => 965, + Iir_Kind_Noise_Quantity_Declaration => 977, + Iir_Kind_Across_Quantity_Declaration => 993, + Iir_Kind_Through_Quantity_Declaration => 1009, + Iir_Kind_File_Declaration => 1024, + Iir_Kind_Guard_Signal_Declaration => 1038, + Iir_Kind_Signal_Declaration => 1055, + Iir_Kind_Variable_Declaration => 1068, + Iir_Kind_Constant_Declaration => 1082, + Iir_Kind_Iterator_Declaration => 1094, + Iir_Kind_Interface_Constant_Declaration => 1111, + Iir_Kind_Interface_Variable_Declaration => 1127, + Iir_Kind_Interface_Signal_Declaration => 1148, + Iir_Kind_Interface_File_Declaration => 1164, + Iir_Kind_Interface_Quantity_Declaration => 1180, + Iir_Kind_Interface_Terminal_Declaration => 1192, + Iir_Kind_Interface_Type_Declaration => 1204, + Iir_Kind_Interface_Package_Declaration => 1218, + Iir_Kind_Interface_Function_Declaration => 1238, + Iir_Kind_Interface_Procedure_Declaration => 1254, + Iir_Kind_Attribute_Implicit_Declaration => 1257, + Iir_Kind_Suspend_State_Declaration => 1260, + Iir_Kind_Identity_Operator => 1264, + Iir_Kind_Negation_Operator => 1268, + Iir_Kind_Absolute_Operator => 1272, + Iir_Kind_Not_Operator => 1276, + Iir_Kind_Implicit_Condition_Operator => 1280, + Iir_Kind_Condition_Operator => 1284, + Iir_Kind_Reduction_And_Operator => 1288, + Iir_Kind_Reduction_Or_Operator => 1292, + Iir_Kind_Reduction_Nand_Operator => 1296, + Iir_Kind_Reduction_Nor_Operator => 1300, + Iir_Kind_Reduction_Xor_Operator => 1304, + Iir_Kind_Reduction_Xnor_Operator => 1308, + Iir_Kind_And_Operator => 1313, + Iir_Kind_Or_Operator => 1318, + Iir_Kind_Nand_Operator => 1323, + Iir_Kind_Nor_Operator => 1328, + Iir_Kind_Xor_Operator => 1333, + Iir_Kind_Xnor_Operator => 1338, + Iir_Kind_Equality_Operator => 1343, + Iir_Kind_Inequality_Operator => 1348, + Iir_Kind_Less_Than_Operator => 1353, + Iir_Kind_Less_Than_Or_Equal_Operator => 1358, + Iir_Kind_Greater_Than_Operator => 1363, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1368, + Iir_Kind_Match_Equality_Operator => 1373, + Iir_Kind_Match_Inequality_Operator => 1378, + Iir_Kind_Match_Less_Than_Operator => 1383, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1388, + Iir_Kind_Match_Greater_Than_Operator => 1393, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1398, + Iir_Kind_Sll_Operator => 1403, + Iir_Kind_Sla_Operator => 1408, + Iir_Kind_Srl_Operator => 1413, + Iir_Kind_Sra_Operator => 1418, + Iir_Kind_Rol_Operator => 1423, + Iir_Kind_Ror_Operator => 1428, + Iir_Kind_Addition_Operator => 1433, + Iir_Kind_Substraction_Operator => 1438, + Iir_Kind_Concatenation_Operator => 1443, + Iir_Kind_Multiplication_Operator => 1448, + Iir_Kind_Division_Operator => 1453, + Iir_Kind_Modulus_Operator => 1458, + Iir_Kind_Remainder_Operator => 1463, + Iir_Kind_Exponentiation_Operator => 1468, + Iir_Kind_Function_Call => 1476, + Iir_Kind_Aggregate => 1484, + Iir_Kind_Parenthesis_Expression => 1487, + Iir_Kind_Qualified_Expression => 1491, + Iir_Kind_Type_Conversion => 1496, + Iir_Kind_Allocator_By_Expression => 1501, + Iir_Kind_Allocator_By_Subtype => 1507, + Iir_Kind_Selected_Element => 1515, + Iir_Kind_Dereference => 1520, + Iir_Kind_Implicit_Dereference => 1525, + Iir_Kind_Slice_Name => 1532, + Iir_Kind_Indexed_Name => 1538, + Iir_Kind_Psl_Prev => 1544, + Iir_Kind_Psl_Stable => 1549, + Iir_Kind_Psl_Rose => 1554, + Iir_Kind_Psl_Fell => 1559, + Iir_Kind_Psl_Onehot => 1562, + Iir_Kind_Psl_Onehot0 => 1565, + Iir_Kind_Psl_Expression => 1567, + Iir_Kind_Sensitized_Process_Statement => 1589, + Iir_Kind_Process_Statement => 1610, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1623, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1636, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1650, + Iir_Kind_Concurrent_Assertion_Statement => 1658, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1665, + Iir_Kind_Concurrent_Break_Statement => 1673, + Iir_Kind_Psl_Assert_Directive => 1687, + Iir_Kind_Psl_Assume_Directive => 1699, + Iir_Kind_Psl_Cover_Directive => 1711, + Iir_Kind_Psl_Restrict_Directive => 1722, + Iir_Kind_Block_Statement => 1736, + Iir_Kind_If_Generate_Statement => 1747, + Iir_Kind_Case_Generate_Statement => 1756, + Iir_Kind_For_Generate_Statement => 1765, + Iir_Kind_Component_Instantiation_Statement => 1777, + Iir_Kind_Psl_Default_Clock => 1780, + Iir_Kind_Generate_Statement_Body => 1791, + Iir_Kind_If_Generate_Else_Clause => 1797, + Iir_Kind_Simple_Simultaneous_Statement => 1804, + Iir_Kind_Simultaneous_Null_Statement => 1808, + Iir_Kind_Simultaneous_Procedural_Statement => 1819, + Iir_Kind_Simultaneous_Case_Statement => 1828, + Iir_Kind_Simultaneous_If_Statement => 1837, + Iir_Kind_Simultaneous_Elsif => 1843, + Iir_Kind_Simple_Signal_Assignment_Statement => 1854, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1865, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1877, + Iir_Kind_Signal_Force_Assignment_Statement => 1887, + Iir_Kind_Signal_Release_Assignment_Statement => 1896, + Iir_Kind_Null_Statement => 1900, + Iir_Kind_Assertion_Statement => 1907, + Iir_Kind_Report_Statement => 1913, + Iir_Kind_Wait_Statement => 1921, + Iir_Kind_Variable_Assignment_Statement => 1928, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1935, + Iir_Kind_Return_Statement => 1941, + Iir_Kind_For_Loop_Statement => 1952, + Iir_Kind_While_Loop_Statement => 1963, + Iir_Kind_Next_Statement => 1970, + Iir_Kind_Exit_Statement => 1977, + Iir_Kind_Case_Statement => 1986, + Iir_Kind_Procedure_Call_Statement => 1992, + Iir_Kind_Break_Statement => 1999, + Iir_Kind_If_Statement => 2009, + Iir_Kind_Suspend_State_Statement => 2013, + Iir_Kind_Elsif => 2019, + Iir_Kind_Character_Literal => 2026, + Iir_Kind_Simple_Name => 2033, + Iir_Kind_Selected_Name => 2041, + Iir_Kind_Operator_Symbol => 2046, + Iir_Kind_Reference_Name => 2051, + Iir_Kind_External_Constant_Name => 2060, + Iir_Kind_External_Signal_Name => 2070, + Iir_Kind_External_Variable_Name => 2080, + Iir_Kind_Selected_By_All_Name => 2086, + Iir_Kind_Parenthesis_Name => 2091, + Iir_Kind_Package_Pathname => 2095, + Iir_Kind_Absolute_Pathname => 2096, + Iir_Kind_Relative_Pathname => 2097, + Iir_Kind_Pathname_Element => 2102, + Iir_Kind_Base_Attribute => 2104, + Iir_Kind_Subtype_Attribute => 2109, + Iir_Kind_Element_Attribute => 2114, + Iir_Kind_Across_Attribute => 2119, + Iir_Kind_Through_Attribute => 2124, + Iir_Kind_Nature_Reference_Attribute => 2128, + Iir_Kind_Left_Type_Attribute => 2133, + Iir_Kind_Right_Type_Attribute => 2138, + Iir_Kind_High_Type_Attribute => 2143, + Iir_Kind_Low_Type_Attribute => 2148, + Iir_Kind_Ascending_Type_Attribute => 2153, + Iir_Kind_Image_Attribute => 2159, + Iir_Kind_Value_Attribute => 2165, + Iir_Kind_Pos_Attribute => 2171, + Iir_Kind_Val_Attribute => 2177, + Iir_Kind_Succ_Attribute => 2183, + Iir_Kind_Pred_Attribute => 2189, + Iir_Kind_Leftof_Attribute => 2195, + Iir_Kind_Rightof_Attribute => 2201, + Iir_Kind_Signal_Slew_Attribute => 2209, + Iir_Kind_Quantity_Slew_Attribute => 2217, + Iir_Kind_Ramp_Attribute => 2225, + Iir_Kind_Zoh_Attribute => 2233, + Iir_Kind_Ltf_Attribute => 2241, + Iir_Kind_Ztf_Attribute => 2251, + Iir_Kind_Dot_Attribute => 2258, + Iir_Kind_Integ_Attribute => 2265, + Iir_Kind_Quantity_Delayed_Attribute => 2273, + Iir_Kind_Above_Attribute => 2281, + Iir_Kind_Delayed_Attribute => 2290, + Iir_Kind_Stable_Attribute => 2299, + Iir_Kind_Quiet_Attribute => 2308, + Iir_Kind_Transaction_Attribute => 2317, + Iir_Kind_Event_Attribute => 2321, + Iir_Kind_Active_Attribute => 2325, + Iir_Kind_Last_Event_Attribute => 2329, + Iir_Kind_Last_Active_Attribute => 2333, + Iir_Kind_Last_Value_Attribute => 2337, + Iir_Kind_Driving_Attribute => 2341, + Iir_Kind_Driving_Value_Attribute => 2345, + Iir_Kind_Behavior_Attribute => 2345, + Iir_Kind_Structure_Attribute => 2345, + Iir_Kind_Simple_Name_Attribute => 2352, + Iir_Kind_Instance_Name_Attribute => 2357, + Iir_Kind_Path_Name_Attribute => 2362, + Iir_Kind_Left_Array_Attribute => 2369, + Iir_Kind_Right_Array_Attribute => 2376, + Iir_Kind_High_Array_Attribute => 2383, + Iir_Kind_Low_Array_Attribute => 2390, + Iir_Kind_Length_Array_Attribute => 2397, + Iir_Kind_Ascending_Array_Attribute => 2404, + Iir_Kind_Range_Array_Attribute => 2411, + Iir_Kind_Reverse_Range_Array_Attribute => 2418, + Iir_Kind_Attribute_Name => 2427 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -12584,7 +12586,14 @@ package body Vhdl.Nodes_Meta is function Has_Has_End (K : Iir_Kind) return Boolean is begin - return K = Iir_Kind_Generate_Statement_Body; + case K is + when Iir_Kind_Component_Configuration + | Iir_Kind_Configuration_Specification + | Iir_Kind_Generate_Statement_Body => + return True; + when others => + return False; + end case; end Has_Has_End; function Has_Has_Is (K : Iir_Kind) return Boolean is diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 044f74e79..b61e6ab49 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -4614,6 +4614,15 @@ package body Vhdl.Parse is -- [ LRM93 5.2 ] -- configuration_specification ::= -- FOR component_specification binding_indication ; + -- + -- [ LRM08 7.3 Configuration specification ] + -- configuration_specification ::= + -- simple_configuration_specification + -- | compound_configuration_specification + -- + -- simple_configuration_specification ::= + -- FOR component_specification binding_indication ; + -- [ END FOR ; ] function Parse_Configuration_Specification return Iir_Configuration_Specification is @@ -4631,6 +4640,20 @@ package body Vhdl.Parse is -- Skip ';'. Scan_Semi_Colon_Declaration ("configuration specification"); + if Current_Token = Tok_End then + Check_Vhdl_At_Least_2008 ("'end for'"); + Set_Has_End (Res, True); + + -- Skip 'end'. + Scan; + + -- Skip 'for'. + Expect_Scan (Tok_For, "'for' expected after 'end'"); + + -- Skip ';'. + Scan_Semi_Colon ("';' expected after 'end for'"); + end if; + return Res; end Parse_Configuration_Specification; diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb index c77bef029..c339120ce 100644 --- a/src/vhdl/vhdl-prints.adb +++ b/src/vhdl/vhdl-prints.adb @@ -1786,9 +1786,18 @@ package body Vhdl.Prints is Disp_Instantiation_List (Ctxt, Get_Instantiation_List (Spec)); Disp_Token (Ctxt, Tok_Colon); Print (Ctxt, Get_Component_Name (Spec)); + Close_Hbox (Ctxt); + + Start_Vbox (Ctxt); + Start_Hbox (Ctxt); Disp_Binding_Indication (Ctxt, Get_Binding_Indication (Spec)); Disp_Token (Ctxt, Tok_Semi_Colon); Close_Hbox (Ctxt); + Close_Vbox (Ctxt); + + if Get_Has_End (Spec) then + Disp_End (Ctxt, Tok_For); + end if; end Disp_Configuration_Specification; procedure Disp_Disconnection_Specification |