For a context-free grammar, FOLLOW(A) is the set of terminals that can appear…

GATE · 1992 · CS · Question 2 subpartsModified — slightly modified from the official paper; see the solution

For a context-free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal A in some “sentential” form. We define two sets LFOLLOW(A) and RFOLLOW(A) by replacing the word “sentential” by “left sentential” and “right most sentential” respectively in the definition of FOLLOW(A). Which of the following statements is/are true?

  1. A.

    FOLLOW(A) and LFOLLOW(A) may be different.

  2. B.

    FOLLOW(A) and RFOLLOW(A) are always the same.

  3. C.

    All the three sets are identical.

  4. D.

    All the three sets are different.

Attempted by 3 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…