Question 11424 – Compiler-Design
May 17, 2024Question 11460 – Compiler-Design
May 17, 2024Question 11444 – Compiler-Design
Consider the grammar
S --> AbBaCc |ε A --> aAb | ba B --> bBC | cb C --> cCa | ac
Find the first() of S
Correct Answer: A
Question 326 Explanation:
First(S) = First(A) ∪ {∊}
First(A) = {a,b}
∴ First(S) = {a,b} ∪ {∊}
= {a,b,∊}
First(A) = {a,b}
∴ First(S) = {a,b} ∪ {∊}
= {a,b,∊}
{a, b, ε}
{ε}
{a,ε}
{a,b,c,ε}
Subscribe
Login
0 Comments