It should work if you define the expressions like this:
exp: exp '+' exp { .. }
exp '-' exp { .. }
exp '*' exp { .. }
exp '/' exp { .. }
| literal_exp { .. }
| ID { .. }
The precedence only works when the operators are present as terminals in the rule.
See the documentation on How precedence works:
each rule gets its precedence from the last terminal symbol mentioned in the components
Your rule for exp has no terminals, hence no precedence is applied.