expression_char Class Reference

#include <char.h>

Inheritance diagram for expression_char:

expression expression_char_compile expression_char_pretty List of all members.

Public Member Functions

virtual ~expression_char ()
 expression_char (const location &locn, unsigned char value)

Protected Member Functions

void logical_traversal (int pprec, label::pointer &true_branch, label::pointer &false_branch, bool fall_through_preference)
int get_precedence () const
type::pointer get_type () const
bool is_lvalue () const
side_effect_t has_side_effect () const
bool is_constant () const
long get_integer_value () const

Private Member Functions

 expression_char ()
 expression_char (const expression_char &)
expression_charoperator= (const expression_char &)

Private Attributes

unsigned char value

Detailed Description

The expression_char class is used to represent an abstract character-valued expression node.

Definition at line 30 of file char.h.


Constructor & Destructor Documentation

virtual expression_char::~expression_char (  )  [virtual]

The destructor.

expression_char::expression_char ( const location locn,
unsigned char  value 
)

The constructor.

Parameters:
locn the source code location of the expression.
value the value of the character constant

expression_char::expression_char (  )  [private]

The default constructor. Do not use.

expression_char::expression_char ( const expression_char  )  [private]

The copy constructor. Do not use.


Member Function Documentation

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

int expression_char::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_char::get_type (  )  const [protected, virtual]

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

Implements expression.

bool expression_char::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_char::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.

bool expression_char::is_constant (  )  const [protected, virtual]

The is_constant method may be used to determine whether this expression node is a constant, or this tree would evaluate to a constant.

The default implementation is conservative, and always returns false.

Returns:
bool; true if constant, false if not.

Reimplemented from expression.

long expression_char::get_integer_value (  )  const [protected, virtual]

The get_integer_value method is used to obtain the integer value of an expression node. It is an error, and the results are undefined (probably rm -rf or worse), if this is not a constant integer expression node.

Reimplemented from expression.

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

The assignment operator. Do not use.


Member Data Documentation

unsigned char expression_char::value [private]

The value instance variable is used to remember the value of the character constant

Definition at line 70 of file char.h.


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