5 votes 5 votes Suppose we have a rightmost derivation which proceeds as follows: $\begin{array}{ccc}S &\rightarrow & Aabw\\ & \rightarrow &ABw \end{array}$ Which of the following is a possible handle for it? $\begin{array}{ccc} A &\rightarrow & ab \end{array}$ $\begin{array}{ccc} A &\rightarrow & a\end{array}$ $\begin{array}{ccc} S &\rightarrow & A\end{array}$ $\begin{array}{ccc} B &\rightarrow & ab \end{array}$ Compiler Design go2025-cd-1 lr-parser + – gatecse asked Dec 14, 2020 • edited Dec 15, 2020 by Lakshman Bhaiya gatecse 212 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes In the rightmost derivation in reverse, $B$ is being replaced by $ab$ or $"ab"$ is reduced using the production $B \to ab.$ So, $B \to ab$ is the handle. gatecse answered Dec 14, 2020 • selected Nov 28, 2021 by Arjun gatecse comment Share Follow See all 0 reply Please log in or register to add a comment.