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

asked in Compiler Design by Boss (11.9k points) | 78 views
0

.....

0
didn't get you what you are saying.. could you please elaborate further.
+1
Thanks i got it now ! Actually i was interpreting the production wrongly based on string derivation !

1 Answer

+3 votes
Best answer
S` - > .S, dollar
S - > .Aa, dollar [Because of .S] ---------------------1
A  - > .Ab, a [Because of A at 1, and lookahead symbol will be first ( a, dollar) i.e a] ------ 2
A - > .c, a [Because of A at 1, and lookahead symbol will be first ( a, dollar ) i.e a]
A -> .Ab,b [Because of A at 2, and lookahead symbol will be first ( b, a ) i.e b]
A -> .c, b [Because of A at 2, and lookahead symbol will be first ( b, a ) i.e b]

So we can also write it as

S` -> .S, dollar
S -> .Aa, dollar
A - > .Ab, a/b
A - > .c, a/b

Option c is correct here
answered by Loyal (7.7k points)
selected by

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

44,087 questions
49,595 answers
162,959 comments
65,791 users