782 views
4 votes
4 votes
Which of the following sentences is CORRECT?
  1. A top-down parse produces a leftmost derivation of a sentence
  2. A bottom-up parse produces a rightmost derivation of a sentence
  3. A top-down parse produces a rightmost derivation of a sentence
  4. A bottom-up parse produces a leftmost derivation of a sentence

1 Answer

Best answer
12 votes
12 votes
A top-down parse produces a leftmost derivation of a sentence.
A bottom-up parse produces a rightmost derivation of a sentence but in reverse.
selected by
Answer:

Related questions

6 votes
6 votes
2 answers
1
Arjun asked Jan 26, 2019
1,731 views
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduceshift-reduce conflictreduce-reduce conflictno extra conflictboth shift-reduce as well as redu...
4 votes
4 votes
2 answers
2
Arjun asked Jan 26, 2019
870 views
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 po...
3 votes
3 votes
1 answer
4