i have this question where I have to write a context free grammar for the following conditions using recursion method.
strings have equal numbers of x and y. For example your language will accept following strings xy, xyxy, xyxyxy, xxxyyy, xxyxyy, but will reject xyx, xxxyy, xxy, yyxxx, ... .
i come up with an answer S -> xSy| ySx |SS | e
But i am not sure if I did this right using recursion method.