gnucap.git - Gnu Circuit Analysis Package

index : gnucap.git
Gnu Circuit Analysis Package
summary refs log tree commit diff
diff options
context:
space:
mode:
authoral davis <ad211@freeelectron.net>2025年11月24日 22:11:20 -0500
committeral davis <ad211@freeelectron.net>2025年11月24日 22:11:20 -0500
commite9dd530ece46eba083363e450f9b214ac6727afe (patch)
tree97eacc0da08cd0455efc0ea13a7aa5a575f12620
parent2608950d6d19b8cd1ff21538d9b9e1774b416967 (diff)
downloadgnucap-c-share-1.tar.gz
c-share-1: new__instance and find_proto are virtual, extended flag is boolc-share-1
Diffstat
-rw-r--r--apps/lang_verilog.cc 8
-rw-r--r--include/u_lang.h 4
-rw-r--r--lib/u_lang.cc 2
3 files changed, 7 insertions, 7 deletions
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);
generated by cgit v1.2.3 (git 2.25.1) at 2025年11月26日 01:49:30 +0000

AltStyle によって変換されたページ (->オリジナル) /