RangeExpr.hGo to the documentation of this file.00001
00002
00003
00004
00005 #ifndef _RANGE_EXPR_H
00006 #define _RANGE_EXPR_H
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "../Expression/Expression.h"
00023 #include "../Expression/BinaryExpr.h"
00024
00025 class RangeExpr : public BinaryExpr {
00026 public:
00027 inline RangeExpr(const Type & etype, Expression *lower,
00028 Expression *upper);
00029 RangeExpr(Expression *lower, Expression *upper);
00030 inline RangeExpr(const RangeExpr & e);
00031 inline virtual ~RangeExpr();
00032
00033 virtual Expression *clone() const;
00034
00035 RangeExpr & operator = (const RangeExpr & e);
00036
00037 virtual const Expression & lb() const;
00038 virtual Expression & lb();
00039 virtual void lb(Expression *);
00040 virtual Expression * grab_lb();
00041
00042
00043 virtual const Expression & ub() const;
00044 virtual Expression & ub();
00045 virtual void ub(Expression *);
00046 virtual Expression * grab_ub();
00047
00048
00049 bool has_lb() const;
00050
00051
00052
00053 bool has_ub() const;
00054
00055
00056
00057 virtual int structures_OK() const;
00058 virtual void convert(BinRep & exprSet, Symtab & symtab);
00059 virtual void print_debug(ostream & o, Boolean debug) const;
00060 };
00061
00062
00063
00064
00065
00066 bool is_empty_range(const Expression &);
00067
00068
00069
00070
00071
00072 bool is_unbounded_range(const Expression &);
00073
00074
00075
00076
00077
00078
00079 RangeExpr *convert_to_range(Expression *expr);
00080
00081
00082
00083
00084 inline
00085 RangeExpr::RangeExpr(const Type & etype, Expression *lower,
00086 Expression *upper)
00087 : BinaryExpr(RANGE_OP, etype, lower, upper)
00088 {
00089
00090 }
00091
00092 inline
00093 RangeExpr::RangeExpr(const RangeExpr & e)
00094 : BinaryExpr(e)
00095 {
00096
00097 }
00098
00099 inline
00100 RangeExpr::~RangeExpr()
00101 {
00102
00103 }
00104
00105 #endif
|