Q19.Marks: +2.0UGC NET Paper 2: Computer Science 8th Oct 2022
Consider the following statements:
Statement I: LALR parser is more powerful than canonical LR Parser.
Statement II: SLR parser is more powerful than LALR
Which of the following is correct?
1.Statement I true and Statement II false
2.Statement I false and Statement II true
3.Both Statement I and Statement II false✓ Correct
4.Both Statement I and Statement II true
Solution
LR parsing is one sort of bottom up parsing. It is used to parse a broad category of grammars. "L" denotes left-to-right scanning of the input in LR parsing, "R" signifies the reverse construction of a right-most derivation and "K" is the number of input symbols used to determine the number of parsing decisions.
LR parsing consists of four different parts: LR (0) parsing, SLR parsing, CLR parsing, and LALR parsing.