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 }

Find the Follow (A) & Follow (C).

  1. A.

    Follow (A) = { ], $ }; Follow (C) = { +, ], $ }

  2. B.

    Follow (A) = { +, ], $ }; Follow (C) = { *, +, ], $ }

  3. C.

    Follow (A) = { *, $, [ }; Follow (C) = { *, [, $ }

  4. D.

    Follow (A) = { *, ], $ }; Follow (C) = { +, ], $ }

Attempted by 16 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…