title: CFG: Why is this grammar ambiguous?
body: <p>The grammar is as follows.</p>
  
  <pre><code>S -&gt; SS' | a | b
  S' -&gt; a | b
  </code></pre>
  
  <p>The way I understand it, derivations from this grammar will be like <code>SS'S'S'S'... (0 or more S')</code>, where each <code>S</code> or <code>S'</code> will generate <code>a</code> or <code>b</code>.</p>
  
  <p>Can someone provide an example that shows this grammar is ambiguous? (The solution says it is.)</p>