expression_function_call_user_defined Class Reference

#include <user_defined.h>

Inheritance diagram for expression_function_call_user_defined:

expression_function_call expression List of all members.

Public Member Functions

virtual ~expression_function_call_user_defined ()
 expression_function_call_user_defined (const symbol_function_user_defined *lhs, expression_list *rhs, translator_compile *cntxt)

Protected Member Functions

void post_order_traversal (int pprec, int argnum)
type::pointer get_type () const
expression::pointer optimize () const

Private Member Functions

 expression_function_call_user_defined ()
 expression_function_call_user_defined (const expression_function_call_user_defined &)
expression_function_call_user_definedoperator= (const expression_function_call_user_defined &)

Private Attributes

translator_compilecode
const symbol_function_user_definedsp

Detailed Description

The expression_function_call_user_defined class is used to represent a user defined function constructed by parsing the Pascal source code.

Definition at line 34 of file user_defined.h.


Constructor & Destructor Documentation

virtual expression_function_call_user_defined::~expression_function_call_user_defined (  )  [virtual]

The destructor.

expression_function_call_user_defined::expression_function_call_user_defined ( const symbol_function_user_defined lhs,
expression_list rhs,
translator_compile cntxt 
)

The constructor.

expression_function_call_user_defined::expression_function_call_user_defined (  )  [private]

The default constructor. Do not use.

expression_function_call_user_defined::expression_function_call_user_defined ( const expression_function_call_user_defined  )  [private]

The copy constructor. Do not use.


Member Function Documentation

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

The post_order_traversal method is called by the traversal method just after the last child expression has been traversed.

Parameters:
pprec parent expression precedence
argnum the number of the argument (can be zero if only one child) usually)

Reimplemented from expression_function_call.

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

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

Reimplemented from expression_function_call.

expression::pointer expression_function_call_user_defined::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_function_call_user_defined& expression_function_call_user_defined::operator= ( const expression_function_call_user_defined  )  [private]

The assignment operator. Do not use.


Member Data Documentation

translator_compile& expression_function_call_user_defined::code [private]

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

Definition at line 65 of file user_defined.h.

const symbol_function_user_defined* expression_function_call_user_defined::sp [private]

The sp instance variable is used to remember the symbol this function call is calling.

Definition at line 71 of file user_defined.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