This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (c) Construct the LL(1) parsing table for your new grammar. (d) Consider the following input string: cababca . Show the steps of an LL parser as it uses your parsing table to predict the expansion of each non-terminal for this input, showing the input as it is consumed, and the parse stack at each step of the parse. 4. Consider the following simple (augmented) grammar: S L $ L E ; L L E E nil (a) Show the steps of a bottom-up parser as it parses the input nil ; nil ; nil , showing the input as it is consumed, the parse stack at each step of the parse, and the action applied at each step. (b) Construct the LR(0) item sets for this grammar: (c) Is this grammar LR(0)? Why or why not? (d) Construct the SLR(1) parse table for this grammar. (e) Is this grammr SLR(1)? Why or why not?...
View Full Document
- Fall '08