give a context-free grammar describing the language L={w∈{a,b}∗∣w is of the form xby, where |x|>|y|}.
I had one solution like this
S -> AYCbY|AYbY|YCbY
A->aB|bB
B->aB|bB|_
C->aD|bD
D->aD|bD|_
Y->aY|bY|_
but it was complaining that it accepts the language babbabaaaaa which is not belonging to the language. Anyone knows how to solve this? and I have no idea how it produces babbabaaaaa, if each time both Ys follows the same rule.