I am not really good at generating grammars, because I find it very hard to come up with rules. However, after a lot of trial and error, this is what I could generate:
A={a,b} Vt={a,b} Vn={S,A,B} R= S->BS S->AS S->e A->a B->b
was this the correct way? if no, what could be improved? thank you!