splitting scanner from lexer