absyntax/absyntax.hh
changeset 983 ead554e12195
parent 978 efab3a94d3c0
child 1000 556b74055518
equal deleted inserted replaced
982:760b26477193 983:ead554e12195
   125       bool       is_valid    (void)     {return (status == cs_const_value);}
   125       bool       is_valid    (void)     {return (status == cs_const_value);}
   126       bool       is_overflow (void)     {return (status == cs_overflow   );}
   126       bool       is_overflow (void)     {return (status == cs_overflow   );}
   127       bool       is_nonconst (void)     {return (status == cs_non_const  );}
   127       bool       is_nonconst (void)     {return (status == cs_non_const  );}
   128       bool       is_undefined(void)     {return (status == cs_undefined  );}
   128       bool       is_undefined(void)     {return (status == cs_undefined  );}
   129       bool       is_zero     (void)     {return (is_valid() && (get() == 0));}
   129       bool       is_zero     (void)     {return (is_valid() && (get() == 0));}
       
   130 
       
   131       /* comparison operator */
       
   132       bool operator==(const const_value__ cv) {
       
   133         return (    ((status!=cs_const_value) && (status==cv.status)) 
       
   134                  || ((status==cs_const_value) && (value ==cv.value )));
       
   135       }
       
   136 
   130     };
   137     };
   131 
   138 
   132     const_value__< int64_t>  _int64; /* status is initialised to UNDEFINED */
   139     const_value__< int64_t>  _int64; /* status is initialised to UNDEFINED */
   133     const_value__<uint64_t> _uint64; /* status is initialised to UNDEFINED */
   140     const_value__<uint64_t> _uint64; /* status is initialised to UNDEFINED */
   134     const_value__<real64_t> _real64; /* status is initialised to UNDEFINED */
   141     const_value__<real64_t> _real64; /* status is initialised to UNDEFINED */
   135     const_value__<bool    >   _bool; /* status is initialised to UNDEFINED */
   142     const_value__<bool    >   _bool; /* status is initialised to UNDEFINED */
   136     
   143     
   137     /* default constructor and destructor */
   144     /* default constructor and destructor */
   138      const_value_c(void) {};
   145      const_value_c(void) {};
   139     ~const_value_c(void) {};
   146     ~const_value_c(void) {};
       
   147     
       
   148     /* comparison operator */
       
   149     bool operator==(const const_value_c cv)
       
   150       {return ((_int64==cv._int64) && (_uint64==cv._uint64) && (_real64==cv._real64) && (_bool==cv._bool));}                                                     
   140 };
   151 };
   141 
   152 
   142 
   153 
   143 
   154 
   144 /* The base class of all symbols */
   155 /* The base class of all symbols */