=========================================================
=  Simple 6-Function Calculator / Expression Evaluator  =
=========================================================
 
Author:  Pollack, Bary W   - ID 1234 - Section 001
Author:  Skywalker, Anakin - ID 5678 - Section 001
Date:    February 10, 2001
Course:  CIS 110L - Data Structures & Algorithms - Assignment L2
 
This program reads a sequence of lines, each containing a valid
arithmetic expression.  Each expression is evaluated.  The
Calculator supports + - * / ^ =.  Variables have initial value
zero.  Their subsequent values are as calculated and assigned.
Input is assumed to come from file 'CalcData.txt' which should
reside in the current directory.  At the end of execution the
contents of the Symbol Table are displayed.
 
Evaluation proceeds in two steps:
 
1. Translate each infix expression into postfix, printing the
   resulting expression.  Use the Railway Shunt Algorithm for
   infix -> postfix.
 
2. Evaluate the postfix expression, printing the final result.
   Use direct evaluation to accomplish this.
 
Translation and Evaluation Begins...
 
Expression #1
Input:     2+3
Postfix:   2 3 + | 
Value:     5

Expression #2
Input:     2*3+4*0.5e1
Postfix:   2 3 * 4 5 * + | 
Value:     26

Expression #3
Input:     baker = (2+3)*4
Postfix:   baker 2 3 + 4 * = | 
Value:     20

Expression #4
Input:     2^3^2
Postfix:   2 3 2 ^ ^ | 
Value:     512

Expression #5
Input:     Charlie = 2^(1+2)^2.0E0
Postfix:   Charlie 2 1 2 + 2 ^ ^ = | 
Value:     512

Expression #6
Input:     able = 3^2-5
Postfix:   able 3 2 ^ 5 - = | 
Value:     4

Expression #7
Input:     chuck = 1/100
Postfix:   chuck 1 100 / = | 
Value:     0.01

Expression #8
Input:     David = 5.0E0 - 1 / chuck
Postfix:   David 5 1 chuck / - = | 
Value:     -95

Expression #9
Input:     able = (3*able)-(4*able-9.5)*3
Postfix:   able 3 able * 4 able * 9.5 - 3 * - = | 
Value:     -7.5

Final Values (5 variables)

    1    able      -7.5
    2    baker     20
    3    Charlie   512
    4    chuck     0.01
    5    David     -95

* Fini! *

