20 votes 20 votes Consider the following grammar: $P\rightarrow xQRS$ $Q\rightarrow yz\mid z$ $R\rightarrow w\mid \varepsilon$ $S\rightarrow y$ What is FOLLOW($Q$)? $\left \{ R \right \}$ $\left \{ w \right \}$ $\left \{ w,y \right \}$ $\left \{ w,\$ \right \}$ Compiler Design gatecse-2017-set1 compiler-design parsing easy + – Arjun asked Feb 14, 2017 • retagged Dec 30, 2023 by Hira Thakur Arjun 6.8k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 23 votes 23 votes Follow of $Q$ is first of $R$ so we get $\{w\}$ but since $R$ can be Null so we have to check first of $S$ which is $\{y\}$ so FOLLOW $Q=\{w,y\}$ Correct option (C) sriv_shubham answered Feb 14, 2017 • edited Dec 11, 2017 by kenzou sriv_shubham comment Share Follow See all 0 reply Please log in or register to add a comment.
9 votes 9 votes correct option is c. Arnabi answered Feb 14, 2017 Arnabi comment Share Follow See all 3 Comments See all 3 3 Comments reply suryaprakash commented Aug 22, 2017 reply Follow Share could u plz tell me how to insert a picture in this 1 votes 1 votes Sona Barman commented Dec 8, 2017 reply Follow Share Nice explanation. From this answer Follow set find rules can be verified. 0 votes 0 votes Neha24 commented Dec 30, 2023 reply Follow Share Nice Explanation :) 0 votes 0 votes Please log in or register to add a comment.
6 votes 6 votes First Follow P {x} {$} Q {y,z} {w,y} R {w,ε} {y} S {y} {$} Ans: (C) - {w,y} Avik10 answered Feb 14, 2017 Avik10 comment Share Follow See all 0 reply Please log in or register to add a comment.
5 votes 5 votes so C is ans. 2018 answered Mar 5, 2017 2018 comment Share Follow See all 0 reply Please log in or register to add a comment.