1 votes 1 votes Consider the following grammar G shown Below : S → abS | ScS | d | c The number of terminals in follow set of non-terminal S is ___________________ Is “$” symbol considered terminal? Compiler Design first-and-follow made-easy-test-series grammar + – vinay chauhan asked Dec 30, 2018 edited Mar 4, 2019 by Rishi yadav vinay chauhan 1.2k views answer comment Share Follow See all 10 Comments See all 10 10 Comments reply Shaik Masthan commented Dec 30, 2018 reply Follow Share it is a special terminal which is not belongs to the given input alphabet ! Due to that reason only " we append it at end of input string in input Buffer " and making Follow(start Terminal) consists '$'. 0 votes 0 votes vinay chauhan commented Dec 30, 2018 reply Follow Share So the answer should be 1 or 2? Do we have to take into account the special terminal? 0 votes 0 votes Shaik Masthan commented Dec 30, 2018 reply Follow Share i am not sure to count it or not 0 votes 0 votes Sayan Bose commented Dec 30, 2018 reply Follow Share Yes If you look at the LL(1) parsing table, it is considered as a terminal symbol 0 votes 0 votes vinay chauhan commented Dec 30, 2018 reply Follow Share I am not convinced, because questions some time mention terminal and non terminal explicitly but they never mention dollar as a terminal symbol. I have never seen it anywhere. 0 votes 0 votes Shaijal Tripathi commented Dec 30, 2018 reply Follow Share A terminal is a symbol that concludes a string expansion. Whereas a non terminal is a variable that will be replaced by some terminal subsequently. $ is the terminating symbol for every input string. It surely is a terminal. 1 votes 1 votes Shaik Masthan commented Dec 30, 2018 reply Follow Share it is surely a terminal, but doubt is " Is it COUNT or not " 0 votes 0 votes vinay chauhan commented Dec 30, 2018 reply Follow Share Yes, that is the doubt. 0 votes 0 votes Shaik Masthan commented Dec 30, 2018 reply Follow Share @vinay chauhan can you please type the question instead of screen shot ? 0 votes 0 votes vinay chauhan commented Dec 30, 2018 reply Follow Share It was quick so I took screenshot, didn't think that discuss will go this long. Will take care next time. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Answer is 2 because follow(S)={c,$) Mritunjay Ashish answered Sep 12, 2019 Mritunjay Ashish comment Share Follow See all 0 reply Please log in or register to add a comment.