A Survey of Machine-Readable Code of Regulations and Its Applications on Machine Learning with a Focus on Generative AI