The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
100 views

in Compiler Design by Active (2.3k points)
edited by | 100 views
0
|||?
0
They've given I , II and III as the answer.
0
Ohh yes...I misjudged ....all s-r r-r are possible ..When you merge them

they will look like this:

A->d.,c|b|f

B->d., b|d|$

X->.fx,g|$

Y-> .g,a|$.

There is R-R confilct in B->d. and A->d. as both will have look-ahead as b.

S-R conflict between X->.fx and A->d. .
0
I get the explanation, but how can "Can be merged" as in I and II and "cannot be merged" as in III both be the answer?
0
I and II are only true.
The given example is LR(1).
Since every production is same only lookaheads are different so we can definately merge them to form LALR(1) example.

Please log in or register to answer this question.

Related questions

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,713 answers
189,264 comments
79,712 users