Fix emit of struct ports/declarations.

This commit is contained in:
Stephen Williams 2012-04-15 09:57:42 -07:00
parent c7366e65cd
commit 7e202bb5ca
3 changed files with 11 additions and 6 deletions

View File

@ -3899,6 +3899,11 @@ module_port_list_opt
: '(' list_of_ports ')' { $$ = $2; } : '(' list_of_ports ')' { $$ = $2; }
| '(' list_of_port_declarations ')' { $$ = $2; } | '(' list_of_port_declarations ')' { $$ = $2; }
| { $$ = 0; } | { $$ = 0; }
| '(' error ')'
{ yyerror(@2, "Errors in port declarations.");
yyerrok;
$$ = 0;
}
; ;
/* Module declarations include optional ANSI style module parameter /* Module declarations include optional ANSI style module parameter

View File

@ -67,7 +67,7 @@ int Entity::emit(ostream&out)
VType::decl_t&decl = declarations_[port->name]; VType::decl_t&decl = declarations_[port->name];
if (sep) out << sep; if (sep) out << sep << endl;
else sep = ", "; else sep = ", ";
switch (port->mode) { switch (port->mode) {

View File

@ -172,7 +172,7 @@ int VTypeRecord::emit_def(ostream&out, perm_string name) const
out << "; "; out << "; ";
} }
out << "} "; out << "} \\" << name << " ";
return errors; return errors;
} }