I’m practicing for an upcoming exam and am being tripped up by a review problem. The problem gives the following grammar:
$ $ S \rightarrow AB$ $ $ $ $ A \rightarrow \epsilon | a | (T)$ $ $ $ T \rightarrow T, S | S$ $ $ $ B \rightarrow b$ $
As far as I can tell, the only nullable symbol is $ A$ . It is the only non-terminal whose production contains the null symbol $ \epsilon$ . I don’t think $ S$ , which contains $ A$ in it’s production, is a nullable symbol since the same production also contains $ B$ , which is not a nullable symbol, and both $ A$ and $ B$ would need to be nullable for $ S$ to also be nullable. Is $ A$ really the only nullable symbol in this grammar, or am I misinformed?
As for the first set, frankly, I’m just having trouble following my professor’s notes for creating the first set. Could anyone help here or point me to a good resource for this?
Thank you all so much.