Consider the context free grammar:$$S \rightarrow aSb \mid aSa \mid bSa \mid bSb \mid \varepsilon$$It could generate regular language, which means it can be converted to a right linear grammar. Is there a general rule to convert CFG into a RLG? If there is no general rule, could you please show me how to convert this CFG to a RLG?
How to convert a context free grammar (could generate regular language) to a right-linear grammar
regular languages;context free;formal grammars