From 7b5470c8a7f91014155f68a85d01fe81daa6955c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 11:31:18 +0200 Subject: [PATCH 1/8] vhdlpp: Subprogram class inherits from ScopeBase. --- vhdlpp/architec_emit.cc | 1 + vhdlpp/debug.cc | 1 + vhdlpp/expression_emit.cc | 1 + vhdlpp/package.cc | 1 + vhdlpp/package_emit.cc | 1 + vhdlpp/scope.cc | 1 + vhdlpp/scope.h | 1 - vhdlpp/subprogram.h | 6 ++++-- 8 files changed, 10 insertions(+), 3 deletions(-) diff --git a/vhdlpp/architec_emit.cc b/vhdlpp/architec_emit.cc index 21d65b7f2..b6f47fc91 100644 --- a/vhdlpp/architec_emit.cc +++ b/vhdlpp/architec_emit.cc @@ -21,6 +21,7 @@ # include "entity.h" # include "expression.h" # include "sequential.h" +# include "subprogram.h" # include "vsignal.h" # include # include diff --git a/vhdlpp/debug.cc b/vhdlpp/debug.cc index f6152b94c..9a389d2ae 100644 --- a/vhdlpp/debug.cc +++ b/vhdlpp/debug.cc @@ -23,6 +23,7 @@ # include "architec.h" # include "expression.h" # include "parse_types.h" +# include "subprogram.h" # include "sequential.h" # include "vsignal.h" # include "vtype.h" diff --git a/vhdlpp/expression_emit.cc b/vhdlpp/expression_emit.cc index ac42aa94a..78f299b3a 100644 --- a/vhdlpp/expression_emit.cc +++ b/vhdlpp/expression_emit.cc @@ -22,6 +22,7 @@ # include "vtype.h" # include "architec.h" # include "package.h" +# include "subprogram.h" # include "parse_types.h" # include # include diff --git a/vhdlpp/package.cc b/vhdlpp/package.cc index 68c8acee1..e1a6c7de3 100644 --- a/vhdlpp/package.cc +++ b/vhdlpp/package.cc @@ -20,6 +20,7 @@ # include "package.h" # include "entity.h" +# include "subprogram.h" # include "parse_misc.h" # include "ivl_assert.h" diff --git a/vhdlpp/package_emit.cc b/vhdlpp/package_emit.cc index db302cbad..94a40c8c8 100644 --- a/vhdlpp/package_emit.cc +++ b/vhdlpp/package_emit.cc @@ -19,6 +19,7 @@ */ # include "package.h" +# include "subprogram.h" # include # include "ivl_assert.h" diff --git a/vhdlpp/scope.cc b/vhdlpp/scope.cc index b3fc8a5cc..e5d1dcd85 100644 --- a/vhdlpp/scope.cc +++ b/vhdlpp/scope.cc @@ -20,6 +20,7 @@ # include "scope.h" # include "package.h" +# include "subprogram.h" # include # include # include diff --git a/vhdlpp/scope.h b/vhdlpp/scope.h index ae2369b86..d0054dae4 100644 --- a/vhdlpp/scope.h +++ b/vhdlpp/scope.h @@ -26,7 +26,6 @@ # include "StringHeap.h" # include "entity.h" # include "expression.h" -# include "subprogram.h" # include "vsignal.h" class ActiveScope; diff --git a/vhdlpp/subprogram.h b/vhdlpp/subprogram.h index d48c94ac9..7af6c9e2f 100644 --- a/vhdlpp/subprogram.h +++ b/vhdlpp/subprogram.h @@ -22,15 +22,15 @@ # include "StringHeap.h" # include "LineInfo.h" +# include "scope.h" # include # include class InterfacePort; -class ScopeBase; class SequentialStmt; class VType; -class Subprogram : public LineInfo { +class Subprogram : public LineInfo, public ScopeBase { public: Subprogram(perm_string name, std::list*ports, @@ -48,6 +48,8 @@ class Subprogram : public LineInfo { // matches this subprogram and that subprogram. bool compare_specification(Subprogram*that) const; + int emit(ostream&out, Entity*ent, Architecture*arc); + // Emit a definition as it would show up in a package. int emit_package(std::ostream&fd) const; From 747e656a0e106cd0e5eb04648882bff8da04551a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 11:38:54 +0200 Subject: [PATCH 2/8] vhdlpp: Added ScopeBase::transfer_from() method. --- vhdlpp/scope.cc | 21 +++++++++++++++++++++ vhdlpp/scope.h | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/vhdlpp/scope.cc b/vhdlpp/scope.cc index e5d1dcd85..5182aee1a 100644 --- a/vhdlpp/scope.cc +++ b/vhdlpp/scope.cc @@ -203,6 +203,27 @@ void ScopeBase::do_use_from(const ScopeBase*that) } } +void ScopeBase::transfer_from(ScopeBase&ref) +{ + std::copy(ref.new_signals_.begin(), ref.new_signals_.end(), + insert_iterator >( + new_signals_, new_signals_.end()) + ); + ref.new_signals_.clear(); + + std::copy(ref.new_variables_.begin(), ref.new_variables_.end(), + insert_iterator >( + new_variables_, new_variables_.end()) + ); + ref.new_variables_.clear(); + + std::copy(ref.new_components_.begin(), ref.new_components_.end(), + insert_iterator >( + new_components_, new_components_.end()) + ); + ref.new_components_.clear(); +} + void ActiveScope::set_package_header(Package*pkg) { assert(package_header_ == 0); diff --git a/vhdlpp/scope.h b/vhdlpp/scope.h index d0054dae4..2b0fdc5b3 100644 --- a/vhdlpp/scope.h +++ b/vhdlpp/scope.h @@ -57,6 +57,9 @@ class ScopeBase { Signal* find_signal(perm_string by_name) const; Variable* find_variable(perm_string by_name) const; Subprogram* find_subprogram(perm_string by_name) const; + // Moves all signals, variables and components from another scope to + // this one. After the transfer new_* maps are emptied in the another scope. + void transfer_from(ScopeBase&ref); protected: void cleanup(); @@ -202,7 +205,7 @@ class ActiveScope : public ScopeBase { { map::iterator it; if((it = use_subprograms_.find(name)) != use_subprograms_.end() ) use_subprograms_.erase(it); - cur_subprograms_[name] = obj;; + cur_subprograms_[name] = obj; } void bind(Entity*ent) From e352bea476ebc3ae07d7c584be2092a09c52a3dc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 11:41:16 +0200 Subject: [PATCH 3/8] vhdlpp: Support for variable declarations in subprograms. Fixes sorrymsg: "variable_declaration not supported." --- vhdlpp/parse.y | 23 +++++++++++------------ vhdlpp/subprogram_emit.cc | 6 ++++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 906395f67..0c2314b84 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -1813,16 +1813,7 @@ procedure_call_statement ; process_declarative_item - : K_variable identifier_list ':' subtype_indication ';' - { /* Save the signal declaration in the block_signals map. */ - for (std::list::iterator cur = $2->begin() - ; cur != $2->end() ; ++cur) { - Variable*sig = new Variable(*cur, $4); - FILE_NAME(sig, @1); - active_scope->bind_name(*cur, sig); - } - delete $2; - } + : variable_declaration ; process_declarative_part @@ -2186,6 +2177,7 @@ subprogram_body /* IEEE 1076-2008 P4.3 */ } else if (tmp) { errormsg(@1, "Subprogram specification for %s doesn't match specification in package header.\n", prog->name().str()); } + prog->transfer_from(*active_scope); prog->set_program_body($5); active_scope->bind_name(prog->name(), prog); } @@ -2410,8 +2402,15 @@ variable_assignment_statement /* IEEE 1076-2008 P10.6.1 */ variable_declaration /* IEEE 1076-2008 P6.4.2.4 */ : K_shared_opt K_variable identifier_list ':' subtype_indication ';' - { sorrymsg(@2, "variable_declaration not supported.\n"); } - + { /* Save the signal declaration in the block_signals map. */ + for (std::list::iterator cur = $3->begin() + ; cur != $3->end() ; ++cur) { + Variable*sig = new Variable(*cur, $5); + FILE_NAME(sig, @2); + active_scope->bind_name(*cur, sig); + } + delete $3; + } | K_shared_opt K_variable error ';' { errormsg(@2, "Syntax error in variable declaration.\n"); yyerrok; diff --git a/vhdlpp/subprogram_emit.cc b/vhdlpp/subprogram_emit.cc index 402b0a4cd..70a97baba 100644 --- a/vhdlpp/subprogram_emit.cc +++ b/vhdlpp/subprogram_emit.cc @@ -60,6 +60,12 @@ int Subprogram::emit_package(ostream&fd) const fd << ");" << endl; + for (map::const_iterator cur = new_variables_.begin() + ; cur != new_variables_.end() ; ++cur) { + + errors += cur->second->emit(fd, NULL, NULL); + } + if (statements_) { for (list::const_iterator cur = statements_->begin() ; cur != statements_->end() ; ++cur) { From 675b7d8efabc2275924c029462f56c01ce3797cc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 16:04:43 +0200 Subject: [PATCH 4/8] vhdlpp: Support for std_logic_vector return type in functions. VHDL does not allow to specify the size of returned std_logic_vector, whereas Verilog requires the size to be known in advance. The size of the vector is determined by checking the type of expression used in the return statement. --- vhdlpp/sequential.h | 2 ++ vhdlpp/subprogram.cc | 28 ++++++++++++++++++++++++++++ vhdlpp/subprogram.h | 4 ++++ 3 files changed, 34 insertions(+) diff --git a/vhdlpp/sequential.h b/vhdlpp/sequential.h index 9aff1aaa9..9271e4ed3 100644 --- a/vhdlpp/sequential.h +++ b/vhdlpp/sequential.h @@ -120,6 +120,8 @@ class ReturnStmt : public SequentialStmt { int emit(ostream&out, Entity*entity, Architecture*arc); void dump(ostream&out, int indent) const; + const Expression*peek_expr() const { return val_; }; + private: Expression*val_; }; diff --git a/vhdlpp/subprogram.cc b/vhdlpp/subprogram.cc index 47641550c..8f071fd25 100644 --- a/vhdlpp/subprogram.cc +++ b/vhdlpp/subprogram.cc @@ -21,6 +21,7 @@ # include "subprogram.h" # include "entity.h" # include "vtype.h" +# include "sequential.h" # include "ivl_assert.h" using namespace std; @@ -45,6 +46,7 @@ void Subprogram::set_program_body(list*stmt) { ivl_assert(*this, statements_==0); statements_ = stmt; + fix_return_type(); } bool Subprogram::compare_specification(Subprogram*that) const @@ -78,6 +80,32 @@ bool Subprogram::compare_specification(Subprogram*that) const return true; } +void Subprogram::fix_return_type(void) +{ + if(!statements_) + return; + + const ReturnStmt*ret = NULL; + const VType*t = NULL; + + for (std::list::const_iterator s = statements_->begin() + ; s != statements_->end(); ++s) { + if((ret = dynamic_cast(*s))) { + const Expression*expr = ret->peek_expr(); + + if(const ExpName*n = dynamic_cast(expr)) { + if(Variable*v = find_variable(n->peek_name())) + t = v->peek_type(); + } else { + t = expr->peek_type(); + } + + if(t) + return_type_ = t; + } + } +} + void Subprogram::write_to_stream(ostream&fd) const { fd << " function " << name_ << "("; diff --git a/vhdlpp/subprogram.h b/vhdlpp/subprogram.h index 7af6c9e2f..68d924d00 100644 --- a/vhdlpp/subprogram.h +++ b/vhdlpp/subprogram.h @@ -57,6 +57,10 @@ class Subprogram : public LineInfo, public ScopeBase { void dump(std::ostream&fd) const; private: + // Determines appropriate return type. Un case of std_logic_vector + // VHDL requires skipping its size in contrary to Verilog + void fix_return_type(void); + perm_string name_; const ScopeBase*parent_; std::list*ports_; From 9e856810b9817167ad2e9816432a7560de35e0fc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Sep 2014 16:05:26 +0200 Subject: [PATCH 5/8] vhdlpp: Workaround to avoid translation of variables to wires in functions. --- vhdlpp/subprogram_emit.cc | 3 ++- vhdlpp/vtype.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vhdlpp/subprogram_emit.cc b/vhdlpp/subprogram_emit.cc index 70a97baba..f3a2a428e 100644 --- a/vhdlpp/subprogram_emit.cc +++ b/vhdlpp/subprogram_emit.cc @@ -62,7 +62,8 @@ int Subprogram::emit_package(ostream&fd) const for (map::const_iterator cur = new_variables_.begin() ; cur != new_variables_.end() ; ++cur) { - + // Workaround to enable reg_flag for variables + cur->second->count_ref_sequ(); errors += cur->second->emit(fd, NULL, NULL); } diff --git a/vhdlpp/vtype.h b/vhdlpp/vtype.h index 247af6b51..2ccb999fb 100644 --- a/vhdlpp/vtype.h +++ b/vhdlpp/vtype.h @@ -86,7 +86,7 @@ class VType { virtual bool can_be_packed() const { return false; } private: - friend class decl_t; + friend struct decl_t; // This virtual method is called to emit the declaration. This // is used by the decl_t object to emit variable/wire/port declarations. virtual int emit_decl(std::ostream&out, perm_string name, bool reg_flag) const; From 99515212120e7c7accd615d9550a06ec4416c41c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Sep 2014 11:24:43 +0200 Subject: [PATCH 6/8] vhdlpp: Subprogram parameters are taken into account when distinguishing between function calls and vector elements. --- vhdlpp/parse.y | 14 ++++++++++++-- vhdlpp/subprogram.cc | 14 ++++++++++++++ vhdlpp/subprogram.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 0c2314b84..26bfb0c86 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -83,6 +83,7 @@ extern int yylex(union YYSTYPE*yylvalp,YYLTYPE*yyllocp,yyscan_t yyscanner); */ static ActiveScope*active_scope = new ActiveScope; static stack scope_stack; +static Subprogram*active_sub = NULL; /* * When a scope boundary starts, call the push_scope function to push @@ -106,6 +107,13 @@ static void pop_scope(void) scope_stack.pop(); } +static bool is_subprogram_param(perm_string name) +{ + if(!active_sub) + return false; + + return (active_sub->find_param(name) != NULL); +} void preload_global_types(void) { @@ -1543,7 +1551,7 @@ name /* IEEE 1076-2008 P8.1 */ | IDENTIFIER '(' expression_list ')' { perm_string name = lex_strings.make($1); delete[]$1; - if (active_scope->is_vector_name(name)) { + if (active_scope->is_vector_name(name) || is_subprogram_param(name)) { ExpName*tmp = new ExpName(name, $3); $$ = tmp; } else { @@ -2166,6 +2174,7 @@ signal_assignment_statement subprogram_body /* IEEE 1076-2008 P4.3 */ : subprogram_specification K_is + { active_sub = $1; } subprogram_declarative_part K_begin subprogram_statement_part K_end subprogram_kind_opt identifier_opt ';' @@ -2178,8 +2187,9 @@ subprogram_body /* IEEE 1076-2008 P4.3 */ errormsg(@1, "Subprogram specification for %s doesn't match specification in package header.\n", prog->name().str()); } prog->transfer_from(*active_scope); - prog->set_program_body($5); + prog->set_program_body($6); active_scope->bind_name(prog->name(), prog); + active_sub = NULL; } | subprogram_specification K_is diff --git a/vhdlpp/subprogram.cc b/vhdlpp/subprogram.cc index 8f071fd25..0e3f22ab6 100644 --- a/vhdlpp/subprogram.cc +++ b/vhdlpp/subprogram.cc @@ -80,6 +80,20 @@ bool Subprogram::compare_specification(Subprogram*that) const return true; } +InterfacePort*Subprogram::find_param(perm_string nam) +{ + if(!ports_) + return NULL; + + for (std::list::const_iterator it = ports_->begin() + ; it != ports_->end(); ++it) { + if((*it)->name == nam) + return *it; + } + + return NULL; +} + void Subprogram::fix_return_type(void) { if(!statements_) diff --git a/vhdlpp/subprogram.h b/vhdlpp/subprogram.h index 68d924d00..68f62f8c3 100644 --- a/vhdlpp/subprogram.h +++ b/vhdlpp/subprogram.h @@ -48,6 +48,8 @@ class Subprogram : public LineInfo, public ScopeBase { // matches this subprogram and that subprogram. bool compare_specification(Subprogram*that) const; + InterfacePort*find_param(perm_string nam); + int emit(ostream&out, Entity*ent, Architecture*arc); // Emit a definition as it would show up in a package. From 194a950f8dc39febc0f082213dfa003a186d1887 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Sep 2014 14:46:02 +0200 Subject: [PATCH 7/8] vhdlpp: Elaboration of ExpFunc parameters fallbacks to the types given in the Subprogram header. --- vhdlpp/expression_elaborate.cc | 3 +++ vhdlpp/subprogram.cc | 13 ++++++++++++- vhdlpp/subprogram.h | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/vhdlpp/expression_elaborate.cc b/vhdlpp/expression_elaborate.cc index 1987be699..481a26597 100644 --- a/vhdlpp/expression_elaborate.cc +++ b/vhdlpp/expression_elaborate.cc @@ -23,6 +23,7 @@ # include "architec.h" # include "entity.h" # include "vsignal.h" +# include "subprogram.h" # include # include # include "parse_types.h" @@ -715,6 +716,8 @@ int ExpFunc::elaborate_expr(Entity*ent, Architecture*arc, const VType*) for (size_t idx = 0 ; idx < argv_.size() ; idx += 1) { const VType*tmp = argv_[idx]->probe_type(ent, arc); + if(!tmp && prog) + tmp = prog->peek_param_type(idx); errors += argv_[idx]->elaborate_expr(ent, arc, tmp); } diff --git a/vhdlpp/subprogram.cc b/vhdlpp/subprogram.cc index 0e3f22ab6..67b5c8cab 100644 --- a/vhdlpp/subprogram.cc +++ b/vhdlpp/subprogram.cc @@ -80,7 +80,7 @@ bool Subprogram::compare_specification(Subprogram*that) const return true; } -InterfacePort*Subprogram::find_param(perm_string nam) +const InterfacePort*Subprogram::find_param(perm_string nam) const { if(!ports_) return NULL; @@ -94,6 +94,17 @@ InterfacePort*Subprogram::find_param(perm_string nam) return NULL; } +const VType*Subprogram::peek_param_type(int idx) const +{ + if(!ports_ || idx >= ports_->size()) + return NULL; + + std::list::const_iterator p = ports_->begin(); + std::advance(p, idx); + + return (*p)->type; +} + void Subprogram::fix_return_type(void) { if(!statements_) diff --git a/vhdlpp/subprogram.h b/vhdlpp/subprogram.h index 68f62f8c3..5b38f1223 100644 --- a/vhdlpp/subprogram.h +++ b/vhdlpp/subprogram.h @@ -48,7 +48,8 @@ class Subprogram : public LineInfo, public ScopeBase { // matches this subprogram and that subprogram. bool compare_specification(Subprogram*that) const; - InterfacePort*find_param(perm_string nam); + const InterfacePort*find_param(perm_string nam) const; + const VType*peek_param_type(int idx) const; int emit(ostream&out, Entity*ent, Architecture*arc); From fde6525acb81844b6a6b9b09e0d4fc10b13568ce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 1 Oct 2014 14:56:32 +0200 Subject: [PATCH 8/8] vhdlpp: Libraries are searched for subprograms during the ExpFunc elaboration. --- vhdlpp/compiler.h | 4 ---- vhdlpp/expression_elaborate.cc | 4 ++++ vhdlpp/library.cc | 20 +++++++++++++++++++- vhdlpp/library.h | 32 ++++++++++++++++++++++++++++++++ vhdlpp/main.cc | 1 + 5 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 vhdlpp/library.h diff --git a/vhdlpp/compiler.h b/vhdlpp/compiler.h index a2ba77083..3cd1b820a 100644 --- a/vhdlpp/compiler.h +++ b/vhdlpp/compiler.h @@ -34,8 +34,4 @@ extern StringHeapLex lex_strings; extern StringHeapLex filename_strings; -extern void library_set_work_path(const char*work_path); -extern void library_add_directory(const char*directory); -extern int emit_packages(void); - #endif /* IVL_compiler_H */ diff --git a/vhdlpp/expression_elaborate.cc b/vhdlpp/expression_elaborate.cc index 481a26597..917a6c28a 100644 --- a/vhdlpp/expression_elaborate.cc +++ b/vhdlpp/expression_elaborate.cc @@ -24,6 +24,7 @@ # include "entity.h" # include "vsignal.h" # include "subprogram.h" +# include "library.h" # include # include # include "parse_types.h" @@ -711,6 +712,9 @@ int ExpFunc::elaborate_expr(Entity*ent, Architecture*arc, const VType*) ivl_assert(*this, arc); Subprogram*prog = arc->find_subprogram(name_); + if(!prog) + prog = library_find_subprogram(name_); + ivl_assert(*this, def_==0); def_ = prog; diff --git a/vhdlpp/library.cc b/vhdlpp/library.cc index 214d42162..f86c590e9 100644 --- a/vhdlpp/library.cc +++ b/vhdlpp/library.cc @@ -69,7 +69,25 @@ void library_add_directory(const char*directory) return; } - library_search_path .push_front(directory); + library_search_path.push_front(directory); +} + +Subprogram*library_find_subprogram(perm_string name) +{ + Subprogram*subp = NULL; + map::const_iterator lib_it; + + for(lib_it = libraries.begin(); lib_it != libraries.end(); ++lib_it) { + const struct library_contents&lib = lib_it->second; + map::const_iterator pack_it; + + for(pack_it = lib.packages.begin(); pack_it != lib.packages.end(); ++pack_it) { + if((subp = pack_it->second->find_subprogram(name))) + return subp; + } + } + + return NULL; } static void store_package_in_work(const Package*pack); diff --git a/vhdlpp/library.h b/vhdlpp/library.h new file mode 100644 index 000000000..ab6464f45 --- /dev/null +++ b/vhdlpp/library.h @@ -0,0 +1,32 @@ +#ifndef IVL_library_H +#define IVL_library_H +/* + * Copyright (c) 2011-2014 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 + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +class Subprogram; + +extern void library_set_work_path(const char*work_path); +extern void library_add_directory(const char*directory); + +extern Subprogram*library_find_subprogram(perm_string name); + +extern int emit_packages(void); + +#endif /* IVL_library_H */ + diff --git a/vhdlpp/main.cc b/vhdlpp/main.cc index f0351dcd9..b142d3845 100644 --- a/vhdlpp/main.cc +++ b/vhdlpp/main.cc @@ -75,6 +75,7 @@ const char NOTICE[] = ; # include "compiler.h" +# include "library.h" # include "parse_api.h" # include "vtype.h" # include