The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
58 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 | 58 views

1 Answer

0 votes

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)

Related questions

0 votes
0 answers
1
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
49,807 questions
54,711 answers
189,259 comments
79,685 users