By default, any non-virtual symbol that does not appear in the head of a
product is assumed to be a Terminal.
For larger grammars, this misses out of an opportunity to detect errors.
So allow a "$TERM" line to list terminals (that do no appear in
precedence lines). If any $TERM line is given, then generate error
if any symbol appears in a production but is not declared, either
as terminal or non-terminal.