This activity demonstrates the means by which arithmetic espressions can be analyzed by parenthesizing. The result of the "analysis" is a hierarchial graph of the factors which constitute the components of the expression, where each factor is composed of a single operator and its relevant operand(s), and the level of presentation of each factor represents, from the bottom upwards, the order of evaluation. The method of parenthesizing is explained elsewhere.
Input is limited to unparenthesized expressions containing one character operands (variable names or integer constants) and operators from the set:
|^||Raise to the Power|
NOTE: The unary minus (~) may only be used at the certain places in an expression - at the beginning or immediately following an assignment operator. Thus an expression such as 6*~d is not valid, whereas ~6*d is acceptable as is A=~D+2. This demonstration DOES NOT check the syntactic validity of the submitted expressions.
Last updated 2000/11/28
© J.A.N. Lee, 2000.