This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: without the subscripts for the parse states). Indicate any conflicts and describe why they are conflicts. Is G 2 LR(1)? Is it LR(0)? (c) Indicate whether G 1 and G 2 are LL(1). You don’t need to construct their LL(1) parse tables, but you may argue from other properties. (d) Of the language classes we have discussed in class, what is the smallest category into which L ( G 1 ) fits? Justify your answer. [Hint: This is a trick question!] 1 2. LL Parsing Given the following grammar: S → uBDz B → Bv B → w D → EF E → y E → F → x F → (a) Calculate nullable, FIRST, and FOLLOW for this grammar. (b) Construct the LL(1) parsing table and give evidence that this grammar is not LL(1). (c) Modify the grammar as little as possible to make an LL(1) grammar that accepts the same language. 2...
View Full Document
- Fall '08
- Context-free grammar, Context free Grammars, grammar g1, input string bbbb