Programming
October 19, 2023Programming
October 20, 2023Compiler-Design
Question 13 |
Which of the following statements about parser is/are CORRECT?
I. Canonical LR is more powerful than SLR.
II. SLR is more powerful than LALR.
III. SLR is more powerful than Canonical LR.
I only | |
II only | |
III only | |
II and III only |
Question 13 Explanation:
Canonical LR is more powerful than SLR as every grammar which can be parsed by SLR parser, can also be parsed by CLR parser.
The power in increasing order is:
LR(0) < SLR < LALR < CLR
Hence only I is true.
The power in increasing order is:
LR(0) < SLR < LALR < CLR
Hence only I is true.
Correct Answer: A
Question 13 Explanation:
Canonical LR is more powerful than SLR as every grammar which can be parsed by SLR parser, can also be parsed by CLR parser.
The power in increasing order is:
LR(0) < SLR < LALR < CLR
Hence only I is true.
The power in increasing order is:
LR(0) < SLR < LALR < CLR
Hence only I is true.
Subscribe
Login
0 Comments