StreakPeaked· Practice

ExamsGATETechnical

Which one of the following kinds of derivation is used by LR parsers?

  1. Leftmost
  2. Leftmost in reverse
  3. Rightmost
  4. Rightmost in reverse

Correct answer: Rightmost in reverse

Solution

LR parsers utilize a rightmost in reverse derivation because they construct the parse tree from the leaves up to the root, effectively processing the input from the end to the beginning, which aligns with the rightmost derivation approach.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →