Which one of the following is false ?
2015
Which one of the following is false ?
- A.
LALR parser is Bottom-Up parser
- B.
A parsing algorithm which performs a left to right scanning and a right most deviation is RL(1)
- C.
LR parser is Bottom-Up parser
- D.
In LL(1), the 1 indicates that there is a one symbol look-ahead
Attempted by 91 students.
Show answer & explanation
Correct answer: B
Answer: The false statement is "A parsing algorithm which performs a left to right scanning and a right most deviation is RL(1)".
Explanation:
Left-to-right scanning with a rightmost derivation describes LR(1) parsers. LR parsers are bottom-up and reconstruct a rightmost derivation in reverse.
RL(1) denotes scanning right-to-left and producing a leftmost derivation, so the statement incorrectly names RL(1) for the described behavior.
LALR is a Look-Ahead LR variant that performs bottom-up parsing and reduces table size by merging similar states.
In LL(1), the '1' means a single-symbol lookahead is used to choose productions during left-to-right, leftmost-derivation parsing.