Parsing Algorithm Teaching System
YOKOYAMA -
MIYADERA Lab
Department of Computer Science and Informatics
Tokyo Gakugei University
This Parsing Algorithm Teaching System presents an algorithm to parse
an arithmetic expression (that you type), and converts it to reverse
polish notation. In a normal expression, for example "a+b*c", cannot
be computed just by reading the expression from left to right.
Instead, the "*" needs to be computed before the "+". After
converting this expression to reverse polish notation, which is
"abc*+", the expression can be computed by reading from left to right.
The system uses animation and program visualization to show how the
algorithm works.
Instructions:
- Parsing an Expression:
- Under the program name is a listing of the C code of the program.
- As the program runs, the currently executing line is highlighted.
- Program Variables:
- Shows the program's variables and their values as the
program runs.
- The main input and output variables and animations of their values
are at the top of this area.
- Input and Output:
- Please type any input to the program in this area.
- Also shows any output the program prints on the console.
- Controls:
- Run:
Press this button to start the program running.
- Stop:
Press this button to pause the program at any
time.
- Step:
Each press of this button makes the program
execute one step.
- Back:
Each press of this button makes the program go
back one step, to see what it did before.
- Reset:
If you want to run the program again from the
start with different input, press this button.
- Speed:
Control the speed of the program when it is
running.
- Algorithm:
Choose which algorithm to visualize.
(There is only one Parsing algorithm in this system, so this control
has no effect.)
- Status:
Shows whether the program is running, stopped,
waiting for input, or if you are looking at previous steps (with
Back). Below the status is a short sentence explaining why the
program is executing each step.
View source code of the Teaching System:
Back to the Teaching System.