title: ANTLR - NoViableAltException
body: <p>I'm trying to learn ANTLR by writing a grammer (I'm using eclipse with the plugins for ANTLR), and it was going alright until I ran into the error:</p>
  
  <pre><code>NoViableAltException: line 0:-1 no viable alternative at input '&lt;EOF&gt;'
  </code></pre>
  
  <p>When I try to test my args parser rule;</p>
  
  <pre><code>typedident  :   (INT|CHAR) IDENT;
  
  args    :   (typedident ( COMMA typedident)*)?;
  </code></pre>
  
  <p>An ident is a letter followed by any character, this works, I've tested it. typedident also works for the test.</p>
  
  <p>I'm using the input of <code>int a12q2efwe, char a12eqdsf</code> (totally random) and the tree appears fine in the interpreter, the only problem is that args has four branches instead of 3, typedident, comma, typedident and then the error in the last one.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks.</p>