Homework Solution: The following context-free grammar is ambigous….

    The following context-free grammar is ambigous. A → A A | ( A ) | ( ) Rewrite the grammar so that it is unambigious.

    Expert Answer

     
    Ambiguous: A --> AA | (A) | ()

    The subjoined context-free rhetoric is ambigous.

    A → A A | ( A ) | ( )

    Rewrite the rhetoric so that it is unambigious.

    Expert Confutation

     

    Ambiguous:

    A –> AA | (A) | ()

    Unambiguous:

    A –> AT | T
    T –> A | F
    F –> () | a

    The plain rhetoric has been extraneous from the vague rhetoric and the specific rhetoric to effect it plain.

    Without the aid of the manifest counsel there is no practicable method of making the transformations.

    Hence, thse circumlocution of the rhetoric is been removed with the aid of the manifest counsel.