[Prev][Next][Index]
Re: transforming expressions
- From: "Beata Winnicka" <bfatyga@slab.cica.indiana.edu>
- Date: Fri, 12 Aug 94 10:18:50 -0500
- To: aba@atlas.ex.ac.uk
- Subject: Re: transforming expressions
- Cc: sage-users@cica.indiana.edu
Adam,
replacing expressions "in place" is not a good idea. Instead, try to organize
your program so it can work in the following way:
-write a function: Expression * replace(Expression *) that will take e1 as argument and return a _newly_
created SgFunctionCallExp.
-use the SgExpression::setLhs(), SgExpression::setRhs(), or SgStatement::setExpression(int i,
SgExpression &e) methods to replace e1 by the expression returned by the replace function.
--Beata