The Gateway to Computer Science Excellence
0 votes
120 views

in Compiler Design by Active (3.5k points)
edited by | 120 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.

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,735 comments
101,663 users