Refactor and extract exception supertype to suit Syntactic, Semantic and
Lexical exceptions.