Parsing & Syntax Analysis

Answer & solution
Answer: C (no official key was published)
1. Approach. Read i,t,e as if, then, else. In nested conditionals, an else can attach to either the inner or the outer if. Exhibit two parses of the same string to prove ambiguity.
2. Derivation and interpretation. The grammar is S→iCtSS₁ | a, S₁→eS | ε, C→b. It is the dangling-else grammar. The string i b t i b t a e a has two parse trees: the e a can belong to the inner conditional (inner S₁→eS, outer S₁→ε) or the outer conditional (inner S₁→ε, outer S₁→eS). Therefore it is ambiguous and cannot be LL(1), giving C. Equivalently e belongs both to FIRST(eS) and FOLLOW(S₁), causing a prediction-table conflict with S₁→ε. Right recursion by itself is not an obstruction to LL(1), and these productions are context-free and not left recursive.