Operator precedences are specified using precedence declarations. The syntax is:
The integer associated with a precedence declaration is the precedence level of an operator. The higher the level of an operator, the lower its precedence.
For example, the following set of precedences are used in the Prop language parser:
left: 23 "as"; left: 22 "::"; left: 21 "||"; left: 20 "equiv:"; left: 19 "xor:"; left: 18 "implies:"; left: 17 "&&" "and"; right: 16 "|=" "&=" "^=" "<<=" ">>="; right: 15 '=' ":=" "+=" "-=" "*=" "/=" "%="; left: 14 '|'; left: 13 ':'; left: 12 ';'; left: 11 '^'; left: 10 '&'; left: 9 "==" "!="; left: 8 '<' '>' ">=" "<="; left: 7 "<<" ">>"; left: 6 '+' '-' "with" "less"; left: 5 '*' '/' '%'; left: 4 "++" "--"; left: 3 '!' '~' "arb" "card" "dom" "ran"; left: 2 '[' ']' '{' '}' '.' "->" ;