Refactoring grammar/scanner to support more-focused type signature parsing