Given the grammar
<expr> -> <term> {( + | - ) <term>} <term> -> <factor> {( * | / ) <factor>} <factor> -> <exp> { ** <exp>} <exp> -> (<expr>) | <id> <id> = (A | B | C | D | E)
leftmost derivation of
A**B + (B * C)
<<exp>r>
<term> + <term>
<term> + <term>
<factor> + <term>
<exp> ** <exp> + <term>
<id> ** <exp> + <term>
A ** <exp> + <term>
A ** <id> + <term>
A ** B + <term>
A ** B + <factor>
A ** B + <exp>
A ** B + (<<exp>r>)
A ** B + (<term>)
A ** B + (<factor> * <factor>)
A ** B + (<exp> * <factor>)
A ** B + (<id> * <factor>)
A ** B + (B * <factor>)
A ** B + (B * <exp>)
A ** B + (B * <id>)
A ** B + (B * C)]
Get Answers For Free
Most questions answered within 1 hours.