Compact the parsing tables constructed in Exercises 4.33 4.34, and 4.35, according to the method of Section 4.7.
Exercises 4.33
Consider the ambiguous grammar
![](https://test.transtutors.com/qimg/2079b345-a34f-4ddb-a621-9414164803b0.png)
a) Construct the collection of sets of LR(O) items for this grammar.
b) Construct an NFAin. which each state is an LR(0) item from (a). Show that the Photograph of the canonical collection of LR(O) items for this grammar is the same as Ihe DFA constructed from the NFA using the subset construction.
c) Construct the parsing table using the SLR Algorithm 4.8.
d) Show all moves allowed by the table from (c) on the input abab.
e) Construct the canonical parsing table.
f) Construct the parsing table using the LALR Algorithm 4.11. g) Construct the parsing table using the LALR Algorith m 4. 13,
Exercises 4.34
Construct an SLR parsing table for the grammar in Exercise 4.3.
Exercise 4.3 Consider the grammar
![](https://test.transtutors.com/qimg/4ed90128-e1ab-42e0-bfe4-168ab898784e.png)
a) Construct a parse tree for the sentence not (true or false).
b) Show that this grammar generates all boolean expressions.
*c) Is this grammar ambiguous? Why?
Exercises 4.35
Consider the following grammar
![](https://test.transtutors.com/qimg/9e3232d1-98f5-4080-a63b-026e207cea2f.png)
a) Construct the SLR parsing tabie for this grammar.
b) Construct the LALR parsing table