I did not understand how a unambiguous grammar is derived from a ambiguous grammar? Consider the example on site: Example. How was the grammar derived is confusing to me. <
From Wikipedia (on Recognizing ambiguous grammars):
Some ambiguous grammars can be converted into unambiguous grammars, but no general procedure for doing this is possible just as no algorithm exists for detecting ambiguous grammars.
In order to come up with the second grammar, you have to find a grammar that is