573 views
4 votes
4 votes

Identify the type of the grammar and give justification

S $\rightarrow$ XYc

X $\rightarrow$ Yb | a

Y $\rightarrow$ c | $\epsilon$
 

  1. SLR(1)
  2. Not SLR(1)
  3. LR(1)
  4. LALR(1)

    Someone please explain me it with state diagram . I'm confused with $\epsilon$ in the I0 Closure

1 Answer

4 votes
4 votes

At level I

y-> epsilon will be reduced production and with lookahead b and there will be shift production y->c with look ahead b .

so there is SR conflict . 

so option B is correct .

Related questions

6 votes
6 votes
4 answers
1
pC asked Nov 20, 2015
3,813 views
The Grammar E$\rightarrow$ EE | a isLR(1)SLR(1)LR(0)None
2 votes
2 votes
1 answer
2
Mk Utkarsh asked Jan 19, 2018
411 views
S $\rightarrow A$A $\rightarrow AB/$$\epsilon$B $\rightarrow aB/b$is this grammar LALR(1) ?
0 votes
0 votes
3 answers
3
8 votes
8 votes
3 answers
4
Parshu gate asked Nov 13, 2017
15,525 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...