title: BNF grammar associativity
body: <p>I'm trying to understand how left and right associative grammars work and I need a little help. So I decided to come up an example and ask for some clarification.
  Basically, I want to create a grammar for two logical operations: <code>and</code> + <code>implication</code>. I want to make it so <code>and</code> is left associative and <code>implication</code> is right associative. This is what I got so far. Is this correct? I feel like it might be ambiguous. (I also kept in mind that <code>and</code> has higher precedence than <code>implication</code>)</p>
  
  <pre><code>&lt;exp&gt; := &lt;and&gt;
  &lt;and&gt; := &lt;impl&gt; | &lt;and&gt; ^ &lt;impl&gt;
  &lt;impl&gt; := &lt;term&gt; | &lt;term&gt; -&gt; &lt;impl&gt;
  &lt;term&gt; := (&lt;exp&gt;) | &lt;bool&gt;
  &lt;bool&gt; := true | false
  </code></pre>