COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

MISCELLENOUS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following statement is True
A
LALR is more powerful than CLR
B
CLR is more powerful than LALR
C
Both have same power
D
CLR cannot be compared with LALR
Explanation: 

Detailed explanation-1: -True, Canonical LR parser is more powerful than LALR parser. The number of states in the parsing automaton differs between the CLR and LALR algorithms. CLR parsers have a much larger number of states than LALR parsers.

Detailed explanation-2: -Connonical (CLR) is the most powerful Parsers among all the LR(k) Parsers or SLR. So, it is correct. 2. SLR is more powerful than LALR is incorrect.

Detailed explanation-3: -Explanation: Canonical LR (CLR) is the most powerful parser than LALR and SLR.

Detailed explanation-4: -The LALR(1) parser is less powerful than the LR(1) parser, and more powerful than the SLR(1) parser, though they all use the same production rules.

There is 1 question to complete.