...
Question 11788 – Compiler-Design
May 17, 2024
Question 12384 – Compiler-Design
May 17, 2024
Question 11788 – Compiler-Design
May 17, 2024
Question 12384 – Compiler-Design
May 17, 2024

Question 11791 – Compiler-Design

Consider the grammar
S→AS/b A→SA / a then Closure (S’→.S,$) is:

Correct Answer: A

Question 343 Explanation: 
The given grammar is
S → AS|b
A → SA|a
Now closure for S →.S, $,
S’ → .S, $
S → .AS|.b, $
A → .SA|.a, a|b
S → .AS|.b, a|b

S → .S, $
S → .AS|.b, $|a|b
A → .SA|.a, a|b
A
S1→.S,$
S→.AS,$ / a/b
S→.b,$/a/b
A→.SA, a/b
A→.a,a /b
B
S1→.S,$
S→.AS,$ s/ b
S→.b,$ / b
C
S1→.S,$
S→.AS,$ / a/b
S→.AS,$ / a/b
S→.b,$ / a/b
D
S1→.S,$
S→.AS,$
S→.b,$
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!