diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 72e632fe8..4a2ca20bf 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -94,6 +94,7 @@ static map block_components; std::list*named_expr_list; entity_aspect_t* entity_aspect; instant_list_t* instantiation_list; + std::pair* component_specification; const VType* vtype; @@ -146,6 +147,7 @@ static map block_components; %type entity_aspect entity_aspect_opt binding_indication binding_indication_semicolon_opt %type instantiation_list +%type component_specification %type concurrent_statement component_instantiation_statement concurrent_signal_assignment_statement %type architecture_statement_part @@ -337,6 +339,10 @@ component_configuration binding_indication_semicolon_opt block_configuration_opt K_end K_for ';' + | K_for component_specification error K_end K_for + { + errormsg(@1, "Error in component configuration statement.\n"); + } ; component_instantiation_statement @@ -358,9 +364,11 @@ component_instantiation_statement ; component_specification - : instantiation_list ':' IDENTIFIER - { sorrymsg(@1, "Component specifications are not supported.\n"); - delete[] $3 + : instantiation_list ':' name + { + ExpName* name = dynamic_cast($3); + std::pair* tmp = new std::pair($1, name); + $$ = tmp; } ;