title: Bison/Yacc Operator Precedence infix vs. prefix
body: <p>So I'm aware that using %left or %right can determine associativity and also precedence. Say,</p>
  
  <p>%left '*' '/'</p>
  
  <p>%left '+' '-'</p>
  
  <p>indicates that multiplication and division have more precedence than sum and subtraction. </p>
  
  <p>However, these are normally for infix operators, i.e. num op num. The problem I'm currently facing is that minus can be used as an infix operator and also as a prefix operator, and their precedence is different (prefix has greater precedence than infix). How would I declare it that way using %left if the token identified is essentially the same?</p>