title: proving that a grammar is LL(1)
body: <p>I'm given the following grammar :</p>
  
  <pre><code>S -&gt; A a A b | B b B a
  A -&gt; epsilon
  B -&gt; epsilon
  </code></pre>
  
  <p>I know that it's obvious that it's LL(1), but I'm facing troubles constructing the parsing table.. I followed the algorithm word by word to find the first and follow of each non-terminal , correct me if I'm wrong:</p>
  
  <pre><code>First(S) = {a,b}
  First(A) = First(B) = epsilon
  
  Follow(S) = {$}
  Follow(A) = {a,b}
  Follow(B) = {a,b}
  </code></pre>
  
  <p>when I construct the parsing table, according to the algorithm, I get a conflict under the $ symbol... what the hell am I doing wrong??</p>
  
  <pre><code>     a       b      $
   A                   A-&gt; epsilon
   B                   B-&gt; epsilon
   S                   S -&gt; AaAb
                       S -&gt; BbBa
  </code></pre>
  
  <p>is it ok if I get 2 productions under $ or something?? or am I constructing the parsing table wrong? please help I'm new to the compiler course</p>