diff --git a/vhdlpp/architec_emit.cc b/vhdlpp/architec_emit.cc index b53f94acf..21d65b7f2 100644 --- a/vhdlpp/architec_emit.cc +++ b/vhdlpp/architec_emit.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * Copyright (c) 2011-2013 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -97,6 +97,11 @@ int Architecture::emit(ostream&out, Entity*entity) errors += emit_signals(out, entity, this); errors += emit_variables(out, entity, this); + for (map::const_iterator cur = cur_subprograms_.begin() + ; cur != cur_subprograms_.end() ; ++ cur) { + errors += cur->second->emit_package(out); + } + for (list::iterator cur = statements_.begin() ; cur != statements_.end() ; ++cur) { diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 873d21eaf..453344930 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -496,6 +496,10 @@ block_declarative_item | constant_declaration + | subprogram_declaration + + | subprogram_body + | type_declaration | use_clause_lib