Question: Consider the following grammar: E - > E + T | T T - > T * F | F F - > ( E

Consider the following grammar: E -> E+T | T T -> T*F | F F ->(E)| a Below is a sample run of the PDA for this grammar on input a+aa. The run is successful, in the sense that it leads the PDA to accept the input. Input Stack a + a * a E a + a * a E + T a + a * a T + T a + a * a F + T a + a * a a + T + a * a + T a * a T a * a T * F a * a F * F a * a a * F * a * F a F a a empty empty Consider input a+a. Consider input a+a. In the same style as shown in table above, illustrate each of the following runs. An unsuccessful run is one that leads the PDA to reject. (1) A successful run. (2) An unsuccessful run that ends with a terminal at the top of the stack but no remaining input symbols. (3) An unsuccessful run that ends with a mismatch between the terminal at the top of the stack and the next input symbol. (4) An unsuccessful run that ends with an empty stack but symbols still remaining in the input. (5) An unsuccessful run where the PDA simply does not halt.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!