aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/libghdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-08-11 21:15:01 +0200
committerTristan Gingold <tgingold@free.fr>2022-08-11 21:15:01 +0200
commit51a346d55f192046583773eb72b515c89c343d45 (patch)
tree7b8c496aa55654abdcdf39a9fcb4f7b577c2d08f /pyGHDL/libghdl
parentcdcbb258be1aefa2244b3a262863544d04d686f8 (diff)
downloadghdl-51a346d55f192046583773eb72b515c89c343d45.tar.gz
ghdl-51a346d55f192046583773eb72b515c89c343d45.tar.bz2
ghdl-51a346d55f192046583773eb72b515c89c343d45.zip
vhdl: add support for file subtype. Fix #2174
Diffstat (limited to 'pyGHDL/libghdl')
-rw-r--r--pyGHDL/libghdl/vhdl/nodes.py517
1 files changed, 260 insertions, 257 deletions
diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py
index 2d0d857d4..181dd4525 100644
--- a/pyGHDL/libghdl/vhdl/nodes.py
+++ b/pyGHDL/libghdl/vhdl/nodes.py
@@ -109,263 +109,264 @@ class Iir_Kind(IntEnum):
Array_Subtype_Definition = 62
Record_Subtype_Definition = 63
Access_Subtype_Definition = 64
- Physical_Subtype_Definition = 65
- Floating_Subtype_Definition = 66
- Integer_Subtype_Definition = 67
- Enumeration_Subtype_Definition = 68
- Enumeration_Type_Definition = 69
- Integer_Type_Definition = 70
- Floating_Type_Definition = 71
- Physical_Type_Definition = 72
- Range_Expression = 73
- Protected_Type_Body = 74
- Wildcard_Type_Definition = 75
- Foreign_Vector_Type_Definition = 76
- Subtype_Definition = 77
- Scalar_Nature_Definition = 78
- Record_Nature_Definition = 79
- Array_Nature_Definition = 80
- Array_Subnature_Definition = 81
- Overload_List = 82
- Foreign_Module = 83
- Entity_Declaration = 84
- Configuration_Declaration = 85
- Context_Declaration = 86
- Package_Declaration = 87
- Package_Instantiation_Declaration = 88
- Vmode_Declaration = 89
- Vprop_Declaration = 90
- Vunit_Declaration = 91
- Package_Body = 92
- Architecture_Body = 93
- Type_Declaration = 94
- Anonymous_Type_Declaration = 95
- Subtype_Declaration = 96
- Nature_Declaration = 97
- Subnature_Declaration = 98
- Package_Header = 99
- Unit_Declaration = 100
- Library_Declaration = 101
- Component_Declaration = 102
- Attribute_Declaration = 103
- Group_Template_Declaration = 104
- Group_Declaration = 105
- Element_Declaration = 106
- Nature_Element_Declaration = 107
- Non_Object_Alias_Declaration = 108
- Psl_Declaration = 109
- Psl_Endpoint_Declaration = 110
- Enumeration_Literal = 111
- Function_Declaration = 112
- Procedure_Declaration = 113
- Function_Body = 114
- Procedure_Body = 115
- Function_Instantiation_Declaration = 116
- Procedure_Instantiation_Declaration = 117
- Terminal_Declaration = 118
- Object_Alias_Declaration = 119
- Free_Quantity_Declaration = 120
- Spectrum_Quantity_Declaration = 121
- Noise_Quantity_Declaration = 122
- Across_Quantity_Declaration = 123
- Through_Quantity_Declaration = 124
- File_Declaration = 125
- Guard_Signal_Declaration = 126
- Signal_Declaration = 127
- Variable_Declaration = 128
- Constant_Declaration = 129
- Iterator_Declaration = 130
- Interface_Constant_Declaration = 131
- Interface_Variable_Declaration = 132
- Interface_Signal_Declaration = 133
- Interface_File_Declaration = 134
- Interface_Quantity_Declaration = 135
- Interface_Terminal_Declaration = 136
- Interface_Type_Declaration = 137
- Interface_Package_Declaration = 138
- Interface_Function_Declaration = 139
- Interface_Procedure_Declaration = 140
- Attribute_Implicit_Declaration = 141
- Suspend_State_Declaration = 142
- Identity_Operator = 143
- Negation_Operator = 144
- Absolute_Operator = 145
- Not_Operator = 146
- Implicit_Condition_Operator = 147
- Condition_Operator = 148
- Reduction_And_Operator = 149
- Reduction_Or_Operator = 150
- Reduction_Nand_Operator = 151
- Reduction_Nor_Operator = 152
- Reduction_Xor_Operator = 153
- Reduction_Xnor_Operator = 154
- And_Operator = 155
- Or_Operator = 156
- Nand_Operator = 157
- Nor_Operator = 158
- Xor_Operator = 159
- Xnor_Operator = 160
- Equality_Operator = 161
- Inequality_Operator = 162
- Less_Than_Operator = 163
- Less_Than_Or_Equal_Operator = 164
- Greater_Than_Operator = 165
- Greater_Than_Or_Equal_Operator = 166
- Match_Equality_Operator = 167
- Match_Inequality_Operator = 168
- Match_Less_Than_Operator = 169
- Match_Less_Than_Or_Equal_Operator = 170
- Match_Greater_Than_Operator = 171
- Match_Greater_Than_Or_Equal_Operator = 172
- Sll_Operator = 173
- Sla_Operator = 174
- Srl_Operator = 175
- Sra_Operator = 176
- Rol_Operator = 177
- Ror_Operator = 178
- Addition_Operator = 179
- Substraction_Operator = 180
- Concatenation_Operator = 181
- Multiplication_Operator = 182
- Division_Operator = 183
- Modulus_Operator = 184
- Remainder_Operator = 185
- Exponentiation_Operator = 186
- Function_Call = 187
- Aggregate = 188
- Parenthesis_Expression = 189
- Qualified_Expression = 190
- Type_Conversion = 191
- Allocator_By_Expression = 192
- Allocator_By_Subtype = 193
- Selected_Element = 194
- Dereference = 195
- Implicit_Dereference = 196
- Slice_Name = 197
- Indexed_Name = 198
- Psl_Prev = 199
- Psl_Stable = 200
- Psl_Rose = 201
- Psl_Fell = 202
- Psl_Onehot = 203
- Psl_Onehot0 = 204
- Psl_Expression = 205
- Sensitized_Process_Statement = 206
- Process_Statement = 207
- Concurrent_Simple_Signal_Assignment = 208
- Concurrent_Conditional_Signal_Assignment = 209
- Concurrent_Selected_Signal_Assignment = 210
- Concurrent_Assertion_Statement = 211
- Concurrent_Procedure_Call_Statement = 212
- Concurrent_Break_Statement = 213
- Psl_Assert_Directive = 214
- Psl_Assume_Directive = 215
- Psl_Cover_Directive = 216
- Psl_Restrict_Directive = 217
- Block_Statement = 218
- If_Generate_Statement = 219
- Case_Generate_Statement = 220
- For_Generate_Statement = 221
- Component_Instantiation_Statement = 222
- Psl_Default_Clock = 223
- Generate_Statement_Body = 224
- If_Generate_Else_Clause = 225
- Simple_Simultaneous_Statement = 226
- Simultaneous_Null_Statement = 227
- Simultaneous_Procedural_Statement = 228
- Simultaneous_Case_Statement = 229
- Simultaneous_If_Statement = 230
- Simultaneous_Elsif = 231
- Simple_Signal_Assignment_Statement = 232
- Conditional_Signal_Assignment_Statement = 233
- Selected_Waveform_Assignment_Statement = 234
- Signal_Force_Assignment_Statement = 235
- Signal_Release_Assignment_Statement = 236
- Null_Statement = 237
- Assertion_Statement = 238
- Report_Statement = 239
- Wait_Statement = 240
- Variable_Assignment_Statement = 241
- Conditional_Variable_Assignment_Statement = 242
- Return_Statement = 243
- For_Loop_Statement = 244
- While_Loop_Statement = 245
- Next_Statement = 246
- Exit_Statement = 247
- Case_Statement = 248
- Procedure_Call_Statement = 249
- Break_Statement = 250
- If_Statement = 251
- Suspend_State_Statement = 252
- Elsif = 253
- Character_Literal = 254
- Simple_Name = 255
- Selected_Name = 256
- Operator_Symbol = 257
- Reference_Name = 258
- External_Constant_Name = 259
- External_Signal_Name = 260
- External_Variable_Name = 261
- Selected_By_All_Name = 262
- Parenthesis_Name = 263
- Package_Pathname = 264
- Absolute_Pathname = 265
- Relative_Pathname = 266
- Pathname_Element = 267
- Base_Attribute = 268
- Subtype_Attribute = 269
- Element_Attribute = 270
- Across_Attribute = 271
- Through_Attribute = 272
- Nature_Reference_Attribute = 273
- Left_Type_Attribute = 274
- Right_Type_Attribute = 275
- High_Type_Attribute = 276
- Low_Type_Attribute = 277
- Ascending_Type_Attribute = 278
- Image_Attribute = 279
- Value_Attribute = 280
- Pos_Attribute = 281
- Val_Attribute = 282
- Succ_Attribute = 283
- Pred_Attribute = 284
- Leftof_Attribute = 285
- Rightof_Attribute = 286
- Signal_Slew_Attribute = 287
- Quantity_Slew_Attribute = 288
- Ramp_Attribute = 289
- Zoh_Attribute = 290
- Ltf_Attribute = 291
- Ztf_Attribute = 292
- Dot_Attribute = 293
- Integ_Attribute = 294
- Quantity_Delayed_Attribute = 295
- Above_Attribute = 296
- Delayed_Attribute = 297
- Stable_Attribute = 298
- Quiet_Attribute = 299
- Transaction_Attribute = 300
- Event_Attribute = 301
- Active_Attribute = 302
- Last_Event_Attribute = 303
- Last_Active_Attribute = 304
- Last_Value_Attribute = 305
- Driving_Attribute = 306
- Driving_Value_Attribute = 307
- Behavior_Attribute = 308
- Structure_Attribute = 309
- Simple_Name_Attribute = 310
- Instance_Name_Attribute = 311
- Path_Name_Attribute = 312
- Left_Array_Attribute = 313
- Right_Array_Attribute = 314
- High_Array_Attribute = 315
- Low_Array_Attribute = 316
- Length_Array_Attribute = 317
- Ascending_Array_Attribute = 318
- Range_Array_Attribute = 319
- Reverse_Range_Array_Attribute = 320
- Attribute_Name = 321
+ File_Subtype_Definition = 65
+ Physical_Subtype_Definition = 66
+ Floating_Subtype_Definition = 67
+ Integer_Subtype_Definition = 68
+ Enumeration_Subtype_Definition = 69
+ Enumeration_Type_Definition = 70
+ Integer_Type_Definition = 71
+ Floating_Type_Definition = 72
+ Physical_Type_Definition = 73
+ Range_Expression = 74
+ Protected_Type_Body = 75
+ Wildcard_Type_Definition = 76
+ Foreign_Vector_Type_Definition = 77
+ Subtype_Definition = 78
+ Scalar_Nature_Definition = 79
+ Record_Nature_Definition = 80
+ Array_Nature_Definition = 81
+ Array_Subnature_Definition = 82
+ Overload_List = 83
+ Foreign_Module = 84
+ Entity_Declaration = 85
+ Configuration_Declaration = 86
+ Context_Declaration = 87
+ Package_Declaration = 88
+ Package_Instantiation_Declaration = 89
+ Vmode_Declaration = 90
+ Vprop_Declaration = 91
+ Vunit_Declaration = 92
+ Package_Body = 93
+ Architecture_Body = 94
+ Type_Declaration = 95
+ Anonymous_Type_Declaration = 96
+ Subtype_Declaration = 97
+ Nature_Declaration = 98
+ Subnature_Declaration = 99
+ Package_Header = 100
+ Unit_Declaration = 101
+ Library_Declaration = 102
+ Component_Declaration = 103
+ Attribute_Declaration = 104
+ Group_Template_Declaration = 105
+ Group_Declaration = 106
+ Element_Declaration = 107
+ Nature_Element_Declaration = 108
+ Non_Object_Alias_Declaration = 109
+ Psl_Declaration = 110
+ Psl_Endpoint_Declaration = 111
+ Enumeration_Literal = 112
+ Function_Declaration = 113
+ Procedure_Declaration = 114
+ Function_Body = 115
+ Procedure_Body = 116
+ Function_Instantiation_Declaration = 117
+ Procedure_Instantiation_Declaration = 118
+ Terminal_Declaration = 119
+ Object_Alias_Declaration = 120
+ Free_Quantity_Declaration = 121
+ Spectrum_Quantity_Declaration = 122
+ Noise_Quantity_Declaration = 123
+ Across_Quantity_Declaration = 124
+ Through_Quantity_Declaration = 125
+ File_Declaration = 126
+ Guard_Signal_Declaration = 127
+ Signal_Declaration = 128
+ Variable_Declaration = 129
+ Constant_Declaration = 130
+ Iterator_Declaration = 131
+ Interface_Constant_Declaration = 132
+ Interface_Variable_Declaration = 133
+ Interface_Signal_Declaration = 134
+ Interface_File_Declaration = 135
+ Interface_Quantity_Declaration = 136
+ Interface_Terminal_Declaration = 137
+ Interface_Type_Declaration = 138
+ Interface_Package_Declaration = 139
+ Interface_Function_Declaration = 140
+ Interface_Procedure_Declaration = 141
+ Attribute_Implicit_Declaration = 142
+ Suspend_State_Declaration = 143
+ Identity_Operator = 144
+ Negation_Operator = 145
+ Absolute_Operator = 146
+ Not_Operator = 147
+ Implicit_Condition_Operator = 148
+ Condition_Operator = 149
+ Reduction_And_Operator = 150
+ Reduction_Or_Operator = 151
+ Reduction_Nand_Operator = 152
+ Reduction_Nor_Operator = 153
+ Reduction_Xor_Operator = 154
+ Reduction_Xnor_Operator = 155
+ And_Operator = 156
+ Or_Operator = 157
+ Nand_Operator = 158
+ Nor_Operator = 159
+ Xor_Operator = 160
+ Xnor_Operator = 161
+ Equality_Operator = 162
+ Inequality_Operator = 163
+ Less_Than_Operator = 164
+ Less_Than_Or_Equal_Operator = 165
+ Greater_Than_Operator = 166
+ Greater_Than_Or_Equal_Operator = 167
+ Match_Equality_Operator = 168
+ Match_Inequality_Operator = 169
+ Match_Less_Than_Operator = 170
+ Match_Less_Than_Or_Equal_Operator = 171
+ Match_Greater_Than_Operator = 172
+ Match_Greater_Than_Or_Equal_Operator = 173
+ Sll_Operator = 174
+ Sla_Operator = 175
+ Srl_Operator = 176
+ Sra_Operator = 177
+ Rol_Operator = 178
+ Ror_Operator = 179
+ Addition_Operator = 180
+ Substraction_Operator = 181
+ Concatenation_Operator = 182
+ Multiplication_Operator = 183
+ Division_Operator = 184
+ Modulus_Operator = 185
+ Remainder_Operator = 186
+ Exponentiation_Operator = 187
+ Function_Call = 188
+ Aggregate = 189
+ Parenthesis_Expression = 190
+ Qualified_Expression = 191
+ Type_Conversion = 192
+ Allocator_By_Expression = 193
+ Allocator_By_Subtype = 194
+ Selected_Element = 195
+ Dereference = 196
+ Implicit_Dereference = 197
+ Slice_Name = 198
+ Indexed_Name = 199
+ Psl_Prev = 200
+ Psl_Stable = 201
+ Psl_Rose = 202
+ Psl_Fell = 203
+ Psl_Onehot = 204
+ Psl_Onehot0 = 205
+ Psl_Expression = 206
+ Sensitized_Process_Statement = 207
+ Process_Statement = 208
+ Concurrent_Simple_Signal_Assignment = 209
+ Concurrent_Conditional_Signal_Assignment = 210
+ Concurrent_Selected_Signal_Assignment = 211
+ Concurrent_Assertion_Statement = 212
+ Concurrent_Procedure_Call_Statement = 213
+ Concurrent_Break_Statement = 214
+ Psl_Assert_Directive = 215
+ Psl_Assume_Directive = 216
+ Psl_Cover_Directive = 217
+ Psl_Restrict_Directive = 218
+ Block_Statement = 219
+ If_Generate_Statement = 220
+ Case_Generate_Statement = 221
+ For_Generate_Statement = 222
+ Component_Instantiation_Statement = 223
+ Psl_Default_Clock = 224
+ Generate_Statement_Body = 225
+ If_Generate_Else_Clause = 226
+ Simple_Simultaneous_Statement = 227
+ Simultaneous_Null_Statement = 228
+ Simultaneous_Procedural_Statement = 229
+ Simultaneous_Case_Statement = 230
+ Simultaneous_If_Statement = 231
+ Simultaneous_Elsif = 232
+ Simple_Signal_Assignment_Statement = 233
+ Conditional_Signal_Assignment_Statement = 234
+ Selected_Waveform_Assignment_Statement = 235
+ Signal_Force_Assignment_Statement = 236
+ Signal_Release_Assignment_Statement = 237
+ Null_Statement = 238
+ Assertion_Statement = 239
+ Report_Statement = 240
+ Wait_Statement = 241
+ Variable_Assignment_Statement = 242
+ Conditional_Variable_Assignment_Statement = 243
+ Return_Statement = 244
+ For_Loop_Statement = 245
+ While_Loop_Statement = 246
+ Next_Statement = 247
+ Exit_Statement = 248
+ Case_Statement = 249
+ Procedure_Call_Statement = 250
+ Break_Statement = 251
+ If_Statement = 252
+ Suspend_State_Statement = 253
+ Elsif = 254
+ Character_Literal = 255
+ Simple_Name = 256
+ Selected_Name = 257
+ Operator_Symbol = 258
+ Reference_Name = 259
+ External_Constant_Name = 260
+ External_Signal_Name = 261
+ External_Variable_Name = 262
+ Selected_By_All_Name = 263
+ Parenthesis_Name = 264
+ Package_Pathname = 265
+ Absolute_Pathname = 266
+ Relative_Pathname = 267
+ Pathname_Element = 268
+ Base_Attribute = 269
+ Subtype_Attribute = 270
+ Element_Attribute = 271
+ Across_Attribute = 272
+ Through_Attribute = 273
+ Nature_Reference_Attribute = 274
+ Left_Type_Attribute = 275
+ Right_Type_Attribute = 276
+ High_Type_Attribute = 277
+ Low_Type_Attribute = 278
+ Ascending_Type_Attribute = 279
+ Image_Attribute = 280
+ Value_Attribute = 281
+ Pos_Attribute = 282
+ Val_Attribute = 283
+ Succ_Attribute = 284
+ Pred_Attribute = 285
+ Leftof_Attribute = 286
+ Rightof_Attribute = 287
+ Signal_Slew_Attribute = 288
+ Quantity_Slew_Attribute = 289
+ Ramp_Attribute = 290
+ Zoh_Attribute = 291
+ Ltf_Attribute = 292
+ Ztf_Attribute = 293
+ Dot_Attribute = 294
+ Integ_Attribute = 295
+ Quantity_Delayed_Attribute = 296
+ Above_Attribute = 297
+ Delayed_Attribute = 298
+ Stable_Attribute = 299
+ Quiet_Attribute = 300
+ Transaction_Attribute = 301
+ Event_Attribute = 302
+ Active_Attribute = 303
+ Last_Event_Attribute = 304
+ Last_Active_Attribute = 305
+ Last_Value_Attribute = 306
+ Driving_Attribute = 307
+ Driving_Value_Attribute = 308
+ Behavior_Attribute = 309
+ Structure_Attribute = 310
+ Simple_Name_Attribute = 311
+ Instance_Name_Attribute = 312
+ Path_Name_Attribute = 313
+ Left_Array_Attribute = 314
+ Right_Array_Attribute = 315
+ High_Array_Attribute = 316
+ Low_Array_Attribute = 317
+ Length_Array_Attribute = 318
+ Ascending_Array_Attribute = 319
+ Range_Array_Attribute = 320
+ Reverse_Range_Array_Attribute = 321
+ Attribute_Name = 322
@export
@@ -441,6 +442,7 @@ class Iir_Kinds:
Iir_Kind.Array_Subtype_Definition,
Iir_Kind.Record_Subtype_Definition,
Iir_Kind.Access_Subtype_Definition,
+ Iir_Kind.File_Subtype_Definition,
Iir_Kind.Physical_Subtype_Definition,
Iir_Kind.Floating_Subtype_Definition,
Iir_Kind.Integer_Subtype_Definition,
@@ -455,6 +457,7 @@ class Iir_Kinds:
Iir_Kind.Array_Subtype_Definition,
Iir_Kind.Record_Subtype_Definition,
Iir_Kind.Access_Subtype_Definition,
+ Iir_Kind.File_Subtype_Definition,
Iir_Kind.Physical_Subtype_Definition,
Iir_Kind.Floating_Subtype_Definition,
Iir_Kind.Integer_Subtype_Definition,