fixed inconsistencies between dos and unix line-ending matching in lexer and pretty-printer