Q. An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if andonly if (Solved)

1. the SLR(1) parser for G has S-R conflicts

2. the LR(1) parser for G has S-R conflicts

3. the LR(0) parser for G has S-R conflicts

4. the LALR(1) parser for G has reduce-reduce conflicts

  • b. the LR(1) parser for G has S-R conflicts
Subscribe Now

Get All Updates & News