Question: Consider the grammar - > | - > | Where is the start symbol, and are the non - terminals and and are the terminals.

Consider the grammar
->|
->|
Where is the start symbol, and are the non-terminals and and are the terminals. For each of the following indicate if (0) the input has no parse tree according to the grammar, (1) the input has one unique parse tree according to the grammar or (2) the input only two parse trees according to the grammar.
1. a a b b (2 as followed by 2 bs)
2. a a a b b b (3 as followed by 3 bs)
3. a a a a b b b b (4 as followed by 4 bs)
4. a a a a a b b b b b (5 as followed by 5 bs)
5. a a a a a a a a b b b b b b b b (8 as followed by 8 bs)
6. Give an example of an input that has three parse trees according to the grammar.
7. Draw two of the parse trees for the input given in part 6

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!