Lexer now takes a file pointer as an argument rather than a file name.