1. 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

2. Thank you very much

Page 2 of 2 First 12