title: YACC grammar for arithmetic expressions, with no surrounding parentheses
body: <p>I want to write the rules for arithmetic expressions in YACC; where the following operations are defined:</p>
  
  <pre><code>+   -   *   /   ()
  </code></pre>
  
  <p>But, I don't want the statement to have surrounding parentheses. That is, <code>a+(b*c)</code> should have a matching rule but <code>(a+(b*c))</code> shouldn't.</p>
  
  <p>How can I achieve this?</p>
  
  <hr>
  
  <p>The motive:</p>
  
  <p>In my grammar I define a set like this: <code>(1,2,3,4)</code> and I want <code>(5)</code> to be treated as a 1-element set. The ambiguity causes a reduce/reduce conflict.</p>