Consider the grammar G with productions \(S\to A\mid B,\quad A\to a\mid c,\quad B\to b\mid c\). The nonterminals are S, A, B and the terminals are a, b, c. Without rewriting G or resolving parsing-table conflicts by an extra rule, which statements are correct? S1: The canonical LR(1) parsing table for G is conflict-free. S2: The LL(1) predictive parsing table for G is conflict-free.
Neither S1 nor S 2
\(\mathrm{FIRST}(A)=\{a,c\},\quad\mathrm{FIRST}(B)=\{b,c\}\). Thus the LL(1) entry for S and lookahead c has both productions S → A and S → B.
In the canonical LR(1) automaton, after c the completed items \([A\to c\mathbin{\cdot},\$]\) and \([B\to c\mathbin{\cdot},\$]\) require two reductions on the same lookahead. This is a reduce/reduce conflict. Neither statement is correct.
Consider the following statements:
Statement I: LALR parser is more powerful than canonical LR Parser.
Statement II: SLR parser is more powerful than LALR
Which of the following is correct?
Given below are two statements
Statement I : LL(1) and LR are examples of Bottom‐up parsers.
Statement II : Recursive descent parser and SLR are examples of Top‐down parsers
In light of the above statements, choose the correct answer from the options given below