| Polaris: StmtLabelExpr.h Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
StmtLabelExpr.hGo to the documentation of this file.00001 /// 00002 #ifndef _STMT_LABEL_EXPR_H 00003 #define _STMT_LABEL_EXPR_H 00004 /// 00005 /// \class StmtLabelExpr 00006 /// \brief An expression representing a temporary statement label 00007 /// \defgroup Polaris 00008 /// \ingroup Polaris 00009 /// Expression 00010 /// \see Expression/StmtLabelExpr.h 00011 /// \see Expression/StmtLabelExpr.h 00012 /// \see Expression/Expression.cc 00013 /// 00014 /// \endcode 00015 /// \section DESCRIPTION DESCRIPTION 00016 /// A StmtLabelExpr is a TEMPORARY data structure that should only be 00017 /// used internally for conversion of Statements. It holds a temporary 00018 /// statement label until all statements have been processed through 00019 /// the first pass, after which point this expression should be turned 00020 /// into a LabelExpr object. 00021 /// 00022 /// Its single field, which is a string, is accessed through the 00023 /// methods data(), str_data(), and data_ref(). See StringExpr.h for 00024 /// more information about these methods. 00025 /// 00026 #ifdef POLARIS_GNU_PRAGMAS 00027 #pragma interface 00028 #endif 00029 /// 00030 #ifndef _STRING_EXPR_H 00031 #include "StringExpr.h" 00032 #endif 00033 /// 00034 class StmtLabelExpr : public StringExpr { 00035 public: 00036 inline StmtLabelExpr(const char *stmt_label); 00037 inline StmtLabelExpr(const StmtLabelExpr & e); 00038 virtual ~StmtLabelExpr(); 00039 00040 virtual StmtLabelExpr & operator = (const StmtLabelExpr &); 00041 00042 virtual Expression *clone() const; 00043 virtual void print_debug(ostream & o, Boolean debug) const; 00044 virtual int structures_OK() const; 00045 virtual void convert(BinRep & exprSet, Symtab & symtab); 00046 ///< See Expression.h 00047 00048 virtual int exchange_expr( VDL & vdl ); 00049 ///< Create a node in the "expression" member and return the index. 00050 }; 00051 00052 00053 ///< inline implementations 00054 00055 inline 00056 StmtLabelExpr::StmtLabelExpr(const char *stmt_label) 00057 : StringExpr(STMT_LABEL_OP, make_type(VOID_TYPE), stmt_label) 00058 { 00059 ///< nothing to do 00060 } 00061 00062 inline 00063 StmtLabelExpr::StmtLabelExpr(const StmtLabelExpr & e) 00064 : StringExpr(e) 00065 { 00066 ///< nothing to do 00067 } 00068 00069 #endif |
||
|