These are the standard patterns for encoding precedence and associativity into an expresion grammar in (E)BNF.
<ADD_OP> ::= "+" | "-"
<MUL_OP> ::= "*" | "/"
<POWER_OP> ::= "^"
<NUMBER> ::= [0-9]+
/* Just for illustrative purposes, as this production can be left out. */
<expr> ::= <term>
/* A term is composed of a factor, so factor is parsed/produced first */
<term> ::= <term> <ADD_OP> <factor>
| <factor>
/* Left associative, so written as left recursive */
<factor> ::= <factor> <MUL_OP> <power>
| <power>
/* Right associative, so written as right recursive */
<power> ::= <unary> <POWER_OP> <power>
| <unary>
<unary> ::= "-" <primary>
| <primary>
/* The leaf nodes……or parenthesized expressions. */
<primary> ::= <NUMBER>
| "(" <expr> ")"