expression_eq_string Class Reference

#include <string.h>

Inheritance diagram for expression_eq_string:

expression_eq expression List of all members.

Public Member Functions

virtual ~expression_eq_string ()
 expression_eq_string (const expression::pointer &lhs, const expression::pointer &rhs, translator_compile *cntxt)

Protected Member Functions

void post_order_traversal (int pprec)
void logical_traversal (int pprec, label::pointer &true_branch, label::pointer &false_branch, bool fall_through_preference)
expression::pointer optimize () const

Private Member Functions

 expression_eq_string ()
 expression_eq_string (const expression_eq_string &)
expression_eq_stringoperator= (const expression_eq_string &)

Private Attributes

translator_compilecode

Detailed Description

The expression_eq_string class is used to represent code generation for string equal to expressions.

Definition at line 32 of file string.h.


Constructor & Destructor Documentation

virtual expression_eq_string::~expression_eq_string (  )  [virtual]

The destructor.

expression_eq_string::expression_eq_string ( const expression::pointer lhs,
const expression::pointer rhs,
translator_compile cntxt 
)

The constructor.

expression_eq_string::expression_eq_string (  )  [private]

The default constructor. Do not use.

expression_eq_string::expression_eq_string ( const expression_eq_string  )  [private]

The copy constructor. Do not use.


Member Function Documentation

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

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

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

Reimplemented from expression_eq.

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

expression::pointer expression_eq_string::optimize (  )  const [protected, virtual]

The optimize method may be used to evaluate constant expressions, or substitute more efficient expressions.

This is intended to be called by the translator:: expression_statement method, or similar, where the expression is in its final form, and will get no deeper. In other words, when all available information has been provided.

There is no default implementation, even though most optimize implementations return self(), because this gives the compiler no opportunity to remind the authors of new classes that they have forgotten something.

Returns:
If the expression tree is not constant, or it is already as reduced as it can get, it returns itself. Otherwise, it returns a new expression node.

Implements expression.

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

The assignment operator. Do not use.


Member Data Documentation

translator_compile& expression_eq_string::code [private]

The code instance variable is used to remember where to send our generated code.

Definition at line 63 of file string.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