1 1 vote Consider the following grammar: Prog → {S} S→ Prog X; | Y = z; X →ϵ |S Prog Y → SZ Z→id Determine follow(S) from the above grammar. (A) { } , id} (B) { }, ϵ , id} (C) { },{ id} (D ) { },{ id,ϵ } Compiler Design compiler-design first-and-follow + – Ayushhh_ 481 views answer comment Share Follow Print See 1 comment 1 1 comment reply Omkar_patil commented Jun 24, 2024 reply Follow flag (C) Follow(S) => { }, {, id } 0 0 replyShare Please log in or register to add a comment.
5 5 votes To find Follow(S), mark where is 'S' in given Productions : Prog → {S} S→ Prog X; | Y = Z; X →ϵ |S Prog Y → SZ Z→id Follow(S) = '}' $\cup$ First(Prog) $\cup$ First(Z) = '}' $\cup$ '{' $\cup$ 'id' Follow(S) = { }, {, id }Option C is Correct Answer. Bhaskar_Saini answered Jun 23, 2024 Bhaskar_Saini comment Share Follow 0 reply Please log in or register to add a comment.