# ACE test series

91 views

PLEASE anyone can explain the states step wise

Ans is given D

1 vote

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.

selected by
0
Thanks

1 vote
1
498 views
1 vote