computer science

profileCurlyK

Show an example of why the following grammar is Ambiguous.

<program>           -> <stmts>

<stmts>               -> <stmts> ; <stmts> | <assignment>

<assignment>       -> <var> = <expr>

<var>                   -> a | b | c | d

<expr>                 -> <term> + <term> | <term> - <term>

<term>                 -> <var> | const

    • 9 years ago
    • 5
    Answer(0)
    Bids(0)