Some vhdl parser error handling.

This commit is contained in:
Stephen Williams 2012-04-05 20:20:34 -07:00
parent 021d944a30
commit a5458828cd
1 changed files with 15 additions and 0 deletions

View File

@ -864,6 +864,16 @@ constant_declaration
}
delete $2;
}
| K_constant identifier_list ':' error ';'
{ errormsg(@4, "Syntax error in constant declaration type.\n");
yyerrok;
delete $2;
}
| K_constant error ';'
{ errormsg(@2, "Syntax error in constant declaration.\n");
yyerrok;
}
;
context_clause : context_items | ;
@ -1595,6 +1605,7 @@ package_body_declarative_part_opt
package_declarative_item
: component_declaration
| constant_declaration
| type_declaration
| subtype_declaration
| type_declaration
| use_clause
@ -2139,6 +2150,10 @@ type_declaration
yyerrok;
delete[]$2;
}
| K_type error ';'
{ errormsg(@1, "Error in type definition\n");
yyerrok;
}
;
type_definition