Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

CCM::Expr Class Reference

Inheritance diagram for CCM::Expr:

CCM::ArrayExpr CCM::BoolExpr CCM::FloatExpr CCM::IntExpr CCM::NullExpr CCM::StringExpr CCM::StubExpr CCM::ThisExpr CCM::VoidExpr List of all members.

Detailed Description

Base class of all expressions.

If an expression contains stub property accesses or stub method calls, there are several possible results which must be iterated through in the caller.


Public Member Functions

abstract Object eval ()
 Evaluate expression and return its value.

abstract Type type ()
 Return the expression type.

bool assignable ()
 Return whether this is an assignable expression (array element or ID).

Ref getRef ()
 Return the referred identifier for reference expressions.

bool isElementAccess ()
 Return whether this is an element access expression.

abstract Expr makeElementAssign (Expr value)
 Return an expression that assigns value to the element if called on an array element access expression.


Protected Member Functions

Object doCall ()
 Call method and return its value (for a method call expression).

Object doElemAccess ()
 Return the array element for an element expression.

Object doElemAssignment ()
 Execute assignmet for an array element assignment expression.


Protected Attributes

Ref id
 Reference for a variable/stub property reference expressions.

Expr left
 Left subexpression for binary expressions, subexpression for unary expressions.

Expr right
 Right subexpression for binary expressions, unused for unary expressions.

IntExpr index
 Element index for array element access expressions.

List callargs
 Argument list for method call expressions (of Expr).


Member Function Documentation

bool CCM::Expr::assignable  ) 
 

Return whether this is an assignable expression (array element or ID).

Object CCM::Expr::doCall  )  [protected]
 

Call method and return its value (for a method call expression).

Common for all expression types.

Object CCM::Expr::doElemAccess  )  [protected]
 

Return the array element for an element expression.

Common for all expression types.

Object CCM::Expr::doElemAssignment  )  [protected]
 

Execute assignmet for an array element assignment expression.

Common for all expression types.

abstract Object CCM::Expr::eval  )  [pure virtual]
 

Evaluate expression and return its value.

Stub access expressions add transitions to the currently evaluated process.

Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr.

Ref CCM::Expr::getRef  ) 
 

Return the referred identifier for reference expressions.

bool CCM::Expr::isElementAccess  ) 
 

Return whether this is an element access expression.

abstract Expr CCM::Expr::makeElementAssign Expr  value  )  [pure virtual]
 

Return an expression that assigns value to the element if called on an array element access expression.

Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr.

abstract Type CCM::Expr::type  )  [pure virtual]
 

Return the expression type.

This is generally the type of the expression value, not of the Expr itself (e. g. "int", not "IntExpr").

Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr.


Member Data Documentation

List CCM::Expr::callargs [protected]
 

Argument list for method call expressions (of Expr).

Ref CCM::Expr::id [protected]
 

Reference for a variable/stub property reference expressions.

IntExpr CCM::Expr::index [protected]
 

Element index for array element access expressions.

Expr CCM::Expr::left [protected]
 

Left subexpression for binary expressions, subexpression for unary expressions.

Expr CCM::Expr::right [protected]
 

Right subexpression for binary expressions, unused for unary expressions.


The documentation for this class was generated from the following file:
Generated on Mon Jun 21 01:20:50 2004 for cs2ccmb by doxygen 1.3.7