Return a table classifying terminals. Each terminal can either be an `opener', a `closer', or `neither'. (fn BNF)