Extended BNF
Optional constructs written as [ x ]
Zero or more of x written as { x }
Choice (or) written using |
Grouping with parentheses ( x | y ) as in { (x | y ) z }
<expression> ::= <term> { (+ | -) <term> }
<term> ::= <factor> { (* | /) <factor> }
<factor> ::= ( <expression> ) | name | number