1,249 views
4 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
15 15 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:
Position:
Show:

Related questions

10 10 votes
4 4 answers
2.7k
2.7k views
Arjun asked Jan 26, 2019
2,687 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 4 votes
2 answers 2 answers
1.5k
1.5k views
Arjun asked Jan 26, 2019
1,455 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...
6 6 votes
3 3 answers
5.7k
5.7k views
Arjun asked Jan 26, 2019
5,655 views
Which of the following statements is FALSE?Any DCFL has an equivalent grammar that can be parsed by a SLR(1) parser with end string delimiterLanguages of grammars parsed ...
3 3 votes
1 1 answer
5.0k
5.0k views
Arjun asked Jan 26, 2019
4,963 views
Which of the following statements is FALSE?In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same stateIn a SLR(1) parser, it is allowable ...