From my recitation class, I have the following exercise:
$\mathrm{EXP} = 0 \mid 1 \mid b \mathrm{EXP} \mid \mathrm{EXP} a \mid \mathrm{EXP} m \mathrm{EXP}$
The above grammar is ambiguous.
Make an unambiguous grammar which produce same language as the above.
In the new grammar, $a$ has priority over $b$ and $b$ has priority over $m$. Also $m$ is associative.
Can you explain what the phrases
- "has priority over" and
- "$m$ is associative"
mean?