title: ANTLR mismatched input '<EOF>'
body: <p>Given the following ANTLR 4.1 grammar, with one line intentionally commented out ...</p>
  
  <pre><code>grammar Foobar;
  
  //whyDoesThisRuleHelp : expression ;
  expression : operand | binaryOperation ;
  binaryOperation : operand WS BINARY_OPERATOR WS expression ;
  operand : LETTER ;
  
  BINARY_OPERATOR : 'EQ' ;
  LETTER : [a-z] ;
  WS : [ \n]+ ;
  </code></pre>
  
  <p>.. why does <code>echo -n "a EQ b" | grun Foobar expression</code> produce</p>
  
  <pre><code>line 1:6 mismatched input '&lt;EOF&gt;' expecting WS
  </code></pre>
  
  <p>.. <strong>but if we uncomment</strong> the <code>block : expression ;</code> line above then <code>grun</code> <strong>produces no errors</strong>?</p>