Repeat Exercise 4.48 for the unambiguous grammar
What do your answers to Exercises 4.48 and 4.49 say about the relative efficiency of parsers for equivalent ambiguous and unambiguous grammars? What about the relative efficiency of constructing the parser?
Exercises 4.48 Consider the following ambiguous grammar for n binary infix operators
Assume that all operators are left-associative and that 6i takes precedence over (Ij if i > i a) Construct the SlR sets of items for this grammar . How many sets of items are there, as a function of n?
b) Construct the SLR parsing table for this grammar and compact it using the list representation in Section 4.7. What is the total length of all the lists used in the representation, as a function of n1
c) How many steps does it take to parse id θ, id θj id?