I am not able to convert the following language to a Context Free Grammar. The major problem is how to pump both "sides" of the word to obtain same number of 0s and 1s, but, without creating a series of 01010101.
$$L=\{0^{r_1}1^{s_1}0^{s_2}1^{r_2}\mid r_1+r_2 = s_1 + s_2,\ \ r_1,r_2,s_1,s_2 > 0\}$$
Can someone explain a solution to me?
the word
is not restricted to terminal symbols. $\endgroup$