Compiler HWK#3 Due date: 2:20pm, April 26, 2007 Consider the following grammar E -> E' T E' -> T E' | ( T') | R H | epsilon T -> F T' | a | b | c T' -> / F T' | * F T' | epsilon F -> int | float | ( E ) | [ E ] | epsilon R -> T' : T | epsilon H -> char | star 1. Compute FIRST for all nonterminals 2. Compute FIRST for all strings that are on the right hand side of a production 3. Computer FOLLOW for all nonterminals 4. Is the grammar LL(1)? Explain your answers. 5. Build a top-down parsing table for this grammar. 6. Parse the input ( * ( b ) / float ) NOTE: (a) epsilon is the empty string. (b) Need to give intermediate steps during computation (c) If a grammar is not LL(1), then some of the entries in the parsing table may have more than one entries. (d) Parse an input using the format in ALSU textbook p. 228. Stop the parsing the moment when the action is reject or ambiguous. (e) E is the starting nonterminal