aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/python/libghdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-29 08:45:55 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-29 08:45:55 +0200
commit5035b126d932529683640867cdf8fe686d7f7cac (patch)
tree7a48dd954794cf10938509a459a5a9cabf7fd86c /src/vhdl/python/libghdl
parent7619ac406427a30e2963e11ad67b43b6aae26ee5 (diff)
downloadghdl-5035b126d932529683640867cdf8fe686d7f7cac.tar.gz
ghdl-5035b126d932529683640867cdf8fe686d7f7cac.tar.bz2
ghdl-5035b126d932529683640867cdf8fe686d7f7cac.zip
vhdl-disp_vhdl: print literals and identifiers from the source.
Add Literal_Length and set it in the parser.
Diffstat (limited to 'src/vhdl/python/libghdl')
-rw-r--r--src/vhdl/python/libghdl/thin/vhdl/nodes.py4
-rw-r--r--src/vhdl/python/libghdl/thin/vhdl/nodes_meta.py586
2 files changed, 299 insertions, 291 deletions
diff --git a/src/vhdl/python/libghdl/thin/vhdl/nodes.py b/src/vhdl/python/libghdl/thin/vhdl/nodes.py
index 07d440896..6ed04bb2a 100644
--- a/src/vhdl/python/libghdl/thin/vhdl/nodes.py
+++ b/src/vhdl/python/libghdl/thin/vhdl/nodes.py
@@ -1199,6 +1199,10 @@ Get_Has_Length = libghdl.vhdl__nodes__get_has_length
Set_Has_Length = libghdl.vhdl__nodes__set_has_length
+Get_Literal_Length = libghdl.vhdl__nodes__get_literal_length
+
+Set_Literal_Length = libghdl.vhdl__nodes__set_literal_length
+
Get_Literal_Origin = libghdl.vhdl__nodes__get_literal_origin
Set_Literal_Origin = libghdl.vhdl__nodes__set_literal_origin
diff --git a/src/vhdl/python/libghdl/thin/vhdl/nodes_meta.py b/src/vhdl/python/libghdl/thin/vhdl/nodes_meta.py
index 523dc43de..8d717732e 100644
--- a/src/vhdl/python/libghdl/thin/vhdl/nodes_meta.py
+++ b/src/vhdl/python/libghdl/thin/vhdl/nodes_meta.py
@@ -96,297 +96,298 @@ class fields:
Has_Signed = 32
Has_Sign = 33
Has_Length = 34
- Literal_Origin = 35
- Range_Origin = 36
- Literal_Subtype = 37
- Allocator_Subtype = 38
- Entity_Class = 39
- Entity_Name_List = 40
- Attribute_Designator = 41
- Attribute_Specification_Chain = 42
- Attribute_Specification = 43
- Signal_List = 44
- Designated_Entity = 45
- Formal = 46
- Actual = 47
- Actual_Conversion = 48
- Formal_Conversion = 49
- Whole_Association_Flag = 50
- Collapse_Signal_Flag = 51
- Artificial_Flag = 52
- Open_Flag = 53
- After_Drivers_Flag = 54
- We_Value = 55
- Time = 56
- Choice_Order = 57
- Associated_Expr = 58
- Associated_Block = 59
- Associated_Chain = 60
- Choice_Name = 61
- Choice_Expression = 62
- Choice_Range = 63
- Same_Alternative_Flag = 64
- Element_Type_Flag = 65
- Architecture = 66
- Block_Specification = 67
- Prev_Block_Configuration = 68
- Configuration_Item_Chain = 69
- Attribute_Value_Chain = 70
- Spec_Chain = 71
- Value_Chain = 72
- Attribute_Value_Spec_Chain = 73
- Entity_Name = 74
- Package = 75
- Package_Body = 76
- Instance_Package_Body = 77
- Need_Body = 78
- Macro_Expanded_Flag = 79
- Need_Instance_Bodies = 80
- Block_Configuration = 81
- Concurrent_Statement_Chain = 82
- Chain = 83
- Port_Chain = 84
- Generic_Chain = 85
- Type = 86
- Subtype_Indication = 87
- Discrete_Range = 88
- Type_Definition = 89
- Subtype_Definition = 90
- Incomplete_Type_Declaration = 91
- Interface_Type_Subprograms = 92
- Nature = 93
- Mode = 94
- Guarded_Signal_Flag = 95
- Signal_Kind = 96
- Base_Name = 97
- Interface_Declaration_Chain = 98
- Subprogram_Specification = 99
- Sequential_Statement_Chain = 100
- Subprogram_Body = 101
- Overload_Number = 102
- Subprogram_Depth = 103
- Subprogram_Hash = 104
- Impure_Depth = 105
- Return_Type = 106
- Implicit_Definition = 107
- Default_Value = 108
- Deferred_Declaration = 109
- Deferred_Declaration_Flag = 110
- Shared_Flag = 111
- Design_Unit = 112
- Block_Statement = 113
- Signal_Driver = 114
- Declaration_Chain = 115
- File_Logical_Name = 116
- File_Open_Kind = 117
- Element_Position = 118
- Use_Clause_Chain = 119
- Context_Reference_Chain = 120
- Selected_Name = 121
- Type_Declarator = 122
- Complete_Type_Definition = 123
- Incomplete_Type_Ref_Chain = 124
- Associated_Type = 125
- Enumeration_Literal_List = 126
- Entity_Class_Entry_Chain = 127
- Group_Constituent_List = 128
- Unit_Chain = 129
- Primary_Unit = 130
- Identifier = 131
- Label = 132
- Visible_Flag = 133
- Range_Constraint = 134
- Direction = 135
- Left_Limit = 136
- Right_Limit = 137
- Left_Limit_Expr = 138
- Right_Limit_Expr = 139
- Base_Type = 140
- Resolution_Indication = 141
- Record_Element_Resolution_Chain = 142
- Tolerance = 143
- Plus_Terminal = 144
- Minus_Terminal = 145
- Simultaneous_Left = 146
- Simultaneous_Right = 147
- Text_File_Flag = 148
- Only_Characters_Flag = 149
- Is_Character_Type = 150
- Type_Staticness = 151
- Constraint_State = 152
- Index_Subtype_List = 153
- Index_Subtype_Definition_List = 154
- Element_Subtype_Indication = 155
- Element_Subtype = 156
- Index_Constraint_List = 157
- Array_Element_Constraint = 158
- Elements_Declaration_List = 159
- Owned_Elements_Chain = 160
- Designated_Type = 161
- Designated_Subtype_Indication = 162
- Index_List = 163
- Reference = 164
- Nature_Declarator = 165
- Across_Type = 166
- Through_Type = 167
- Target = 168
- Waveform_Chain = 169
- Guard = 170
- Delay_Mechanism = 171
- Reject_Time_Expression = 172
- Sensitivity_List = 173
- Process_Origin = 174
- Package_Origin = 175
- Condition_Clause = 176
- Timeout_Clause = 177
- Postponed_Flag = 178
- Callees_List = 179
- Passive_Flag = 180
- Resolution_Function_Flag = 181
- Wait_State = 182
- All_Sensitized_State = 183
- Seen_Flag = 184
- Pure_Flag = 185
- Foreign_Flag = 186
- Resolved_Flag = 187
- Signal_Type_Flag = 188
- Has_Signal_Flag = 189
- Purity_State = 190
- Elab_Flag = 191
- Configuration_Mark_Flag = 192
- Configuration_Done_Flag = 193
- Index_Constraint_Flag = 194
- Hide_Implicit_Flag = 195
- Assertion_Condition = 196
- Report_Expression = 197
- Severity_Expression = 198
- Instantiated_Unit = 199
- Generic_Map_Aspect_Chain = 200
- Port_Map_Aspect_Chain = 201
- Configuration_Name = 202
- Component_Configuration = 203
- Configuration_Specification = 204
- Default_Binding_Indication = 205
- Default_Configuration_Declaration = 206
- Expression = 207
- Conditional_Expression = 208
- Allocator_Designated_Type = 209
- Selected_Waveform_Chain = 210
- Conditional_Waveform_Chain = 211
- Guard_Expression = 212
- Guard_Decl = 213
- Guard_Sensitivity_List = 214
- Signal_Attribute_Chain = 215
- Block_Block_Configuration = 216
- Package_Header = 217
- Block_Header = 218
- Uninstantiated_Package_Name = 219
- Uninstantiated_Package_Decl = 220
- Instance_Source_File = 221
- Generate_Block_Configuration = 222
- Generate_Statement_Body = 223
- Alternative_Label = 224
- Generate_Else_Clause = 225
- Condition = 226
- Else_Clause = 227
- Parameter_Specification = 228
- Parent = 229
- Loop_Label = 230
- Component_Name = 231
- Instantiation_List = 232
- Entity_Aspect = 233
- Default_Entity_Aspect = 234
- Binding_Indication = 235
- Named_Entity = 236
- Alias_Declaration = 237
- Referenced_Name = 238
- Expr_Staticness = 239
- Error_Origin = 240
- Operand = 241
- Left = 242
- Right = 243
- Unit_Name = 244
- Name = 245
- Group_Template_Name = 246
- Name_Staticness = 247
- Prefix = 248
- Signature_Prefix = 249
- External_Pathname = 250
- Pathname_Suffix = 251
- Pathname_Expression = 252
- In_Formal_Flag = 253
- Slice_Subtype = 254
- Suffix = 255
- Index_Subtype = 256
- Parameter = 257
- Attr_Chain = 258
- Signal_Attribute_Declaration = 259
- Actual_Type = 260
- Actual_Type_Definition = 261
- Association_Chain = 262
- Individual_Association_Chain = 263
- Subprogram_Association_Chain = 264
- Aggregate_Info = 265
- Sub_Aggregate_Info = 266
- Aggr_Dynamic_Flag = 267
- Aggr_Min_Length = 268
- Aggr_Low_Limit = 269
- Aggr_High_Limit = 270
- Aggr_Others_Flag = 271
- Aggr_Named_Flag = 272
- Aggregate_Expand_Flag = 273
- Association_Choices_Chain = 274
- Case_Statement_Alternative_Chain = 275
- Choice_Staticness = 276
- Procedure_Call = 277
- Implementation = 278
- Parameter_Association_Chain = 279
- Method_Object = 280
- Subtype_Type_Mark = 281
- Type_Conversion_Subtype = 282
- Type_Mark = 283
- File_Type_Mark = 284
- Return_Type_Mark = 285
- Has_Disconnect_Flag = 286
- Has_Active_Flag = 287
- Is_Within_Flag = 288
- Type_Marks_List = 289
- Implicit_Alias_Flag = 290
- Alias_Signature = 291
- Attribute_Signature = 292
- Overload_List = 293
- Simple_Name_Identifier = 294
- Simple_Name_Subtype = 295
- Protected_Type_Body = 296
- Protected_Type_Declaration = 297
- Use_Flag = 298
- End_Has_Reserved_Id = 299
- End_Has_Identifier = 300
- End_Has_Postponed = 301
- Has_Label = 302
- Has_Begin = 303
- Has_End = 304
- Has_Is = 305
- Has_Pure = 306
- Has_Body = 307
- Has_Parameter = 308
- Has_Component = 309
- Has_Identifier_List = 310
- Has_Mode = 311
- Has_Class = 312
- Suspend_Flag = 313
- Is_Ref = 314
- Is_Forward_Ref = 315
- Psl_Property = 316
- Psl_Sequence = 317
- Psl_Declaration = 318
- Psl_Expression = 319
- Psl_Boolean = 320
- PSL_Clock = 321
- PSL_NFA = 322
- PSL_Nbr_States = 323
- PSL_Clock_Sensitivity = 324
- PSL_EOS_Flag = 325
+ Literal_Length = 35
+ Literal_Origin = 36
+ Range_Origin = 37
+ Literal_Subtype = 38
+ Allocator_Subtype = 39
+ Entity_Class = 40
+ Entity_Name_List = 41
+ Attribute_Designator = 42
+ Attribute_Specification_Chain = 43
+ Attribute_Specification = 44
+ Signal_List = 45
+ Designated_Entity = 46
+ Formal = 47
+ Actual = 48
+ Actual_Conversion = 49
+ Formal_Conversion = 50
+ Whole_Association_Flag = 51
+ Collapse_Signal_Flag = 52
+ Artificial_Flag = 53
+ Open_Flag = 54
+ After_Drivers_Flag = 55
+ We_Value = 56
+ Time = 57
+ Choice_Order = 58
+ Associated_Expr = 59
+ Associated_Block = 60
+ Associated_Chain = 61
+ Choice_Name = 62
+ Choice_Expression = 63
+ Choice_Range = 64
+ Same_Alternative_Flag = 65
+ Element_Type_Flag = 66
+ Architecture = 67
+ Block_Specification = 68
+ Prev_Block_Configuration = 69
+ Configuration_Item_Chain = 70
+ Attribute_Value_Chain = 71
+ Spec_Chain = 72
+ Value_Chain = 73
+ Attribute_Value_Spec_Chain = 74
+ Entity_Name = 75
+ Package = 76
+ Package_Body = 77
+ Instance_Package_Body = 78
+ Need_Body = 79
+ Macro_Expanded_Flag = 80
+ Need_Instance_Bodies = 81
+ Block_Configuration = 82
+ Concurrent_Statement_Chain = 83
+ Chain = 84
+ Port_Chain = 85
+ Generic_Chain = 86
+ Type = 87
+ Subtype_Indication = 88
+ Discrete_Range = 89
+ Type_Definition = 90
+ Subtype_Definition = 91
+ Incomplete_Type_Declaration = 92
+ Interface_Type_Subprograms = 93
+ Nature = 94
+ Mode = 95
+ Guarded_Signal_Flag = 96
+ Signal_Kind = 97
+ Base_Name = 98
+ Interface_Declaration_Chain = 99
+ Subprogram_Specification = 100
+ Sequential_Statement_Chain = 101
+ Subprogram_Body = 102
+ Overload_Number = 103
+ Subprogram_Depth = 104
+ Subprogram_Hash = 105
+ Impure_Depth = 106
+ Return_Type = 107
+ Implicit_Definition = 108
+ Default_Value = 109
+ Deferred_Declaration = 110
+ Deferred_Declaration_Flag = 111
+ Shared_Flag = 112
+ Design_Unit = 113
+ Block_Statement = 114
+ Signal_Driver = 115
+ Declaration_Chain = 116
+ File_Logical_Name = 117
+ File_Open_Kind = 118
+ Element_Position = 119
+ Use_Clause_Chain = 120
+ Context_Reference_Chain = 121
+ Selected_Name = 122
+ Type_Declarator = 123
+ Complete_Type_Definition = 124
+ Incomplete_Type_Ref_Chain = 125
+ Associated_Type = 126
+ Enumeration_Literal_List = 127
+ Entity_Class_Entry_Chain = 128
+ Group_Constituent_List = 129
+ Unit_Chain = 130
+ Primary_Unit = 131
+ Identifier = 132
+ Label = 133
+ Visible_Flag = 134
+ Range_Constraint = 135
+ Direction = 136
+ Left_Limit = 137
+ Right_Limit = 138
+ Left_Limit_Expr = 139
+ Right_Limit_Expr = 140
+ Base_Type = 141
+ Resolution_Indication = 142
+ Record_Element_Resolution_Chain = 143
+ Tolerance = 144
+ Plus_Terminal = 145
+ Minus_Terminal = 146
+ Simultaneous_Left = 147
+ Simultaneous_Right = 148
+ Text_File_Flag = 149
+ Only_Characters_Flag = 150
+ Is_Character_Type = 151
+ Type_Staticness = 152
+ Constraint_State = 153
+ Index_Subtype_List = 154
+ Index_Subtype_Definition_List = 155
+ Element_Subtype_Indication = 156
+ Element_Subtype = 157
+ Index_Constraint_List = 158
+ Array_Element_Constraint = 159
+ Elements_Declaration_List = 160
+ Owned_Elements_Chain = 161
+ Designated_Type = 162
+ Designated_Subtype_Indication = 163
+ Index_List = 164
+ Reference = 165
+ Nature_Declarator = 166
+ Across_Type = 167
+ Through_Type = 168
+ Target = 169
+ Waveform_Chain = 170
+ Guard = 171
+ Delay_Mechanism = 172
+ Reject_Time_Expression = 173
+ Sensitivity_List = 174
+ Process_Origin = 175
+ Package_Origin = 176
+ Condition_Clause = 177
+ Timeout_Clause = 178
+ Postponed_Flag = 179
+ Callees_List = 180
+ Passive_Flag = 181
+ Resolution_Function_Flag = 182
+ Wait_State = 183
+ All_Sensitized_State = 184
+ Seen_Flag = 185
+ Pure_Flag = 186
+ Foreign_Flag = 187
+ Resolved_Flag = 188
+ Signal_Type_Flag = 189
+ Has_Signal_Flag = 190
+ Purity_State = 191
+ Elab_Flag = 192
+ Configuration_Mark_Flag = 193
+ Configuration_Done_Flag = 194
+ Index_Constraint_Flag = 195
+ Hide_Implicit_Flag = 196
+ Assertion_Condition = 197
+ Report_Expression = 198
+ Severity_Expression = 199
+ Instantiated_Unit = 200
+ Generic_Map_Aspect_Chain = 201
+ Port_Map_Aspect_Chain = 202
+ Configuration_Name = 203
+ Component_Configuration = 204
+ Configuration_Specification = 205
+ Default_Binding_Indication = 206
+ Default_Configuration_Declaration = 207
+ Expression = 208
+ Conditional_Expression = 209
+ Allocator_Designated_Type = 210
+ Selected_Waveform_Chain = 211
+ Conditional_Waveform_Chain = 212
+ Guard_Expression = 213
+ Guard_Decl = 214
+ Guard_Sensitivity_List = 215
+ Signal_Attribute_Chain = 216
+ Block_Block_Configuration = 217
+ Package_Header = 218
+ Block_Header = 219
+ Uninstantiated_Package_Name = 220
+ Uninstantiated_Package_Decl = 221
+ Instance_Source_File = 222
+ Generate_Block_Configuration = 223
+ Generate_Statement_Body = 224
+ Alternative_Label = 225
+ Generate_Else_Clause = 226
+ Condition = 227
+ Else_Clause = 228
+ Parameter_Specification = 229
+ Parent = 230
+ Loop_Label = 231
+ Component_Name = 232
+ Instantiation_List = 233
+ Entity_Aspect = 234
+ Default_Entity_Aspect = 235
+ Binding_Indication = 236
+ Named_Entity = 237
+ Alias_Declaration = 238
+ Referenced_Name = 239
+ Expr_Staticness = 240
+ Error_Origin = 241
+ Operand = 242
+ Left = 243
+ Right = 244
+ Unit_Name = 245
+ Name = 246
+ Group_Template_Name = 247
+ Name_Staticness = 248
+ Prefix = 249
+ Signature_Prefix = 250
+ External_Pathname = 251
+ Pathname_Suffix = 252
+ Pathname_Expression = 253
+ In_Formal_Flag = 254
+ Slice_Subtype = 255
+ Suffix = 256
+ Index_Subtype = 257
+ Parameter = 258
+ Attr_Chain = 259
+ Signal_Attribute_Declaration = 260
+ Actual_Type = 261
+ Actual_Type_Definition = 262
+ Association_Chain = 263
+ Individual_Association_Chain = 264
+ Subprogram_Association_Chain = 265
+ Aggregate_Info = 266
+ Sub_Aggregate_Info = 267
+ Aggr_Dynamic_Flag = 268
+ Aggr_Min_Length = 269
+ Aggr_Low_Limit = 270
+ Aggr_High_Limit = 271
+ Aggr_Others_Flag = 272
+ Aggr_Named_Flag = 273
+ Aggregate_Expand_Flag = 274
+ Association_Choices_Chain = 275
+ Case_Statement_Alternative_Chain = 276
+ Choice_Staticness = 277
+ Procedure_Call = 278
+ Implementation = 279
+ Parameter_Association_Chain = 280
+ Method_Object = 281
+ Subtype_Type_Mark = 282
+ Type_Conversion_Subtype = 283
+ Type_Mark = 284
+ File_Type_Mark = 285
+ Return_Type_Mark = 286
+ Has_Disconnect_Flag = 287
+ Has_Active_Flag = 288
+ Is_Within_Flag = 289
+ Type_Marks_List = 290
+ Implicit_Alias_Flag = 291
+ Alias_Signature = 292
+ Attribute_Signature = 293
+ Overload_List = 294
+ Simple_Name_Identifier = 295
+ Simple_Name_Subtype = 296
+ Protected_Type_Body = 297
+ Protected_Type_Declaration = 298
+ Use_Flag = 299
+ End_Has_Reserved_Id = 300
+ End_Has_Identifier = 301
+ End_Has_Postponed = 302
+ Has_Label = 303
+ Has_Begin = 304
+ Has_End = 305
+ Has_Is = 306
+ Has_Pure = 307
+ Has_Body = 308
+ Has_Parameter = 309
+ Has_Component = 310
+ Has_Identifier_List = 311
+ Has_Mode = 312
+ Has_Class = 313
+ Suspend_Flag = 314
+ Is_Ref = 315
+ Is_Forward_Ref = 316
+ Psl_Property = 317
+ Psl_Sequence = 318
+ Psl_Declaration = 319
+ Psl_Expression = 320
+ Psl_Boolean = 321
+ PSL_Clock = 322
+ PSL_NFA = 323
+ PSL_Nbr_States = 324
+ PSL_Clock_Sensitivity = 325
+ PSL_EOS_Flag = 326
Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean
@@ -557,6 +558,9 @@ Has_Has_Sign =\
Has_Has_Length =\
libghdl.vhdl__nodes_meta__has_has_length
+Has_Literal_Length =\
+ libghdl.vhdl__nodes_meta__has_literal_length
+
Has_Literal_Origin =\
libghdl.vhdl__nodes_meta__has_literal_origin