E → E+T | T T → T*F | F F → (E) | id
Stack | Symbols | Input | Action |
---|---|---|---|
0 | $ | id + id | shift to 5 |
0 5 | $ id | *id | Reduce F→ id |
0 | $ F | + id | go to state 3 |
0 3 | $ F | + id | Reduce T → F |
0 | $ T | + id | go to state 2 |
0 2 | $ T | + id | Reduce E → T |
0 | $ E | + id | go to state 1 |
0 1 | $ E | + id | Shift, goto sate 6 |
0 1 6 | $ E + | id | Shift, goto sate 5 |
0 1 6 5 | $ E + id | $ | Reduce F → id |
0 1 6 | $ E + F | $ | go to state 3 |
0 1 6 3 | $ E + F | $ | Reduce T → F |
0 1 6 | $ E + T | $ | go to state 9 |
0 1 6 9 | $ E + T | $ | Reduce E → E + T |
0 1 6 | $ E | $ | Reduce E → E + T |