The Gateway to Computer Science Excellence
0 votes

PLEASE anyone can explain the states step wise 

Ans is given D

in Compiler Design by (357 points) | 59 views

1 Answer

+1 vote
Best answer

As options are about transition  $S \rightarrow a$ only I have designed diagram for that only and

new transition takes place then we'll check due to which Variable it is occurring and take its new lookahead.

At state I0, we start with augmented state so its look-ahead is $. In next transition in I0, marked S have lookahead as its follow which is S. So first of its immediately next S (.SS+) which is 'a' is lookahead .

Similarly in state I1, marked S will produce new transition with its lookahead as its follow i.e +.

In LALR(1) we combine states with same transition and different lookahead so I2 and I3 are combined. So we get option D.

by Active (1.3k points)
selected by

Related questions

+1 vote
1 answer
+1 vote
1 answer
0 votes
1 answer
asked Jan 24, 2019 in Compiler Design by Shankar Kakde (195 points) | 64 views
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,737 questions
57,314 answers
105,085 users