Follow(S) comes as {(, ). $ }
So, do we count $ as terminal or not.
Could anyone please tell me, $ should be considered as terminal or not ?
** Although I think, I should not count it as a terminal because we do not put $ in the terminal set of CFG.
See here : https://en.wikipedia.org/wiki/Context-free_grammar#Example
$ is also marker to identify that parsing of string has been successfully completed.
Follow of S is {(, ). $ } Because S is a start Symbol and follow of start symbol is always $ . So no of terminals here are 3.
follow of S is {(, ). $ } & it is correct.
please give me a reference why you r considering $ as terminal ?
64.3k questions
77.9k answers
244k comments
80.0k users