Most compilers can produce a source listing of the program being compiled. This listing is usually just a copy of the source file, perhaps embellished with line numbers and page breaks. Assume you are to produce a pretty printed listing.
(a) How would you modify a Lex scanner specification to produce a pretty printed listing?
(b) How are compiler diagnostics and line numbering complicated when a pretty printed listing is produced?