Go to the previous, next section.

Constructing Expressions Using Operator Overloading

One neat feature of the builder is the ability to use the C++ parser to parse and generate SUIF code. This is achieved using operator overloading. There are definitions for a full set of operator overloading as shown below. Expressions and statements can also be created using explicit functions (See section Constructing Expressions Using Explicit Function Calls). Building expressions using operator overloading is recommended when the exact structure of the expression is known at the compile time.

     block & operator-()         

     block & operator!()         

     block & operator~()         


     block & operator*(block & b)

     block & operator/(block & b)

     block & operator%(block & b)

     block & operator+(block & b)

     block & operator-(block & b)

     block & operator<<(block & b)

     block & operator>>(block & b)

     block & operator<(block & b) 

     block & operator>(block & b) 

     block & operator<=(block & b)

     block & operator>=(block & b)

     block & operator==(block & b)

     block & operator!=(block & b)

     block & operator&(block & b) 

     block & operator^(block & b) 

     block & operator|(block & b) 

     block & operator&&(block & b)

     block & operator||(block & b)


     block & operator=(block & b) 

     block & operator+=(block & b)

     block & operator-=(block & b)

     block & operator*=(block & b)

     block & operator/=(block & b)

     block & operator%=(block & b)

     block & operator>>=(block & b)

     block & operator<<=(block & b)

     block & operator&=(block & b) 

     block & operator^=(block & b) 

     block & operator|=(block & b) 


     block & operator*(int b)  

     block & operator/(int b)  

     block & operator%(int b)  

     block & operator+(int b)  

     block & operator-(int b)  

     block & operator<<(int b) 

     block & operator>>(int b) 

     block & operator<(int b)  

     block & operator>(int b)  

     block & operator<=(int b) 

     block & operator>=(int b) 

     block & operator==(int b) 

     block & operator!=(int b) 

     block & operator&(int b)  

     block & operator^(int b)  

     block & operator|(int b)  

     block & operator&&(int b) 

     block & operator||(int b) 


     block & operator=(int b)  

     block & operator+=(int b) 

     block & operator-=(int b) 

     block & operator*=(int b) 

     block & operator/=(int b) 

     block & operator%=(int b) 

     block & operator>>=(int b)

     block & operator<<=(int b)

     block & operator&=(int b) 

     block & operator^=(int b) 

     block & operator|=(int b) 



     block & operator*(double b)  

     block & operator/(double b)  

     block & operator%(double b)  

     block & operator+(double b)  

     block & operator-(double b)  

     block & operator<<(double b) 

     block & operator>>(double b) 

     block & operator<(double b)  

     block & operator>(double b)  

     block & operator<=(double b) 

     block & operator>=(double b) 

     block & operator==(double b) 

     block & operator!=(double b) 

     block & operator&(double b)  

     block & operator^(double b)  

     block & operator|(double b)  

     block & operator&&(double b) 

     block & operator||(double b) 


     block & operator=(double b)  

     block & operator+=(double b) 

     block & operator-=(double b) 

     block & operator*=(double b) 

     block & operator/=(double b) 

     block & operator%=(double b) 

     block & operator>>=(double b)

     block & operator<<=(double b)

     block & operator&=(double b) 

     block & operator^=(double b) 

     block & operator|=(double b) 



     block & operator*(float b)  

     block & operator/(float b)  

     block & operator%(float b)  

     block & operator+(float b)  

     block & operator-(float b)  

     block & operator<<(float b) 

     block & operator>>(float b) 

     block & operator<(float b)  

     block & operator>(float b)  

     block & operator<=(float b) 

     block & operator>=(float b) 

     block & operator==(float b) 

     block & operator!=(float b) 

     block & operator&(float b)  

     block & operator^(float b)  

     block & operator|(float b)  

     block & operator&&(float b) 

     block & operator||(float b) 


     block & operator=(float b)  

     block & operator+=(float b) 

     block & operator-=(float b) 

     block & operator*=(float b) 

     block & operator/=(float b) 

     block & operator%=(float b) 

     block & operator>>=(float b)

     block & operator<<=(float b)

     block & operator&=(float b) 

     block & operator^=(float b) 

     block & operator|=(float b) 



     block & operator*(char * b)  

     block & operator/(char * b)  

     block & operator%(char * b)  

     block & operator+(char * b)  

     block & operator-(char * b)  

     block & operator<<(char * b) 

     block & operator>>(char * b) 

     block & operator<(char * b)  

     block & operator>(char * b)  

     block & operator<=(char * b) 

     block & operator>=(char * b) 

     block & operator==(char * b) 

     block & operator!=(char * b) 

     block & operator&(char * b)  

     block & operator^(char * b)  

     block & operator|(char * b)  

     block & operator&&(char * b) 

     block & operator||(char * b) 


     block & operator=(char * b)  

     block & operator+=(char * b) 

     block & operator-=(char * b) 

     block & operator*=(char * b) 

     block & operator/=(char * b) 

     block & operator%=(char * b) 

     block & operator>>=(char * b)

     block & operator<<=(char * b)

     block & operator&=(char * b) 

     block & operator^=(char * b) 

     block & operator|=(char * b) 



     block & max(block &a, 
                 block &b) 
     block & min(block &a, 
                 block &b)  
     block & mod(block &a, 
                 block &b)  
     block & abs(block &a) 

Go to the previous, next section.