Consider the Following Context Free Grammar (G) :- S → A B B → + A B | ε A → C…
PYQ UGC NET 2026
Consider the Following Context Free Grammar (G) :-
S → A B
B → + A B | ε
A → C D
D → * C D | ε
C → [ S ] | x
Variable = { S, A, B, C, D }
Terminals = { +, *, [, ], x }
What will be the FIRST(S) & FIRST(D)?
- A.
FIRST(S) = { +, [, x }; FIRST(D) = { +, * }
- B.
FIRST(S) = { [, ], x }; FIRST(D) = { +, ε }
- C.
FIRST(S) = { [, x }; FIRST(D) = { *, ε }
- D.
FIRST(S) = { [, x, ε }; FIRST(D) = { *, ε }
Attempted by 15 students.
Sign up free to check your answer
Sign up freeLoading lesson…

