The figurative language that is used in lines 1-4 in the walrus and the carpenter is personification. The sun and the moon have been personified. Human feelings are expressed by the conversation of inanimate objects like the sun and moon and the walrus and the carpenter.