Online automatic code generation for robot swarms: LLMs and self-organizing hierarchy