retagged by
639 views

1 Answer

0 votes
0 votes

My Answer is

Here we use bottom up approach

we have to construct parse tree for given input

then first we get id--F =>print wool

                        F--T=> ,baa

                        T---E =>,black

                        id--F => wool

                        F--T=> ,baa

                        id--F => wool

                        T*F ---T =>,baa

                        E+T ---E=>,sheep

                      E  dollarsymbol --- E1 => dollarsymbol

By printing all we get wool,baa,blackwool,baawool,baa,sheepdollarsymbol

edited by

Related questions

0 votes
0 votes
1 answer
1
3 votes
3 votes
5 answers
2