Which of the following statement(s) is/are TRUE while computing \(First \) and…

PYQ GATE 2025

Which of the following statement(s) is/are TRUE while computing FirstFirst and FollowFollow during top down parsing by a compiler?

  1. A.

    For a production 𝐴→𝜖,𝜖 𝐴 → 𝜖, 𝜖 will be added to 𝐹𝑖𝑟𝑠𝑡(𝐴)𝐹𝑖𝑟𝑠𝑡(𝐴).

  2. B.

    If there is any input right end marker, it will be added to 𝐹𝑖𝑟𝑠𝑡(𝑆)𝐹𝑖𝑟𝑠𝑡(𝑆), where SS is the start symbol.

  3. C.

    For a production 𝐴→𝜖,𝜖𝐴 → 𝜖, 𝜖 will be added to 𝐹𝑜𝑙𝑙𝑜𝑤(𝐴)𝐹𝑜𝑙𝑙𝑜𝑤(𝐴).

  4. D.

    If there is any input right end marker, it will be added to 𝐹𝑜𝑙𝑙𝑜𝑤(𝑆)𝐹𝑜𝑙𝑙𝑜𝑤(𝑆), where SS is the start symbol.

Attempted by 208 students.

Sign up free to check your answer

Sign up free

Explore the full course: Compiler Design

Loading lesson…