I'm writing a context-free grammar that I hope will be in Chomsky Normal Form, and I have two questions:
Can I use a single variable (a non-terminal) on the left-hand side of multiple rules?
Can I use a single variable (a non-terminal) twice on the right-hand side of a single rule?
For instance, is the following grammar properly in Chomsky Normal Form? Is it OK that I have two rules with $S$ on the left-hand side? Is it OK that I have $X$ twice on the right-hand side of the second rule?
$$S_0 \to S$$ $$S \to XX$$ $$S \to XZ$$ $$\vdots$$
|
, whatever the convention in your context is. Otherwise, this looks correct to me. $\endgroup$ – G. Bach Nov 15 '13 at 16:23