monadic Lexer and tracking line number