in Compiler Design edited by
1,695 views
6 votes
6 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 edited by
by
1.7k 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 look aheads.

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

Related questions