title: How do I label expression alternatives with same precedence level?
body: <p>With antlr4 I can label rule alternatives like this:</p>
  
  <pre><code>e : e '*' e # Mult
    | e '+' e # Add
    | INT # Int
    ;
  </code></pre>
  
  <p>From what I understand, in the rule above, Mult has higher precedence over Add because Mult comes before Add in the list of alternatives.</p>
  
  <p>So for instance, if I wrote:</p>
  
  <pre><code>e : e '*'       e # Mult
    | e ('+'|'-') e # Add
    | INT # Int
    ;
  </code></pre>
  
  <p>The <code>+</code> in <code>1 + 2</code> and <code>-</code> in <code>4 - 2</code> have the same precedence.
  However, now the alternative is not in the top level. Is there a way I can label the rules <code>e '+' e # Add</code> and <code>e '-' e #Sub</code> separately while still having both alternatives have same precedence level?</p>