The Gateway to Computer Science Excellence
0 votes
163 views

How to solve this problem ?? Is the given solution correct?

in Compiler Design by (375 points)
edited by | 163 views
0
Yes this is correct. And solution is same as they have given.
0
Can you explain how the look ahead are calculated ?
0
only $ in first T production
0
So the answer should be there is only one look ahead. Right? And that is $
0
how you get  4 look ahead   on first T

and  look ahead of E is  $ only
0
i got  $
i don't know how they  find lookahead
0
The answer I got is 1 only considering the look ahead to be $ . but in the solution of the test series they have given that there are 4 look aheads

So which one is correct?
0
1 is the right ans

if given ans is right then please explain ,how?
0

There are 4 look-aheads.

1 from E->.T ($)

next one is again we are calling E->.E+T

hence again E->.T, but here first of next of E = + hence we got (+)

from T->.T*E next time we can get (*)

from T->.T-F next time we can get (-)

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,666 questions
56,167 answers
193,841 comments
94,042 users