[Prev][Next][Index]
Re: Valid Expressions
- To: Diego Novillo <diego@cs.ualberta.ca>
- Cc: sage-bugs@cica.indiana.edu
- Subject: Re: Valid Expressions
- In-Reply-To: Your message of "Fri, 29 Jul 1994 08:57:13 MDT."
<Pine.3.89.9407290813.A5091-0100000@sundance.cs.ualberta.ca>
- Date: Fri, 29 Jul 1994 10:03:37 -0500
- From: Andrew Mauer <mauer@mcs.anl.gov>
[...]
> 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.
>
I think you are correct, but I am not sure why it is so important. If
you are traversing the expression tree, I would suggest doing so in a
"safe" manner --- descend the entire tree looking for what you are
interested in; if you do not find it, fine, but there is never any
chance of dying because some node had an unexpectedly null child. My
Iterator_Expr class provides this functionality (if you do not have it
and want it, email me).
/Andrew/
Follow-Up(s):
Reference(s):