Add enum parsing test and modify enum parsing rules