Lexer: parsing tokens from input file