Dear Prof. Parr,
I noticed that your UnderlineListener on page 156 is applied to only the parser. When I applied it to the lexer, it will not work, because unrecognized tokens cannot be cast to CommonTokenStream. But can we underline the offending token if it causes a lexer error? If yes, can you show us how? Thank you for your time and help.