mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
binpac: Mark overridden methods with 'override'
This commit is contained in:
parent
45ef19049c
commit
299f39e8e2
29 changed files with 260 additions and 257 deletions
|
@ -17,7 +17,7 @@ public:
|
|||
|
||||
AnalyzerAction(ID* action_id, When when, ActionParam* param, EmbeddedCode* code);
|
||||
|
||||
~AnalyzerAction();
|
||||
~AnalyzerAction() override;
|
||||
|
||||
When when() const { return when_; }
|
||||
ActionParam* param() const { return param_; }
|
||||
|
|
|
@ -21,16 +21,16 @@ class AnalyzerDecl : public TypeDecl
|
|||
{
|
||||
public:
|
||||
AnalyzerDecl(ID* id, DeclType decl_type, ParamList* params);
|
||||
~AnalyzerDecl();
|
||||
~AnalyzerDecl() override;
|
||||
|
||||
void AddElements(AnalyzerElementList* elemlist);
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
// void GenCode(Output *out_h, Output *out_cc);
|
||||
|
||||
void GenInitCode(Output* out_cc);
|
||||
void GenCleanUpCode(Output* out_cc);
|
||||
void GenInitCode(Output* out_cc) override;
|
||||
void GenCleanUpCode(Output* out_cc) override;
|
||||
|
||||
string class_name() const;
|
||||
// string cookie_name() const;
|
||||
|
@ -41,8 +41,8 @@ protected:
|
|||
|
||||
// Generate public/private declarations for member functions and
|
||||
// variables
|
||||
void GenPubDecls(Output* out_h, Output* out_cc);
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc);
|
||||
void GenPubDecls(Output* out_h, Output* out_cc) override;
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc) override;
|
||||
|
||||
// Generate the NewData() function
|
||||
virtual void GenProcessFunc(Output* out_h, Output* out_cc) = 0;
|
||||
|
@ -107,7 +107,7 @@ class AnalyzerState : public AnalyzerElement
|
|||
{
|
||||
public:
|
||||
AnalyzerState(StateVarList* statevars) : AnalyzerElement(STATE), statevars_(statevars) { }
|
||||
~AnalyzerState();
|
||||
~AnalyzerState() override;
|
||||
|
||||
StateVarList* statevars() const { return statevars_; }
|
||||
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
: AnalyzerElement(HELPER), helper_type_(helper_type), code_(code)
|
||||
{
|
||||
}
|
||||
~AnalyzerHelper();
|
||||
~AnalyzerHelper() override;
|
||||
|
||||
Type helper_type() const { return helper_type_; }
|
||||
|
||||
|
@ -149,7 +149,7 @@ class FlowField : public Field
|
|||
{
|
||||
public:
|
||||
FlowField(ID* flow_id, ParameterizedType* flow_type);
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
};
|
||||
|
||||
class AnalyzerFlow : public AnalyzerElement
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
DOWN
|
||||
};
|
||||
AnalyzerFlow(Direction dir, ID* type_id, ExprList* params);
|
||||
~AnalyzerFlow();
|
||||
~AnalyzerFlow() override;
|
||||
|
||||
Direction dir() const { return dir_; }
|
||||
FlowField* flow_field() const { return flow_field_; }
|
||||
|
|
|
@ -10,48 +10,48 @@ class ArrayType : public Type
|
|||
{
|
||||
public:
|
||||
ArrayType(Type* arg_elemtype, Expr* arg_length = nullptr);
|
||||
~ArrayType();
|
||||
~ArrayType() override;
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
string DefaultValue() const { return "0"; }
|
||||
Type* ElementDataType() const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
string DefaultValue() const override { return "0"; }
|
||||
Type* ElementDataType() const override;
|
||||
|
||||
string EvalElement(const string& array, const string& index) const;
|
||||
string EvalElement(const string& array, const string& index) const override;
|
||||
|
||||
void ProcessAttr(Attr* a);
|
||||
void ProcessAttr(Attr* a) override;
|
||||
|
||||
void Prepare(Env* env, int flags);
|
||||
void Prepare(Env* env, int flags) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env);
|
||||
void GenPrivDecls(Output* out, Env* env);
|
||||
void GenPubDecls(Output* out, Env* env) override;
|
||||
void GenPrivDecls(Output* out, Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
void SetBoundaryChecked();
|
||||
void SetBoundaryChecked() override;
|
||||
void GenUntilInputCheck(Output* out_cc, Env* env);
|
||||
|
||||
bool IsPointerType() const { return true; }
|
||||
bool IsPointerType() const override { return true; }
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
void GenArrayLength(Output* out_cc, Env* env, const DataPtr& data);
|
||||
string GenArrayInit(Output* out_cc, Env* env, bool known_array_length);
|
||||
void GenElementAssignment(Output* out_cc, Env* env, string const& array_str, bool use_vector);
|
||||
void GenUntilCheck(Output* out_cc, Env* env, Expr* until_condition, bool delete_elem);
|
||||
|
||||
bool ByteOrderSensitive() const { return elemtype_->RequiresByteOrder(); }
|
||||
bool RequiresAnalyzerContext();
|
||||
bool ByteOrderSensitive() const override { return elemtype_->RequiresByteOrder(); }
|
||||
bool RequiresAnalyzerContext() override;
|
||||
|
||||
Type* DoClone() const;
|
||||
Type* DoClone() const override;
|
||||
|
||||
void DoMarkIncrementalInput();
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
const ID* arraylength_var() const;
|
||||
const ID* elem_it_var() const;
|
||||
|
@ -60,7 +60,7 @@ protected:
|
|||
const ID* elem_input_var() const;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
Type* elemtype_;
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
Attr(AttrType type, ExprList* exprlist);
|
||||
Attr(AttrType type, SeqEnd* seqend);
|
||||
|
||||
virtual ~Attr();
|
||||
~Attr() override;
|
||||
|
||||
AttrType type() const { return type_; }
|
||||
Expr* expr() const { return expr_; }
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
bool RequiresAnalyzerContext() const;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
|
|
@ -22,26 +22,26 @@ public:
|
|||
|
||||
BITType bit_type() const { return bit_type_; }
|
||||
|
||||
bool IsNumericType() const;
|
||||
bool IsNumericType() const override;
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
string DefaultValue() const { return "0"; }
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
string DefaultValue() const override { return "0"; }
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
bool IsPointerType() const { return false; }
|
||||
bool IsPointerType() const override { return false; }
|
||||
|
||||
bool ByteOrderSensitive() const { return StaticSize(0) >= 2; }
|
||||
bool ByteOrderSensitive() const override { return StaticSize(0) >= 2; }
|
||||
|
||||
void GenInitCode(Output* out_cc, Env* env);
|
||||
void GenInitCode(Output* out_cc, Env* env) override;
|
||||
|
||||
void DoMarkIncrementalInput();
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
protected:
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
Type* DoClone() const;
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
Type* DoClone() const override;
|
||||
|
||||
BITType bit_type_;
|
||||
|
||||
|
|
|
@ -10,39 +10,39 @@ class CaseType : public Type
|
|||
{
|
||||
public:
|
||||
CaseType(Expr* index, CaseFieldList* cases);
|
||||
~CaseType();
|
||||
~CaseType() override;
|
||||
|
||||
void AddCaseField(CaseField* f);
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
string DefaultValue() const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
string DefaultValue() const override;
|
||||
|
||||
void Prepare(Env* env, int flags);
|
||||
void Prepare(Env* env, int flags) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env);
|
||||
void GenPrivDecls(Output* out, Env* env);
|
||||
void GenPubDecls(Output* out, Env* env) override;
|
||||
void GenPrivDecls(Output* out, Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
void SetBoundaryChecked();
|
||||
void SetBoundaryChecked() override;
|
||||
|
||||
Type* ValueType() const;
|
||||
|
||||
Expr* IndexExpr() const { return index_expr_; }
|
||||
|
||||
bool IsPointerType() const { return ValueType()->IsPointerType(); }
|
||||
bool IsPointerType() const override { return ValueType()->IsPointerType(); }
|
||||
|
||||
protected:
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
Type* DoClone() const { return nullptr; }
|
||||
void DoMarkIncrementalInput();
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
Type* DoClone() const override { return nullptr; }
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
bool ByteOrderSensitive() const;
|
||||
bool ByteOrderSensitive() const override;
|
||||
|
||||
Expr* index_expr_;
|
||||
ID* index_var_;
|
||||
|
@ -56,7 +56,7 @@ class CaseField : public Field
|
|||
{
|
||||
public:
|
||||
CaseField(ExprList* index, ID* id, Type* type);
|
||||
~CaseField();
|
||||
~CaseField() override;
|
||||
|
||||
CaseType* case_type() const { return case_type_; }
|
||||
void set_case_type(CaseType* t) { case_type_ = t; }
|
||||
|
@ -68,12 +68,12 @@ public:
|
|||
const char* CaseStr(Env* env);
|
||||
void set_index_var(const ID* var) { index_var_ = var; }
|
||||
|
||||
void Prepare(Env* env);
|
||||
void Prepare(Env* env) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env);
|
||||
void GenPubDecls(Output* out, Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
void GenParseCode(Output* out, Env* env, const DataPtr& data, const ID* size_var);
|
||||
|
||||
int StaticSize(Env* env) const { return type_->StaticSize(env); }
|
||||
|
@ -82,10 +82,10 @@ public:
|
|||
void SetBoundaryChecked() { type_->SetBoundaryChecked(); }
|
||||
|
||||
bool RequiresByteOrder() const { return type_->RequiresByteOrder(); }
|
||||
bool RequiresAnalyzerContext() const;
|
||||
bool RequiresAnalyzerContext() const override;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
protected:
|
||||
CaseType* case_type_;
|
||||
|
|
|
@ -8,24 +8,24 @@ class ConnDecl : public AnalyzerDecl
|
|||
{
|
||||
public:
|
||||
ConnDecl(ID* conn_id, ParamList* params, AnalyzerElementList* elemlist);
|
||||
~ConnDecl();
|
||||
~ConnDecl() override;
|
||||
|
||||
void Prepare();
|
||||
void Prepare() override;
|
||||
|
||||
Type* DataType() const { return data_type_; }
|
||||
|
||||
protected:
|
||||
void AddBaseClass(vector<string>* base_classes) const;
|
||||
void AddBaseClass(vector<string>* base_classes) const override;
|
||||
|
||||
void GenProcessFunc(Output* out_h, Output* out_cc);
|
||||
void GenGapFunc(Output* out_h, Output* out_cc);
|
||||
void GenEOFFunc(Output* out_h, Output* out_cc);
|
||||
void GenProcessFunc(Output* out_h, Output* out_cc) override;
|
||||
void GenGapFunc(Output* out_h, Output* out_cc) override;
|
||||
void GenEOFFunc(Output* out_h, Output* out_cc) override;
|
||||
|
||||
void GenPubDecls(Output* out_h, Output* out_cc);
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc);
|
||||
void GenPubDecls(Output* out_h, Output* out_cc) override;
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc) override;
|
||||
|
||||
void ProcessFlowElement(AnalyzerFlow* flow_elem);
|
||||
void ProcessDataUnitElement(AnalyzerDataUnit* dataunit_elem);
|
||||
void ProcessFlowElement(AnalyzerFlow* flow_elem) override;
|
||||
void ProcessDataUnitElement(AnalyzerDataUnit* dataunit_elem) override;
|
||||
|
||||
AnalyzerFlow* flows_[2];
|
||||
Type* data_type_;
|
||||
|
|
|
@ -33,7 +33,7 @@ class AnalyzerContextDecl : public TypeDecl
|
|||
{
|
||||
public:
|
||||
AnalyzerContextDecl(ID* id, ContextFieldList* context_fields);
|
||||
~AnalyzerContextDecl();
|
||||
~AnalyzerContextDecl() override;
|
||||
|
||||
void AddFlowBuffer();
|
||||
|
||||
|
@ -42,8 +42,8 @@ public:
|
|||
// The type of analyzer context as a parameter
|
||||
ParameterizedType* param_type() const { return param_type_; }
|
||||
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
void GenNamespaceBegin(Output* out) const;
|
||||
void GenNamespaceEnd(Output* out) const;
|
||||
|
@ -69,35 +69,38 @@ class DummyType : public Type
|
|||
public:
|
||||
DummyType() : Type(DUMMY) { }
|
||||
|
||||
bool DefineValueVar() const { return false; }
|
||||
string DataTypeStr() const
|
||||
bool DefineValueVar() const override { return false; }
|
||||
string DataTypeStr() const override
|
||||
{
|
||||
ASSERT(0);
|
||||
return "";
|
||||
}
|
||||
|
||||
int StaticSize(Env* env) const
|
||||
int StaticSize(Env* env) const override
|
||||
{
|
||||
ASSERT(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool ByteOrderSensitive() const { return false; }
|
||||
bool ByteOrderSensitive() const override { return false; }
|
||||
|
||||
bool IsPointerType() const
|
||||
bool IsPointerType() const override
|
||||
{
|
||||
ASSERT(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) { ASSERT(0); }
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override
|
||||
{
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
// Generate code for computing the dynamic size of the type
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) { ASSERT(0); }
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override { ASSERT(0); }
|
||||
|
||||
protected:
|
||||
Type* DoClone() const;
|
||||
void DoMarkIncrementalInput() { ASSERT(0); }
|
||||
Type* DoClone() const override;
|
||||
void DoMarkIncrementalInput() override { ASSERT(0); }
|
||||
};
|
||||
|
||||
#endif // pac_context_h
|
||||
|
|
|
@ -56,8 +56,8 @@ public:
|
|||
RequiresAnalyzerContext() : requires_analyzer_context_(false) { }
|
||||
|
||||
// Returns whether to continue traversal
|
||||
bool PreProcess(DataDepElement* element);
|
||||
bool PostProcess(DataDepElement* element);
|
||||
bool PreProcess(DataDepElement* element) override;
|
||||
bool PostProcess(DataDepElement* element) override;
|
||||
|
||||
bool requires_analyzer_context() const { return requires_analyzer_context_; }
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
FLOWUNIT
|
||||
};
|
||||
AnalyzerDataUnit(DataUnitType type, ID* id, ExprList* type_params, ExprList* context_params);
|
||||
~AnalyzerDataUnit();
|
||||
~AnalyzerDataUnit() override;
|
||||
|
||||
void Prepare(Env* env);
|
||||
|
||||
|
|
|
@ -76,14 +76,14 @@ public:
|
|||
EXTERN,
|
||||
};
|
||||
HelperDecl(HelperType type, ID* context_id, EmbeddedCode* code);
|
||||
~HelperDecl();
|
||||
~HelperDecl() override;
|
||||
|
||||
void Prepare();
|
||||
void GenExternDeclaration(Output* out_h);
|
||||
void GenForwardDeclaration(Output* out_h)
|
||||
void Prepare() override;
|
||||
void GenExternDeclaration(Output* out_h) override;
|
||||
void GenForwardDeclaration(Output* out_h) override
|
||||
{ /* do nothing */
|
||||
}
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
private:
|
||||
HelperType helper_type_;
|
||||
|
|
|
@ -20,13 +20,13 @@ class EnumDecl : public Decl
|
|||
{
|
||||
public:
|
||||
EnumDecl(ID* id, EnumList* enumlist);
|
||||
~EnumDecl();
|
||||
~EnumDecl() override;
|
||||
|
||||
Type* DataType() const { return datatype_; }
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
private:
|
||||
EnumList* enumlist_;
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
Expr(ExprType type, Expr* op1, Expr* op2);
|
||||
Expr(ExprType type, Expr* op1, Expr* op2, Expr* op3);
|
||||
|
||||
virtual ~Expr();
|
||||
~Expr() override;
|
||||
|
||||
const char* orig() const { return orig_.c_str(); }
|
||||
const ID* id() const { return id_; }
|
||||
|
@ -89,7 +89,7 @@ public:
|
|||
bool RequiresAnalyzerContext() const;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
ExprType expr_type_;
|
||||
|
@ -121,7 +121,7 @@ class CaseExpr : public Object, public DataDepElement
|
|||
{
|
||||
public:
|
||||
CaseExpr(ExprList* index, Expr* value);
|
||||
virtual ~CaseExpr();
|
||||
~CaseExpr() override;
|
||||
|
||||
ExprList* index() const { return index_; }
|
||||
Expr* value() const { return value_; }
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
bool RequiresAnalyzerContext() const;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
ExprList* index_;
|
||||
|
|
|
@ -19,22 +19,22 @@ public:
|
|||
};
|
||||
ExternType(const ID* id, EXTType ext_type) : Type(EXTERN), id_(id), ext_type_(ext_type) { }
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
int StaticSize(Env* env) const;
|
||||
bool ByteOrderSensitive() const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
int StaticSize(Env* env) const override;
|
||||
bool ByteOrderSensitive() const override;
|
||||
|
||||
string EvalMember(const ID* member_id) const;
|
||||
bool IsNumericType() const { return ext_type_ == NUMBER; }
|
||||
bool IsPointerType() const { return ext_type_ == POINTER; }
|
||||
string EvalMember(const ID* member_id) const override;
|
||||
bool IsNumericType() const override { return ext_type_ == NUMBER; }
|
||||
bool IsPointerType() const override { return ext_type_ == POINTER; }
|
||||
|
||||
void GenInitCode(Output* out_cc, Env* env);
|
||||
void GenInitCode(Output* out_cc, Env* env) override;
|
||||
|
||||
protected:
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
|
||||
Type* DoClone() const;
|
||||
Type* DoClone() const override;
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
static const int PUBLIC_READABLE = 4;
|
||||
static const int NOT_PUBLIC_READABLE = 0;
|
||||
|
||||
virtual ~Field();
|
||||
~Field() override;
|
||||
|
||||
FieldType tof() const { return tof_; }
|
||||
const ID* id() const { return id_; }
|
||||
|
@ -70,7 +70,7 @@ protected:
|
|||
int ValueVarType() const;
|
||||
bool ToBeParsed() const;
|
||||
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
protected:
|
||||
FieldType tof_;
|
||||
|
|
|
@ -7,28 +7,28 @@ class FlowDecl : public AnalyzerDecl
|
|||
{
|
||||
public:
|
||||
FlowDecl(ID* flow_id, ParamList* params, AnalyzerElementList* elemlist);
|
||||
~FlowDecl();
|
||||
~FlowDecl() override;
|
||||
|
||||
void Prepare();
|
||||
void Prepare() override;
|
||||
|
||||
void set_conn_decl(ConnDecl* c) { conn_decl_ = c; }
|
||||
|
||||
static ParameterizedType* flow_buffer_type();
|
||||
|
||||
protected:
|
||||
void AddBaseClass(vector<string>* base_classes) const;
|
||||
void AddBaseClass(vector<string>* base_classes) const override;
|
||||
|
||||
void GenInitCode(Output* out_cc);
|
||||
void GenCleanUpCode(Output* out_cc);
|
||||
void GenProcessFunc(Output* out_h, Output* out_cc);
|
||||
void GenEOFFunc(Output* out_h, Output* out_cc);
|
||||
void GenGapFunc(Output* out_h, Output* out_cc);
|
||||
void GenInitCode(Output* out_cc) override;
|
||||
void GenCleanUpCode(Output* out_cc) override;
|
||||
void GenProcessFunc(Output* out_h, Output* out_cc) override;
|
||||
void GenEOFFunc(Output* out_h, Output* out_cc) override;
|
||||
void GenGapFunc(Output* out_h, Output* out_cc) override;
|
||||
|
||||
void GenPubDecls(Output* out_h, Output* out_cc);
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc);
|
||||
void GenPubDecls(Output* out_h, Output* out_cc) override;
|
||||
void GenPrivDecls(Output* out_h, Output* out_cc) override;
|
||||
|
||||
void ProcessFlowElement(AnalyzerFlow* flow_elem);
|
||||
void ProcessDataUnitElement(AnalyzerDataUnit* dataunit_elem);
|
||||
void ProcessFlowElement(AnalyzerFlow* flow_elem) override;
|
||||
void ProcessDataUnitElement(AnalyzerDataUnit* dataunit_elem) override;
|
||||
|
||||
private:
|
||||
void GenNewDataUnit(Output* out_cc);
|
||||
|
|
|
@ -42,13 +42,13 @@ class FuncDecl : public Decl
|
|||
{
|
||||
public:
|
||||
FuncDecl(Function* function);
|
||||
~FuncDecl();
|
||||
~FuncDecl() override;
|
||||
|
||||
Function* function() const { return function_; }
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
private:
|
||||
Function* function_;
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
DataPtr GenDataBeginEnd(Output* out_cc, Env* env);
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
Expr* expr_;
|
||||
|
|
|
@ -8,20 +8,20 @@ class LetField : public Field, Evaluatable
|
|||
{
|
||||
public:
|
||||
LetField(ID* arg_id, Type* type, Expr* arg_expr);
|
||||
~LetField();
|
||||
~LetField() override;
|
||||
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
void Prepare(Env* env);
|
||||
void Prepare(Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenParseCode(Output* out, Env* env);
|
||||
void GenEval(Output* out, Env* env);
|
||||
void GenEval(Output* out, Env* env) override;
|
||||
|
||||
bool RequiresAnalyzerContext() const;
|
||||
bool RequiresAnalyzerContext() const override;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
protected:
|
||||
Expr* expr_;
|
||||
|
@ -31,14 +31,14 @@ class LetDecl : public Decl, Evaluatable
|
|||
{
|
||||
public:
|
||||
LetDecl(ID* id, Type* type, Expr* expr);
|
||||
~LetDecl();
|
||||
~LetDecl() override;
|
||||
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void GenEval(Output* out, Env* env);
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
void GenEval(Output* out, Env* env) override;
|
||||
|
||||
private:
|
||||
Type* type_;
|
||||
|
|
|
@ -27,8 +27,8 @@ class ParamField : public Field
|
|||
public:
|
||||
ParamField(const Param* param);
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
};
|
||||
|
||||
// Returns the string with a list of param declarations separated by ','.
|
||||
|
|
|
@ -8,54 +8,54 @@ class ParameterizedType : public Type
|
|||
{
|
||||
public:
|
||||
ParameterizedType(ID* type_id, ExprList* args);
|
||||
~ParameterizedType();
|
||||
~ParameterizedType() override;
|
||||
|
||||
Type* clone() const;
|
||||
|
||||
string EvalMember(const ID* member_id) const;
|
||||
string EvalMember(const ID* member_id) const override;
|
||||
// Env *member_env() const;
|
||||
|
||||
void AddParamArg(Expr* arg);
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
string DefaultValue() const { return "0"; }
|
||||
Type* MemberDataType(const ID* member_id) const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
string DefaultValue() const override { return "0"; }
|
||||
Type* MemberDataType(const ID* member_id) const override;
|
||||
|
||||
// "throw_exception" specifies whether to throw an exception
|
||||
// if the referred data type is not found
|
||||
Type* ReferredDataType(bool throw_exception) const;
|
||||
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
bool IsPointerType() const { return true; }
|
||||
bool IsPointerType() const override { return true; }
|
||||
|
||||
bool ByteOrderSensitive() const;
|
||||
bool RequiresAnalyzerContext();
|
||||
bool ByteOrderSensitive() const override;
|
||||
bool RequiresAnalyzerContext() override;
|
||||
|
||||
void GenInitCode(Output* out_cc, Env* env);
|
||||
void GenInitCode(Output* out_cc, Env* env) override;
|
||||
|
||||
string class_name() const;
|
||||
string EvalParameters(Output* out_cc, Env* env) const;
|
||||
|
||||
BufferMode buffer_mode() const;
|
||||
BufferMode buffer_mode() const override;
|
||||
|
||||
protected:
|
||||
void GenNewInstance(Output* out, Env* env);
|
||||
void GenNewInstance(Output* out, Env* env) override;
|
||||
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
Type* DoClone() const;
|
||||
void DoMarkIncrementalInput();
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
Type* DoClone() const override;
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
private:
|
||||
ID* type_id_;
|
||||
ExprList* args_;
|
||||
bool checking_requires_analyzer_context_;
|
||||
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
};
|
||||
|
||||
#endif // pac_paramtype_h
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
PPVal(Expr* expr) : PacPrimitive(VAL), expr_(expr) { }
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
string ToCode(Env* env);
|
||||
string ToCode(Env* env) override;
|
||||
|
||||
private:
|
||||
Expr* expr_;
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
PPSet(Expr* expr) : PacPrimitive(SET), expr_(expr) { }
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
string ToCode(Env* env);
|
||||
string ToCode(Env* env) override;
|
||||
|
||||
private:
|
||||
Expr* expr_;
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
PPType(Expr* expr) : PacPrimitive(TYPE), expr_(expr) { }
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
string ToCode(Env* env);
|
||||
string ToCode(Env* env) override;
|
||||
|
||||
private:
|
||||
Expr* expr_;
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
const ID* id() const { return id_; }
|
||||
Expr* expr() const { return expr_; }
|
||||
|
||||
string ToCode(Env* env);
|
||||
string ToCode(Env* env) override;
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
|
|
|
@ -11,41 +11,41 @@ class RecordType : public Type
|
|||
{
|
||||
public:
|
||||
RecordType(RecordFieldList* fields);
|
||||
~RecordType();
|
||||
~RecordType() override;
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
|
||||
void Prepare(Env* env, int flags);
|
||||
void Prepare(Env* env, int flags) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env);
|
||||
void GenPrivDecls(Output* out, Env* env);
|
||||
void GenPubDecls(Output* out, Env* env) override;
|
||||
void GenPrivDecls(Output* out, Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
void SetBoundaryChecked();
|
||||
void SetBoundaryChecked() override;
|
||||
|
||||
const ID* parsing_dataptr_var() const;
|
||||
|
||||
bool IsPointerType() const
|
||||
bool IsPointerType() const override
|
||||
{
|
||||
ASSERT(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
|
||||
Type* DoClone() const { return nullptr; }
|
||||
Type* DoClone() const override { return nullptr; }
|
||||
|
||||
void DoMarkIncrementalInput();
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool ByteOrderSensitive() const;
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
bool ByteOrderSensitive() const override;
|
||||
|
||||
private:
|
||||
Field* parsing_dataptr_var_field_;
|
||||
|
@ -60,7 +60,7 @@ class RecordField : public Field
|
|||
{
|
||||
public:
|
||||
RecordField(FieldType tof, ID* id, Type* type);
|
||||
~RecordField();
|
||||
~RecordField() override;
|
||||
|
||||
RecordType* record_type() const { return record_type_; }
|
||||
void set_record_type(RecordType* ty) { record_type_ = ty; }
|
||||
|
@ -115,26 +115,26 @@ class RecordDataField : public RecordField, public Evaluatable
|
|||
{
|
||||
public:
|
||||
RecordDataField(ID* arg_id, Type* arg_type);
|
||||
~RecordDataField();
|
||||
~RecordDataField() override;
|
||||
|
||||
// Instantiates abstract class Field
|
||||
void Prepare(Env* env);
|
||||
void GenParseCode(Output* out, Env* env);
|
||||
void Prepare(Env* env) override;
|
||||
void GenParseCode(Output* out, Env* env) override;
|
||||
|
||||
// Instantiates abstract class Evaluatable
|
||||
void GenEval(Output* out, Env* env);
|
||||
void GenEval(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env, int) const { return type()->StaticSize(env); }
|
||||
int StaticSize(Env* env, int) const override { return type()->StaticSize(env); }
|
||||
|
||||
void SetBoundaryChecked();
|
||||
void SetBoundaryChecked() override;
|
||||
|
||||
bool RequiresByteOrder() const { return type()->RequiresByteOrder(); }
|
||||
bool RequiresAnalyzerContext() const;
|
||||
bool RequiresByteOrder() const override { return type()->RequiresByteOrder(); }
|
||||
bool RequiresAnalyzerContext() const override;
|
||||
|
||||
protected:
|
||||
void GenFieldEnd(Output* out, Env* env, const DataPtr& begin);
|
||||
bool GenBoundaryCheck(Output* out_cc, Env* env);
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
void GenFieldEnd(Output* out, Env* env, const DataPtr& begin) override;
|
||||
bool GenBoundaryCheck(Output* out_cc, Env* env) override;
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
};
|
||||
|
||||
enum PaddingType
|
||||
|
@ -148,33 +148,33 @@ class RecordPaddingField : public RecordField
|
|||
{
|
||||
public:
|
||||
RecordPaddingField(ID* id, PaddingType ptype, Expr* expr);
|
||||
~RecordPaddingField();
|
||||
~RecordPaddingField() override;
|
||||
|
||||
void Prepare(Env* env);
|
||||
void Prepare(Env* env) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env)
|
||||
void GenPubDecls(Output* out, Env* env) override
|
||||
{ /* nothing */
|
||||
}
|
||||
void GenPrivDecls(Output* out, Env* env)
|
||||
void GenPrivDecls(Output* out, Env* env) override
|
||||
{ /* nothing */
|
||||
}
|
||||
|
||||
void GenInitCode(Output* out, Env* env)
|
||||
void GenInitCode(Output* out, Env* env) override
|
||||
{ /* nothing */
|
||||
}
|
||||
void GenCleanUpCode(Output* out, Env* env)
|
||||
void GenCleanUpCode(Output* out, Env* env) override
|
||||
{ /* nothing */
|
||||
}
|
||||
void GenParseCode(Output* out, Env* env);
|
||||
void GenParseCode(Output* out, Env* env) override;
|
||||
|
||||
int StaticSize(Env* env, int offset) const;
|
||||
int StaticSize(Env* env, int offset) const override;
|
||||
|
||||
bool RequiresByteOrder() const { return false; }
|
||||
bool RequiresByteOrder() const override { return false; }
|
||||
|
||||
protected:
|
||||
void GenFieldEnd(Output* out, Env* env, const DataPtr& begin);
|
||||
bool GenBoundaryCheck(Output* out_cc, Env* env);
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
void GenFieldEnd(Output* out, Env* env, const DataPtr& begin) override;
|
||||
bool GenBoundaryCheck(Output* out_cc, Env* env) override;
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
PaddingType ptype_;
|
||||
|
|
|
@ -30,9 +30,9 @@ class RegExDecl : public Decl
|
|||
public:
|
||||
RegExDecl(RegEx* regex);
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
private:
|
||||
RegEx* regex_;
|
||||
|
|
|
@ -17,28 +17,28 @@ public:
|
|||
explicit StringType(StringTypeEnum anystr);
|
||||
explicit StringType(ConstString* str);
|
||||
explicit StringType(RegEx* regex);
|
||||
~StringType();
|
||||
~StringType() override;
|
||||
|
||||
bool DefineValueVar() const;
|
||||
string DataTypeStr() const;
|
||||
string DefaultValue() const { return "0"; }
|
||||
Type* ElementDataType() const;
|
||||
bool DefineValueVar() const override;
|
||||
string DataTypeStr() const override;
|
||||
string DefaultValue() const override { return "0"; }
|
||||
Type* ElementDataType() const override;
|
||||
|
||||
void Prepare(Env* env, int flags);
|
||||
void Prepare(Env* env, int flags) override;
|
||||
|
||||
void GenPubDecls(Output* out, Env* env);
|
||||
void GenPrivDecls(Output* out, Env* env);
|
||||
void GenPubDecls(Output* out, Env* env) override;
|
||||
void GenPrivDecls(Output* out, Env* env) override;
|
||||
|
||||
void GenInitCode(Output* out, Env* env);
|
||||
void GenCleanUpCode(Output* out, Env* env);
|
||||
void GenInitCode(Output* out, Env* env) override;
|
||||
void GenCleanUpCode(Output* out, Env* env) override;
|
||||
|
||||
void DoMarkIncrementalInput();
|
||||
void DoMarkIncrementalInput() override;
|
||||
|
||||
int StaticSize(Env* env) const;
|
||||
int StaticSize(Env* env) const override;
|
||||
|
||||
bool IsPointerType() const { return false; }
|
||||
bool IsPointerType() const override { return false; }
|
||||
|
||||
void ProcessAttr(Attr* a);
|
||||
void ProcessAttr(Attr* a) override;
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
@ -50,21 +50,21 @@ protected:
|
|||
// Generate a string mismatch exception
|
||||
void GenStringMismatch(Output* out_cc, Env* env, const DataPtr& data, string pattern);
|
||||
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags);
|
||||
void DoGenParseCode(Output* out, Env* env, const DataPtr& data, int flags) override;
|
||||
|
||||
void GenCheckingCStr(Output* out, Env* env, const DataPtr& data, const string& str_size);
|
||||
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data);
|
||||
void GenDynamicSize(Output* out, Env* env, const DataPtr& data) override;
|
||||
void GenDynamicSizeAnyStr(Output* out_cc, Env* env, const DataPtr& data);
|
||||
void GenDynamicSizeRegEx(Output* out_cc, Env* env, const DataPtr& data);
|
||||
|
||||
Type* DoClone() const;
|
||||
Type* DoClone() const override;
|
||||
|
||||
// TODO: insensitive towards byte order till we support unicode
|
||||
bool ByteOrderSensitive() const { return false; }
|
||||
bool ByteOrderSensitive() const override { return false; }
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
private:
|
||||
const ID* string_length_var() const;
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
};
|
||||
|
||||
explicit Type(TypeType tot);
|
||||
virtual ~Type();
|
||||
~Type() override;
|
||||
|
||||
Type* Clone() const;
|
||||
|
||||
|
@ -236,7 +236,7 @@ protected:
|
|||
// Generate code for computing the dynamic size of the type
|
||||
virtual void GenDynamicSize(Output* out, Env* env, const DataPtr& data) = 0;
|
||||
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
virtual Type* DoClone() const = 0;
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@ class TypeDecl : public Decl
|
|||
{
|
||||
public:
|
||||
TypeDecl(ID* arg_id, ParamList* arg_params, Type* arg_type);
|
||||
~TypeDecl();
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output* out_h);
|
||||
void GenCode(Output* out_h, Output* out_cc);
|
||||
~TypeDecl() override;
|
||||
void Prepare() override;
|
||||
void GenForwardDeclaration(Output* out_h) override;
|
||||
void GenCode(Output* out_h, Output* out_cc) override;
|
||||
|
||||
Env* env() const { return env_; }
|
||||
Env* env() const override { return env_; }
|
||||
Type* type() const { return type_; }
|
||||
string class_name() const;
|
||||
static Type* LookUpType(const ID* id);
|
||||
|
@ -20,7 +20,7 @@ public:
|
|||
protected:
|
||||
void AddParam(Param* param);
|
||||
virtual void AddBaseClass(vector<string>* base_classes) const { }
|
||||
void ProcessAttr(Attr* a);
|
||||
void ProcessAttr(Attr* a) override;
|
||||
|
||||
virtual void GenPubDecls(Output* out_h, Output* out_cc);
|
||||
virtual void GenPrivDecls(Output* out_h, Output* out_cc);
|
||||
|
|
|
@ -12,7 +12,7 @@ public:
|
|||
type)
|
||||
{
|
||||
}
|
||||
void GenPubDecls(Output* out, Env* env)
|
||||
void GenPubDecls(Output* out, Env* env) override
|
||||
{ /* do nothing */
|
||||
}
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
: Field(PUB_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | CLASS_MEMBER | PUBLIC_READABLE, id, type)
|
||||
{
|
||||
}
|
||||
~PubVarField() { }
|
||||
~PubVarField() override { }
|
||||
};
|
||||
|
||||
// A private variable
|
||||
|
@ -37,9 +37,9 @@ public:
|
|||
type)
|
||||
{
|
||||
}
|
||||
~PrivVarField() { }
|
||||
~PrivVarField() override { }
|
||||
|
||||
void GenPubDecls(Output* out, Env* env)
|
||||
void GenPubDecls(Output* out, Env* env) override
|
||||
{ /* do nothing */
|
||||
}
|
||||
};
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
: Field(TEMP_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | NOT_CLASS_MEMBER, id, type)
|
||||
{
|
||||
}
|
||||
~TempVarField() { }
|
||||
~TempVarField() override { }
|
||||
};
|
||||
|
||||
#endif // pac_varfield_h
|
||||
|
|
|
@ -9,11 +9,11 @@ class WithInputField : public Field, public Evaluatable
|
|||
{
|
||||
public:
|
||||
WithInputField(ID* id, Type* type, InputBuffer* input);
|
||||
virtual ~WithInputField();
|
||||
~WithInputField() override;
|
||||
|
||||
InputBuffer* input() const { return input_; }
|
||||
|
||||
void Prepare(Env* env);
|
||||
void Prepare(Env* env) override;
|
||||
|
||||
// void GenPubDecls(Output* out, Env* env);
|
||||
// void GenPrivDecls(Output* out, Env* env);
|
||||
|
@ -24,12 +24,12 @@ public:
|
|||
void GenParseCode(Output* out, Env* env);
|
||||
|
||||
// Instantiate the Evaluatable interface
|
||||
void GenEval(Output* out, Env* env);
|
||||
void GenEval(Output* out, Env* env) override;
|
||||
|
||||
bool RequiresAnalyzerContext() const;
|
||||
bool RequiresAnalyzerContext() const override;
|
||||
|
||||
protected:
|
||||
bool DoTraverse(DataDepVisitor* visitor);
|
||||
bool DoTraverse(DataDepVisitor* visitor) override;
|
||||
|
||||
protected:
|
||||
InputBuffer* input_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue