diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-30 06:28:26 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-30 06:28:26 +0100 |
commit | a6a74017fd6b467627f23ff733218af1062d139f (patch) | |
tree | 70facbde8de4dab2ff32d5f626ca51f15198f4bf /python/libghdl | |
parent | 2d835b7e171093b894aae52f54e1b3cfd373a5fe (diff) | |
download | ghdl-a6a74017fd6b467627f23ff733218af1062d139f.tar.gz ghdl-a6a74017fd6b467627f23ff733218af1062d139f.tar.bz2 ghdl-a6a74017fd6b467627f23ff733218af1062d139f.zip |
ams-vhdl: check nature for record natures and terminals.
Diffstat (limited to 'python/libghdl')
-rw-r--r-- | python/libghdl/thin/vhdl/nodes.py | 68 | ||||
-rw-r--r-- | python/libghdl/thin/vhdl/nodes_meta.py | 416 |
2 files changed, 249 insertions, 235 deletions
diff --git a/python/libghdl/thin/vhdl/nodes.py b/python/libghdl/thin/vhdl/nodes.py index 985b8fdef..06c9a750b 100644 --- a/python/libghdl/thin/vhdl/nodes.py +++ b/python/libghdl/thin/vhdl/nodes.py @@ -320,10 +320,12 @@ class Iir_Kinds: Iir_Kind.Variable_Assignment_Statement, Iir_Kind.Conditional_Variable_Assignment_Statement] - Simultaneous_Statement = [ - Iir_Kind.Simple_Simultaneous_Statement, - Iir_Kind.Simultaneous_Procedural_Statement, - Iir_Kind.Simultaneous_If_Statement] + Denoting_Name = [ + Iir_Kind.Character_Literal, + Iir_Kind.Simple_Name, + Iir_Kind.Selected_Name, + Iir_Kind.Operator_Symbol, + Iir_Kind.Reference_Name] Case_Choice = [ Iir_Kind.Choice_By_Range, @@ -378,6 +380,12 @@ class Iir_Kinds: Iir_Kind.Physical_Int_Literal, Iir_Kind.Physical_Fp_Literal] + Nature_Indication = [ + Iir_Kind.Scalar_Nature_Definition, + Iir_Kind.Record_Nature_Definition, + Iir_Kind.Array_Nature_Definition, + Iir_Kind.Array_Subnature_Definition] + Process_Statement = [ Iir_Kind.Sensitized_Process_Statement, Iir_Kind.Process_Statement] @@ -754,22 +762,6 @@ class Iir_Kinds: Iir_Kind.Interface_Function_Declaration, Iir_Kind.Interface_Procedure_Declaration] - Nonoverloadable_Declaration = [ - Iir_Kind.Type_Declaration, - Iir_Kind.Anonymous_Type_Declaration, - Iir_Kind.Subtype_Declaration, - Iir_Kind.Nature_Declaration, - Iir_Kind.Subnature_Declaration, - Iir_Kind.Package_Header, - Iir_Kind.Unit_Declaration, - Iir_Kind.Library_Declaration, - Iir_Kind.Component_Declaration, - Iir_Kind.Attribute_Declaration, - Iir_Kind.Group_Template_Declaration, - Iir_Kind.Group_Declaration, - Iir_Kind.Element_Declaration, - Iir_Kind.Nature_Element_Declaration] - Branch_Quantity_Declaration = [ Iir_Kind.Across_Quantity_Declaration, Iir_Kind.Through_Quantity_Declaration] @@ -797,9 +789,21 @@ class Iir_Kinds: Iir_Kind.Across_Quantity_Declaration, Iir_Kind.Through_Quantity_Declaration] - Physical_Literal = [ - Iir_Kind.Physical_Int_Literal, - Iir_Kind.Physical_Fp_Literal] + Nonoverloadable_Declaration = [ + Iir_Kind.Type_Declaration, + Iir_Kind.Anonymous_Type_Declaration, + Iir_Kind.Subtype_Declaration, + Iir_Kind.Nature_Declaration, + Iir_Kind.Subnature_Declaration, + Iir_Kind.Package_Header, + Iir_Kind.Unit_Declaration, + Iir_Kind.Library_Declaration, + Iir_Kind.Component_Declaration, + Iir_Kind.Attribute_Declaration, + Iir_Kind.Group_Template_Declaration, + Iir_Kind.Group_Declaration, + Iir_Kind.Element_Declaration, + Iir_Kind.Nature_Element_Declaration] Scalar_Type_And_Subtype_Definition = [ Iir_Kind.Physical_Subtype_Definition, @@ -862,12 +866,14 @@ class Iir_Kinds: Iir_Kind.Range_Array_Attribute, Iir_Kind.Reverse_Range_Array_Attribute] - Denoting_Name = [ - Iir_Kind.Character_Literal, - Iir_Kind.Simple_Name, - Iir_Kind.Selected_Name, - Iir_Kind.Operator_Symbol, - Iir_Kind.Reference_Name] + Physical_Literal = [ + Iir_Kind.Physical_Int_Literal, + Iir_Kind.Physical_Fp_Literal] + + Simultaneous_Statement = [ + Iir_Kind.Simple_Simultaneous_Statement, + Iir_Kind.Simultaneous_Procedural_Statement, + Iir_Kind.Simultaneous_If_Statement] Concurrent_Signal_Assignment = [ Iir_Kind.Concurrent_Simple_Signal_Assignment, @@ -1910,6 +1916,10 @@ Get_Base_Type = libghdl.vhdl__nodes__get_base_type Set_Base_Type = libghdl.vhdl__nodes__set_base_type +Get_Simple_Nature = libghdl.vhdl__nodes__get_simple_nature + +Set_Simple_Nature = libghdl.vhdl__nodes__set_simple_nature + Get_Base_Nature = libghdl.vhdl__nodes__get_base_nature Set_Base_Nature = libghdl.vhdl__nodes__set_base_nature diff --git a/python/libghdl/thin/vhdl/nodes_meta.py b/python/libghdl/thin/vhdl/nodes_meta.py index 12cc144e0..aff2f14d0 100644 --- a/python/libghdl/thin/vhdl/nodes_meta.py +++ b/python/libghdl/thin/vhdl/nodes_meta.py @@ -210,212 +210,213 @@ class fields: Left_Limit_Expr = 146 Right_Limit_Expr = 147 Base_Type = 148 - Base_Nature = 149 - Resolution_Indication = 150 - Record_Element_Resolution_Chain = 151 - Tolerance = 152 - Plus_Terminal_Name = 153 - Minus_Terminal_Name = 154 - Plus_Terminal = 155 - Minus_Terminal = 156 - Magnitude_Expression = 157 - Phase_Expression = 158 - Power_Expression = 159 - Simultaneous_Left = 160 - Simultaneous_Right = 161 - Text_File_Flag = 162 - Only_Characters_Flag = 163 - Is_Character_Type = 164 - Nature_Staticness = 165 - Type_Staticness = 166 - Constraint_State = 167 - Index_Subtype_List = 168 - Index_Subtype_Definition_List = 169 - Element_Subtype_Indication = 170 - Element_Subtype = 171 - Element_Subnature_Indication = 172 - Element_Subnature = 173 - Index_Constraint_List = 174 - Array_Element_Constraint = 175 - Elements_Declaration_List = 176 - Owned_Elements_Chain = 177 - Designated_Type = 178 - Designated_Subtype_Indication = 179 - Index_List = 180 - Reference = 181 - Nature_Declarator = 182 - Across_Type_Mark = 183 - Through_Type_Mark = 184 - Across_Type_Definition = 185 - Through_Type_Definition = 186 - Across_Type = 187 - Through_Type = 188 - Target = 189 - Waveform_Chain = 190 - Guard = 191 - Delay_Mechanism = 192 - Reject_Time_Expression = 193 - Sensitivity_List = 194 - Process_Origin = 195 - Package_Origin = 196 - Condition_Clause = 197 - Break_Element = 198 - Selector_Quantity = 199 - Break_Quantity = 200 - Timeout_Clause = 201 - Postponed_Flag = 202 - Callees_List = 203 - Passive_Flag = 204 - Resolution_Function_Flag = 205 - Wait_State = 206 - All_Sensitized_State = 207 - Seen_Flag = 208 - Pure_Flag = 209 - Foreign_Flag = 210 - Resolved_Flag = 211 - Signal_Type_Flag = 212 - Has_Signal_Flag = 213 - Purity_State = 214 - Elab_Flag = 215 - Configuration_Mark_Flag = 216 - Configuration_Done_Flag = 217 - Index_Constraint_Flag = 218 - Hide_Implicit_Flag = 219 - Assertion_Condition = 220 - Report_Expression = 221 - Severity_Expression = 222 - Instantiated_Unit = 223 - Generic_Map_Aspect_Chain = 224 - Port_Map_Aspect_Chain = 225 - Configuration_Name = 226 - Component_Configuration = 227 - Configuration_Specification = 228 - Default_Binding_Indication = 229 - Default_Configuration_Declaration = 230 - Expression = 231 - Conditional_Expression_Chain = 232 - Allocator_Designated_Type = 233 - Selected_Waveform_Chain = 234 - Conditional_Waveform_Chain = 235 - Guard_Expression = 236 - Guard_Decl = 237 - Guard_Sensitivity_List = 238 - Signal_Attribute_Chain = 239 - Block_Block_Configuration = 240 - Package_Header = 241 - Block_Header = 242 - Uninstantiated_Package_Name = 243 - Uninstantiated_Package_Decl = 244 - Instance_Source_File = 245 - Generate_Block_Configuration = 246 - Generate_Statement_Body = 247 - Alternative_Label = 248 - Generate_Else_Clause = 249 - Condition = 250 - Else_Clause = 251 - Parameter_Specification = 252 - Parent = 253 - Loop_Label = 254 - Exit_Flag = 255 - Next_Flag = 256 - Component_Name = 257 - Instantiation_List = 258 - Entity_Aspect = 259 - Default_Entity_Aspect = 260 - Binding_Indication = 261 - Named_Entity = 262 - Alias_Declaration = 263 - Referenced_Name = 264 - Expr_Staticness = 265 - Error_Origin = 266 - Operand = 267 - Left = 268 - Right = 269 - Unit_Name = 270 - Name = 271 - Group_Template_Name = 272 - Name_Staticness = 273 - Prefix = 274 - Signature_Prefix = 275 - External_Pathname = 276 - Pathname_Suffix = 277 - Pathname_Expression = 278 - In_Formal_Flag = 279 - Slice_Subtype = 280 - Suffix = 281 - Index_Subtype = 282 - Parameter = 283 - Parameter_2 = 284 - Attr_Chain = 285 - Signal_Attribute_Declaration = 286 - Actual_Type = 287 - Actual_Type_Definition = 288 - Association_Chain = 289 - Individual_Association_Chain = 290 - Subprogram_Association_Chain = 291 - Aggregate_Info = 292 - Sub_Aggregate_Info = 293 - Aggr_Dynamic_Flag = 294 - Aggr_Min_Length = 295 - Aggr_Low_Limit = 296 - Aggr_High_Limit = 297 - Aggr_Others_Flag = 298 - Aggr_Named_Flag = 299 - Aggregate_Expand_Flag = 300 - Association_Choices_Chain = 301 - Case_Statement_Alternative_Chain = 302 - Choice_Staticness = 303 - Procedure_Call = 304 - Implementation = 305 - Parameter_Association_Chain = 306 - Method_Object = 307 - Subtype_Type_Mark = 308 - Subnature_Nature_Mark = 309 - Type_Conversion_Subtype = 310 - Type_Mark = 311 - File_Type_Mark = 312 - Return_Type_Mark = 313 - Has_Disconnect_Flag = 314 - Has_Active_Flag = 315 - Is_Within_Flag = 316 - Type_Marks_List = 317 - Implicit_Alias_Flag = 318 - Alias_Signature = 319 - Attribute_Signature = 320 - Overload_List = 321 - Simple_Name_Identifier = 322 - Simple_Name_Subtype = 323 - Protected_Type_Body = 324 - Protected_Type_Declaration = 325 - Use_Flag = 326 - End_Has_Reserved_Id = 327 - End_Has_Identifier = 328 - End_Has_Postponed = 329 - Has_Label = 330 - Has_Begin = 331 - Has_End = 332 - Has_Is = 333 - Has_Pure = 334 - Has_Body = 335 - Has_Parameter = 336 - Has_Component = 337 - Has_Identifier_List = 338 - Has_Mode = 339 - Has_Class = 340 - Has_Delay_Mechanism = 341 - Suspend_Flag = 342 - Is_Ref = 343 - Is_Forward_Ref = 344 - Psl_Property = 345 - Psl_Sequence = 346 - Psl_Declaration = 347 - Psl_Expression = 348 - Psl_Boolean = 349 - PSL_Clock = 350 - PSL_NFA = 351 - PSL_Nbr_States = 352 - PSL_Clock_Sensitivity = 353 - PSL_EOS_Flag = 354 + Simple_Nature = 149 + Base_Nature = 150 + Resolution_Indication = 151 + Record_Element_Resolution_Chain = 152 + Tolerance = 153 + Plus_Terminal_Name = 154 + Minus_Terminal_Name = 155 + Plus_Terminal = 156 + Minus_Terminal = 157 + Magnitude_Expression = 158 + Phase_Expression = 159 + Power_Expression = 160 + Simultaneous_Left = 161 + Simultaneous_Right = 162 + Text_File_Flag = 163 + Only_Characters_Flag = 164 + Is_Character_Type = 165 + Nature_Staticness = 166 + Type_Staticness = 167 + Constraint_State = 168 + Index_Subtype_List = 169 + Index_Subtype_Definition_List = 170 + Element_Subtype_Indication = 171 + Element_Subtype = 172 + Element_Subnature_Indication = 173 + Element_Subnature = 174 + Index_Constraint_List = 175 + Array_Element_Constraint = 176 + Elements_Declaration_List = 177 + Owned_Elements_Chain = 178 + Designated_Type = 179 + Designated_Subtype_Indication = 180 + Index_List = 181 + Reference = 182 + Nature_Declarator = 183 + Across_Type_Mark = 184 + Through_Type_Mark = 185 + Across_Type_Definition = 186 + Through_Type_Definition = 187 + Across_Type = 188 + Through_Type = 189 + Target = 190 + Waveform_Chain = 191 + Guard = 192 + Delay_Mechanism = 193 + Reject_Time_Expression = 194 + Sensitivity_List = 195 + Process_Origin = 196 + Package_Origin = 197 + Condition_Clause = 198 + Break_Element = 199 + Selector_Quantity = 200 + Break_Quantity = 201 + Timeout_Clause = 202 + Postponed_Flag = 203 + Callees_List = 204 + Passive_Flag = 205 + Resolution_Function_Flag = 206 + Wait_State = 207 + All_Sensitized_State = 208 + Seen_Flag = 209 + Pure_Flag = 210 + Foreign_Flag = 211 + Resolved_Flag = 212 + Signal_Type_Flag = 213 + Has_Signal_Flag = 214 + Purity_State = 215 + Elab_Flag = 216 + Configuration_Mark_Flag = 217 + Configuration_Done_Flag = 218 + Index_Constraint_Flag = 219 + Hide_Implicit_Flag = 220 + Assertion_Condition = 221 + Report_Expression = 222 + Severity_Expression = 223 + Instantiated_Unit = 224 + Generic_Map_Aspect_Chain = 225 + Port_Map_Aspect_Chain = 226 + Configuration_Name = 227 + Component_Configuration = 228 + Configuration_Specification = 229 + Default_Binding_Indication = 230 + Default_Configuration_Declaration = 231 + Expression = 232 + Conditional_Expression_Chain = 233 + Allocator_Designated_Type = 234 + Selected_Waveform_Chain = 235 + Conditional_Waveform_Chain = 236 + Guard_Expression = 237 + Guard_Decl = 238 + Guard_Sensitivity_List = 239 + Signal_Attribute_Chain = 240 + Block_Block_Configuration = 241 + Package_Header = 242 + Block_Header = 243 + Uninstantiated_Package_Name = 244 + Uninstantiated_Package_Decl = 245 + Instance_Source_File = 246 + Generate_Block_Configuration = 247 + Generate_Statement_Body = 248 + Alternative_Label = 249 + Generate_Else_Clause = 250 + Condition = 251 + Else_Clause = 252 + Parameter_Specification = 253 + Parent = 254 + Loop_Label = 255 + Exit_Flag = 256 + Next_Flag = 257 + Component_Name = 258 + Instantiation_List = 259 + Entity_Aspect = 260 + Default_Entity_Aspect = 261 + Binding_Indication = 262 + Named_Entity = 263 + Alias_Declaration = 264 + Referenced_Name = 265 + Expr_Staticness = 266 + Error_Origin = 267 + Operand = 268 + Left = 269 + Right = 270 + Unit_Name = 271 + Name = 272 + Group_Template_Name = 273 + Name_Staticness = 274 + Prefix = 275 + Signature_Prefix = 276 + External_Pathname = 277 + Pathname_Suffix = 278 + Pathname_Expression = 279 + In_Formal_Flag = 280 + Slice_Subtype = 281 + Suffix = 282 + Index_Subtype = 283 + Parameter = 284 + Parameter_2 = 285 + Attr_Chain = 286 + Signal_Attribute_Declaration = 287 + Actual_Type = 288 + Actual_Type_Definition = 289 + Association_Chain = 290 + Individual_Association_Chain = 291 + Subprogram_Association_Chain = 292 + Aggregate_Info = 293 + Sub_Aggregate_Info = 294 + Aggr_Dynamic_Flag = 295 + Aggr_Min_Length = 296 + Aggr_Low_Limit = 297 + Aggr_High_Limit = 298 + Aggr_Others_Flag = 299 + Aggr_Named_Flag = 300 + Aggregate_Expand_Flag = 301 + Association_Choices_Chain = 302 + Case_Statement_Alternative_Chain = 303 + Choice_Staticness = 304 + Procedure_Call = 305 + Implementation = 306 + Parameter_Association_Chain = 307 + Method_Object = 308 + Subtype_Type_Mark = 309 + Subnature_Nature_Mark = 310 + Type_Conversion_Subtype = 311 + Type_Mark = 312 + File_Type_Mark = 313 + Return_Type_Mark = 314 + Has_Disconnect_Flag = 315 + Has_Active_Flag = 316 + Is_Within_Flag = 317 + Type_Marks_List = 318 + Implicit_Alias_Flag = 319 + Alias_Signature = 320 + Attribute_Signature = 321 + Overload_List = 322 + Simple_Name_Identifier = 323 + Simple_Name_Subtype = 324 + Protected_Type_Body = 325 + Protected_Type_Declaration = 326 + Use_Flag = 327 + End_Has_Reserved_Id = 328 + End_Has_Identifier = 329 + End_Has_Postponed = 330 + Has_Label = 331 + Has_Begin = 332 + Has_End = 333 + Has_Is = 334 + Has_Pure = 335 + Has_Body = 336 + Has_Parameter = 337 + Has_Component = 338 + Has_Identifier_List = 339 + Has_Mode = 340 + Has_Class = 341 + Has_Delay_Mechanism = 342 + Suspend_Flag = 343 + Is_Ref = 344 + Is_Forward_Ref = 345 + Psl_Property = 346 + Psl_Sequence = 347 + Psl_Declaration = 348 + Psl_Expression = 349 + Psl_Boolean = 350 + PSL_Clock = 351 + PSL_NFA = 352 + PSL_Nbr_States = 353 + PSL_Clock_Sensitivity = 354 + PSL_EOS_Flag = 355 Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean @@ -928,6 +929,9 @@ Has_Right_Limit_Expr =\ Has_Base_Type =\ libghdl.vhdl__nodes_meta__has_base_type +Has_Simple_Nature =\ + libghdl.vhdl__nodes_meta__has_simple_nature + Has_Base_Nature =\ libghdl.vhdl__nodes_meta__has_base_nature |