edited by
1,687 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
edited by

2 Answers

1 votes
1 votes
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