The Gateway to Computer Science Excellence
+1 vote
216 views
Find the closure of S $\rightarrow$ .A ,dollar for the grammar

S --> A

A --> AB | $\varepsilon$

B --> aB | b
 

// I'm getting
S --> .A , dollar

A --> .AB, dollar

A --> . $\varepsilon$ , a,b
in Compiler Design by Boss (12.1k points)
edited by | 216 views
+1

S--->.A, $

A--->.AB, $

         /.ϵ, $

A--->.AB, a/b

        /.ϵ, a/b

0

So you're saying that in A--->.AB, lookaheads will be { $, a, b} ?

0
yes..
0
can you elaborate in detail please ? @joshi_nitish
+3

S--->.A, $

A--->.AB, $

         /.ϵ, $   

upto above you might be clear...now,

in A--->.AB, \$  dot(.) is before A you have to write productions of 'A' and his time new lookaheads will be first(B$) i.e a,b...

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,741 questions
57,251 answers
198,060 comments
104,693 users