I am trying to find a context free grammar for the language$L = \{xy \mid |x|=|y| \text{ and } xy^R\}$ where $y^R$ is the reverse of string y and $x, y\in \{a,b\}^*$ . Here is a possible solution:$G=\{V,,R,S\}$where$V=\{A,B,a,b\}$$=\{a,b\}$$R=\{S\rightarrow aSa|bSb|aBb|bBa,$   $\ \ \ \ \ \ \ \ \ \ B\rightarrow aBa|bBb|aBb|bBa\}$Is this correct?  I found a similar problem here.
A context free grammar for the language of even-length non-palindromes
formal languages;context free;formal grammars