From a9ed06bec80a2a975102195b5b7b4fe7fece3d38 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Mon, 19 Sep 2016 15:50:07 -0600 Subject: change rosecg path & add install --- lib/rosecg/include/code_gen/CG_roseRepr.h | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lib/rosecg/include/code_gen/CG_roseRepr.h (limited to 'lib/rosecg/include/code_gen/CG_roseRepr.h') diff --git a/lib/rosecg/include/code_gen/CG_roseRepr.h b/lib/rosecg/include/code_gen/CG_roseRepr.h new file mode 100644 index 0000000..28553e7 --- /dev/null +++ b/lib/rosecg/include/code_gen/CG_roseRepr.h @@ -0,0 +1,46 @@ +#ifndef CG_roseRepr_h +#define CG_roseRepr_h + +#include +#include "rose.h" + +namespace omega { + +class CG_roseRepr : public CG_outputRepr { + friend class CG_roseBuilder; +public: + CG_roseRepr(); + CG_roseRepr(SgNode *tnl); + CG_roseRepr(SgExpression *exp); + CG_roseRepr(SgStatementPtrList* stmtlist); + + ~CG_roseRepr(); + CG_outputRepr *clone() const; + void clear(); + + SgNode* GetCode() const; + SgStatementPtrList* GetList() const; + SgExpression *GetExpression() const; + + + + + //--------------------------------------------------------------------------- + // Dump operations + //--------------------------------------------------------------------------- + void Dump() const; +private: + // only one of _tnl and _op would be active at any time, depending on + // whether it is building a statement list or an expression tree + SgNode *tnl_; + SgExpression *op_; + SgStatementPtrList *list_; + void DumpFileHelper(SgNode* node, FILE* fp) const; + //operand op_; +}; + + + +} // namespace + +#endif -- cgit v1.2.3-70-g09d2