Originally Posted by undefined I believe this is right; however, S -> ()S is unnecessary since you can always do
S => SS => (S)S => ()S
using just the other rules. So we have
S -> xS | yS | (S) | SS | E Actually, we can get even simpler.
S -> x | y | (S) | SS | E
Thank you very much