in Compiler Design
1,068 views
5 votes
5 votes
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduce
  1. shift-reduce conflict
  2. reduce-reduce conflict
  3. no extra conflict
  4. both shift-reduce as well as reduce-reduce
in Compiler Design
by
1.1k views

1 comment

B. we can only introduce R-R conflicts.
0
0

2 Answers

1 vote
1 vote
ans is B.

It is because we construct LALR parsing table by merging states of CLR(1) which are only separated by look a heads. In doing so we may merge states which introduce R-R conflicts
0 votes
0 votes
To go from CLR(1) parsing table to LALR(1) parsing table, we merge the states that have the same final items but different lookaheads.

In doing so, we can only introduce RR conflicts.
Answer:

Related questions