| author | al davis <ad211@freeelectron.net> | 2025年11月24日 22:11:20 -0500 |
|---|---|---|
| committer | al davis <ad211@freeelectron.net> | 2025年11月24日 22:11:20 -0500 |
| commit | e9dd530ece46eba083363e450f9b214ac6727afe (patch) | |
| tree | 97eacc0da08cd0455efc0ea13a7aa5a575f12620 | |
| parent | 2608950d6d19b8cd1ff21538d9b9e1774b416967 (diff) | |
| download | gnucap-c-share-1.tar.gz | |
| -rw-r--r-- | apps/lang_verilog.cc | 8 | ||||
| -rw-r--r-- | include/u_lang.h | 4 | ||||
| -rw-r--r-- | lib/u_lang.cc | 2 |
diff --git a/apps/lang_verilog.cc b/apps/lang_verilog.cc index 43fcdfb1..59ddb357 100644 --- a/apps/lang_verilog.cc +++ b/apps/lang_verilog.cc @@ -32,7 +32,7 @@ namespace { /*--------------------------------------------------------------------------*/ static int nest; -static const CARD* extended; +static bool extended; /*--------------------------------------------------------------------------*/ class LANG_VERILOG : public LANGUAGE { enum MODE {mDEFAULT, mPARAMSET} _mode; @@ -763,11 +763,11 @@ COMPONENT* LANG_VERILOG::parse_instance(CS& cmd, COMPONENT* x) if (cmd >> ',') { // there will be another just like this one - extended = x; + extended = true; }else{ cmd >> ';'; cmd.check(bWARNING, "what's this?"); - extended = nullptr; + extended = false; } return x; } @@ -776,7 +776,7 @@ std::string LANG_VERILOG::find_type_in_string(CS& cmd) { if (extended) { // another just like this one - return ","; + return ""; }else{ skip_attributes(cmd); size_t here = cmd.cursor(); diff --git a/include/u_lang.h b/include/u_lang.h index 20f7b10e..601a41db 100644 --- a/include/u_lang.h +++ b/include/u_lang.h @@ -34,9 +34,9 @@ class CARD_LIST; /*--------------------------------------------------------------------------*/ class INTERFACE LANGUAGE : public CKT_BASE { public: - const CARD* find_proto(const std::string&, const CARD*); + virtual const CARD* find_proto(const std::string&, const CARD*); public: - void new__instance(CS& cmd, BASE_SUBCKT* owner, CARD_LIST* Scope); + virtual void new__instance(CS& cmd, BASE_SUBCKT* owner, CARD_LIST* Scope); public: //BUG//need constructors diff --git a/lib/u_lang.cc b/lib/u_lang.cc index 915a1769..a6a54c13 100644 --- a/lib/u_lang.cc +++ b/lib/u_lang.cc @@ -47,7 +47,7 @@ const CARD* LANGUAGE::find_proto(const std::string& Name, const CARD* Scope) const CARD* p = nullptr; if (Scope) { // got here by new__instance try { - if (Name == ",") { + if (Name == "") { p = Scope->subckt()->back(); }else{ p = Scope->find_looking_out(Name); |