K
Kobu
Hi,
I've gotten into the habit of mentally converting big expressions to
parse tress (started doing this after reading some c.l.c posts on parse
trees).
Can someone verify if the following assumptions are correct?
1) For ++n, one can us (n=n+1) as it's equivalent:
| =
| / \
| n +
| / \
| n 1
2) For assignment operators of the form n op= b, the equivalent tree
is:
| =
| / \
| n op
| / \
| n b
3) For n++, one can use n, but with a side condition that (n=n+1) will
occur somewhere between now and the earliest sequence point up the tree
(but n=n+1 is no physically part of the tree)
|
| n
|
| [Side note: (n=n+1) can occure as a side effect anytime before the
| earliest sequence point up the tree]
Are my assumption correct?
I've gotten into the habit of mentally converting big expressions to
parse tress (started doing this after reading some c.l.c posts on parse
trees).
Can someone verify if the following assumptions are correct?
1) For ++n, one can us (n=n+1) as it's equivalent:
| =
| / \
| n +
| / \
| n 1
2) For assignment operators of the form n op= b, the equivalent tree
is:
| =
| / \
| n op
| / \
| n b
3) For n++, one can use n, but with a side condition that (n=n+1) will
occur somewhere between now and the earliest sequence point up the tree
(but n=n+1 is no physically part of the tree)
|
| n
|
| [Side note: (n=n+1) can occure as a side effect anytime before the
| earliest sequence point up the tree]
Are my assumption correct?