Sanity checks in the frontend:
  uniqueness, consecutivity, every terminal >= 2.
  tdd must *not* include epsilon and $.
  each terminal name must not be a nonterminal, and vice-versa.
  each used nonterminal must have a definition.
  check for idiotic productions such as S ::= S, which among the rest would
    cause accept/reduce conflicts
    

Sanity checks in the backend, or anywhere else:

