retagged by
252 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$
retagged by

1 Answer

Best answer
3 votes
3 votes
  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

2 votes
2 votes
0 answers
1
Bikram asked Nov 25, 2016
448 views
$\textbf{goto}$ function of LR class of grammar is represented as:Deterministic Finite Automata transitionsNon-deterministic Finite Automata transitionsPDA transitionsPar...
3 votes
3 votes
1 answer
2
Bikram asked Nov 25, 2016
448 views
Consider the following grammar:$E \rightarrow E + T \mid T$$T \rightarrow T ^* F \mid F$$F \rightarrow (E) \mid id$What are the productions for E, T and F after convertin...
2 votes
2 votes
1 answer
3
Bikram asked Nov 25, 2016
300 views
Which one of the following statements is TRUE?SLR parser has more states than LALR parser.LALR parser has more states than Canonical LR.Canonical LR has fewer states than...
3 votes
3 votes
1 answer
4
Bikram asked Nov 25, 2016
983 views
Which one of the following can be handled by predictive parsers?Left recursionLeft factorsAmbiguityNon-determinism