Polaris: CommaExpr Class Reference

CommaExpr Class Reference

An expression representing an argument list. More...

#include <CommaExpr.h>

Inheritance diagram for CommaExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CommaExpr ()
 Constructor for a CommaExpr with no args.
 CommaExpr (Expression *exp1, Expression *exp2=0, Expression *exp3=0, Expression *exp4=0, Expression *exp5=0)
 Constructor for a CommaExpr with up to five args.
 CommaExpr (List< Expression > *list)
 Creates a new CommaExpr object with the expressions in 'list' as its arguments.
 CommaExpr (const CommaExpr &e)
 Copy constructor.
virtual ~CommaExpr ()
 Virtual destructor.
virtual CommaExproperator= (const CommaExpr &)
 Copy assignment.
virtual Expressionclone () const
 Return a copy of myself.
virtual int structures_OK () const
 Return 1 if my structures are in a valid state.
virtual void convert (BinRep &exprSet, Symtab &symtab)
 Read in the values of my fields and my subexpressions from the given BinRep object.
virtual void print_debug (ostream &o, Boolean debug) const
 See Expression.h.
virtual int exchange_expr (VDL &vdl)
 Create a node in the "expression" member and return the index.

Friends

class ExprTable

Detailed Description

An expression representing an argument list.

Polaris Expression

See also:
Expression/CommaExpr.h

Expression/CommaExpr.h

Expression/Expression.cc

Description

A CommaExpr represents a comma-separated list of expressions. CommaExprs are typically used for representing the argument lists of array references or function calls.

Definition at line 28 of file CommaExpr.h.


Constructor & Destructor Documentation

CommaExpr::CommaExpr  )  [inline]
 

Constructor for a CommaExpr with no args.

< nothing to do

Definition at line 70 of file CommaExpr.h.

References COMMA_OP, make_type(), and VOID_TYPE.

CommaExpr::CommaExpr Expression exp1,
Expression exp2 = 0,
Expression exp3 = 0,
Expression exp4 = 0,
Expression exp5 = 0
[inline]
 

Constructor for a CommaExpr with up to five args.

CommaExpr::CommaExpr List< Expression > *  list  )  [inline]
 

Creates a new CommaExpr object with the expressions in 'list' as its arguments.

'list' is deleted automatically, so the user must NOT delete 'list' after the call to this constructor.

Definition at line 89 of file CommaExpr.h.

References COMMA_OP, make_type(), and VOID_TYPE.

CommaExpr::CommaExpr const CommaExpr e  )  [inline]
 

Copy constructor.

< nothing to do

Definition at line 96 of file CommaExpr.h.

References e.

CommaExpr::~CommaExpr  )  [virtual]
 

Virtual destructor.

... nothing to do

Definition at line 3851 of file Expression.cc.


Member Function Documentation

CommaExpr & CommaExpr::operator= const CommaExpr  )  [virtual]
 

Copy assignment.

Definition at line 3863 of file Expression.cc.

Expression * CommaExpr::clone  )  const [virtual]
 

Return a copy of myself.

Reimplemented from NonBinaryExpr.

Definition at line 3857 of file Expression.cc.

Referenced by Data::Data(), and substitute_parameters_data().

int CommaExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Reimplemented from NonBinaryExpr.

Definition at line 3871 of file Expression.cc.

virtual void CommaExpr::convert BinRep exprSet,
Symtab symtab
[virtual]
 

Read in the values of my fields and my subexpressions from the given BinRep object.

Convert(BinRep) expects the BinRep to be referencing an expression set of the same type as the expression. On return, all data from the expression set has been inserted into the appropriate fields in the expression object. NOTE that this converts the expression to an intermediate form which may contain TableExpr objects.

Reimplemented from NonBinaryExpr.

virtual void CommaExpr::print_debug ostream &  o,
Boolean  debug
const [virtual]
 

See Expression.h.

Reimplemented from NonBinaryExpr.

Referenced by Data::print().

int CommaExpr::exchange_expr VDL vdl  )  [virtual]
 

Create a node in the "expression" member and return the index.

Reimplemented from NonBinaryExpr.

Definition at line 3878 of file Expression.cc.

References Expression::exchange_expr(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), BinRep::to_tuple(), and List< T >::valid().

Referenced by DataList::exchange_convert().


Friends And Related Function Documentation

friend class ExprTable [friend]
 

Reimplemented from NonBinaryExpr.

Definition at line 29 of file CommaExpr.h.


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:06 2005