enum generator grammar and model