title: ANTLR4 Error : Missing NEWLINE
body: <pre><code>grammar Hello;          
  prog:   stat+ EOF;
  stat:   expr NEWLINE    # printExpr 
  |   ID '=' expr NEWLINE # assign
  |   NEWLINE     # blank 
  |   STRING NEWLINE  # string
  ;
  expr:   expr (MUL|DIV) expr # opExpr
  |   expr (ADD|SUB) expr # opExpr
  |   expr AND expr # andExpr
  |   INT         # int
  |   ID          # id
  |   '(' expr ')'        # parens
  ;
  MUL:    '*';
  DIV:    '/';
  ADD:    '+';
  SUB:    '-';
  ID: [a-zA-Z]+[0-9a-zA-Z]*;
  NEWLINE : [\r\n] ;
  INT     : [0-9]+ ;
  AND :     '&amp;';
  WS  : [ \t\r\n]+ -&gt; skip;
  CM  : '//' ~[\r\n]* -&gt; skip;`
  </code></pre>
  
  <p>Can someone explain to me what is wrong with my code? This is my error :</p>
  
  <p><img src="https://i.stack.imgur.com/u9LbV.jpg" alt="error"></p>
  
  <p>Your help will be appreciated ! </p>