Hi,
I have an exam coming up soon, and im having problems understanding how to do left/rightmost derivations from my notes for some slightly complex grammars.
I can do it fine for simple grammars and strings e.g
Grammer:
S -> aAs | a
A -> AbA | SS | ba
and so i can derive: "S -> aAs" so there are no more non-terminals. This exam question is slighly more complex though.
Please could someone point me in the right direction for doing a leftmost derivation of that?
Thanks for any help
I have an exam coming up soon, and im having problems understanding how to do left/rightmost derivations from my notes for some slightly complex grammars.
I can do it fine for simple grammars and strings e.g
Grammer:
S -> aAs | a
A -> AbA | SS | ba
and so i can derive: "S -> aAs" so there are no more non-terminals. This exam question is slighly more complex though.

Please could someone point me in the right direction for doing a leftmost derivation of that?
Thanks for any help