[Prev][Next][Index]
Re: A question about SgStatement::expr()
- Date: Fri, 29 Jul 1994 08:57:13 -0600
- From: Diego Novillo <diego@cs.ualberta.ca>
- Subject: Re: A question about SgStatement::expr()
- To: Andrew Mauer <mauer@mcs.anl.gov>
- Cc: Sage bug reports <sage-bugs@cica.indiana.edu>
- In-Reply-To: <199407282120.QAA01171@antares.mcs.anl.gov>
On Thu, 28 Jul 1994, Andrew Mauer wrote:
>
> > I've been experimenting with SgStatement::expr() and it appears
> > that it is always true that given,
> >
> > SgStatement *st = .... ;
> >
> > Then, if the statement is executable, st->expr(i)->lhs() will
> > contain the executable expression and st->expr(i)->rhs() will be NULL. Is
> > that true?
> >
> > I tried it on several sources and it seems to be true, but I wanted to
> > confirm that.
> >
>
> It is not always true. Except in pathological circumstances, it
> probably is, but check out this program:
>
Ok. Now, suppose I have the same statement *st and one of st->expr(i) is
a valid expression, is it true that the LHS of this expression will
always be non-NULL? I think yes, because cases like your counterexample,
the LHS will be the EXPR_LIST that I can traverse.
Thanks! Diego.
--
Diego A. Novillo | "We each pay a fabulous price for our
diego@cs.ualberta.ca | visions of paradise. But a spirit with
Computing Science - U of Alberta | a vision is a dream with a mission"
Edmonton, Alberta - Canada | Rush - Mission
Follow-Up(s):
Reference(s):