in Compiler Design retagged by
257 views
3 votes
3 votes

Match the following:

$$\begin{array}{|l|l|l|l|} \hline a. & \text{Canonical Parser} & 1. & \text{No adjacent nonterminals} \\ \hline b. & \text{SLR(1) Parser} & 2. & \text{Follow sets must be disjoint} \\ \hline c. & \text{LL(1) Parser} & 3. & \text{Most powerful parser} \\ \hline d. & \text{Operator Precedence Grammar} & 4. & \text{Top-down parser} \\ \hline \end{array}$$

  1. $a-2; b-3; c-1; d-4$
  2. $a-3; b-4; c-2; d-1$
  3. $a-2; b-1; c-4; d-3$
  4. $a-3; b-2; c-4; d-1$
in Compiler Design retagged by
by
257 views

1 Answer

3 votes
3 votes
Best answer
  1. Operator precedence grammar have no two non-terminals are adjacent and no epsilon move.
  2. If in case one final item and one reduce move  $A\rightarrow p.ad , B\rightarrow b.\:FOLLOW(A) \cap FOLLOW (B)=\phi$ ,That means follow(A) and follow(B) set are disjoint(means no common terminals ) set.
  3. Canonical parser means CLR(1)=LR(1)= most powerful parser.
  4. LL(1) parser is Top-down parser.

So, the correct answer is $(D)$.

References:

edited by
Answer:

Related questions