mirror of
https://github.com/verilator/verilator.git
synced 2025-04-25 10:06:54 +00:00
Remove ; from end of some function definitions. No functional change
This commit is contained in:
parent
15b3c9797b
commit
c44febe85e
94
src/V3Ast.h
94
src/V3Ast.h
@ -41,10 +41,10 @@ public:
|
||||
// enum en {...};
|
||||
// const char* ascii() const {...};
|
||||
enum en m_e;
|
||||
inline AstType () {};
|
||||
inline AstType (en _e) : m_e(_e) {};
|
||||
explicit inline AstType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstType () {}
|
||||
inline AstType (en _e) : m_e(_e) {}
|
||||
explicit inline AstType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (AstType lhs, AstType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstType lhs, AstType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -64,10 +64,10 @@ public:
|
||||
PUBLIC_TASK
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstPragmaType () {};
|
||||
inline AstPragmaType (en _e) : m_e(_e) {};
|
||||
explicit inline AstPragmaType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstPragmaType () {}
|
||||
inline AstPragmaType (en _e) : m_e(_e) {}
|
||||
explicit inline AstPragmaType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (AstPragmaType lhs, AstPragmaType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstPragmaType lhs, AstPragmaType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -87,10 +87,10 @@ public:
|
||||
TRACE_CHANGE_SUB
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstCFuncType () {};
|
||||
inline AstCFuncType (en _e) : m_e(_e) {};
|
||||
explicit inline AstCFuncType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstCFuncType () {}
|
||||
inline AstCFuncType (en _e) : m_e(_e) {}
|
||||
explicit inline AstCFuncType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
// METHODS
|
||||
bool isTrace() const { return (m_e==TRACE_INIT || m_e==TRACE_INIT_SUB
|
||||
|| m_e==TRACE_FULL || m_e==TRACE_FULL_SUB
|
||||
@ -155,10 +155,10 @@ public:
|
||||
};
|
||||
return names[m_e];
|
||||
};
|
||||
inline AstEdgeType () {};
|
||||
inline AstEdgeType (en _e) : m_e(_e) {};
|
||||
explicit inline AstEdgeType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstEdgeType () {}
|
||||
inline AstEdgeType (en _e) : m_e(_e) {}
|
||||
explicit inline AstEdgeType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (AstEdgeType lhs, AstEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstEdgeType lhs, AstEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -188,10 +188,10 @@ public:
|
||||
};
|
||||
return names[m_e];
|
||||
};
|
||||
inline AstAttrType () {};
|
||||
inline AstAttrType (en _e) : m_e(_e) {};
|
||||
explicit inline AstAttrType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstAttrType () {}
|
||||
inline AstAttrType (en _e) : m_e(_e) {}
|
||||
explicit inline AstAttrType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (AstAttrType lhs, AstAttrType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstAttrType lhs, AstAttrType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -223,17 +223,17 @@ public:
|
||||
XTEMP
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstVarType () {};
|
||||
inline AstVarType (en _e) : m_e(_e) {};
|
||||
explicit inline AstVarType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstVarType () {}
|
||||
inline AstVarType (en _e) : m_e(_e) {}
|
||||
explicit inline AstVarType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
const char* ascii() const {
|
||||
static const char* names[] = {
|
||||
"?","GPARAM","LPARAM","GENVAR",
|
||||
"INTEGER","INPUT","OUTPUT","INOUT",
|
||||
"SUPPLY0","SUPPLY1","WIRE","IMPLICIT","REG","TRIWIRE","PORT",
|
||||
"BLOCKTEMP","MODULETEMP","STMTTEMP","XTEMP"};
|
||||
return names[m_e];};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator== (AstVarType lhs, AstVarType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstVarType lhs, AstVarType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -252,10 +252,10 @@ public:
|
||||
};
|
||||
enum en m_e;
|
||||
// CONSTRUCTOR - note defaults to *UNKNOWN*
|
||||
inline AstBranchPred () : m_e(UNKNOWN) {};
|
||||
inline AstBranchPred (en _e) : m_e(_e) {};
|
||||
explicit inline AstBranchPred (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstBranchPred () : m_e(UNKNOWN) {}
|
||||
inline AstBranchPred (en _e) : m_e(_e) {}
|
||||
explicit inline AstBranchPred (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
AstBranchPred invert() const {
|
||||
if (m_e==UNLIKELY) return LIKELY;
|
||||
else if (m_e==LIKELY) return UNLIKELY;
|
||||
@ -264,7 +264,7 @@ public:
|
||||
const char* ascii() const {
|
||||
static const char* names[] = {
|
||||
"","VL_LIKELY","VL_UNLIKELY"};
|
||||
return names[m_e];};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator== (AstBranchPred lhs, AstBranchPred rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstBranchPred lhs, AstBranchPred::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -281,10 +281,10 @@ public:
|
||||
CASEZ
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstCaseType () {};
|
||||
inline AstCaseType (en _e) : m_e(_e) {};
|
||||
explicit inline AstCaseType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstCaseType () {}
|
||||
inline AstCaseType (en _e) : m_e(_e) {}
|
||||
explicit inline AstCaseType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (AstCaseType lhs, AstCaseType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstCaseType lhs, AstCaseType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -303,16 +303,16 @@ public:
|
||||
FATAL
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstDisplayType () {};
|
||||
inline AstDisplayType (en _e) : m_e(_e) {};
|
||||
explicit inline AstDisplayType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstDisplayType () {}
|
||||
inline AstDisplayType (en _e) : m_e(_e) {}
|
||||
explicit inline AstDisplayType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
bool addNewline() const { return m_e!=WRITE; }
|
||||
bool needScopeTracking() const { return m_e!=DISPLAY && m_e!=WRITE; }
|
||||
const char* ascii() const {
|
||||
static const char* names[] = {
|
||||
"display","write","info","error","warning","fatal"};
|
||||
return names[m_e];};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator== (AstDisplayType lhs, AstDisplayType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstDisplayType lhs, AstDisplayType::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -331,14 +331,14 @@ public:
|
||||
_ENUM_END
|
||||
};
|
||||
enum en m_e;
|
||||
inline AstParseRefExp() : m_e(NONE) {};
|
||||
inline AstParseRefExp (en _e) : m_e(_e) {};
|
||||
explicit inline AstParseRefExp (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline AstParseRefExp() : m_e(NONE) {}
|
||||
inline AstParseRefExp (en _e) : m_e(_e) {}
|
||||
explicit inline AstParseRefExp (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
const char* ascii() const {
|
||||
static const char* names[] = {
|
||||
"","VAR_MEM","VAR_ANY","TASK","FUNC"};
|
||||
return names[m_e];};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator== (AstParseRefExp lhs, AstParseRefExp rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (AstParseRefExp lhs, AstParseRefExp::en rhs) { return (lhs.m_e == rhs); }
|
||||
@ -520,9 +520,9 @@ public:
|
||||
uint32_t depth() const { return (m_both >> 24) & 255; }
|
||||
uint32_t hshval() const { return m_both & M24; }
|
||||
// OPERATORS
|
||||
inline bool operator== (const V3Hash& rh) const { return m_both==rh.m_both; };
|
||||
inline bool operator!= (const V3Hash& rh) const { return m_both!=rh.m_both; };
|
||||
inline bool operator< (const V3Hash& rh) const { return m_both<rh.m_both; };
|
||||
inline bool operator== (const V3Hash& rh) const { return m_both==rh.m_both; }
|
||||
inline bool operator!= (const V3Hash& rh) const { return m_both!=rh.m_both; }
|
||||
inline bool operator< (const V3Hash& rh) const { return m_both<rh.m_both; }
|
||||
// CREATORS
|
||||
class Illegal {}; // for creator type-overload selection
|
||||
class FullValue {}; // for creator type-overload selection
|
||||
|
@ -935,7 +935,7 @@ struct AstAssign : public AstNodeAssign {
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(Assign, ASSIGN)
|
||||
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssign(this->fileline(), lhsp, rhsp); }
|
||||
virtual string verilogKwd() const { return "="; };
|
||||
virtual string verilogKwd() const { return "="; }
|
||||
};
|
||||
|
||||
struct AstAssignAlias : public AstNodeAssign {
|
||||
@ -954,7 +954,7 @@ struct AstAssignDly : public AstNodeAssign {
|
||||
ASTNODE_NODE_FUNCS(AssignDly, ASSIGNDLY)
|
||||
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssignDly(this->fileline(), lhsp, rhsp); }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual string verilogKwd() const { return "<="; };
|
||||
virtual string verilogKwd() const { return "<="; }
|
||||
};
|
||||
|
||||
struct AstAssignW : public AstNodeAssign {
|
||||
@ -1242,7 +1242,7 @@ struct AstFClose : public AstNodeStmt {
|
||||
setNOp2p(filep);
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(FClose, FCLOSE)
|
||||
virtual string verilogKwd() const { return "$fclose"; };
|
||||
virtual string verilogKwd() const { return "$fclose"; }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
virtual bool isSplittable() const { return false; }
|
||||
@ -1262,7 +1262,7 @@ struct AstFOpen : public AstNodeStmt {
|
||||
setOp3p(modep);
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(FOpen, FOPEN)
|
||||
virtual string verilogKwd() const { return "$fclose"; };
|
||||
virtual string verilogKwd() const { return "$fclose"; }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
virtual bool isSplittable() const { return false; }
|
||||
@ -1283,7 +1283,7 @@ struct AstFFlush : public AstNodeStmt {
|
||||
setNOp2p(filep);
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(FFlush, FFLUSH)
|
||||
virtual string verilogKwd() const { return "$fflush"; };
|
||||
virtual string verilogKwd() const { return "$fflush"; }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
virtual bool isSplittable() const { return false; }
|
||||
@ -1371,7 +1371,7 @@ public:
|
||||
setOp1p(filenamep); setOp2p(memp); setNOp3p(lsbp); setNOp4p(msbp);
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(ReadMem, READMEM)
|
||||
virtual string verilogKwd() const { return (isHex()?"$readmemh":"$readmemb"); };
|
||||
virtual string verilogKwd() const { return (isHex()?"$readmemh":"$readmemb"); }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
virtual bool isSplittable() const { return false; }
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
V3OutCFile(const string& filename) : V3OutFile(filename) {
|
||||
resetPrivate();
|
||||
}
|
||||
virtual ~V3OutCFile() {};
|
||||
virtual ~V3OutCFile() {}
|
||||
virtual void putsCellDecl(const string& classname, const string& cellname) {
|
||||
this->printf("%-19s\t%s;\n",
|
||||
(classname + "*").c_str(),cellname.c_str());
|
||||
@ -66,7 +66,7 @@ public:
|
||||
class V3OutScFile : public V3OutCFile {
|
||||
public:
|
||||
V3OutScFile(const string& filename) : V3OutCFile(filename) {}
|
||||
virtual ~V3OutScFile() {};
|
||||
virtual ~V3OutScFile() {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); }
|
||||
virtual void putsIntTopInclude() {
|
||||
puts("#include \"systemc.h\"\n");
|
||||
@ -77,7 +77,7 @@ public:
|
||||
class V3OutSpFile : public V3OutCFile {
|
||||
public:
|
||||
V3OutSpFile(const string& filename) : V3OutCFile(filename) {}
|
||||
virtual ~V3OutSpFile() {};
|
||||
virtual ~V3OutSpFile() {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); }
|
||||
virtual void putsIntTopInclude() {
|
||||
puts("#include \"systemperl.h\"\n");
|
||||
@ -88,14 +88,14 @@ public:
|
||||
class V3OutVFile : public V3OutFile {
|
||||
public:
|
||||
V3OutVFile(const string& filename) : V3OutFile(filename) {}
|
||||
virtual ~V3OutVFile() {};
|
||||
virtual ~V3OutVFile() {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
|
||||
};
|
||||
|
||||
class V3OutMkFile : public V3OutFile {
|
||||
public:
|
||||
V3OutMkFile(const string& filename) : V3OutFile(filename) {}
|
||||
virtual ~V3OutMkFile() {};
|
||||
virtual ~V3OutMkFile() {}
|
||||
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
|
||||
// No automatic indentation yet.
|
||||
void puts(const char* strg) { putsNoTracking(strg); }
|
||||
@ -110,7 +110,7 @@ public:
|
||||
// STATE
|
||||
V3OutCFile* m_ofp;
|
||||
// METHODS
|
||||
V3OutCFile* ofp() const { return m_ofp; };
|
||||
V3OutCFile* ofp() const { return m_ofp; }
|
||||
void puts(const string& str) { ofp()->puts(str); }
|
||||
void putbs(const string& str) { ofp()->putbs(str); }
|
||||
void putsQuoted(const string& str) { ofp()->putsQuoted(str); }
|
||||
|
@ -461,7 +461,7 @@ class EmitVFileVisitor : public EmitVBaseVisitor {
|
||||
// MEMBERS
|
||||
V3OutFile* m_ofp;
|
||||
// METHODS
|
||||
V3OutFile* ofp() const { return m_ofp; };
|
||||
V3OutFile* ofp() const { return m_ofp; }
|
||||
void puts(const string& str) { ofp()->puts(str); }
|
||||
void putbs(const string& str) { ofp()->putbs(str); }
|
||||
void putsNoTracking(const string& str) { ofp()->putsNoTracking(str); }
|
||||
|
@ -46,7 +46,7 @@ bool V3Error::s_describedWarnings = false;
|
||||
bool V3Error::s_pretendError[V3ErrorCode::MAX];
|
||||
|
||||
struct v3errorIniter {
|
||||
v3errorIniter() { V3Error::init(); };
|
||||
v3errorIniter() { V3Error::init(); }
|
||||
};
|
||||
v3errorIniter v3errorInit;
|
||||
|
||||
@ -358,7 +358,7 @@ void V3Error::v3errorEnd (ostringstream& sstr) {
|
||||
// If first warning is not the user's fault (internal/unsupported) then give the website
|
||||
// Not later warnings, as a internal may be caused by an earlier problem
|
||||
if (s_tellManual == 0) {
|
||||
if (s_errorCode==V3ErrorCode::FATALSRC
|
||||
if (s_errorCode.mentionManual()
|
||||
|| sstr.str().find("Unsupported") != string::npos) {
|
||||
s_tellManual = 1;
|
||||
} else {
|
||||
|
@ -77,11 +77,11 @@ public:
|
||||
// ***Add new elements below also***
|
||||
};
|
||||
enum en m_e;
|
||||
inline V3ErrorCode () {};
|
||||
inline V3ErrorCode (en _e) : m_e(_e) {};
|
||||
inline V3ErrorCode () {}
|
||||
inline V3ErrorCode (en _e) : m_e(_e) {}
|
||||
V3ErrorCode (const char* msgp); // Matching code or ERROR
|
||||
explicit inline V3ErrorCode (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
explicit inline V3ErrorCode (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
const char* ascii() const {
|
||||
const char* names[] = {
|
||||
// Leading spaces indicate it can't be disabled.
|
||||
@ -101,14 +101,17 @@ public:
|
||||
" MAX"
|
||||
};
|
||||
return names[m_e];
|
||||
};
|
||||
}
|
||||
// Warnings that default to off
|
||||
bool defaultsOff() const { return ( m_e==IMPERFECTSCH );};
|
||||
bool defaultsOff() const { return ( m_e==IMPERFECTSCH ); }
|
||||
// Warnings that warn about nasty side effects
|
||||
bool dangerous() const { return ( m_e==COMBDLY );};
|
||||
bool dangerous() const { return ( m_e==COMBDLY ); }
|
||||
// Warnings we'll present to the user as errors
|
||||
// Later -Werror- options may make more of these.
|
||||
bool pretendError() const { return ( m_e==BLKANDNBLK || m_e==IMPURE); };
|
||||
bool pretendError() const { return ( m_e==BLKANDNBLK || m_e==IMPURE ); }
|
||||
// Warnings to mention manual
|
||||
bool mentionManual() const { return ( m_e==FATALSRC || pretendError() ); }
|
||||
|
||||
// Warnings that are lint only
|
||||
bool lintError() const { return ( m_e==CASEINCOMPLETE || m_e==CASEOVERLAP
|
||||
|| m_e==CASEWITHX || m_e==CASEX
|
||||
@ -116,7 +119,7 @@ public:
|
||||
|| m_e==IMPLICIT
|
||||
|| m_e==UNDRIVEN || m_e==UNSIGNED
|
||||
|| m_e==UNUSED || m_e==VARHIDDEN
|
||||
|| m_e==WIDTH); };
|
||||
|| m_e==WIDTH); }
|
||||
};
|
||||
inline bool operator== (V3ErrorCode lhs, V3ErrorCode rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (V3ErrorCode lhs, V3ErrorCode::en rhs) { return (lhs.m_e == rhs); }
|
||||
|
@ -62,7 +62,7 @@ class V3FileDependImp {
|
||||
}
|
||||
}
|
||||
}
|
||||
bool operator<(const DependFile& rhs) const { return filename()<rhs.filename(); };
|
||||
bool operator<(const DependFile& rhs) const { return filename()<rhs.filename(); }
|
||||
};
|
||||
|
||||
// MEMBERS
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
bool exceededWidth() const { return m_column > WIDTH; }
|
||||
bool tokenStart(const char* cp, const char* cmp);
|
||||
bool tokenEnd(const char* cp);
|
||||
void indentInc() { m_indentLevel += INDBLK; };
|
||||
void indentInc() { m_indentLevel += INDBLK; }
|
||||
void indentDec() {
|
||||
m_indentLevel -= INDBLK;
|
||||
UASSERT(m_indentLevel>=0, ": "<<m_filename<<": Underflow of indentation\n");
|
||||
|
@ -69,7 +69,7 @@ protected:
|
||||
};
|
||||
uint32_t m_flags;
|
||||
VarFlags(AstNode* nodep) { m_flags = nodep->user2(); }
|
||||
void setNodeFlags(AstNode* nodep) { nodep->user2(m_flags); };
|
||||
void setNodeFlags(AstNode* nodep) { nodep->user2(m_flags); }
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
class VerilogString {}; // for creator type-overload selection
|
||||
// CONSTRUCTORS
|
||||
V3Number(FileLine* fileline) { init(fileline, 1); }
|
||||
V3Number(FileLine* fileline, int width) { init(fileline, width); }; // 0=unsized
|
||||
V3Number(FileLine* fileline, int width) { init(fileline, width); } // 0=unsized
|
||||
V3Number(FileLine* fileline, int width, uint32_t value) { init(fileline, width); m_value[0]=value; }
|
||||
V3Number(FileLine* fileline, const char* source); // Create from a verilog 32'hxxxx number.
|
||||
V3Number(VerilogString, FileLine* fileline, const string& vvalue);
|
||||
|
@ -60,11 +60,11 @@ public:
|
||||
bool legal() const { return m_e != ERROR; }
|
||||
//
|
||||
enum en m_e;
|
||||
inline V3LangCode () : m_e(ERROR) {};
|
||||
inline V3LangCode (en _e) : m_e(_e) {};
|
||||
inline V3LangCode () : m_e(ERROR) {}
|
||||
inline V3LangCode (en _e) : m_e(_e) {}
|
||||
V3LangCode (const char* textp); // Return matching code or ERROR
|
||||
explicit inline V3LangCode (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
explicit inline V3LangCode (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -103,12 +103,12 @@ struct OrderVEdgeType {
|
||||
|
||||
};
|
||||
return names[m_e];
|
||||
};
|
||||
}
|
||||
enum en m_e;
|
||||
inline OrderVEdgeType () {};
|
||||
inline OrderVEdgeType (en _e) : m_e(_e) {};
|
||||
explicit inline OrderVEdgeType (int _e) : m_e(static_cast<en>(_e)) {};
|
||||
operator en () const { return m_e; };
|
||||
inline OrderVEdgeType () {}
|
||||
inline OrderVEdgeType (en _e) : m_e(_e) {}
|
||||
explicit inline OrderVEdgeType (int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en () const { return m_e; }
|
||||
};
|
||||
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
|
@ -83,7 +83,7 @@ protected:
|
||||
};
|
||||
public:
|
||||
static V3PreProc* createPreProc(FileLine* fileline);
|
||||
virtual ~V3PreProc() {};
|
||||
virtual ~V3PreProc() {}
|
||||
};
|
||||
|
||||
#endif // Guard
|
||||
|
@ -103,7 +103,7 @@ public: // But for internal use only
|
||||
}
|
||||
|
||||
// Return next token, for bison, since bison isn't class based, use a global THIS
|
||||
static int yylex() { return s_readp->yylexThis(); };
|
||||
static int yylex() { return s_readp->yylexThis(); }
|
||||
static FileLine* fileline() { return s_readp->m_fileline; }
|
||||
static AstNetlist* rootp() { return s_readp->m_rootp; }
|
||||
static FileLine* copyOrSameFileLine() { return s_readp->fileline()->copyOrSameFileLine(); }
|
||||
|
@ -34,19 +34,19 @@ class V3Double0 {
|
||||
double m_d; ///< Count of occurrences/ value
|
||||
public:
|
||||
// METHODS
|
||||
V3Double0() : m_d(0) {};
|
||||
V3Double0() : m_d(0) {}
|
||||
~V3Double0() {}
|
||||
|
||||
// Implicit conversion operators:
|
||||
inline V3Double0 (const vluint64_t v) : m_d(v) { };
|
||||
inline operator double () const { return m_d; };
|
||||
inline V3Double0 (const vluint64_t v) : m_d(v) { }
|
||||
inline operator double () const { return m_d; }
|
||||
|
||||
// Explicit operators:
|
||||
inline V3Double0& operator++() { ++m_d; return *this; }; // prefix
|
||||
inline V3Double0 operator++(int) { V3Double0 old=*this; m_d++; return old; }; // postfix
|
||||
inline V3Double0& operator= (const double v) { m_d = v; return *this; };
|
||||
inline V3Double0& operator+=(const double v) { m_d += v; return *this; };
|
||||
inline V3Double0& operator-=(const double v) { m_d -= v; return *this; };
|
||||
inline V3Double0& operator++() { ++m_d; return *this; } // prefix
|
||||
inline V3Double0 operator++(int) { V3Double0 old=*this; m_d++; return old; } // postfix
|
||||
inline V3Double0& operator= (const double v) { m_d = v; return *this; }
|
||||
inline V3Double0& operator+=(const double v) { m_d += v; return *this; }
|
||||
inline V3Double0& operator-=(const double v) { m_d -= v; return *this; }
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
|
@ -67,7 +67,7 @@
|
||||
int m_minWidth; // Minimum width, for (2+2), it's 2 bits, for 32'2+32'2 it's 32 bits
|
||||
Stage m_stage; // If true, report errors
|
||||
public:
|
||||
WidthVP(int width, int minWidth, Stage stage) : m_width(width), m_minWidth(minWidth), m_stage(stage) {};
|
||||
WidthVP(int width, int minWidth, Stage stage) : m_width(width), m_minWidth(minWidth), m_stage(stage) {}
|
||||
int width() const { return m_width; }
|
||||
int widthMin() const { return m_minWidth?m_minWidth:m_width; }
|
||||
bool prelim() const { return m_stage&1; }
|
||||
|
Loading…
Reference in New Issue
Block a user