Kind of off topic, but you can pretty easily break down the grammar into subgrammars that you can analyze indepedently.
Firstly, the E
rule only appears in one place on the RHS, so you can trivially substitute it and get rid of it by making the S
rule S→A|C|Z
. Each of those non-terminals leads to an indepedent sublanguage (language A consisting of just the rules for A
and B
, language C with just C
and D
, and language Z with just Z
. Your language G is just the union of these three sublanguages.
Langauge A is trivially regular (due to all the non-terminals being at the end of the RHS of rules), and can be trivially transoformed into a 2 state E-NFA, which reduces to regexp (0|011*10)*
Language C similarly reduces to the regexp (1|100*01)*
Language Z is the only non-regular subpart and is the language { 0i1i | i ≥ 0 }
The union of these three is language G and doesn't really have any particularly good way of describing it other than the grammar.