expression_logical_or Class Reference

#include <logical_or.h>

Inheritance diagram for expression_logical_or:

expression expression_logical_or_compile expression_logical_or_pretty List of all members.

Public Member Functions

virtual ~expression_logical_or ()
 expression_logical_or (const expression::pointer &lhs, const expression::pointer &rhs, translator *cntxt)

Protected Member Functions

void traversal (int pprec)
int get_precedence () const
type::pointer get_type () const
bool is_lvalue () const
side_effect_t has_side_effect () const
void logical_traversal (int pprec, label::pointer &true_branch, label::pointer &false_branch, bool fall_through_preference)
virtual void pre_order_traversal (int pprec)
virtual void infix_order_traversal (int pprec)
virtual void post_order_traversal (int pprec)
expression::pointer get_lhs () const
expression::pointer get_rhs () const

Private Member Functions

 expression_logical_or ()
 expression_logical_or (const expression_logical_or &)
expression_logical_oroperator= (const expression_logical_or &)

Private Attributes

translatorxlat
expression::pointer lhs
expression::pointer rhs

Detailed Description

The expression_logical_or class is used to represent an abstract logical OR expression node.

Definition at line 32 of file logical_or.h.


Constructor & Destructor Documentation

virtual expression_logical_or::~expression_logical_or (  )  [virtual]

The destructor.

expression_logical_or::expression_logical_or ( const expression::pointer lhs,
const expression::pointer rhs,
translator cntxt 
)

The constructor.

expression_logical_or::expression_logical_or (  )  [private]

The default constructor.

expression_logical_or::expression_logical_or ( const expression_logical_or  )  [private]

The copy constructor.


Member Function Documentation

void expression_logical_or::traversal ( int  pprec  )  [protected, virtual]

The traversal method may be used to traverse each of the declaractions in the list.

Parameters:
pprec The precedence of the parent expression node.

Implements expression.

int expression_logical_or::get_precedence (  )  const [protected, virtual]

The get_precedence method is used to obtain the precedence of this expression node.

The highest precedence has the highest absolute value, the lowest precedence gets the lowest absolute value.

Implements expression.

type::pointer expression_logical_or::get_type (  )  const [protected, virtual]

The get_type method is used to get the type of this expression.

Implements expression.

bool expression_logical_or::is_lvalue (  )  const [protected, virtual]

The is_lvalue method is used to determine whether or not this expression is suitable to appear on the left hand side of an assignment expression.

Implements expression.

side_effect_t expression_logical_or::has_side_effect (  )  const [protected, virtual]

The has_side_effect method is used to determine if an expression has any effect. It is used by the parse to produce "statement with no effect" warnings.

Implements expression.

void expression_logical_or::logical_traversal ( int  pprec,
label::pointer true_branch,
label::pointer false_branch,
bool  fall_through_preference 
) [protected]

virtual void expression_logical_or::pre_order_traversal ( int  pprec  )  [protected, virtual]

The pre_order_traversal method is used to perform actions required before the left hand expression is traversed.

Parameters:
pprec The parent expression's precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct.

Reimplemented in expression_logical_or_pretty.

virtual void expression_logical_or::infix_order_traversal ( int  pprec  )  [protected, virtual]

The infix_order_traversal method is used to perform actions required after the left hand expression is traversed and before the right hand expression is traversed.

Parameters:
pprec The parent expression's precedence.

Reimplemented in expression_logical_or_pretty.

virtual void expression_logical_or::post_order_traversal ( int  pprec  )  [protected, virtual]

The post_order_traversal method is used to perform actions required after the right hand expression is traversed.

Parameters:
pprec The parent expression's precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct.

Reimplemented in expression_logical_or_pretty.

expression::pointer expression_logical_or::get_lhs (  )  const [inline, protected]

The get_lhs method is used by derived classes to obtain the left hand operand of this logical OR expression.

Definition at line 103 of file logical_or.h.

References lhs.

expression::pointer expression_logical_or::get_rhs (  )  const [inline, protected]

The get_rhs method is used by derived classes to obtain the right hand operand of this logical OR expression.

Definition at line 109 of file logical_or.h.

References rhs.

expression_logical_or& expression_logical_or::operator= ( const expression_logical_or  )  [private]

The assignment operator.


Member Data Documentation

translator& expression_logical_or::xlat [private]

The xlat instance variable is used to remember where to get labels from.

Definition at line 116 of file logical_or.h.

expression::pointer expression_logical_or::lhs [private]

The lhs instance variable is used to remember the left and side of the logical AND expression.

Definition at line 122 of file logical_or.h.

Referenced by get_lhs().

expression::pointer expression_logical_or::rhs [private]

The lhs instance variable is used to remember the right hand side of the logical AND expression.

Definition at line 128 of file logical_or.h.

Referenced by get_rhs().


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 01:27:12 2007 for UCSDp-SystemCrossCompiler by  doxygen 1.5.1