Consider the grammar G: ({S, A}, {a, b}, {P, S}) where p consists of: S → aAs | a A → sbA | ss | ba Draw a parse tree for the string aabbaa and left most derivations.



Consider the grammar G: ({S, A}, {a, b}, {P, S}) where p consists of:
S → aAs | a
A → sbA | ss | ba
Draw a parse tree for the string aabbaa and left most derivations.
Left most derivation:
S aAs
asbAs
aabAs
aabbas
aabbaa
For above derivation the sentential form will be S *¦⇒ aabbaa. 

Parse tree:

No comments

Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....

Theme images by ideabug. Powered by Blogger.