Parsing · Compiler Design
58 questions · asked in 25 of 27 years (2000–2026)
MCQ 46 · MSQ 5 · NAT 71-mark 39 · 2-mark 19
Questions 56–58 of 58
Answer: (A)
Correct Option: A
(A) We cannot have different Left Most Derivation and Right Most Derivation parse trees, BUT we can certainly have different LMD and RMD for a given string. (Here, LMD and RMD mean the order of the productions used in the derivation, and this order can be different.)
(D) is not the false statement, because IT IS TRUE that any LR(k) grammar IS NEVER AMBIGUOUS. So an ambiguous grammar can never be LR(K) for any k, however large k becomes.
(B) and (C) cannot be the answer, because LL(1) is a top-down parser and LALR is more powerful than SLR. So both are TRUE.
Which of the following is true?
Answer: (B)
So has higher precedence than * (and +).
Answer: has higher precedence than *
Answer: (A)
A bottom-up parser uses the reverse of the rightmost derivation.
Correct Answer :
Keep practising