An exercise in compiler implementation