This question on context-free and regular grammars was unilaterally closed as off-topic and migrated to cs.stackexchange.com by one of the moderators; I should like to know why. We have a long history of answering questions in this area of mathematics — and it is mathematics — and we have a number of regulars who are competent to do so. We also have appropriate tags, two of which were used by the OP.
The author of the question flagged and requested it be migrated to Computer Science.
Although such questions are also on topic here, if the author requests migration, and the question is also on-topic on the requested target, I see no reason not to oblige.