Each rule includes a symbol on the left side, followed by an arrow, followed by a sequence of symbols and atoms on the right side. If the same symbol can expand to one of several sequences, you can list those sequences on the right side, separated by vertical bars, or you can simply write several rules with the same left-side symbol.
Symbols (nonterminals) and atoms (terminals) are both made of sequences of letters and digits. Any sequence of capital letters represents a symbol (and all symbols have only capital letters).
You may optionally use a dash ('-') to indicate nothing on the right-hand side of a production. If you do this, then it must be the only thing listed.
White space is not important. In particular, you can break a rule across several lines.
For comments, the program ignores all letters on the line following a sharp sign (`#').