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 aftercited context-free expression is ambigous.

    A → A A | ( A ) | ( )

    Rewrite the expression so that it is unambigious.

    Expert Tally

     

    Ambiguous:

    A –> AA | (A) | ()

    Unambiguous:

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

    The apparent expression has been superficial from the equivocal expression and the restricted expression to form it apparent.

    Without the succor of the visible counsel there is no practicable fashion of making the transformations.

    Hence, thse ambiguousness of the expression is been removed with the succor of the visible counsel.