C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Operator Class Reference

#include <operators.h>

List of all members.

Public Types

enum  OperatorID {
  SIZEOF = 300, UPLUS, UMINUS, INDIR,
  ADDRESS, POSTINC, POSTDEC, PREINC,
  PREDEC, ARROW, ICR, DECR,
  LS, RS, LE, GE,
  EQ, NE, ANDAND, OROR,
  MULTassign, DIVassign, MODassign, PLUSassign,
  MINUSassign, LSassign, RSassign, ANDassign,
  ERassign, ORassign, Index, FUNC_CALL
}

Public Member Functions

 Operator (unsigned int id, const char *print, const char *name, int unary_prec, int binary_prec, bool is_left_assoc=true)
unsigned int id () const
int unary_prec () const
int binary_prec () const
bool is_left_assoc () const
const string & name () const
const string & print () const
bool is_assignment () const
bool is_arithmetic () const
bool is_comparison () const
bool is_unary () const
bool is_binary () const
bool is_dismantled_binary () const

Private Attributes

unsigned int _id
int _unary_prec
int _binary_prec
bool _is_left_assoc
string _name
string _print


Member Enumeration Documentation

enum Operator::OperatorID
 

Enumeration values:
SIZEOF 
UPLUS 
UMINUS 
INDIR 
ADDRESS 
POSTINC 
POSTDEC 
PREINC 
PREDEC 
ARROW 
ICR 
DECR 
LS 
RS 
LE 
GE 
EQ 
NE 
ANDAND 
OROR 
MULTassign 
DIVassign 
MODassign 
PLUSassign 
MINUSassign 
LSassign 
RSassign 
ANDassign 
ERassign 
ORassign 
Index 
FUNC_CALL 

Definition at line 48 of file operators.h.


Constructor & Destructor Documentation

Operator::Operator unsigned int    id,
const char *    print,
const char *    name,
int    unary_prec,
int    binary_prec,
bool    is_left_assoc = true
[inline]
 

Definition at line 93 of file operators.h.


Member Function Documentation

int Operator::binary_prec   const [inline]
 

Definition at line 106 of file operators.h.

Referenced by binaryNode::precedence().

unsigned int Operator::id   const [inline]
 

Definition at line 104 of file operators.h.

Referenced by vcgASTWalker::at_binary(), semcheck_expr_visitor::at_binary(), id_lookup_walker::at_binary(), ExpressionDismantle::at_binary(), ArrowDismantle::at_binary(), SelectionDismantle::at_binary(), constantAnalyzer::at_binary(), SelectionDismantle::at_if(), UnificationBasedPtr::at_initializer(), TreeChecker::at_threeAddr(), TreeChecker::at_unary(), semcheck_expr_visitor::at_unary(), AllocSizeChanger::at_unary(), ExpressionDismantle::at_unary(), fixPointerWalker::at_unary(), constantAnalyzer::at_unary(), ipConstantPropagation::binary_operator(), unaryNode::dataflow(), binaryNode::dataflow(), Pointers::eval(), constant::eval(), memoryModel::generate_array_elements_for(), DefUseWalker::get_def(), DefUseWalker::get_uses(), memoryModel::initialize_struct(), LocalCopyPropChanger::local_copy_prop(), DismantleUtil::Not(), unaryNode::output_expr(), binaryNode::output_expr(), threeAddrNode::output_stmt(), LocalCopyPropChanger::prop_expr(), ipConstantPropagation::unary_operator(), and binaryNode::walk().

bool Operator::is_arithmetic   const
 

Definition at line 162 of file operators.cc.

References ANDAND, LS, OROR, and RS.

bool Operator::is_assignment   const
 

Definition at line 107 of file operators.cc.

References ANDassign, DIVassign, ERassign, LSassign, MINUSassign, MODassign, MULTassign, ORassign, PLUSassign, and RSassign.

Referenced by SSA::assignment(), and Assignment_walker::at_binary().

bool Operator::is_binary   const
 

Definition at line 183 of file operators.cc.

References ANDAND, ANDassign, ARROW, DIVassign, EQ, ERassign, GE, Index, LE, LS, LSassign, MINUSassign, MODassign, MULTassign, NE, ORassign, OROR, PLUSassign, RS, and RSassign.

Referenced by BinaryOperator::operator()().

bool Operator::is_comparison   const
 

Definition at line 127 of file operators.cc.

References EQ, GE, LE, and NE.

Referenced by SelectionDismantle::at_if(), conditiongotoNode::op(), and ComparisonOperator::operator()().

bool Operator::is_dismantled_binary   const
 

Definition at line 224 of file operators.cc.

References EQ, GE, LE, LS, NE, and RS.

Referenced by TreeChecker::at_threeAddr().

bool Operator::is_left_assoc   const [inline]
 

Definition at line 107 of file operators.h.

Referenced by unaryNode::precedence(), and binaryNode::precedence().

bool Operator::is_unary   const
 

Definition at line 142 of file operators.cc.

References ADDRESS, INDIR, POSTDEC, POSTINC, PREDEC, PREINC, SIZEOF, UMINUS, and UPLUS.

Referenced by constantAnalyzer::at_binary(), constantAnalyzer::at_unary(), UnaryOperator::operator()(), and threeAddrNode::output_stmt().

const string& Operator::name   const [inline]
 

Definition at line 108 of file operators.h.

const string& Operator::print   const [inline]
 

Definition at line 109 of file operators.h.

Referenced by print_walker::at_binary(), print_tree_visitor::at_binary(), print_walker::at_unary(), print_tree_visitor::at_unary(), unaryNode::output_expr(), binaryNode::output_expr(), threeAddrNode::output_stmt(), and conditiongotoNode::output_stmt().

int Operator::unary_prec   const [inline]
 

Definition at line 105 of file operators.h.

Referenced by unaryNode::precedence().


Member Data Documentation

int Operator::_binary_prec [private]
 

Definition at line 86 of file operators.h.

unsigned int Operator::_id [private]
 

Definition at line 84 of file operators.h.

bool Operator::_is_left_assoc [private]
 

Definition at line 87 of file operators.h.

string Operator::_name [private]
 

Definition at line 88 of file operators.h.

string Operator::_print [private]
 

Definition at line 89 of file operators.h.

int Operator::_unary_prec [private]
 

Definition at line 85 of file operators.h.


The documentation for this class was generated from the following files:

Generated on August 27, 2003
Back to the C-Breeze home page