Discussion
Consider the following statements about LALR parsing.
1. It has the same number of states as the SLR parser.
2. Merging states can introduce reduce-reduce conflicts.
3. It can introduce shift-reduce conflicts not present in canonical LR.
Answer: A
LALR has the SLR state count with better lookaheads. Merging may create a reduce-reduce conflict but provably never a shift-reduce one, so the third statement is false. That asymmetry is a standard result quoted in every treatment of the method.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development