Here is the grammar,
S -> A | B
A -> 0000A | epsilon
B -> 000B | epsilon
I thought the regular expression for above is
0000(0000)*000(000)*
// because 0000 and 000 will be spotted at least once.
Is this correct ?
Some people said me that, this grammar is ambiguous. any one can explain this to me why?