The Gateway to Computer Science Excellence
0 votes
82 views

        

WHICH OF THE FOLLOWING STATEMENTS ARE TRUE?

a) S1 & S3

b) S2 & S4

c) S2 & S3

d) None of these

Answer is option a.

can anyone tell me how option a is correct?

in Compiler Design by (181 points)
edited by | 82 views

1 Answer

+1 vote

Okay ..

To check,  this is LR(0) or not check Conflicts.

There are two type conflict 1) SR Conflict and 2) RR conflict

A full parsing table is not needed, only the canonical collection. In the canonical collection, find all final items (and only final items), and see if:

  • There are both shift and reduce in the same item ("shift-reduce", s/r)
  • There are two reduce actions in the same item ("reduce-reduce", r/r)

If none of these is true, there are no conflicts means it is LR(0).

And If it is LR(0) then it is also SLR.

 

Here you can see there is no conflict. 

by Active (1.7k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,563 answers
195,730 comments
101,647 users